commit: e7a5afaf149495f07b95dc3d2a7441d3825a29f2 Author: Sam James <sam <AT> gentoo <DOT> org> AuthorDate: Sun Dec 14 11:46:57 2025 +0000 Commit: Sam James <sam <AT> gentoo <DOT> org> CommitDate: Sun Dec 14 11:47:30 2025 +0000 URL: https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=e7a5afaf
16.0.0: avoid triggering -fno-stack-protector on -foffload-options=* Bug: https://bugs.gentoo.org/965847 Bug: https://bugs.gentoo.org/965848 Signed-off-by: Sam James <sam <AT> gentoo.org> 16.0.0/gentoo/04_all_nossp-on-nostdlib.patch | 2 +- 16.0.0/gentoo/26_all_enable-cet.patch | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/16.0.0/gentoo/04_all_nossp-on-nostdlib.patch b/16.0.0/gentoo/04_all_nossp-on-nostdlib.patch index a0d2c07..412cb0a 100644 --- a/16.0.0/gentoo/04_all_nossp-on-nostdlib.patch +++ b/16.0.0/gentoo/04_all_nossp-on-nostdlib.patch @@ -8,7 +8,7 @@ https://bugs.gentoo.org/484714 #endif +#ifdef ENABLE_DEFAULT_SSP -+#define NO_SSP_SPEC "%{nostdlib|nodefaultlibs|ffreestanding|foffload*:-fno-stack-protector} -foffload-options=-fno-stack-protector " ++#define NO_SSP_SPEC "%{nostdlib|nodefaultlibs|ffreestanding|foffload=*:-fno-stack-protector} -foffload-options=-fno-stack-protector " +#else +#define NO_SSP_SPEC "" +#endif diff --git a/16.0.0/gentoo/26_all_enable-cet.patch b/16.0.0/gentoo/26_all_enable-cet.patch index bdddcc1..c1bc605 100644 --- a/16.0.0/gentoo/26_all_enable-cet.patch +++ b/16.0.0/gentoo/26_all_enable-cet.patch @@ -68,7 +68,7 @@ Only supported on amd64. + We use a new option (EXTRA_OPTIONS_CF) here to avoid turning + this on accidentally for other arches. */ +#if defined(EXTRA_OPTIONS_CF) && !defined(ACCEL_COMPILER) -+#define DEFAULT_FLAG_CF_SPEC " %{!m16:%{!m32:%{!fcf-protection*:%{!foffload*:%{!fno-cf-protection:-fcf-protection}}}}} -foffload-options=-fcf-protection=none" ++#define DEFAULT_FLAG_CF_SPEC " %{!m16:%{!m32:%{!fcf-protection*:%{!foffload=*:%{!fno-cf-protection:-fcf-protection}}}}} -foffload-options=-fcf-protection=none" +#endif +#ifndef DEFAULT_FLAG_CF_SPEC +#define DEFAULT_FLAG_CF_SPEC ""
