From f3840a6d621d682757070f84f001e7109cbddb63 Mon Sep 17 00:00:00 2001 From: Alfred Persson Forsberg Date: Thu, 9 Mar 2023 01:21:37 +0100 Subject: [PATCH] perl-module.eclass: Fix linking with ld.lld If LD is not specified then CCLD will be used as the linker. Setting CCLD to CC makes it correctly use LDFLAGS. Bug: https://bugs.gentoo.org/261375 Signed-off-by: Alfred Persson Forsberg --- eclass/perl-module.eclass | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/eclass/perl-module.eclass b/eclass/perl-module.eclass index d4f6bdc5191e3..867c15225789f 100644 --- a/eclass/perl-module.eclass +++ b/eclass/perl-module.eclass @@ -1,4 +1,4 @@ -# Copyright 1999-2022 Gentoo Authors +# Copyright 1999-2023 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 # @ECLASS: perl-module.eclass @@ -21,11 +21,11 @@ case ${EAPI} in 7) - inherit multiprocessing perl-functions + inherit multiprocessing perl-functions toolchain-funcs PERL_EXPF="src_prepare src_configure src_compile src_test src_install" ;; 8) - inherit multiprocessing perl-functions readme.gentoo-r1 + inherit multiprocessing perl-functions readme.gentoo-r1 toolchain-funcs PERL_EXPF="src_prepare src_configure src_compile src_test src_install" ;; *) @@ -209,6 +209,10 @@ perl-module_src_prepare() { perl-module_src_configure() { debug-print-function ${FUNCNAME} "$@" + # Perl runs LD with LDFLAGS + export CCLD=$(tc-getCC) + unset LD + perl_check_env perl_set_version