From 69d4cc312072ad28491d2dce5798dd49d63713e5 Mon Sep 17 00:00:00 2001 From: Sam James Date: Wed, 22 May 2024 02:40:06 +0100 Subject: [PATCH] perl-module.eclass: don't set 'ccflags' for Module::Build TL;DR: If we set 'ccflags', we're clobbering the Perl default. We're already setting 'optimize' which is what we're supposed to use here. We set ccflags *and* optimize for Module::Build (which dev-perl/Net-DNS uses), while we only set OPTIMIZE (case is fine) for MM (which dev-perl/Net-LibIDN2 uses). ccflags clobbers the Perl default, while optimize appends. We should just set optimize - to not clobber what Perl sets, but also for consistency between the two build systems). (Unfortunately, this does mean we also inherit things we don't really want to, which don't affect ABI, like -fno-strict-aliasing, but let's live with it for now...) Bug: https://bugs.gentoo.org/261375 Bug: https://bugs.gentoo.org/877659 Closes: https://bugs.gentoo.org/932176 Signed-off-by: Sam James --- eclass/perl-module.eclass | 1 - 1 file changed, 1 deletion(-) diff --git a/eclass/perl-module.eclass b/eclass/perl-module.eclass index f32c2c237d055..432d1ab315dd4 100644 --- a/eclass/perl-module.eclass +++ b/eclass/perl-module.eclass @@ -279,7 +279,6 @@ perl-module_src_configure() { --config ld="$(tc-getCC)" \ --config nm="$(tc-getNM)" \ --config ranlib="$(tc-getRANLIB)" \ - --config ccflags="${CFLAGS}" \ --config optimize="${CFLAGS}" \ --config ldflags="${LDFLAGS}" \ "${myconf_local[@]}"