commit: 12e4c095bcab11d29aa9808ec150c90437d9d950
Author: Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Mon May 5 15:44:33 2025 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Mon May 5 15:44:33 2025 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=12e4c095
toolchain.eclass: move hppa workaround to CC
... as it must always be passed whenever -specs is.
Signed-off-by: Sam James <sam <AT> gentoo.org>
eclass/toolchain.eclass | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)
diff --git a/eclass/toolchain.eclass b/eclass/toolchain.eclass
index a0085b22d659..b4a4124ce8fe 100644
--- a/eclass/toolchain.eclass
+++ b/eclass/toolchain.eclass
@@ -1139,6 +1139,15 @@ toolchain_setup_ada() {
! tc-is-cross-compiler && _toolchain_make_gnat_wrappers
export CC="$(tc-getCC) -specs=${T}/ada.spec"
+
+ if ver_test $(gcc-fullversion) -lt 13 && [[ ${CTARGET} == hppa* ]] ;
then
+ # For HPPA, the ada-bootstrap binaries seem to default
+ # to -fstack-protector still (maybe because of cross-building)
+ # so we need to override it for <13 (which ignores
-fstack-protector)
+ # as SSP doesn't exist there. The GNAT configure test gets
confused
+ # by GCC warning about this otherwise.
+ CC+=" -fno-stack-protector"
+ fi
}
# @FUNCTION: toolchain_setup_d
@@ -2345,15 +2354,6 @@ gcc_do_make() {
STAGE1_CFLAGS="-O2"
STAGE1_CXXFLAGS="-O2"
STAGE1_GDCFLAGS="-O2"
-
- if ver_test $(gcc-fullversion) -lt 13 && [[ ${CTARGET}
== hppa* ]] ; then
- # For HPPA, the ada-bootstrap binaries seem to
default
- # to -fstack-protector still (maybe because of
cross-building)
- # so we need to override it for <13 (which
ignores -fstack-protector)
- # as SSP doesn't exist there. The GNAT
configure test gets confused
- # by GCC warning about this otherwise.
- STAGE1_CFLAGS+=" -fno-stack-protector"
- fi
fi
# We only want to use the system's CFLAGS if not building a