commit: 7a041d6a2d430e983c796bb07e2dc678697912c9 Author: Sam James <sam <AT> gentoo <DOT> org> AuthorDate: Sun Dec 14 03:45:05 2025 +0000 Commit: Sam James <sam <AT> gentoo <DOT> org> CommitDate: Sun Dec 14 03:45:05 2025 +0000 URL: https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=7a041d6a
16.0.0: avoid passing -fcf-protection=* or -fstack-protector for offload 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 +- 16.0.0/gentoo/README.history | 2 ++ 3 files changed, 4 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 4462c0e..a0d2c07 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:-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 6d977cf..bdddcc1 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*:%{!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 "" diff --git a/16.0.0/gentoo/README.history b/16.0.0/gentoo/README.history index a964753..7f98f00 100644 --- a/16.0.0/gentoo/README.history +++ b/16.0.0/gentoo/README.history @@ -1,5 +1,7 @@ 27 ???? + U 04_all_nossp-on-nostdlib.patch + U 26_all_enable-cet.patch U 86_all_PR122456-pgo-workaround.patch 26 7 December 2025
