public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Sam James" <sam@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/gcc-patches:master commit in: 12.2.0/gentoo/
Date: Wed, 28 Dec 2022 19:35:48 +0000 (UTC)	[thread overview]
Message-ID: <1672250062.224f6241ec785ccc386eb191df36d919e9b62351.sam@gentoo> (raw)

commit:     224f6241ec785ccc386eb191df36d919e9b62351
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Wed Dec 28 17:54:22 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Wed Dec 28 17:54:22 2022 +0000
URL:        https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=224f6241

12.2.0: add patches for FORTIFY_SOURCE=3, default GLIBCXX_ASSERTIONS

Bug: https://bugs.gentoo.org/876895
Bug: https://bugs.gentoo.org/884417
Bug: https://bugs.gentoo.org/847148
Bug: https://bugs.gentoo.org/876893
Signed-off-by: Sam James <sam <AT> gentoo.org>

 12.2.0/gentoo/01_all_default-fortify-source.patch        |  8 ++++++--
 12.2.0/gentoo/15_all_DEF_GENTOO_GLIBCXX_ASSERTIONS.patch | 14 ++++++++++++++
 12.2.0/gentoo/README.history                             |  4 ++++
 3 files changed, 24 insertions(+), 2 deletions(-)

diff --git a/12.2.0/gentoo/01_all_default-fortify-source.patch b/12.2.0/gentoo/01_all_default-fortify-source.patch
index d9f001a..79d6639 100644
--- a/12.2.0/gentoo/01_all_default-fortify-source.patch
+++ b/12.2.0/gentoo/01_all_default-fortify-source.patch
@@ -7,14 +7,18 @@ initially Gentoo used too complicated macro.
 # DP: if the optimization level is > 0
 --- a/gcc/c-family/c-cppbuiltin.cc
 +++ b/gcc/c-family/c-cppbuiltin.cc
-@@ -1510,6 +1510,12 @@ c_cpp_builtins (cpp_reader *pfile)
+@@ -1510,6 +1510,16 @@ c_cpp_builtins (cpp_reader *pfile)
    builtin_define_with_value ("__REGISTER_PREFIX__", REGISTER_PREFIX, 0);
    builtin_define_with_value ("__USER_LABEL_PREFIX__", user_label_prefix, 0);
  
 +#if !defined(ACCEL_COMPILER)
++  #ifndef GENTOO_FORTIFY_SOURCE_LEVEL
++    #define GENTOO_FORTIFY_SOURCE_LEVEL 2
++  #endif
++
 +  /* Fortify Source enabled by default for optimization levels > 0 */
 +  if (optimize)
-+    builtin_define_with_int_value ("_FORTIFY_SOURCE", 2);
++    builtin_define_with_int_value ("_FORTIFY_SOURCE", GENTOO_FORTIFY_SOURCE_LEVEL);
 +#endif
 +
    /* Misc.  */

diff --git a/12.2.0/gentoo/15_all_DEF_GENTOO_GLIBCXX_ASSERTIONS.patch b/12.2.0/gentoo/15_all_DEF_GENTOO_GLIBCXX_ASSERTIONS.patch
new file mode 100644
index 0000000..2daf73b
--- /dev/null
+++ b/12.2.0/gentoo/15_all_DEF_GENTOO_GLIBCXX_ASSERTIONS.patch
@@ -0,0 +1,14 @@
+https://bugs.gentoo.org/876895
+--- a/gcc/c-family/c-cppbuiltin.cc
++++ b/gcc/c-family/c-cppbuiltin.cc
+@@ -957,6 +957,10 @@ c_cpp_builtins (cpp_reader *pfile)
+ 	  cpp_define (pfile, "__cpp_rtti=199711L");
+ 	}
+ 
++      #ifdef DEF_GENTOO_GLIBCXX_ASSERTIONS
++	  cpp_define (pfile, "_GLIBCXX_ASSERTIONS");
++      #endif
++
+       if (cxx_dialect >= cxx11)
+         cpp_define (pfile, "__GXX_EXPERIMENTAL_CXX0X__");
+ 

diff --git a/12.2.0/gentoo/README.history b/12.2.0/gentoo/README.history
index 29fd78e..713d788 100644
--- a/12.2.0/gentoo/README.history
+++ b/12.2.0/gentoo/README.history
@@ -1,3 +1,7 @@
+8		28 Dec 2022
+	U 01_all_default-fortify-source.patch
+	+ 15_all_DEF_GENTOO_GLIBCXX_ASSERTIONS.patch
+
 7		25 Dec 2022
 	- 78_all_Factor-out-jobserver_active_p.patch
 	- 79_all_lto-support-jobserver-style-fifo-for-recent-GNU-make.patch


             reply	other threads:[~2022-12-28 19:35 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-28 19:35 Sam James [this message]
  -- strict thread matches above, loose matches on Subject: below --
2023-04-23  2:41 [gentoo-commits] proj/gcc-patches:master commit in: 12.2.0/gentoo/ Sam James
2023-03-13 22:28 Sam James
2023-02-12  2:39 Sam James
2023-02-06 18:36 Sam James
2023-02-06 17:40 Sam James
2023-01-29  8:50 Sam James
2023-01-23  0:35 Sam James
2023-01-08  4:46 Sam James
2022-12-26  8:06 Sam James
2022-12-17  4:54 Sam James
2022-12-09 11:24 Sam James
2022-12-05  0:27 Sam James
2022-12-05  0:18 Andreas K. Hüttel
2022-11-20  0:25 Sam James
2022-08-22  1:41 Sam James
2022-08-22  1:41 Sam James

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1672250062.224f6241ec785ccc386eb191df36d919e9b62351.sam@gentoo \
    --to=sam@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox