commit: a3b3428e8a96ff4541f9193c2c70c6cb492bdc4c
Author: Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Mon May 5 15:31:43 2025 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Mon May 5 15:32:19 2025 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a3b3428e
toolchain.eclass: pass -fno-stack-protector for HPPA GNAT bootstrap
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.
Signed-off-by: Sam James <sam <AT> gentoo.org>
eclass/toolchain.eclass | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/eclass/toolchain.eclass b/eclass/toolchain.eclass
index 93d4792af4d6..a0085b22d659 100644
--- a/eclass/toolchain.eclass
+++ b/eclass/toolchain.eclass
@@ -2345,6 +2345,15 @@ 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