commit: fd01685ece15afd0a2f85471637a719002d46495
Author: Andrei Horodniceanu <a.horodniceanu <AT> proton <DOT> me>
AuthorDate: Fri Oct 4 03:57:10 2024 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Mon Oct 7 04:12:41 2024 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=fd01685e
toolchain.eclass: also clear GDCFLAGS when cross-compiling
sys-devel/gcc[d] uses GDCFLAGS when compiling the D parts. GDCFLAGS is
also used by ::dlang in a similar manner. The overlay suggests putting
in the variable similar values to CFLAGS so it's possible that it will
contain -march=native.
Because of this, add GDCFLAGS to the list of *FLAGS that are reset to
something that is understood by both the build and the host system when
cross-compiling.
Signed-off-by: Andrei Horodniceanu <a.horodniceanu <AT> proton.me>
Signed-off-by: Sam James <sam <AT> gentoo.org>
eclass/toolchain.eclass | 1 +
1 file changed, 1 insertion(+)
diff --git a/eclass/toolchain.eclass b/eclass/toolchain.eclass
index 5b978f6871db..0d46d6f3a799 100644
--- a/eclass/toolchain.eclass
+++ b/eclass/toolchain.eclass
@@ -1948,6 +1948,7 @@ gcc_do_filter_flags() {
CFLAGS="-O2 -pipe"
FFLAGS=${CFLAGS}
FCFLAGS=${CFLAGS}
+ GDCFLAGS=${CFLAGS}
# "hppa2.0-unknown-linux-gnu" -> hppa2_0_unknown_linux_gnu
local VAR="CFLAGS_"${CTARGET//[-.]/_}