commit:     15daf0510a5fab17cd556261d688a6618391a0c1
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sun Jan 22 08:35:13 2023 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Mon Jan 23 00:35:20 2023 +0000
URL:        https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=15daf051

11.4.0: drop 26_all_enable-cet.patch (bootstrapping issues with PGO/LTO?)

See https://bugs.gentoo.org/891655#c2 in particular:
"""
In https://bugs.gentoo.org/822036#c14, I got fed up and changed to the 
Ubuntu-style
specs patching for the time being, because it was too fragile otherwise.

We should probably just drop the CET patch for 11.x. We can keep the USE in
make.defaults for CET on hardened profiles though, as support for it is still 
useful, but it'll only be on by default with 12.

I do want to revisit the specs patch later on as it's not very maintainable 
though.
"""

11.x is really not the place we want to experiment further at this point,
so go for the safe option and either develop the approach further for 12
or maybe even 13.

Arsen notes that we might be able to try --enable-cet=yes (rather than
default auto) but let's leave that for now given ^ wrt 11.

Bug: https://bugs.gentoo.org/822036
Closes: https://bugs.gentoo.org/891655
Signed-off-by: Sam James <sam <AT> gentoo.org>

 11.4.0/gentoo/26_all_enable-cet.patch | 48 -----------------------------------
 11.4.0/gentoo/README.history          |  3 +++
 2 files changed, 3 insertions(+), 48 deletions(-)

diff --git a/11.4.0/gentoo/26_all_enable-cet.patch 
b/11.4.0/gentoo/26_all_enable-cet.patch
deleted file mode 100644
index 75f9c8b..0000000
--- a/11.4.0/gentoo/26_all_enable-cet.patch
+++ /dev/null
@@ -1,48 +0,0 @@
-From 83efc6ce009021f27b602c1dfcf65338f761b095 Mon Sep 17 00:00:00 2001
-From: Sam James <s...@gentoo.org>
-Date: Tue, 28 Dec 2021 03:42:53 +0000
-Subject: [PATCH] Enable CET (-fcf-protection=full) by default
-
-Needs:
-- CET to be enabled for GCC
-- -DEXTRA_OPTIONS_CF to be passed during build (via toolchain.eclass).
-
-  Only supported on amd64.
-
---- a/gcc/config/i386/i386-options.c
-+++ b/gcc/config/i386/i386-options.c
-@@ -3049,6 +3049,9 @@ ix86_option_override_internal (bool main_args_p,
-         = build_target_option_node (opts, opts_set);
-     }
- 
-+  if (TARGET_64BIT && TARGET_CMOV)
-+    SET_OPTION_IF_UNSET (opts, opts_set, flag_cf_protection, DEFAULT_FLAG_CF);
-+
-   if (opts->x_flag_cf_protection != CF_NONE)
-     {
-       if ((opts->x_flag_cf_protection & CF_BRANCH) == CF_BRANCH
---- a/gcc/defaults.h
-+++ b/gcc/defaults.h
-@@ -1463,6 +1463,19 @@ see the files COPYING3 and COPYING.RUNTIME 
respectively.  If not, see
- #define DEFAULT_FLAG_SCP 0
- #endif
- 
-+/* Default value for flag_cf_protection when flag_cf_protection is
-+   initialized to CF_FULL.
-+
-+   We use a new option (EXTRA_OPTIONS_CF) here to avoid turning
-+   this on accidentally for other arches. */
-+#ifdef EXTRA_OPTIONS_CF
-+#define DEFAULT_FLAG_CF CF_FULL
-+#endif
-+#ifndef DEFAULT_FLAG_CF
-+#define DEFAULT_FLAG_CF CF_NONE
-+#endif
-+
-+
- /* By default, the C++ compiler will use function addresses in the
-    vtable entries.  Setting this nonzero tells the compiler to use
-    function descriptors instead.  The value of this macro says how
--- 
-2.34.1
-

diff --git a/11.4.0/gentoo/README.history b/11.4.0/gentoo/README.history
index e29c262..1f5565d 100644
--- a/11.4.0/gentoo/README.history
+++ b/11.4.0/gentoo/README.history
@@ -1,3 +1,6 @@
+7              22 Jan 2022
+       - 26_all_enable-cet.patch
+
 6              7 Jan 2022
        - 77_all_configure-c89.patch
 

Reply via email to