Skip to content

Commit

Permalink
perl-module.eclass: Fix linking with ld.lld
Browse files Browse the repository at this point in the history
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 <cat@catcream.org>
  • Loading branch information
alfredfo committed Mar 9, 2023
1 parent 9498cb6 commit f3840a6
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions 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
Expand All @@ -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"
;;
*)
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit f3840a6

Please sign in to comment.