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
Closes: https://bugs.gentoo.org/882373
Closes: https://bugs.gentoo.org/894608
Signed-off-by: Alfred Persson Forsberg <[email protected]>
Closes: gentoo#30009
Signed-off-by: Sam James <[email protected]>
  • Loading branch information
alfredfo authored and thesamesam committed Mar 11, 2023
1 parent ca0845b commit 6eb964b
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions eclass/perl-module.eclass
Original file line number Diff line number Diff line change
@@ -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 6eb964b

Please sign in to comment.