public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] proj/gcc-patches:master commit in: 9.3.0/gentoo/
@ 2021-12-18 22:00 Sam James
  0 siblings, 0 replies; 12+ messages in thread
From: Sam James @ 2021-12-18 22:00 UTC (permalink / raw
  To: gentoo-commits

commit:     030174db141cce9adcdbb3ba40231663aeae7145
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Fri Dec 17 02:16:35 2021 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sat Dec 18 22:00:28 2021 +0000
URL:        https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=030174db

9.3.0: add cyclades patch, cut 5 patchset

Needed gnat-gpl-2020.

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

 9.3.0/gentoo/75_all_remove_cyclades.patch | 127 ++++++++++++++++++++++++++++++
 9.3.0/gentoo/README.history               |   3 +-
 2 files changed, 129 insertions(+), 1 deletion(-)

diff --git a/9.3.0/gentoo/75_all_remove_cyclades.patch b/9.3.0/gentoo/75_all_remove_cyclades.patch
new file mode 100644
index 0000000..57d5043
--- /dev/null
+++ b/9.3.0/gentoo/75_all_remove_cyclades.patch
@@ -0,0 +1,127 @@
+https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=f45fc759ee4bac87fcdb6bc790a221205aa3eb5a
+https://bugs.gentoo.org/829141
+
+Needed for gnat-gpl-2020.
+
+From 2b40941d23b1570cdd90083b58fa0f66aa58c86e Mon Sep 17 00:00:00 2001
+From: Tamar Christina <tamar.christina@arm.com>
+Date: Fri, 21 May 2021 12:16:56 +0100
+Subject: [PATCH 1/1] libsanitizer: Remove cyclades from libsanitizer
+
+The Linux kernel has removed the interface to cyclades from
+the latest kernel headers[1] due to them being orphaned for the
+past 13 years.
+
+libsanitizer uses this header when compiling against glibc, but
+glibcs itself doesn't seem to have any references to cyclades.
+
+Further more it seems that the driver is broken in the kernel and
+the firmware doesn't seem to be available anymore.
+
+As such since this is breaking the build of libsanitizer (and so the
+GCC bootstrap[2]) I propose to remove this.
+
+[1] https://lkml.org/lkml/2021/3/2/153
+[2] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100379
+
+libsanitizer/ChangeLog:
+
+	PR sanitizer/100379
+	* sanitizer_common/sanitizer_common_interceptors_ioctl.inc: Cherry-pick
+	llvm-project revision f7c5351552387bd43f6ca3631016d7f0dfe0f135.
+	* sanitizer_common/sanitizer_platform_limits_posix.cc: Likewise.
+	* sanitizer_common/sanitizer_platform_limits_posix.h: Likewise.
+---
+ .../sanitizer_common_interceptors_ioctl.inc           |  9 ---------
+ .../sanitizer_platform_limits_posix.cc                | 11 -----------
+ .../sanitizer_platform_limits_posix.h                 | 10 ----------
+ 3 files changed, 30 deletions(-)
+
+diff --git a/libsanitizer/sanitizer_common/sanitizer_common_interceptors_ioctl.inc b/libsanitizer/sanitizer_common/sanitizer_common_interceptors_ioctl.inc
+index 5408ea17c59..7a9cd3f5968 100644
+--- a/libsanitizer/sanitizer_common/sanitizer_common_interceptors_ioctl.inc
++++ b/libsanitizer/sanitizer_common/sanitizer_common_interceptors_ioctl.inc
+@@ -365,15 +365,6 @@ static void ioctl_table_fill() {
+ 
+ #if SANITIZER_LINUX && !SANITIZER_ANDROID
+   // _(SIOCDEVPLIP, WRITE, struct_ifreq_sz); // the same as EQL_ENSLAVE
+-  _(CYGETDEFTHRESH, WRITE, sizeof(int));
+-  _(CYGETDEFTIMEOUT, WRITE, sizeof(int));
+-  _(CYGETMON, WRITE, struct_cyclades_monitor_sz);
+-  _(CYGETTHRESH, WRITE, sizeof(int));
+-  _(CYGETTIMEOUT, WRITE, sizeof(int));
+-  _(CYSETDEFTHRESH, NONE, 0);
+-  _(CYSETDEFTIMEOUT, NONE, 0);
+-  _(CYSETTHRESH, NONE, 0);
+-  _(CYSETTIMEOUT, NONE, 0);
+   _(EQL_EMANCIPATE, WRITE, struct_ifreq_sz);
+   _(EQL_ENSLAVE, WRITE, struct_ifreq_sz);
+   _(EQL_GETMASTRCFG, WRITE, struct_ifreq_sz);
+diff --git a/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc b/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc
+index d823a12190c..e8fce8a0287 100644
+--- a/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc
++++ b/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc
+@@ -157,7 +157,6 @@ typedef struct user_fpregs elf_fpregset_t;
+ # include <sys/procfs.h>
+ #endif
+ #include <sys/user.h>
+-#include <linux/cyclades.h>
+ #include <linux/if_eql.h>
+ #include <linux/if_plip.h>
+ #include <linux/lp.h>
+@@ -466,7 +465,6 @@ unsigned struct_ElfW_Phdr_sz = sizeof(Elf_Phdr);
+ 
+ #if SANITIZER_LINUX && !SANITIZER_ANDROID
+   unsigned struct_ax25_parms_struct_sz = sizeof(struct ax25_parms_struct);
+-  unsigned struct_cyclades_monitor_sz = sizeof(struct cyclades_monitor);
+ #if EV_VERSION > (0x010000)
+   unsigned struct_input_keymap_entry_sz = sizeof(struct input_keymap_entry);
+ #else
+@@ -833,15 +831,6 @@ unsigned struct_ElfW_Phdr_sz = sizeof(Elf_Phdr);
+ #endif // SANITIZER_LINUX || SANITIZER_FREEBSD
+ 
+ #if SANITIZER_LINUX && !SANITIZER_ANDROID
+-  unsigned IOCTL_CYGETDEFTHRESH = CYGETDEFTHRESH;
+-  unsigned IOCTL_CYGETDEFTIMEOUT = CYGETDEFTIMEOUT;
+-  unsigned IOCTL_CYGETMON = CYGETMON;
+-  unsigned IOCTL_CYGETTHRESH = CYGETTHRESH;
+-  unsigned IOCTL_CYGETTIMEOUT = CYGETTIMEOUT;
+-  unsigned IOCTL_CYSETDEFTHRESH = CYSETDEFTHRESH;
+-  unsigned IOCTL_CYSETDEFTIMEOUT = CYSETDEFTIMEOUT;
+-  unsigned IOCTL_CYSETTHRESH = CYSETTHRESH;
+-  unsigned IOCTL_CYSETTIMEOUT = CYSETTIMEOUT;
+   unsigned IOCTL_EQL_EMANCIPATE = EQL_EMANCIPATE;
+   unsigned IOCTL_EQL_ENSLAVE = EQL_ENSLAVE;
+   unsigned IOCTL_EQL_GETMASTRCFG = EQL_GETMASTRCFG;
+diff --git a/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h b/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h
+index 6a673a7c995..f921bf2b5b5 100644
+--- a/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h
++++ b/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h
+@@ -1040,7 +1040,6 @@ struct __sanitizer_cookie_io_functions_t {
+ 
+ #if SANITIZER_LINUX && !SANITIZER_ANDROID
+   extern unsigned struct_ax25_parms_struct_sz;
+-  extern unsigned struct_cyclades_monitor_sz;
+   extern unsigned struct_input_keymap_entry_sz;
+   extern unsigned struct_ipx_config_data_sz;
+   extern unsigned struct_kbdiacrs_sz;
+@@ -1385,15 +1384,6 @@ struct __sanitizer_cookie_io_functions_t {
+ #endif  // SANITIZER_LINUX || SANITIZER_FREEBSD
+ 
+ #if SANITIZER_LINUX && !SANITIZER_ANDROID
+-  extern unsigned IOCTL_CYGETDEFTHRESH;
+-  extern unsigned IOCTL_CYGETDEFTIMEOUT;
+-  extern unsigned IOCTL_CYGETMON;
+-  extern unsigned IOCTL_CYGETTHRESH;
+-  extern unsigned IOCTL_CYGETTIMEOUT;
+-  extern unsigned IOCTL_CYSETDEFTHRESH;
+-  extern unsigned IOCTL_CYSETDEFTIMEOUT;
+-  extern unsigned IOCTL_CYSETTHRESH;
+-  extern unsigned IOCTL_CYSETTIMEOUT;
+   extern unsigned IOCTL_EQL_EMANCIPATE;
+   extern unsigned IOCTL_EQL_ENSLAVE;
+   extern unsigned IOCTL_EQL_GETMASTRCFG;
+-- 
+2.27.0
+
+

diff --git a/9.3.0/gentoo/README.history b/9.3.0/gentoo/README.history
index a9fffed..20f447c 100644
--- a/9.3.0/gentoo/README.history
+++ b/9.3.0/gentoo/README.history
@@ -1,5 +1,6 @@
-5		TODO
+5		17 Dec 2021
 	+ 33_all_vmat-PR97236.patch
+	+ 75_all_remove_cyclades.patch
 
 4		04 Nov 2020
 	+ 30_all_plugin-objdump.patch


^ permalink raw reply related	[flat|nested] 12+ messages in thread
* [gentoo-commits] proj/gcc-patches:master commit in: 9.3.0/gentoo/
@ 2021-03-04 11:02 Sergei Trofimovich
  0 siblings, 0 replies; 12+ messages in thread
From: Sergei Trofimovich @ 2021-03-04 11:02 UTC (permalink / raw
  To: gentoo-commits

commit:     42fd29a7f1f28a6599ccd2089da1e1526b91e780
Author:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
AuthorDate: Thu Mar  4 10:59:04 2021 +0000
Commit:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Thu Mar  4 10:59:04 2021 +0000
URL:        https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=42fd29a7

9.3.0: backport PR97236: fix bad use of VMAT_CONTIGUOUS

Bug: https://gcc.gnu.org/PR97236
Signed-off-by: Sergei Trofimovich <slyfox <AT> gentoo.org>

 9.3.0/gentoo/33_all_vmat-PR97236.patch | 118 +++++++++++++++++++++++++++++++++
 9.3.0/gentoo/README.history            |   3 +
 2 files changed, 121 insertions(+)

diff --git a/9.3.0/gentoo/33_all_vmat-PR97236.patch b/9.3.0/gentoo/33_all_vmat-PR97236.patch
new file mode 100644
index 0000000..ca7df78
--- /dev/null
+++ b/9.3.0/gentoo/33_all_vmat-PR97236.patch
@@ -0,0 +1,118 @@
+https://gcc.gnu.org/PR97236
+
+From 97b668f9a8c6ec565c278a60e7d1492a6932e409 Mon Sep 17 00:00:00 2001
+From: Matthias Klose <doko@ubuntu.com>
+Date: Tue, 6 Oct 2020 13:41:37 +0200
+Subject: [PATCH] Backport fix for PR/tree-optimization/97236 - fix bad use of
+ VMAT_CONTIGUOUS
+
+This avoids using VMAT_CONTIGUOUS with single-element interleaving
+when using V1mode vectors.  Instead keep VMAT_ELEMENTWISE but
+continue to avoid load-lanes and gathers.
+
+2020-10-01  Richard Biener  <rguenther@suse.de>
+
+	PR tree-optimization/97236
+	* tree-vect-stmts.c (get_group_load_store_type): Keep
+	VMAT_ELEMENTWISE for single-element vectors.
+
+	* gcc.dg/vect/pr97236.c: New testcase.
+
+(cherry picked from commit 1ab88985631dd2c5a5e3b5c0dce47cf8b6ed2f82)
+---
+ gcc/testsuite/gcc.dg/vect/pr97236.c | 43 +++++++++++++++++++++++++++++
+ gcc/tree-vect-stmts.c               | 20 ++++++--------
+ 2 files changed, 52 insertions(+), 11 deletions(-)
+ create mode 100644 gcc/testsuite/gcc.dg/vect/pr97236.c
+
+diff --git a/gcc/testsuite/gcc.dg/vect/pr97236.c b/gcc/testsuite/gcc.dg/vect/pr97236.c
+new file mode 100644
+index 00000000000..9d3dc20d953
+--- /dev/null
++++ b/gcc/testsuite/gcc.dg/vect/pr97236.c
+@@ -0,0 +1,43 @@
++typedef unsigned char __uint8_t;
++typedef __uint8_t uint8_t;
++typedef struct plane_t {
++  uint8_t *p_pixels;
++  int i_lines;
++  int i_pitch;
++} plane_t;
++
++typedef struct {
++  plane_t p[5];
++} picture_t;
++
++#define N 4
++
++void __attribute__((noipa))
++picture_Clone(picture_t *picture, picture_t *res)
++{
++  for (int i = 0; i < N; i++) {
++    res->p[i].p_pixels = picture->p[i].p_pixels;
++    res->p[i].i_lines = picture->p[i].i_lines;
++    res->p[i].i_pitch = picture->p[i].i_pitch;
++  }
++}
++
++int
++main()
++{
++  picture_t aaa, bbb;
++  uint8_t pixels[10] = {1, 1, 1, 1, 1, 1, 1, 1};
++
++  for (unsigned i = 0; i < N; i++)
++    aaa.p[i].p_pixels = pixels;
++
++  picture_Clone (&aaa, &bbb);
++
++  uint8_t c = 0;
++  for (unsigned i = 0; i < N; i++)
++    c += bbb.p[i].p_pixels[0];
++
++  if (c != N)
++    __builtin_abort ();
++  return 0;
++}
+diff --git a/gcc/tree-vect-stmts.c b/gcc/tree-vect-stmts.c
+index 507f81b0a0e..ffbba3441de 100644
+--- a/gcc/tree-vect-stmts.c
++++ b/gcc/tree-vect-stmts.c
+@@ -2355,25 +2355,23 @@ get_group_load_store_type (stmt_vec_info stmt_info, tree vectype, bool slp,
+ 	  /* First cope with the degenerate case of a single-element
+ 	     vector.  */
+ 	  if (known_eq (TYPE_VECTOR_SUBPARTS (vectype), 1U))
+-	    *memory_access_type = VMAT_CONTIGUOUS;
++	    ;
+ 
+ 	  /* Otherwise try using LOAD/STORE_LANES.  */
+-	  if (*memory_access_type == VMAT_ELEMENTWISE
+-	      && (vls_type == VLS_LOAD
+-		  ? vect_load_lanes_supported (vectype, group_size, masked_p)
+-		  : vect_store_lanes_supported (vectype, group_size,
+-						masked_p)))
++	  else if (vls_type == VLS_LOAD
++		   ? vect_load_lanes_supported (vectype, group_size, masked_p)
++		   : vect_store_lanes_supported (vectype, group_size,
++						 masked_p))
+ 	    {
+ 	      *memory_access_type = VMAT_LOAD_STORE_LANES;
+ 	      overrun_p = would_overrun_p;
+ 	    }
+ 
+ 	  /* If that fails, try using permuting loads.  */
+-	  if (*memory_access_type == VMAT_ELEMENTWISE
+-	      && (vls_type == VLS_LOAD
+-		  ? vect_grouped_load_supported (vectype, single_element_p,
+-						 group_size)
+-		  : vect_grouped_store_supported (vectype, group_size)))
++	  else if (vls_type == VLS_LOAD
++		   ? vect_grouped_load_supported (vectype, single_element_p,
++						  group_size)
++		   : vect_grouped_store_supported (vectype, group_size))
+ 	    {
+ 	      *memory_access_type = VMAT_CONTIGUOUS_PERMUTE;
+ 	      overrun_p = would_overrun_p;
+-- 
+2.30.1
+

diff --git a/9.3.0/gentoo/README.history b/9.3.0/gentoo/README.history
index e00e2e2..a9fffed 100644
--- a/9.3.0/gentoo/README.history
+++ b/9.3.0/gentoo/README.history
@@ -1,3 +1,6 @@
+5		TODO
+	+ 33_all_vmat-PR97236.patch
+
 4		04 Nov 2020
 	+ 30_all_plugin-objdump.patch
 	U 11_all_extra-options.patch


^ permalink raw reply related	[flat|nested] 12+ messages in thread
* [gentoo-commits] proj/gcc-patches:master commit in: 9.3.0/gentoo/
@ 2020-11-04  7:47 Sergei Trofimovich
  0 siblings, 0 replies; 12+ messages in thread
From: Sergei Trofimovich @ 2020-11-04  7:47 UTC (permalink / raw
  To: gentoo-commits

commit:     3a85230e907766210c490f3d5d39153f7728f73c
Author:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
AuthorDate: Wed Nov  4 00:07:29 2020 +0000
Commit:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Wed Nov  4 07:25:58 2020 +0000
URL:        https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=3a85230e

9.3.0: cut 4 patchset

Three new patches:
+ 30_all_plugin-objdump.patch: always use prefixed objdump
+ 31_all_ipa-to_frequency.patch: fix ICE on empty profile merges.
+ 32_all_assume-aligned.patch: don't assume alignment

Bug: https://bugs.gentoo.org/746578
Bug: https://gcc.gnu.org/PR97295
Bug: https://bugs.gentoo.org/750905
Bug: https://gcc.gnu.org/PR94163
Signed-off-by: Sergei Trofimovich <slyfox <AT> gentoo.org>

 9.3.0/gentoo/README.history | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/9.3.0/gentoo/README.history b/9.3.0/gentoo/README.history
index 70b06c9..e00e2e2 100644
--- a/9.3.0/gentoo/README.history
+++ b/9.3.0/gentoo/README.history
@@ -1,4 +1,4 @@
-4		TODO
+4		04 Nov 2020
 	+ 30_all_plugin-objdump.patch
 	U 11_all_extra-options.patch
 	+ 31_all_ipa-to_frequency.patch


^ permalink raw reply related	[flat|nested] 12+ messages in thread
* [gentoo-commits] proj/gcc-patches:master commit in: 9.3.0/gentoo/
@ 2020-11-01  0:33 Sergei Trofimovich
  0 siblings, 0 replies; 12+ messages in thread
From: Sergei Trofimovich @ 2020-11-01  0:33 UTC (permalink / raw
  To: gentoo-commits

commit:     3f9f4ffb0ee9da59e44ff405a872c00736fa7159
Author:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
AuthorDate: Sun Nov  1 00:32:41 2020 +0000
Commit:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Sun Nov  1 00:32:41 2020 +0000
URL:        https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=3f9f4ffb

9.3.0: backport assume_aligned fix (PR94163)

Reported-by: Ervin Peters
Bug: https://bugs.gentoo.org/750905
Bug: https://gcc.gnu.org/PR94163
Signed-off-by: Sergei Trofimovich <slyfox <AT> gentoo.org>

 9.3.0/gentoo/32_all_assume-aligned.patch | 31 +++++++++++++++++++++++++++++++
 9.3.0/gentoo/README.history              |  1 +
 2 files changed, 32 insertions(+)

diff --git a/9.3.0/gentoo/32_all_assume-aligned.patch b/9.3.0/gentoo/32_all_assume-aligned.patch
new file mode 100644
index 0000000..10dffbb
--- /dev/null
+++ b/9.3.0/gentoo/32_all_assume-aligned.patch
@@ -0,0 +1,31 @@
+https://bugs.gentoo.org/750905
+https://gcc.gnu.org/PR94163
+
+From db3584552871c8caccdc22e97ea1573da9458253 Mon Sep 17 00:00:00 2001
+From: Richard Biener <rguenther@suse.de>
+Date: Fri, 13 Mar 2020 13:56:26 +0100
+Subject: [PATCH] tree-optimization/94163 constrain alignment set by PRE
+
+This avoids HWI -> unsigned truncation to end up with zero alignment
+which set_ptr_info_alignment ICEs on.
+
+2020-03-13  Richard Biener  <rguenther@suse.de>
+
+	PR tree-optimization/94163
+	* tree-ssa-pre.c (create_expression_by_pieces): Check
+	whether alignment would be zero.
+--- a/gcc/tree-ssa-pre.c
++++ b/gcc/tree-ssa-pre.c
+@@ -2810,7 +2810,8 @@ create_expression_by_pieces (basic_block block, pre_expr expr,
+ 	      unsigned HOST_WIDE_INT hmisalign
+ 		= args.length () == 3 ? tree_to_uhwi (args[2]) : 0;
+ 	      if ((halign & (halign - 1)) == 0
+-		  && (hmisalign & ~(halign - 1)) == 0)
++		  && (hmisalign & ~(halign - 1)) == 0
++		  && (unsigned int)halign != 0)
+ 		set_ptr_info_alignment (get_ptr_info (forcedname),
+ 					halign, hmisalign);
+ 	    }
+-- 
+2.29.2
+

diff --git a/9.3.0/gentoo/README.history b/9.3.0/gentoo/README.history
index ff47a81..70b06c9 100644
--- a/9.3.0/gentoo/README.history
+++ b/9.3.0/gentoo/README.history
@@ -2,6 +2,7 @@
 	+ 30_all_plugin-objdump.patch
 	U 11_all_extra-options.patch
 	+ 31_all_ipa-to_frequency.patch
+	+ 32_all_assume-aligned.patch
 
 3		29 May 2020
 	+ 29_all_libcpp-ar.patch


^ permalink raw reply related	[flat|nested] 12+ messages in thread
* [gentoo-commits] proj/gcc-patches:master commit in: 9.3.0/gentoo/
@ 2020-10-15 21:36 Sergei Trofimovich
  0 siblings, 0 replies; 12+ messages in thread
From: Sergei Trofimovich @ 2020-10-15 21:36 UTC (permalink / raw
  To: gentoo-commits

commit:     604daa40f01cb708beafcef226f1b207d576075d
Author:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
AuthorDate: Thu Oct 15 21:35:46 2020 +0000
Commit:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Thu Oct 15 21:35:46 2020 +0000
URL:        https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=604daa40

9.3.0: backport IPA to_frequency() ICE

Reported-by: inasprecali <AT> disroot.org
Bug: https://bugs.gentoo.org/746578
Bug: https://gcc.gnu.org/PR97295
Signed-off-by: Sergei Trofimovich <slyfox <AT> gentoo.org>

 9.3.0/gentoo/31_all_ipa-to_frequency.patch | 48 ++++++++++++++++++++++++++++++
 9.3.0/gentoo/README.history                |  1 +
 2 files changed, 49 insertions(+)

diff --git a/9.3.0/gentoo/31_all_ipa-to_frequency.patch b/9.3.0/gentoo/31_all_ipa-to_frequency.patch
new file mode 100644
index 0000000..0849207
--- /dev/null
+++ b/9.3.0/gentoo/31_all_ipa-to_frequency.patch
@@ -0,0 +1,48 @@
+https://bugs.gentoo.org/746578
+https://gcc.gnu.org/PR97295
+
+From 508e2d88a4c512e8b8685cf5ba201ad48e6bb58d Mon Sep 17 00:00:00 2001
+From: Martin Liska <mliska@suse.cz>
+Date: Tue, 13 Oct 2020 16:44:47 +0200
+Subject: [PATCH] IPA: fix profile handling in IRA
+
+gcc/ChangeLog:
+
+	PR ipa/97295
+	* profile-count.c (profile_count::to_frequency): Move part of
+	gcc_assert to STATIC_ASSERT.
+	* regs.h (REG_FREQ_FROM_BB): Do not use count.to_frequency for
+	a function that does not have count_max initialized.
+---
+ gcc/profile-count.c | 4 ++--
+ gcc/regs.h          | 3 ++-
+ 2 files changed, 4 insertions(+), 3 deletions(-)
+
+--- a/gcc/profile-count.c
++++ b/gcc/profile-count.c
+@@ -270,8 +270,8 @@ profile_count::to_frequency (struct function *fun) const
+     return BB_FREQ_MAX;
+   if (*this == zero ())
+     return 0;
+-  gcc_assert (REG_BR_PROB_BASE == BB_FREQ_MAX
+-	      && fun->cfg->count_max.initialized_p ());
++  STATIC_ASSERT (REG_BR_PROB_BASE == BB_FREQ_MAX);
++  gcc_assert (fun->cfg->count_max.initialized_p ());
+   profile_probability prob = probability_in (fun->cfg->count_max);
+   if (!prob.initialized_p ())
+     return REG_BR_PROB_BASE;
+--- a/gcc/regs.h
++++ b/gcc/regs.h
+@@ -128,7 +128,8 @@ extern size_t reg_info_p_size;
+    or profile driven feedback is available and the function is never executed,
+    frequency is always equivalent.  Otherwise rescale the basic block
+    frequency.  */
+-#define REG_FREQ_FROM_BB(bb) (optimize_function_for_size_p (cfun)	      \
++#define REG_FREQ_FROM_BB(bb) ((optimize_function_for_size_p (cfun)	      \
++			       || !cfun->cfg->count_max.initialized_p ())     \
+ 			      ? REG_FREQ_MAX				      \
+ 			      : ((bb)->count.to_frequency (cfun)	      \
+ 				* REG_FREQ_MAX / BB_FREQ_MAX)		      \
+-- 
+2.28.0
+

diff --git a/9.3.0/gentoo/README.history b/9.3.0/gentoo/README.history
index 9dbbc19..ff47a81 100644
--- a/9.3.0/gentoo/README.history
+++ b/9.3.0/gentoo/README.history
@@ -1,6 +1,7 @@
 4		TODO
 	+ 30_all_plugin-objdump.patch
 	U 11_all_extra-options.patch
+	+ 31_all_ipa-to_frequency.patch
 
 3		29 May 2020
 	+ 29_all_libcpp-ar.patch


^ permalink raw reply related	[flat|nested] 12+ messages in thread
* [gentoo-commits] proj/gcc-patches:master commit in: 9.3.0/gentoo/
@ 2020-08-28 19:03 Sergei Trofimovich
  0 siblings, 0 replies; 12+ messages in thread
From: Sergei Trofimovich @ 2020-08-28 19:03 UTC (permalink / raw
  To: gentoo-commits

commit:     c5f94af7f0e3c8e908746f14d522967ee5031668
Author:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
AuthorDate: Fri Aug 28 19:01:02 2020 +0000
Commit:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Fri Aug 28 19:01:02 2020 +0000
URL:        https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=c5f94af7

9.3.0: backport 'objdump' lookup for plugins

Signed-off-by: Sergei Trofimovich <slyfox <AT> gentoo.org>

 9.3.0/gentoo/30_all_plugin-objdump.patch | 34 ++++++++++++++++++++++++++++++++
 9.3.0/gentoo/README.history              |  3 +++
 2 files changed, 37 insertions(+)

diff --git a/9.3.0/gentoo/30_all_plugin-objdump.patch b/9.3.0/gentoo/30_all_plugin-objdump.patch
new file mode 100644
index 0000000..a9c33fd
--- /dev/null
+++ b/9.3.0/gentoo/30_all_plugin-objdump.patch
@@ -0,0 +1,34 @@
+https://gcc.gnu.org/PR95648
+--- a/config/gcc-plugin.m4
++++ b/config/gcc-plugin.m4
+@@ -45,7 +45,7 @@ AC_DEFUN([GCC_ENABLE_PLUGINS],
+      ;;
+      *)
+        if test x$build = x$host; then
+-	 export_sym_check="objdump${exeext} -T"
++	 export_sym_check="$ac_cv_prog_OBJDUMP -T"
+        elif test x$host = x$target; then
+ 	 export_sym_check="$gcc_cv_objdump -T"
+        else
+--- a/gcc/configure
++++ b/gcc/configure
+@@ -30386,7 +30386,7 @@ fi
+      ;;
+      *)
+        if test x$build = x$host; then
+-	 export_sym_check="objdump${exeext} -T"
++	 export_sym_check="$ac_cv_prog_OBJDUMP -T"
+        elif test x$host = x$target; then
+ 	 export_sym_check="$gcc_cv_objdump -T"
+        else
+--- a/libcc1/configure
++++ b/libcc1/configure
+@@ -14819,7 +14819,7 @@ fi
+      ;;
+      *)
+        if test x$build = x$host; then
+-	 export_sym_check="objdump${exeext} -T"
++	 export_sym_check="$ac_cv_prog_OBJDUMP -T"
+        elif test x$host = x$target; then
+ 	 export_sym_check="$gcc_cv_objdump -T"
+        else

diff --git a/9.3.0/gentoo/README.history b/9.3.0/gentoo/README.history
index 7cd4a84..d8c024d 100644
--- a/9.3.0/gentoo/README.history
+++ b/9.3.0/gentoo/README.history
@@ -1,3 +1,6 @@
+4		TODO
+	+ 30_all_plugin-objdump.patch
+
 3		29 May 2020
 	+ 29_all_libcpp-ar.patch
 


^ permalink raw reply related	[flat|nested] 12+ messages in thread
* [gentoo-commits] proj/gcc-patches:master commit in: 9.3.0/gentoo/
@ 2020-05-29 21:27 Sergei Trofimovich
  0 siblings, 0 replies; 12+ messages in thread
From: Sergei Trofimovich @ 2020-05-29 21:27 UTC (permalink / raw
  To: gentoo-commits

commit:     ab6ae685eb5c56d622cb74c2a8b81a0e565e12aa
Author:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
AuthorDate: Fri May 29 21:03:53 2020 +0000
Commit:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Fri May 29 21:03:53 2020 +0000
URL:        https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=ab6ae685

9.3.0: cut 3 patchset

One new patch:
- 29_all_libcpp-ar.patch: respect user's AR

Reported-by: Agostino Sarubbo
Bug: https://bugs.gentoo.org/718004
Bug: https://gcc.gnu.org/PR94657
Signed-off-by: Sergei Trofimovich <slyfox <AT> gentoo.org>

 9.3.0/gentoo/README.history | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/9.3.0/gentoo/README.history b/9.3.0/gentoo/README.history
index d6c1828..7cd4a84 100644
--- a/9.3.0/gentoo/README.history
+++ b/9.3.0/gentoo/README.history
@@ -1,4 +1,4 @@
-3		TODO
+3		29 May 2020
 	+ 29_all_libcpp-ar.patch
 
 2		01 Apr 2020


^ permalink raw reply related	[flat|nested] 12+ messages in thread
* [gentoo-commits] proj/gcc-patches:master commit in: 9.3.0/gentoo/
@ 2020-04-19  9:46 Sergei Trofimovich
  0 siblings, 0 replies; 12+ messages in thread
From: Sergei Trofimovich @ 2020-04-19  9:46 UTC (permalink / raw
  To: gentoo-commits

commit:     baf79867c63ff919483051395b518822fa501a41
Author:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
AuthorDate: Sun Apr 19 09:45:02 2020 +0000
Commit:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Sun Apr 19 09:45:02 2020 +0000
URL:        https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=baf79867

9.3.0: fix libcpp ar detection

Reported-by: Agostino Sarubbo
Bug: https://bugs.gentoo.org/718004
Bug: https://gcc.gnu.org/PR94657
Signed-off-by: Sergei Trofimovich <slyfox <AT> gentoo.org>

 9.3.0/gentoo/29_all_libcpp-ar.patch | 143 ++++++++++++++++++++++++++++++++++++
 9.3.0/gentoo/README.history         |   3 +
 2 files changed, 146 insertions(+)

diff --git a/9.3.0/gentoo/29_all_libcpp-ar.patch b/9.3.0/gentoo/29_all_libcpp-ar.patch
new file mode 100644
index 0000000..55f2944
--- /dev/null
+++ b/9.3.0/gentoo/29_all_libcpp-ar.patch
@@ -0,0 +1,143 @@
+https://bugs.gentoo.org/718004
+https://gcc.gnu.org/PR94657
+
+Make sue we use ${CHOST}-ar and not 'ar'.
+
+--- a/libcpp/configure.ac
++++ b/libcpp/configure.ac
+@@ -12,6 +12,7 @@ AC_PROG_INSTALL
+ AC_PROG_CC
+ AC_PROG_CXX
+ AC_PROG_RANLIB
++AC_CHECK_TOOL(AR, ar)
+ 
+ AC_USE_SYSTEM_EXTENSIONS
+ AC_SYS_LARGEFILE
+--- a/libcpp/Makefile.in
++++ b/libcpp/Makefile.in
+@@ -25,7 +25,7 @@ srcdir = @srcdir@
+ top_builddir = .
+ VPATH = @srcdir@
+ INSTALL = @INSTALL@
+-AR = ar
++AR = @AR@
+ ARFLAGS = cru
+ ACLOCAL = @ACLOCAL@
+ AUTOCONF = @AUTOCONF@
+--- a/libcpp/configure
++++ b/libcpp/configure
+@@ -657,6 +657,7 @@ ACLOCAL
+ EGREP
+ GREP
+ CPP
++AR
+ RANLIB
+ ac_ct_CXX
+ CXXFLAGS
+@@ -1038,6 +1039,7 @@ do
+   | -silent | --silent | --silen | --sile | --sil)
+     silent=yes ;;
+ 
++
+   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
+     ac_prev=sbindir ;;
+   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
+@@ -4006,6 +4008,98 @@ else
+   RANLIB="$ac_cv_prog_RANLIB"
+ fi
+ 
++if test -n "$ac_tool_prefix"; then
++  # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
++set dummy ${ac_tool_prefix}ar; ac_word=$2
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
++$as_echo_n "checking for $ac_word... " >&6; }
++if ${ac_cv_prog_AR+:} false; then :
++  $as_echo_n "(cached) " >&6
++else
++  if test -n "$AR"; then
++  ac_cv_prog_AR="$AR" # Let the user override the test.
++else
++as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
++for as_dir in $PATH
++do
++  IFS=$as_save_IFS
++  test -z "$as_dir" && as_dir=.
++    for ac_exec_ext in '' $ac_executable_extensions; do
++  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
++    ac_cv_prog_AR="${ac_tool_prefix}ar"
++    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
++    break 2
++  fi
++done
++  done
++IFS=$as_save_IFS
++
++fi
++fi
++AR=$ac_cv_prog_AR
++if test -n "$AR"; then
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
++$as_echo "$AR" >&6; }
++else
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++fi
++
++
++fi
++if test -z "$ac_cv_prog_AR"; then
++  ac_ct_AR=$AR
++  # Extract the first word of "ar", so it can be a program name with args.
++set dummy ar; ac_word=$2
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
++$as_echo_n "checking for $ac_word... " >&6; }
++if ${ac_cv_prog_ac_ct_AR+:} false; then :
++  $as_echo_n "(cached) " >&6
++else
++  if test -n "$ac_ct_AR"; then
++  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
++else
++as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
++for as_dir in $PATH
++do
++  IFS=$as_save_IFS
++  test -z "$as_dir" && as_dir=.
++    for ac_exec_ext in '' $ac_executable_extensions; do
++  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
++    ac_cv_prog_ac_ct_AR="ar"
++    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
++    break 2
++  fi
++done
++  done
++IFS=$as_save_IFS
++
++fi
++fi
++ac_ct_AR=$ac_cv_prog_ac_ct_AR
++if test -n "$ac_ct_AR"; then
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
++$as_echo "$ac_ct_AR" >&6; }
++else
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++fi
++
++  if test "x$ac_ct_AR" = x; then
++    AR=""
++  else
++    case $cross_compiling:$ac_tool_warned in
++yes:)
++{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
++$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
++ac_tool_warned=yes ;;
++esac
++    AR=$ac_ct_AR
++  fi
++else
++  AR="$ac_cv_prog_AR"
++fi
++
+ 
+ 
+ ac_ext=c

diff --git a/9.3.0/gentoo/README.history b/9.3.0/gentoo/README.history
index 7aea050..d6c1828 100644
--- a/9.3.0/gentoo/README.history
+++ b/9.3.0/gentoo/README.history
@@ -1,3 +1,6 @@
+3		TODO
+	+ 29_all_libcpp-ar.patch
+
 2		01 Apr 2020
 	- 04_all_default-ssp-fix.patch
 	+ 04_all_nossp-on-nostdlib.patch


^ permalink raw reply related	[flat|nested] 12+ messages in thread
* [gentoo-commits] proj/gcc-patches:master commit in: 9.3.0/gentoo/
@ 2020-04-01  7:04 Sergei Trofimovich
  0 siblings, 0 replies; 12+ messages in thread
From: Sergei Trofimovich @ 2020-04-01  7:04 UTC (permalink / raw
  To: gentoo-commits

commit:     74c0b4bdd3eb8ae414272eb0097a79ea746c5f23
Author:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
AuthorDate: Wed Apr  1 07:03:10 2020 +0000
Commit:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Wed Apr  1 07:03:10 2020 +0000
URL:        https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=74c0b4bd

9.3.0: cut 2 patchset

One new patch:
+ 28_all_hppa-faster-synth_mult.patch: speed up xxhash compilation on hppa

One old patch is split in two:
- 04_all_default-ssp-fix.patch
+ 04_all_nossp-on-nostdlib.patch
+ 27_all_default_ssp-buffer-size.patch
to separate two independent fixes.

Signed-off-by: Sergei Trofimovich <slyfox <AT> gentoo.org>

 9.3.0/gentoo/README.history | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/9.3.0/gentoo/README.history b/9.3.0/gentoo/README.history
index 5da5a24..7aea050 100644
--- a/9.3.0/gentoo/README.history
+++ b/9.3.0/gentoo/README.history
@@ -1,4 +1,4 @@
-2		TODO
+2		01 Apr 2020
 	- 04_all_default-ssp-fix.patch
 	+ 04_all_nossp-on-nostdlib.patch
 	+ 27_all_default_ssp-buffer-size.patch


^ permalink raw reply related	[flat|nested] 12+ messages in thread
* [gentoo-commits] proj/gcc-patches:master commit in: 9.3.0/gentoo/
@ 2020-03-31 23:08 Sergei Trofimovich
  0 siblings, 0 replies; 12+ messages in thread
From: Sergei Trofimovich @ 2020-03-31 23:08 UTC (permalink / raw
  To: gentoo-commits

commit:     0bc14fb37320230d55449627a143c97cb187bdf1
Author:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
AuthorDate: Tue Mar 31 23:07:39 2020 +0000
Commit:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Tue Mar 31 23:07:39 2020 +0000
URL:        https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=0bc14fb3

9.3.0: increase expmed cache size from 10^3 to 10^6

Without this patch is takes dev-libs/xxhash 1-2 hours
to compile. With this patch - TODO measurements.

It workarounds deficiency of synth_mult() which evics
cache entries as it calculates optimal multiplication
algorithm. xxhash is especially hevyweight as it's a
64-bit multiplication of large prime constants.

Bug: https://gcc.gnu.org/PR87256
Signed-off-by: Sergei Trofimovich <slyfox <AT> gentoo.org>

 9.3.0/gentoo/28_all_hppa-faster-synth_mult.patch | 44 ++++++++++++++++++++++++
 9.3.0/gentoo/README.history                      |  1 +
 2 files changed, 45 insertions(+)

diff --git a/9.3.0/gentoo/28_all_hppa-faster-synth_mult.patch b/9.3.0/gentoo/28_all_hppa-faster-synth_mult.patch
new file mode 100644
index 0000000..e93aa40
--- /dev/null
+++ b/9.3.0/gentoo/28_all_hppa-faster-synth_mult.patch
@@ -0,0 +1,44 @@
+From 73a841928cc1b86f43108d2383a6242e7e61a785 Mon Sep 17 00:00:00 2001
+From: Sergei Trofimovich <slyfox@gentoo.org>
+Date: Tue, 31 Mar 2020 23:58:05 +0100
+Subject: [PATCH] gcc/expmed.h: increase cache size from 10^3 to 10^6
+
+Without this patch is takes dev-libs/xxhash 1-2 hours
+to compile. With this patch - TODO measurements.
+
+It workarounds deficiency of synth_mult() which evics
+cache entries as it calculates optimal multiplication
+algorithm. xxhash is especially hevyweight as it's a
+64-bit multiplication of large prime constants.
+
+Bug: https://gcc.gnu.org/PR87256
+Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
+---
+ gcc/expmed.h | 13 ++++++++-----
+ 1 file changed, 8 insertions(+), 5 deletions(-)
+
+--- a/gcc/expmed.h
++++ b/gcc/expmed.h
+@@ -127,11 +127,14 @@ struct alg_hash_entry {
+ };
+ 
+ /* The number of cache/hash entries.  */
+-#if HOST_BITS_PER_WIDE_INT == 64
+-#define NUM_ALG_HASH_ENTRIES 1031
+-#else
+-#define NUM_ALG_HASH_ENTRIES 307
+-#endif
++/*
++ * Workaround hppa2.0 synth_mult deficiency
++ * and allocate ~1 million slots:
++ *     https://gcc.gnu.org/PR87256
++ * That should increase RAM usage up to ~24MB
++ * per process.
++ */
++#define NUM_ALG_HASH_ENTRIES 1000003
+ 
+ #define NUM_MODE_INT \
+   (MAX_MODE_INT - MIN_MODE_INT + 1)
+-- 
+2.26.0
+

diff --git a/9.3.0/gentoo/README.history b/9.3.0/gentoo/README.history
index e5865d4..5da5a24 100644
--- a/9.3.0/gentoo/README.history
+++ b/9.3.0/gentoo/README.history
@@ -2,6 +2,7 @@
 	- 04_all_default-ssp-fix.patch
 	+ 04_all_nossp-on-nostdlib.patch
 	+ 27_all_default_ssp-buffer-size.patch
+	+ 28_all_hppa-faster-synth_mult.patch
 
 1		12 Mar 2019
 	+ 01_all_default-fortify-source.patch


^ permalink raw reply related	[flat|nested] 12+ messages in thread
* [gentoo-commits] proj/gcc-patches:master commit in: 9.3.0/gentoo/
@ 2020-03-14 10:47 Sergei Trofimovich
  0 siblings, 0 replies; 12+ messages in thread
From: Sergei Trofimovich @ 2020-03-14 10:47 UTC (permalink / raw
  To: gentoo-commits

commit:     038fd4e08bbf78fabe2d8bb13aec85bd20a611b1
Author:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
AuthorDate: Sat Mar 14 10:46:40 2020 +0000
Commit:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Sat Mar 14 10:46:40 2020 +0000
URL:        https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=038fd4e0

9.3.0: split 04_all_default-ssp-fix.patch in two

No functional change should happen. gcc-10 got rid of
defaults defined in .c file. We'll need to adapt one
patch slightly.

Signed-off-by: Sergei Trofimovich <slyfox <AT> gentoo.org>

 ...efault-ssp-fix.patch => 04_all_nossp-on-nostdlib.patch} | 13 +------------
 9.3.0/gentoo/27_all_default_ssp-buffer-size.patch          | 14 ++++++++++++++
 9.3.0/gentoo/README.history                                |  5 +++++
 3 files changed, 20 insertions(+), 12 deletions(-)

diff --git a/9.3.0/gentoo/04_all_default-ssp-fix.patch b/9.3.0/gentoo/04_all_nossp-on-nostdlib.patch
similarity index 67%
rename from 9.3.0/gentoo/04_all_default-ssp-fix.patch
rename to 9.3.0/gentoo/04_all_nossp-on-nostdlib.patch
index d2deac7..648d712 100644
--- a/9.3.0/gentoo/04_all_default-ssp-fix.patch
+++ b/9.3.0/gentoo/04_all_nossp-on-nostdlib.patch
@@ -1,6 +1,6 @@
 Disable ssp on -nostdlib, -nodefaultlibs and -ffreestanding 
-Change the buffer size.
 
+https://bugs.gentoo.org/484714
 --- a/gcc/gcc.c	2017-07-04 09:15:57.740793000 +0200
 +++ b/gcc/gcc.c	2018-03-02 13:58:44.387741114 +0100
 @@ -857,6 +857,12 @@ proper position among the other output f
@@ -25,14 +25,3 @@ Change the buffer size.
   %{coverage:-fprofile-arcs -ftest-coverage}\
   %{fprofile-arcs|fprofile-generate*|coverage:\
     %{!fprofile-update=singel:\
---- a/gcc/params.def	2016-03-30 09:47:40.000000000 +0200
-+++ b/gcc/params.def	2016-09-19 12:56:58.443179039 +0200
-@@ -673,7 +673,7 @@ DEFPARAM (PARAM_INTEGER_SHARE_LIMIT,
- DEFPARAM (PARAM_SSP_BUFFER_SIZE,
- 	  "ssp-buffer-size",
- 	  "The lower bound for a buffer to be considered for stack smashing protection.",
--	  8, 1, 0)
-+	  4, 1, 0)
- 
- DEFPARAM (PARAM_MIN_SIZE_FOR_STACK_SHARING,
- 	  "min-size-for-stack-sharing",

diff --git a/9.3.0/gentoo/27_all_default_ssp-buffer-size.patch b/9.3.0/gentoo/27_all_default_ssp-buffer-size.patch
new file mode 100644
index 0000000..dddd06b
--- /dev/null
+++ b/9.3.0/gentoo/27_all_default_ssp-buffer-size.patch
@@ -0,0 +1,14 @@
+Change the minimal SSP buffer size.
+
+https://bugs.gentoo.org/484714
+--- a/gcc/params.def	2016-03-30 09:47:40.000000000 +0200
++++ b/gcc/params.def	2016-09-19 12:56:58.443179039 +0200
+@@ -673,7 +673,7 @@ DEFPARAM (PARAM_INTEGER_SHARE_LIMIT,
+ DEFPARAM (PARAM_SSP_BUFFER_SIZE,
+ 	  "ssp-buffer-size",
+ 	  "The lower bound for a buffer to be considered for stack smashing protection.",
+-	  8, 1, 0)
++	  4, 1, 0)
+ 
+ DEFPARAM (PARAM_MIN_SIZE_FOR_STACK_SHARING,
+ 	  "min-size-for-stack-sharing",

diff --git a/9.3.0/gentoo/README.history b/9.3.0/gentoo/README.history
index 6f2d71a..e5865d4 100644
--- a/9.3.0/gentoo/README.history
+++ b/9.3.0/gentoo/README.history
@@ -1,3 +1,8 @@
+2		TODO
+	- 04_all_default-ssp-fix.patch
+	+ 04_all_nossp-on-nostdlib.patch
+	+ 27_all_default_ssp-buffer-size.patch
+
 1		12 Mar 2019
 	+ 01_all_default-fortify-source.patch
 	+ 02_all_default-warn-format-security.patch


^ permalink raw reply related	[flat|nested] 12+ messages in thread
* [gentoo-commits] proj/gcc-patches:master commit in: 9.3.0/gentoo/
@ 2020-03-12 22:36 Sergei Trofimovich
  0 siblings, 0 replies; 12+ messages in thread
From: Sergei Trofimovich @ 2020-03-12 22:36 UTC (permalink / raw
  To: gentoo-commits

commit:     1994eb2bd79215a806f1d5a8cb4b57f805e3ce44
Author:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
AuthorDate: Thu Mar 12 22:20:26 2020 +0000
Commit:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Thu Mar 12 22:20:26 2020 +0000
URL:        https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=1994eb2b

9.3.0: cut initial patchset, a copy of 9.2.0 patches

All patches removed are backports:
- 27_all_sparc-PIC-constant-PR91472.patch
- 28_all_sparc-fpu-subregs-91269.patch
- 29_all_mips_split_move-SEGV.patch
- 30_all_arm64-march-native.patch
- 31_all_openmp-for-SEGV.patch
- 32_all_sparc-PIC-constant-part2.patch
- 33_all_extend-lifetime.patch
- 34_all_ia64-neg-insn-cost.patch
- 35_all_glibc-2.31-libsanitizer-1.patch
- 36_all_glibc-2.31-libsanitizer-2.patch
- 37_all_whitespace-pa.patch

Signed-off-by: Sergei Trofimovich <slyfox <AT> gentoo.org>

 9.3.0/gentoo/01_all_default-fortify-source.patch   |  22 ++++
 .../02_all_default-warn-format-security.patch      |  22 ++++
 9.3.0/gentoo/03_all_default-warn-trampolines.patch |  13 +++
 9.3.0/gentoo/04_all_default-ssp-fix.patch          |  38 +++++++
 9.3.0/gentoo/05_all_alpha-mieee-default.patch      |  39 +++++++
 9.3.0/gentoo/06_all_ia64_note.GNU-stack.patch      |  92 ++++++++++++++++
 .../gentoo/07_all_i386_libgcc_note.GNU-stack.patch |  54 +++++++++
 9.3.0/gentoo/08_all_libiberty-asprintf.patch       |  18 +++
 9.3.0/gentoo/09_all_libiberty-pic.patch            |  10 ++
 9.3.0/gentoo/10_all_nopie-all-flags.patch          |  18 +++
 9.3.0/gentoo/11_all_extra-options.patch            |  89 +++++++++++++++
 .../12_all_pr55930-dependency-tracking.patch       |  18 +++
 9.3.0/gentoo/13_all_sh-drop-sysroot-suffix.patch   |  32 ++++++
 9.3.0/gentoo/14_all_ia64-TEXTREL.patch             |  22 ++++
 9.3.0/gentoo/15_all_disable-systemtap-switch.patch | 122 +++++++++++++++++++++
 9.3.0/gentoo/16_all_m68k-textrel-on-libgcc.patch   |  93 ++++++++++++++++
 9.3.0/gentoo/17_all_respect-build-cxxflags.patch   |  39 +++++++
 9.3.0/gentoo/18_all_libgfortran-Werror.patch       |  20 ++++
 9.3.0/gentoo/19_all_libgomp-Werror.patch           |  20 ++++
 9.3.0/gentoo/20_all_libitm-Werror.patch            |  19 ++++
 9.3.0/gentoo/21_all_libatomic-Werror.patch         |  19 ++++
 9.3.0/gentoo/22_all_libbacktrace-Werror.patch      |  17 +++
 9.3.0/gentoo/23_all_libsanitizer-Werror.patch      |  17 +++
 9.3.0/gentoo/24_all_libstdcxx-no-vtv.patch         |  61 +++++++++++
 9.3.0/gentoo/25_all_ia64-bootstrap.patch           |  41 +++++++
 9.3.0/gentoo/26_all_disable-riscv32-ABIs.patch     |  53 +++++++++
 9.3.0/gentoo/README.history                        |  27 +++++
 27 files changed, 1035 insertions(+)

diff --git a/9.3.0/gentoo/01_all_default-fortify-source.patch b/9.3.0/gentoo/01_all_default-fortify-source.patch
new file mode 100644
index 0000000..d307474
--- /dev/null
+++ b/9.3.0/gentoo/01_all_default-fortify-source.patch
@@ -0,0 +1,22 @@
+Taken Debian's patch and removed docs matches:
+    https://salsa.debian.org/toolchain-team/gcc.git
+Also see https://bugs.gentoo.org/621036 where
+initially Gentoo used too complicated macro.
+
+# DP: Turn on -D_FORTIFY_SOURCE=2 by default for C, C++, ObjC, ObjC++,
+# DP: if the optimization level is > 0
+--- a/gcc/c-family/c-cppbuiltin.c
++++ b/gcc/c-family/c-cppbuiltin.c
+@@ -951,6 +951,12 @@ 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)
++  /* Fortify Source enabled by default for optimization levels > 0 */
++  if (optimize)
++    builtin_define_with_int_value ("_FORTIFY_SOURCE", 2);
++#endif
++
+   /* Misc.  */
+   if (flag_gnu89_inline)
+     cpp_define (pfile, "__GNUC_GNU_INLINE__");

diff --git a/9.3.0/gentoo/02_all_default-warn-format-security.patch b/9.3.0/gentoo/02_all_default-warn-format-security.patch
new file mode 100644
index 0000000..f809abd
--- /dev/null
+++ b/9.3.0/gentoo/02_all_default-warn-format-security.patch
@@ -0,0 +1,22 @@
+Enable -Wformat and -Wformat-security by default.
+
+--- a/gcc/c-family/c.opt	2016-03-23 18:51:56.000000000 +0100
++++ b/gcc/c-family/c.opt	2016-04-28 23:45:54.063351272 +0200
+@@ -459,7 +459,7 @@ C ObjC C++ ObjC++ Var(warn_format_nonlit
+ Warn about format strings that are not literals.
+ 
+ Wformat-security
+-C ObjC C++ ObjC++ Var(warn_format_security) Warning LangEnabledBy(C ObjC C++ ObjC++,Wformat=, warn_format >= 2, 0)
++C ObjC C++ ObjC++ Var(warn_format_security) Init(1) Warning LangEnabledBy(C ObjC C++ ObjC++,Wformat=, warn_format >= 2, 0)
+ Warn about possible security problems with format functions.
+ 
+ Wformat-signedness
+@@ -475,7 +475,7 @@ C ObjC C++ ObjC++ Var(warn_format_zero_l
+ Warn about zero-length formats.
+ 
+ Wformat=
+-C ObjC C++ ObjC++ Joined RejectNegative UInteger Var(warn_format) Warning LangEnabledBy(C ObjC C++ ObjC++,Wall, 1, 0) IntegerRange(0, 2)
++C ObjC C++ ObjC++ Joined RejectNegative UInteger Var(warn_format) Init(1) Warning LangEnabledBy(C ObjC C++ ObjC++,Wall, 1, 0) IntegerRange(0, 2)
+ Warn about printf/scanf/strftime/strfmon format string anomalies.
+ 
+ Wignored-qualifiers

diff --git a/9.3.0/gentoo/03_all_default-warn-trampolines.patch b/9.3.0/gentoo/03_all_default-warn-trampolines.patch
new file mode 100644
index 0000000..7a644cb
--- /dev/null
+++ b/9.3.0/gentoo/03_all_default-warn-trampolines.patch
@@ -0,0 +1,13 @@
+Enable -Wtrampolines by default.
+
+--- a/gcc/common.opt
++++ b/gcc/common.opt
+@@ -712,7 +712,7 @@ Common Var(warn_system_headers) Warning
+ Do not suppress warnings from system headers.
+ 
+ Wtrampolines
+-Common Var(warn_trampolines) Warning
++Common Var(warn_trampolines) Init(1) Warning
+ Warn whenever a trampoline is generated.
+ 
+ Wtype-limits

diff --git a/9.3.0/gentoo/04_all_default-ssp-fix.patch b/9.3.0/gentoo/04_all_default-ssp-fix.patch
new file mode 100644
index 0000000..d2deac7
--- /dev/null
+++ b/9.3.0/gentoo/04_all_default-ssp-fix.patch
@@ -0,0 +1,38 @@
+Disable ssp on -nostdlib, -nodefaultlibs and -ffreestanding 
+Change the buffer size.
+
+--- a/gcc/gcc.c	2017-07-04 09:15:57.740793000 +0200
++++ b/gcc/gcc.c	2018-03-02 13:58:44.387741114 +0100
+@@ -857,6 +857,12 @@ proper position among the other output f
+ #define LINK_GCC_C_SEQUENCE_SPEC "%G %L %G"
+ #endif
+ 
++#ifdef ENABLE_DEFAULT_SSP
++#define NO_SSP_SPEC "%{nostdlib|nodefaultlibs|ffreestanding:-fno-stack-protector} "
++#else
++#define NO_SSP_SPEC ""
++#endif
++
+ #ifndef LINK_SSP_SPEC
+ #ifdef TARGET_LIBC_PROVIDES_SSP
+ #define LINK_SSP_SPEC "%{fstack-protector|fstack-protector-all" \
+@@ -1131,7 +1148,7 @@ static const char *cc1_options =
+  %{-version:--version}\
+  %{-help=*:--help=%*}\
+  %{!fsyntax-only:%{S:%W{o*}%{!o*:-o %b.s}}}\
+- %{fsyntax-only:-o %j} %{-param*}\
++ %{fsyntax-only:-o %j} %{-param*} " NO_SSP_SPEC "\
+  %{coverage:-fprofile-arcs -ftest-coverage}\
+  %{fprofile-arcs|fprofile-generate*|coverage:\
+    %{!fprofile-update=singel:\
+--- a/gcc/params.def	2016-03-30 09:47:40.000000000 +0200
++++ b/gcc/params.def	2016-09-19 12:56:58.443179039 +0200
+@@ -673,7 +673,7 @@ DEFPARAM (PARAM_INTEGER_SHARE_LIMIT,
+ DEFPARAM (PARAM_SSP_BUFFER_SIZE,
+ 	  "ssp-buffer-size",
+ 	  "The lower bound for a buffer to be considered for stack smashing protection.",
+-	  8, 1, 0)
++	  4, 1, 0)
+ 
+ DEFPARAM (PARAM_MIN_SIZE_FOR_STACK_SHARING,
+ 	  "min-size-for-stack-sharing",

diff --git a/9.3.0/gentoo/05_all_alpha-mieee-default.patch b/9.3.0/gentoo/05_all_alpha-mieee-default.patch
new file mode 100644
index 0000000..b266d77
--- /dev/null
+++ b/9.3.0/gentoo/05_all_alpha-mieee-default.patch
@@ -0,0 +1,39 @@
+Set the default behavior on alpha to use -mieee since the large majority of
+time we want this (bad/weird things can happen with packages built without
+it).
+
+To satisfy those people who may not want -mieee forced on them all the time,
+we also provide -mno-ieee.
+
+Patch by Mike Frysinger <vapier@gentoo.org>
+
+Note: upstream doesn't want to take this due to long standing behavior, and
+because it'd make behavior across OS's inconsistent:
+	https://gcc.gnu.org/ml/gcc-patches/2003-07/msg02144.html
+
+This makes sense for upstream, but Gentoo is more concerned about packages
+behaving the same across arches under Linux.
+
+--- a/gcc/config/alpha/alpha.h
++++ b/gcc/config/alpha/alpha.h
+@@ -96,6 +96,8 @@ along with GCC; see the file COPYING3.  If not see
+   while (0)
+ #endif
+ 
++#define CPP_SPEC "%{!no-ieee:-mieee}"
++
+ /* Run-time compilation parameters selecting different hardware subsets.  */
+ 
+ /* Which processor to schedule for. The cpu attribute defines a list that
+--- a/gcc/config/alpha/alpha.opt
++++ b/gcc/config/alpha/alpha.opt
+@@ -35,7 +35,7 @@
+ Request IEEE-conformant math library routines (OSF/1).
+ 
+ mieee
+-Target Report RejectNegative Mask(IEEE)
++Target Report Mask(IEEE)
+ Emit IEEE-conformant code, without inexact exceptions.
+ 
+ mieee-with-inexact
+

diff --git a/9.3.0/gentoo/06_all_ia64_note.GNU-stack.patch b/9.3.0/gentoo/06_all_ia64_note.GNU-stack.patch
new file mode 100644
index 0000000..66a787e
--- /dev/null
+++ b/9.3.0/gentoo/06_all_ia64_note.GNU-stack.patch
@@ -0,0 +1,92 @@
+http://gcc.gnu.org/PR21098
+
+
+2004-09-20  Jakub Jelinek  <jakub@redhat.com>
+
+	* config/rs6000/ppc-asm.h: Add .note.GNU-stack section also
+	on ppc64-linux.
+
+	* config/ia64/lib1funcs.asm: Add .note.GNU-stack section on
+	ia64-linux.
+	* config/ia64/crtbegin.asm: Likewise.
+	* config/ia64/crtend.asm: Likewise.
+	* config/ia64/crti.asm: Likewise.
+	* config/ia64/crtn.asm: Likewise.
+
+2004-05-14  Jakub Jelinek  <jakub@redhat.com>
+
+	* config/ia64/linux.h (TARGET_ASM_FILE_END): Define.
+
+
+--- a/gcc/config/ia64/linux.h
++++ b/gcc/config/ia64/linux.h
+@@ -24,6 +24,8 @@ a copy of the GCC Runtime Library Exception along with this program;
+ see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
+ <http://www.gnu.org/licenses/>.  */
+ 
++#define TARGET_ASM_FILE_END file_end_indicate_exec_stack
++
+ /* This is for -profile to use -lc_p instead of -lc.  */
+ #undef CC1_SPEC
+ #define CC1_SPEC "%{profile:-p} %{G*}"
+--- a/gcc/config/rs6000/ppc-asm.h
++++ b/gcc/config/rs6000/ppc-asm.h
+@@ -352,7 +352,7 @@ GLUE(.L,name): \
+ #endif
+ #endif
+ 
+-#if defined __linux__ && !defined __powerpc64__
++#if defined __linux__
+ 	.section .note.GNU-stack
+ 	.previous
+ #endif
+--- a/libgcc/config/ia64/crtbegin.S
++++ b/libgcc/config/ia64/crtbegin.S
+@@ -252,3 +252,7 @@ __do_jv_register_classes:
+ .weak __cxa_finalize
+ #endif
+ .weak _Jv_RegisterClasses
++
++#ifdef __linux__
++.section .note.GNU-stack; .previous
++#endif
+--- a/libgcc/config/ia64/crtend.S
++++ b/libgcc/config/ia64/crtend.S
+@@ -119,3 +119,6 @@ __do_global_ctors_aux:
+ 
+ 	br.ret.sptk.many rp
+ 	.endp __do_global_ctors_aux
++#ifdef __linux__
++.section .note.GNU-stack; .previous
++#endif
+--- a/libgcc/config/ia64/crti.S
++++ b/libgcc/config/ia64/crti.S
+@@ -49,5 +49,8 @@ _fini:
+ 	.save rp, r33
+ 	mov	r33 = b0
+ 	.body
++#ifdef __linux__
++.section .note.GNU-stack; .previous
++#endif
+ 
+ # end of crti.S
+--- a/libgcc/config/ia64/crtn.S
++++ b/libgcc/config/ia64/crtn.S
+@@ -39,5 +39,8 @@
+ 	.restore sp
+ 	mov	r12 = r35
+ 	br.ret.sptk.many b0
++#ifdef __linux__
++.section .note.GNU-stack; .previous
++#endif
+ 
+ # end of crtn.S
+--- a/libgcc/config/ia64/lib1funcs.S
++++ b/libgcc/config/ia64/lib1funcs.S
+@@ -793,3 +793,6 @@ __floattitf:
+ 	.endp __floattitf
+ #endif
+ #endif
++#ifdef __linux__
++.section .note.GNU-stack; .previous
++#endif

diff --git a/9.3.0/gentoo/07_all_i386_libgcc_note.GNU-stack.patch b/9.3.0/gentoo/07_all_i386_libgcc_note.GNU-stack.patch
new file mode 100644
index 0000000..7f74945
--- /dev/null
+++ b/9.3.0/gentoo/07_all_i386_libgcc_note.GNU-stack.patch
@@ -0,0 +1,54 @@
+--- a/libgcc/config/i386/resms64.h	2018-01-03 11:03:58.000000000 +0100
++++ b/libgcc/config/i386/resms64.h	2018-05-01 12:59:48.942833419 +0200
+@@ -57,3 +57,6 @@ MS2SYSV_STUB_END(resms64_17)
+ MS2SYSV_STUB_END(resms64_18)
+ 
+ #endif /* __x86_64__ */
++#if defined(__linux__) && defined(__ELF__)
++.section .note.GNU-stack,"",%progbits
++#endif
+--- a/libgcc/config/i386/resms64f.h	2018-01-03 11:03:58.000000000 +0100
++++ b/libgcc/config/i386/resms64f.h	2018-05-01 13:00:23.422832853 +0200
+@@ -55,3 +55,6 @@ MS2SYSV_STUB_END(resms64f_16)
+ MS2SYSV_STUB_END(resms64f_17)
+ 
+ #endif /* __x86_64__ */
++#if defined(__linux__) && defined(__ELF__)
++.section .note.GNU-stack,"",%progbits
++#endif
+--- a/libgcc/config/i386/resms64fx.h	2018-02-26 20:46:34.000000000 +0100
++++ b/libgcc/config/i386/resms64fx.h	2018-05-01 13:06:49.682826518 +0200
+@@ -62,3 +62,6 @@ MS2SYSV_STUB_END(resms64fx_16)
+ MS2SYSV_STUB_END(resms64fx_17)
+ 
+ #endif /* __x86_64__ */
++#if defined(__linux__) && defined(__ELF__)
++.section .note.GNU-stack,"",%progbits
++#endif
+--- a/libgcc/config/i386/resms64x.h	2018-02-26 20:46:34.000000000 +0100
++++ b/libgcc/config/i386/resms64x.h	2018-05-01 13:07:21.702825993 +0200
+@@ -63,3 +63,6 @@ MS2SYSV_STUB_END(resms64x_17)
+ MS2SYSV_STUB_END(resms64x_18)
+ 
+ #endif /* __x86_64__ */
++#if defined(__linux__) && defined(__ELF__)
++.section .note.GNU-stack,"",%progbits
++#endif
+--- a/libgcc/config/i386/savms64.h	2018-01-03 11:03:58.000000000 +0100
++++ b/libgcc/config/i386/savms64.h	2018-05-01 13:07:48.952825546 +0200
+@@ -57,3 +57,6 @@ MS2SYSV_STUB_END(savms64_17)
+ MS2SYSV_STUB_END(savms64_18)
+ 
+ #endif /* __x86_64__ */
++#if defined(__linux__) && defined(__ELF__)
++.section .note.GNU-stack,"",%progbits
++#endif
+--- a/libgcc/config/i386/savms64f.h	2018-01-03 11:03:58.000000000 +0100
++++ b/libgcc/config/i386/savms64f.h	2018-05-01 13:08:30.082824871 +0200
+@@ -55,3 +55,6 @@ MS2SYSV_STUB_END(savms64f_16)
+ MS2SYSV_STUB_END(savms64f_17)
+ 
+ #endif /* __x86_64__ */
++#if defined(__linux__) && defined(__ELF__)
++.section .note.GNU-stack,"",%progbits
++#endif

diff --git a/9.3.0/gentoo/08_all_libiberty-asprintf.patch b/9.3.0/gentoo/08_all_libiberty-asprintf.patch
new file mode 100644
index 0000000..bee0c4c
--- /dev/null
+++ b/9.3.0/gentoo/08_all_libiberty-asprintf.patch
@@ -0,0 +1,18 @@
+2008-07-25  Magnus Granberg  <zorry@ume.nu>
+
+	* include/libiberty.h (asprintf): Don't declare if defined as a macro
+
+--- a/include/libiberty.h
++++ b/include/libiberty.h
+@@ -609,8 +609,11 @@ extern int pwait (int, int *, int);
+ /* Like sprintf but provides a pointer to malloc'd storage, which must
+    be freed by the caller.  */
+ 
++/* asprintf may be declared as a macro by glibc with __USE_FORTIFY_LEVEL.  */
++#ifndef asprintf
+ extern int asprintf (char **, const char *, ...) ATTRIBUTE_PRINTF_2;
+ #endif
++#endif
+ 
+ #if !HAVE_DECL_VASPRINTF
+ /* Like vsprintf but provides a pointer to malloc'd storage, which

diff --git a/9.3.0/gentoo/09_all_libiberty-pic.patch b/9.3.0/gentoo/09_all_libiberty-pic.patch
new file mode 100644
index 0000000..b6160a7
--- /dev/null
+++ b/9.3.0/gentoo/09_all_libiberty-pic.patch
@@ -0,0 +1,10 @@
+--- a/libiberty/Makefile.in
++++ b/libiberty/Makefile.in
+@@ -246,6 +246,7 @@ $(TARGETLIB): $(REQUIRED_OFILES) $(EXTRA_OFILES) $(LIBOBJS)
+ 	  $(AR) $(AR_FLAGS) $(TARGETLIB) \
+ 	    $(REQUIRED_OFILES) $(EXTRA_OFILES) $(LIBOBJS); \
+ 	  $(RANLIB) $(TARGETLIB); \
++	  cp $(TARGETLIB) ../ ; \
+ 	  cd ..; \
+ 	else true; fi
+ 

diff --git a/9.3.0/gentoo/10_all_nopie-all-flags.patch b/9.3.0/gentoo/10_all_nopie-all-flags.patch
new file mode 100644
index 0000000..48536e6
--- /dev/null
+++ b/9.3.0/gentoo/10_all_nopie-all-flags.patch
@@ -0,0 +1,18 @@
+We need to pass NO_PIE_CFLAGS to ALL_* so gcc don't fail when
+we compile it with older gcc and pie.
+
+--- a/gcc/Makefile.in	2015-06-25 19:18:12.000000000 +0200
++++ b/gcc/Makefile.in	2016-04-22 00:12:54.029178860 +0200
+@@ -991,10 +991,10 @@ ALL_CXXFLAGS = $(T_CFLAGS) $(CFLAGS-$@)
+ ALL_CPPFLAGS = $(INCLUDES) $(CPPFLAGS)
+ 
+ # This is the variable to use when using $(COMPILER).
+-ALL_COMPILERFLAGS = $(ALL_CXXFLAGS)
++ALL_COMPILERFLAGS = $(NO_PIE_CFLAGS) $(ALL_CXXFLAGS)
+ 
+ # This is the variable to use when using $(LINKER).
+-ALL_LINKERFLAGS = $(ALL_CXXFLAGS)
++ALL_LINKERFLAGS = $(NO_PIE_CFLAGS) $(ALL_CXXFLAGS)
+ 
+ # Build and host support libraries.
+ 

diff --git a/9.3.0/gentoo/11_all_extra-options.patch b/9.3.0/gentoo/11_all_extra-options.patch
new file mode 100644
index 0000000..9187af8
--- /dev/null
+++ b/9.3.0/gentoo/11_all_extra-options.patch
@@ -0,0 +1,89 @@
+On Hardened we add some options like -fstack-clash-protection and -z now
+
+--- a/gcc/common.opt	2018-03-28 16:51:09.000000000 +0200
++++ a/gcc/common.opt	2018-04-30 15:35:55.274096877 +0200
+@@ -2367,7 +2367,7 @@ Common Alias(fstack-check=, specific, no
+ Insert stack checking code into the program.  Same as -fstack-check=specific.
+ 
+ fstack-clash-protection
+-Common Report Var(flag_stack_clash_protection) Optimization
++Common Report Var(flag_stack_clash_protection) Optimization Init(-1)
+ Insert code to probe each page of stack space as it is allocated to protect
+ from stack-clash style attacks.
+ 
+--- a/gcc/defaults.h	2018-01-03 11:03:58.000000000 +0100
++++ b/gcc/defaults.h	2018-05-01 12:41:29.522851451 +0200
+@@ -1435,6 +1435,15 @@ see the files COPYING3 and COPYING.RUNTI
+ #define STACK_CHECK_MAX_VAR_SIZE (STACK_CHECK_MAX_FRAME_SIZE / 100)
+ #endif
+ 
++/* Default value for flag_clash_protector when flag_clash_protector is
++   initialized to -1.  */
++#ifdef EXTRA_OPTIONS
++#define DEFAULT_FLAG_SCP 1
++#endif
++#ifndef DEFAULT_FLAG_SCP
++#define DEFAULT_FLAG_SCP 0
++#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
+--- a/gcc/toplev.c	2018-02-13 17:18:37.000000000 +0100
++++ b/toplev.c	2018-04-30 16:46:37.244027303 +0200
+@@ -1682,6 +1682,10 @@ process_options (void)
+ 
+   /* -fstack-clash-protection is not currently supported on targets
+      where the stack grows up.  */
++  if (flag_stack_clash_protection == -1)
++    {
++      flag_stack_clash_protection = DEFAULT_FLAG_SCP;
++    }
+   if (flag_stack_clash_protection && !STACK_GROWS_DOWNWARD)
+     {
+       warning_at (UNKNOWN_LOCATION, 0,
+
+--- a/libgcc/Makefile.in	2011-11-22 04:01:02.000000000 +0100
++++ b/libgcc/Makefile.in	2011-12-25 15:18:22.449610631 +0100
+@@ -225,7 +225,7 @@ endif
+ LIBGCC2_DEBUG_CFLAGS = -g
+ LIBGCC2_CFLAGS = -O2 $(LIBGCC2_INCLUDES) $(GCC_CFLAGS) $(HOST_LIBGCC2_CFLAGS) \
+ 		 $(LIBGCC2_DEBUG_CFLAGS) -DIN_LIBGCC2 \
+-		 -fbuilding-libgcc -fno-stack-protector \
++		 -fbuilding-libgcc -fno-stack-protector -fno-stack-clash-protection \
+ 		 $(INHIBIT_LIBC_CFLAGS)
+ 
+ # Additional options to use when compiling libgcc2.a.
+@@ -279,7 +290,7 @@ INTERNAL_CFLAGS = $(CFLAGS) $(LIBGCC2_CF
+   -finhibit-size-directive -fno-inline -fno-exceptions \
+   -fno-zero-initialized-in-bss -fno-toplevel-reorder -fno-tree-vectorize \
+   -fbuilding-libgcc -fno-stack-protector $(FORCE_EXPLICIT_EH_REGISTRY) \
+-  $(INHIBIT_LIBC_CFLAGS)
++  -fno-stack-clash-protection $(INHIBIT_LIBC_CFLAGS)
+ 
+ # Extra flags to use when compiling crt{begin,end}.o.
+ CRTSTUFF_T_CFLAGS =
+--- a/gcc/gcc.c	2016-02-19 23:18:38.000000000 +0100
++++ b/gcc/gcc.c	2016-05-02 22:56:10.185721270 +0200
+@@ -868,6 +868,12 @@ proper position among the other output f
+ #endif
+ #endif
+ 
++#ifdef EXTRA_OPTIONS
++#define LINK_NOW_SPEC "%{!nonow:-z now} "
++#else
++#define LINK_NOW_SPEC ""
++#endif
++
+ #ifdef ENABLE_DEFAULT_PIE
+ #define NO_PIE_SPEC		"no-pie|static"
+ #define PIE_SPEC		NO_PIE_SPEC "|r|shared:;"
+@@ -1013,7 +1020,7 @@ proper position among the other output f
+     %(linker) " \
+     LINK_PLUGIN_SPEC \
+    "%{flto|flto=*:%<fcompare-debug*} \
+-    %{flto} %{fno-lto} %{flto=*} %l " LINK_PIE_SPEC \
++    %{flto} %{fno-lto} %{flto=*} %l " LINK_PIE_SPEC LINK_NOW_SPEC \
+    "%{fuse-ld=*:-fuse-ld=%*} " LINK_COMPRESS_DEBUG_SPEC \
+    "%X %{o*} %{e*} %{N} %{n} %{r}\
+     %{s} %{t} %{u*} %{z} %{Z} %{!nostdlib:%{!nostartfiles:%S}} \

diff --git a/9.3.0/gentoo/12_all_pr55930-dependency-tracking.patch b/9.3.0/gentoo/12_all_pr55930-dependency-tracking.patch
new file mode 100644
index 0000000..a8743e0
--- /dev/null
+++ b/9.3.0/gentoo/12_all_pr55930-dependency-tracking.patch
@@ -0,0 +1,18 @@
+libatomic build failure if configured with --disable-dependency-tracking
+load_n.c:115:1: fatal error: opening dependency file .deps/load_1_.lo.Ppo: No such file or directory
+
+https://bugs.gentoo.org/463463
+http://gcc.gnu.org/PR55930
+
+--- a/libatomic/Makefile.in
++++ b/libatomic/Makefile.in
+@@ -298,7 +298,8 @@ PAT_N = $(word 2,$(PAT_SPLIT))
+ PAT_S = $(word 3,$(PAT_SPLIT))
+ IFUNC_DEF = -DIFUNC_ALT=$(PAT_S)
+ IFUNC_OPT = $(word $(PAT_S),$(IFUNC_OPTIONS))
+-M_DEPS = -MT $@ -MD -MP -MF $(DEPDIR)/$(@F).Ppo
++@AMDEP_TRUE@M_DEPS = -MT $@ -MD -MP -MF $(DEPDIR)/$(@F).Ppo
++@AMDEP_FALSE@M_DEPS =
+ M_SIZE = -DN=$(PAT_N)
+ M_IFUNC = $(if $(PAT_S),$(IFUNC_DEF) $(IFUNC_OPT))
+ M_FILE = $(PAT_BASE)_n.c

diff --git a/9.3.0/gentoo/13_all_sh-drop-sysroot-suffix.patch b/9.3.0/gentoo/13_all_sh-drop-sysroot-suffix.patch
new file mode 100644
index 0000000..3dadd4c
--- /dev/null
+++ b/9.3.0/gentoo/13_all_sh-drop-sysroot-suffix.patch
@@ -0,0 +1,32 @@
+From 5eeeff19bb4978a8d3c0d53bc81744bc25d82993 Mon Sep 17 00:00:00 2001
+From: Sergei Trofimovich <slyfox@gentoo.org>
+Date: Sat, 14 Apr 2018 13:07:39 +0100
+Subject: [PATCH] gcc/config.gcc: sh-*: Disable sysroot-suffix (PR42947)
+
+sh-* is a multilib target. It is also one of 2 sysroot-prefix targets.
+Unfortunately two options do not mix well. Attempt to use default
+multilib flavour always prepends sysroot-prefix.
+
+Bug: https://bugs.gentoo.org/511548
+Bug: https://gcc.gnu.org/PR42947
+Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
+---
+ gcc/config.gcc | 2 --
+ 1 file changed, 2 deletions(-)
+
+diff --git a/gcc/config.gcc b/gcc/config.gcc
+index 55c314afdbd..c320f24f123 100644
+--- a/gcc/config.gcc
++++ b/gcc/config.gcc
+@@ -2866,8 +2866,6 @@ sh-*-elf* | sh[12346l]*-*-elf* | \
+ 	if test x${enable_incomplete_targets} = xyes ; then
+ 		tm_defines="$tm_defines SUPPORT_SH1=1 SUPPORT_SH2E=1 SUPPORT_SH4=1 SUPPORT_SH4_SINGLE=1 SUPPORT_SH2A=1 SUPPORT_SH2A_SINGLE=1"
+ 	fi
+-	tm_file="$tm_file ./sysroot-suffix.h"
+-	tmake_file="$tmake_file t-sysroot-suffix"
+ 	;;
+ sh-*-rtems*)
+ 	tmake_file="${tmake_file} sh/t-sh sh/t-rtems"
+-- 
+2.17.0
+

diff --git a/9.3.0/gentoo/14_all_ia64-TEXTREL.patch b/9.3.0/gentoo/14_all_ia64-TEXTREL.patch
new file mode 100644
index 0000000..706dbe5
--- /dev/null
+++ b/9.3.0/gentoo/14_all_ia64-TEXTREL.patch
@@ -0,0 +1,22 @@
+Fix textrels on -rdynamic binaries:
+Bug: https://gcc.gnu.org/PR84553
+Bug: https://bugs.gentoo.org/566118
+--- a/gcc/config/ia64/ia64.c
++++ a/gcc/config/ia64/ia64.c
+@@ -10838,12 +10838,14 @@ ia64_hpux_reloc_rw_mask (void)
+ 
+ /* For others, relax this so that relocations to local data goes in
+    read-only segments, but we still cannot allow global relocations
+-   in read-only segments.  */
++   in read-only segments.  Except that use of -rdynamic at link time
++   may make any local data global, so we can't allow local data in
++   read-only segments either.  */
+ 
+ static int
+ ia64_reloc_rw_mask (void)
+ {
+-  return flag_pic ? 3 : 2;
++  return flag_pic ? 3 : 3;
+ }
+ 
+ /* Return the section to use for X.  The only special thing we do here

diff --git a/9.3.0/gentoo/15_all_disable-systemtap-switch.patch b/9.3.0/gentoo/15_all_disable-systemtap-switch.patch
new file mode 100644
index 0000000..d5ae8d0
--- /dev/null
+++ b/9.3.0/gentoo/15_all_disable-systemtap-switch.patch
@@ -0,0 +1,122 @@
+From bb510ed7ea82093c924b027489db6f92250a85b3 Mon Sep 17 00:00:00 2001
+From: Sergei Trofimovich <slyfox@gentoo.org>
+Date: Sat, 12 May 2018 12:56:46 +0100
+Subject: [PATCH] gcc/configure.ac: add --disable-systemtap switch
+
+Before the change systemtap probes were enabled
+if target headers had sys/sdt.h at ./configure time.
+
+After the change explicitly ask to enable or disable
+for probe support and not rely on automagic dependency
+discovery.
+
+Bug: https://bugs.gentoo.org/654748
+Bug: https://gcc.gnu.org/bugzilla/PR61257
+Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
+---
+ gcc/configure    | 34 ++++++++++++++++++++++++++--------
+ gcc/configure.ac | 30 ++++++++++++++++++++++--------
+ 2 files changed, 48 insertions(+), 16 deletions(-)
+
+diff --git a/gcc/configure b/gcc/configure
+index 3dcf7752b..c2049f117 100755
+--- a/gcc/configure
++++ b/gcc/configure
+@@ -988,6 +988,7 @@ enable_gnu_unique_object
+ enable_linker_build_id
+ enable_libssp
+ enable_default_ssp
++enable_systemtap
+ with_long_double_128
+ with_long_double_format
+ with_gc
+@@ -1740,6 +1741,7 @@ Optional Features:
+                           compiler will always pass --build-id to linker
+   --enable-libssp         enable linking against libssp
+   --enable-default-ssp    enable Stack Smashing Protection as default
++  --disable-systemtap     enable systemtap static probe points [default=auto]
+   --enable-maintainer-mode
+                           enable make rules and dependencies not useful (and
+                           sometimes confusing) to the casual installer
+@@ -29330,17 +29332,33 @@ fi
+ 
+ # Test for <sys/sdt.h> on the target.
+ 
+-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking sys/sdt.h in the target C library" >&5
++
++# Check whether --enable-systemtap was given.
++if test "${enable_systemtap+set}" = set; then :
++  enableval=$enable_systemtap; enable_systemtap=$enableval
++else
++  enable_systemtap=auto
++fi
++
++
++if test x$enable_systemtap != xno; then
++  { $as_echo "$as_me:${as_lineno-$LINENO}: checking sys/sdt.h in the target C library" >&5
+ $as_echo_n "checking sys/sdt.h in the target C library... " >&6; }
+-have_sys_sdt_h=no
+-if test -f $target_header_dir/sys/sdt.h; then
+-  have_sys_sdt_h=yes
++  have_sys_sdt_h=no
++  if test -f $target_header_dir/sys/sdt.h ; then
++    have_sys_sdt_h=yes
+ 
+ $as_echo "#define HAVE_SYS_SDT_H 1" >>confdefs.h
+ 
+-fi
+-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_sys_sdt_h" >&5
++  fi
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_sys_sdt_h" >&5
+ $as_echo "$have_sys_sdt_h" >&6; }
++  if test x$enable_systemtap = xyes ; then
++    if test x$have_sys_sdt_h = xno ; then
++      as_fn_error $? "sys/sdt.h was not found" "$LINENO" 5
++    fi
++  fi
++fi
+ 
+ # Check if TFmode long double should be used by default or not.
+ # Some glibc targets used DFmode long double, but with glibc 2.4
+--- a/gcc/configure.ac
++++ b/gcc/configure.ac
+@@ -6000,14 +6000,28 @@ AC_SUBST([enable_default_ssp])
+ 
+ # Test for <sys/sdt.h> on the target.
+ GCC_TARGET_TEMPLATE([HAVE_SYS_SDT_H])
+-AC_MSG_CHECKING(sys/sdt.h in the target C library)
+-have_sys_sdt_h=no
+-if test -f $target_header_dir/sys/sdt.h; then
+-  have_sys_sdt_h=yes
+-  AC_DEFINE(HAVE_SYS_SDT_H, 1,
+-            [Define if your target C library provides sys/sdt.h])
+-fi
+-AC_MSG_RESULT($have_sys_sdt_h)
++
++AC_ARG_ENABLE(systemtap,
++[AS_HELP_STRING([--disable-systemtap],
++  [enable systemtap static probe points [default=auto]])],
++      enable_systemtap=$enableval,
++      enable_systemtap=auto)
++
++if test x$enable_systemtap != xno; then
++  AC_MSG_CHECKING(sys/sdt.h in the target C library)
++  have_sys_sdt_h=no
++  if test -f $target_header_dir/sys/sdt.h ; then
++    have_sys_sdt_h=yes
++    AC_DEFINE(HAVE_SYS_SDT_H, 1,
++              [Define if your target C library provides sys/sdt.h])
++  fi
++  AC_MSG_RESULT($have_sys_sdt_h)
++  if test x$enable_systemtap = xyes ; then
++    if test x$have_sys_sdt_h = xno ; then
++      AC_MSG_ERROR([sys/sdt.h was not found])
++    fi
++  fi
++fi
+ 
+ # Check if TFmode long double should be used by default or not.
+ # Some glibc targets used DFmode long double, but with glibc 2.4
+-- 
+2.17.0
+

diff --git a/9.3.0/gentoo/16_all_m68k-textrel-on-libgcc.patch b/9.3.0/gentoo/16_all_m68k-textrel-on-libgcc.patch
new file mode 100644
index 0000000..a2aa100
--- /dev/null
+++ b/9.3.0/gentoo/16_all_m68k-textrel-on-libgcc.patch
@@ -0,0 +1,93 @@
+https://gcc.gnu.org/PR86224
+
+From 1d89df42bdaf0745fd2a0d294471ac16f0553707 Mon Sep 17 00:00:00 2001
+From: Sergei Trofimovich <slyfox@gentoo.org>
+Date: Sat, 28 Jul 2018 11:33:27 +0100
+Subject: [PATCH] libgcc: m68k: avoid absolute relocation in shared library
+
+Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
+---
+ libgcc/config/m68k/lb1sf68.S | 19 ++++++++++++++-----
+ 1 file changed, 14 insertions(+), 5 deletions(-)
+
+diff --git a/libgcc/config/m68k/lb1sf68.S b/libgcc/config/m68k/lb1sf68.S
+index 325a7c17d9b..16c6dc3f5a7 100644
+--- a/libgcc/config/m68k/lb1sf68.S
++++ b/libgcc/config/m68k/lb1sf68.S
+@@ -435,7 +435,10 @@ $_exception_handler:
+ 	.text
+ 	FUNC(__mulsi3)
+ 	.globl	SYM (__mulsi3)
++	.globl	SYM (__mulsi3_internal)
++	.hidden	SYM (__mulsi3_internal)
+ SYM (__mulsi3):
++SYM (__mulsi3_internal):
+ 	movew	sp@(4), d0	/* x0 -> d0 */
+ 	muluw	sp@(10), d0	/* x0*y1 */
+ 	movew	sp@(6), d1	/* x1 -> d1 */
+@@ -458,7 +461,10 @@ SYM (__mulsi3):
+ 	.text
+ 	FUNC(__udivsi3)
+ 	.globl	SYM (__udivsi3)
++	.globl	SYM (__udivsi3_internal)
++	.hidden	SYM (__udivsi3_internal)
+ SYM (__udivsi3):
++SYM (__udivsi3_internal):
+ #ifndef __mcoldfire__
+ 	movel	d2, sp@-
+ 	movel	sp@(12), d1	/* d1 = divisor */
+@@ -534,7 +540,10 @@ L2:	subql	IMM (1),d4
+ 	.text
+ 	FUNC(__divsi3)
+ 	.globl	SYM (__divsi3)
++	.globl	SYM (__divsi3_internal)
++	.hidden	SYM (__divsi3_internal)
+ SYM (__divsi3):
++SYM (__divsi3_internal):
+ 	movel	d2, sp@-
+ 
+ 	moveq	IMM (1), d2	/* sign of result stored in d2 (=1 or =-1) */
+@@ -557,7 +566,7 @@ L1:	movel	sp@(8), d0	/* d0 = dividend */
+ 
+ L2:	movel	d1, sp@-
+ 	movel	d0, sp@-
+-	PICCALL	SYM (__udivsi3)	/* divide abs(dividend) by abs(divisor) */
++	PICCALL	SYM (__udivsi3_internal)	/* divide abs(dividend) by abs(divisor) */
+ 	addql	IMM (8), sp
+ 
+ 	tstb	d2
+@@ -577,13 +586,13 @@ SYM (__umodsi3):
+ 	movel	sp@(4), d0	/* d0 = dividend */
+ 	movel	d1, sp@-
+ 	movel	d0, sp@-
+-	PICCALL	SYM (__udivsi3)
++	PICCALL	SYM (__udivsi3_internal)
+ 	addql	IMM (8), sp
+ 	movel	sp@(8), d1	/* d1 = divisor */
+ #ifndef __mcoldfire__
+ 	movel	d1, sp@-
+ 	movel	d0, sp@-
+-	PICCALL	SYM (__mulsi3)	/* d0 = (a/b)*b */
++	PICCALL	SYM (__mulsi3_internal)	/* d0 = (a/b)*b */
+ 	addql	IMM (8), sp
+ #else
+ 	mulsl	d1,d0
+@@ -603,13 +612,13 @@ SYM (__modsi3):
+ 	movel	sp@(4), d0	/* d0 = dividend */
+ 	movel	d1, sp@-
+ 	movel	d0, sp@-
+-	PICCALL	SYM (__divsi3)
++	PICCALL	SYM (__divsi3_internal)
+ 	addql	IMM (8), sp
+ 	movel	sp@(8), d1	/* d1 = divisor */
+ #ifndef __mcoldfire__
+ 	movel	d1, sp@-
+ 	movel	d0, sp@-
+-	PICCALL	SYM (__mulsi3)	/* d0 = (a/b)*b */
++	PICCALL	SYM (__mulsi3_internal)	/* d0 = (a/b)*b */
+ 	addql	IMM (8), sp
+ #else
+ 	mulsl	d1,d0
+-- 
+2.18.0
+

diff --git a/9.3.0/gentoo/17_all_respect-build-cxxflags.patch b/9.3.0/gentoo/17_all_respect-build-cxxflags.patch
new file mode 100644
index 0000000..14139ea
--- /dev/null
+++ b/9.3.0/gentoo/17_all_respect-build-cxxflags.patch
@@ -0,0 +1,39 @@
+Pass CXXFLAGS as CXXFLAGS_FOR_BUILD to stage1.
+
+Fixes build failure when CXXFLAGS contains
+TARGET-specific flags.
+
+Tested on x86_64-pc-linux-gnu host as:
+    # CFLAGS='-O2 -mfpu=neon-vfpv4' CXXFLAGS='-O2 -mfpu=neon-vfpv4' \
+        armv7a-unknown-linux-gnueabihf-emerge -v1 sys-devel/gcc --quiet-build=n
+
+Fix by Peter Levine.
+https://bugs.gentoo.org/581406
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -170,6 +170,7 @@
+ # built for the build system to override those in BASE_FLAGS_TO_PASS.
+ EXTRA_BUILD_FLAGS = \
+ 	CFLAGS="$(CFLAGS_FOR_BUILD)" \
++	CXXFLAGS="$(CXXFLAGS_FOR_BUILD)" \
+ 	LDFLAGS="$(LDFLAGS_FOR_BUILD)"
+ 
+ # This is the list of directories to built for the host system.
+@@ -710,6 +711,7 @@
+ 	"CC_FOR_BUILD=$(CC_FOR_BUILD)" \
+ 	"CFLAGS_FOR_BUILD=$(CFLAGS_FOR_BUILD)" \
+ 	"CXX_FOR_BUILD=$(CXX_FOR_BUILD)" \
++	"CXXFLAGS_FOR_BUILD=$(CXXFLAGS_FOR_BUILD)" \
+ 	"EXPECT=$(EXPECT)" \
+ 	"FLEX=$(FLEX)" \
+ 	"INSTALL=$(INSTALL)" \
+--- a/Makefile.tpl
++++ b/Makefile.tpl
+@@ -172,6 +172,7 @@
+ # built for the build system to override those in BASE_FLAGS_TO_PASS.
+ EXTRA_BUILD_FLAGS = \
+ 	CFLAGS="$(CFLAGS_FOR_BUILD)" \
++	CXXFLAGS="$(CXXFLAGS_FOR_BUILD)" \
+ 	LDFLAGS="$(LDFLAGS_FOR_BUILD)"
+ 
+ # This is the list of directories to built for the host system.

diff --git a/9.3.0/gentoo/18_all_libgfortran-Werror.patch b/9.3.0/gentoo/18_all_libgfortran-Werror.patch
new file mode 100644
index 0000000..f6c26bf
--- /dev/null
+++ b/9.3.0/gentoo/18_all_libgfortran-Werror.patch
@@ -0,0 +1,20 @@
+libgfortran does not respect --disable-werror
+
+https://bugs.gentoo.org/433435
+http://gcc.gnu.org/PR54724
+
+
+--- a/libgfortran/configure.ac
++++ b/libgfortran/configure.ac
+@@ -140,3 +140,3 @@ AM_PROG_CC_C_O
+ if test "x$GCC" = "xyes"; then
+-  AM_FCFLAGS="-I . -Wall -Werror -fimplicit-none -fno-repack-arrays -fno-underscoring"
++  AM_FCFLAGS="-I . -Wall -fimplicit-none -fno-repack-arrays -fno-underscoring"
+   ## We like to use C11 and C99 routines when available.  This makes
+--- a/libgfortran/configure
++++ b/libgfortran/configure
+@@ -5764,3 +5764,3 @@ fi
+ # Add -Wall -fno-repack-arrays -fno-underscoring if we are using GCC.
+ if test "x$GCC" = "xyes"; then
+-  AM_FCFLAGS="-I . -Wall -Werror -fimplicit-none -fno-repack-arrays -fno-underscoring"
++  AM_FCFLAGS="-I . -Wall -fimplicit-none -fno-repack-arrays -fno-underscoring"

diff --git a/9.3.0/gentoo/19_all_libgomp-Werror.patch b/9.3.0/gentoo/19_all_libgomp-Werror.patch
new file mode 100644
index 0000000..416808a
--- /dev/null
+++ b/9.3.0/gentoo/19_all_libgomp-Werror.patch
@@ -0,0 +1,20 @@
+libgomp does not respect --disable-werror
+
+https://bugs.gentoo.org/229059
+http://gcc.gnu.org/PR38436
+--- a/libgomp/configure.ac
++++ b/libgomp/configure.ac
+@@ -4282,4 +4282,4 @@ save_CFLAGS="$CFLAGS"
+ # Add -Wall -Werror if we are using GCC.
+ if test "x$GCC" = "xyes"; then
+-  XCFLAGS="$XCFLAGS -Wall -Werror"
++  XCFLAGS="$XCFLAGS -Wall"
+ fi
+--- a/libgomp/configure
++++ b/libgomp/configure
+@@ -4282,4 +4282,4 @@ save_CFLAGS="$CFLAGS"
+ # Add -Wall -Werror if we are using GCC.
+ if test "x$GCC" = "xyes"; then
+-  XCFLAGS="$XCFLAGS -Wall -Werror"
++  XCFLAGS="$XCFLAGS -Wall"
+ fi

diff --git a/9.3.0/gentoo/20_all_libitm-Werror.patch b/9.3.0/gentoo/20_all_libitm-Werror.patch
new file mode 100644
index 0000000..27181e0
--- /dev/null
+++ b/9.3.0/gentoo/20_all_libitm-Werror.patch
@@ -0,0 +1,19 @@
+libitm does not respect --disable-werror
+
+https://bugs.gentoo.org/475350
+--- a/libitm/configure.ac
++++ b/libitm/configure.ac
+@@ -4282,4 +4282,4 @@ save_CFLAGS="$CFLAGS"
+ # Add -Wall -Werror if we are using GCC.
+ if test "x$GCC" = "xyes"; then
+-  XCFLAGS="$XCFLAGS -Wall -Werror"
++  XCFLAGS="$XCFLAGS -Wall"
+ fi
+--- a/libitm/configure
++++ b/libitm/configure
+@@ -4282,4 +4282,4 @@ save_CFLAGS="$CFLAGS"
+ # Add -Wall -Werror if we are using GCC.
+ if test "x$GCC" = "xyes"; then
+-  XCFLAGS="$XCFLAGS -Wall -Werror"
++  XCFLAGS="$XCFLAGS -Wall"
+ fi

diff --git a/9.3.0/gentoo/21_all_libatomic-Werror.patch b/9.3.0/gentoo/21_all_libatomic-Werror.patch
new file mode 100644
index 0000000..0550722
--- /dev/null
+++ b/9.3.0/gentoo/21_all_libatomic-Werror.patch
@@ -0,0 +1,19 @@
+libatomic does not respect --disable-werror
+
+https://bugs.gentoo.org/475350
+--- a/libatomic/configure.ac
++++ b/libatomic/configure.ac
+@@ -4282,4 +4282,4 @@ save_CFLAGS="$CFLAGS"
+ # Add -Wall -Werror if we are using GCC.
+ if test "x$GCC" = "xyes"; then
+-  XCFLAGS="$XCFLAGS -Wall -Werror"
++  XCFLAGS="$XCFLAGS -Wall"
+ fi
+--- a/libatomic/configure
++++ b/libatomic/configure
+@@ -4282,4 +4282,4 @@ save_CFLAGS="$CFLAGS"
+ # Add -Wall -Werror if we are using GCC.
+ if test "x$GCC" = "xyes"; then
+-  XCFLAGS="$XCFLAGS -Wall -Werror"
++  XCFLAGS="$XCFLAGS -Wall"
+ fi

diff --git a/9.3.0/gentoo/22_all_libbacktrace-Werror.patch b/9.3.0/gentoo/22_all_libbacktrace-Werror.patch
new file mode 100644
index 0000000..57dd284
--- /dev/null
+++ b/9.3.0/gentoo/22_all_libbacktrace-Werror.patch
@@ -0,0 +1,17 @@
+libbacktrace does not respect --disable-werror
+
+https://bugs.gentoo.org/667104
+--- a/libbacktrace/configure
++++ b/libbacktrace/configure
+@@ -11634,3 +11634,3 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
+ if test -n "${with_target_subdir}"; then
+-  WARN_FLAGS="$WARN_FLAGS -Werror"
++  WARN_FLAGS="$WARN_FLAGS"
+ fi
+--- a/libbacktrace/configure.ac
++++ b/libbacktrace/configure.ac
+@@ -138,3 +138,3 @@ ACX_PROG_CC_WARNING_OPTS([-W -Wall -Wwrite-strings -Wstrict-prototypes \
+ if test -n "${with_target_subdir}"; then
+-  WARN_FLAGS="$WARN_FLAGS -Werror"
++  WARN_FLAGS="$WARN_FLAGS"
+ fi

diff --git a/9.3.0/gentoo/23_all_libsanitizer-Werror.patch b/9.3.0/gentoo/23_all_libsanitizer-Werror.patch
new file mode 100644
index 0000000..0e484a4
--- /dev/null
+++ b/9.3.0/gentoo/23_all_libsanitizer-Werror.patch
@@ -0,0 +1,17 @@
+libsanitizer does not respect --disable-werror
+
+https://bugs.gentoo.org/667104
+--- a/libsanitizer/libbacktrace/Makefile.am
++++ b/libsanitizer/libbacktrace/Makefile.am
+@@ -37,3 +37,3 @@ AM_CPPFLAGS = -I $(top_srcdir)/../include -I $(top_srcdir)/../libgcc \
+ WARN_FLAGS = -W -Wall -Wwrite-strings -Wmissing-format-attribute \
+-	     -Wcast-qual -Werror
++	     -Wcast-qual
+ C_WARN_FLAGS = $(WARN_FLAGS) -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition
+--- a/libsanitizer/libbacktrace/Makefile.in
++++ b/libsanitizer/libbacktrace/Makefile.in
+@@ -297,3 +297,3 @@ AM_CPPFLAGS = -I $(top_srcdir)/../include -I $(top_srcdir)/../libgcc \
+ WARN_FLAGS = -W -Wall -Wwrite-strings -Wmissing-format-attribute \
+-	     -Wcast-qual -Werror
++	     -Wcast-qual
+ 

diff --git a/9.3.0/gentoo/24_all_libstdcxx-no-vtv.patch b/9.3.0/gentoo/24_all_libstdcxx-no-vtv.patch
new file mode 100644
index 0000000..68508bd
--- /dev/null
+++ b/9.3.0/gentoo/24_all_libstdcxx-no-vtv.patch
@@ -0,0 +1,61 @@
+Final libstdc++.so should not contain rpath to make libvtv usable.
+It's up to final binaries to link against proper libvtv.
+
+Bug: https://bugs.gentoo.org/582524
+Bug: https://gcc.gnu.org/PR85884
+--- a/libstdc++-v3/src/Makefile.am
++++ b/libstdc++-v3/src/Makefile.am
+@@ -217,7 +217,6 @@ CXXLINK = \
+ 	$(LIBTOOL) --tag CXX \
+ 	$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+ 	--mode=link $(CXX) \
+-	$(VTV_CXXLINKFLAGS) \
+ 	$(OPT_LDFLAGS) $(SECTION_LDFLAGS) $(AM_CXXFLAGS) $(LTLDFLAGS) -o $@
+ 
+ # Symbol versioning for shared libraries.
+--- a/libstdc++-v3/src/Makefile.in
++++ b/libstdc++-v3/src/Makefile.in
+@@ -511,7 +511,6 @@ CXXLINK = \
+ 	$(LIBTOOL) --tag CXX \
+ 	$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+ 	--mode=link $(CXX) \
+-	$(VTV_CXXLINKFLAGS) \
+ 	$(OPT_LDFLAGS) $(SECTION_LDFLAGS) $(AM_CXXFLAGS) $(LTLDFLAGS) -o $@
+ 
+ @ENABLE_SYMVERS_TRUE@CLEANFILES = libstdc++-symbols.ver $(version_dep)
+--- a/libstdc++-v3/src/c++11/Makefile.am
++++ b/libstdc++-v3/src/c++11/Makefile.am
+@@ -204,5 +204,4 @@ CXXLINK = \
+ 	$(LIBTOOL) --tag CXX --tag disable-shared \
+ 	$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+ 	--mode=link $(CXX) \
+-	$(VTV_CXXLINKFLAGS) \
+ 	$(OPT_LDFLAGS) $(SECTION_LDFLAGS) $(AM_CXXFLAGS) $(LTLDFLAGS) -o $@
+--- a/libstdc++-v3/src/c++11/Makefile.in
++++ b/libstdc++-v3/src/c++11/Makefile.in
+@@ -496,7 +496,6 @@ CXXLINK = \
+ 	$(LIBTOOL) --tag CXX --tag disable-shared \
+ 	$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+ 	--mode=link $(CXX) \
+-	$(VTV_CXXLINKFLAGS) \
+ 	$(OPT_LDFLAGS) $(SECTION_LDFLAGS) $(AM_CXXFLAGS) $(LTLDFLAGS) -o $@
+ 
+ all: all-am
+--- a/libstdc++-v3/src/c++98/Makefile.am
++++ b/libstdc++-v3/src/c++98/Makefile.am
+@@ -273,5 +273,4 @@ CXXLINK = \
+ 	$(LIBTOOL) --tag CXX --tag disable-shared \
+ 	$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+ 	--mode=link $(CXX) \
+-	$(VTV_CXXLINKFLAGS) \
+ 	$(OPT_LDFLAGS) $(SECTION_LDFLAGS) $(AM_CXXFLAGS) $(LTLDFLAGS) -o $@
+--- a/libstdc++-v3/src/c++98/Makefile.in
++++ b/libstdc++-v3/src/c++98/Makefile.in
+@@ -500,7 +500,6 @@ CXXLINK = \
+ 	$(LIBTOOL) --tag CXX --tag disable-shared \
+ 	$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+ 	--mode=link $(CXX) \
+-	$(VTV_CXXLINKFLAGS) \
+ 	$(OPT_LDFLAGS) $(SECTION_LDFLAGS) $(AM_CXXFLAGS) $(LTLDFLAGS) -o $@
+ 
+ all: all-am

diff --git a/9.3.0/gentoo/25_all_ia64-bootstrap.patch b/9.3.0/gentoo/25_all_ia64-bootstrap.patch
new file mode 100644
index 0000000..0a0a25b
--- /dev/null
+++ b/9.3.0/gentoo/25_all_ia64-bootstrap.patch
@@ -0,0 +1,41 @@
+https://gcc.gnu.org/PR87338
+
+From 1cc1dc32fcf6b47db4e6d28f55de343713f824a4 Mon Sep 17 00:00:00 2001
+From: James Clarke <jrtc27@jrtc27.com>
+Date: Thu, 25 Apr 2019 15:58:55 +0200
+Subject: [PATCH] PR bootstrap/87338: Fix ia64 bootstrap comparison regression
+ in r257511
+To: gcc-patches@gcc.gnu.org
+
+By using ASM_OUTPUT_LABEL, r257511 forced the assembler to start a new
+bundle when emitting an inline entry label on. Instead, use
+ASM_OUTPUT_DEBUG_LABEL like for the block begin and end labels so tags are
+emitted rather than labels.
+
+gcc/
+	PR bootstrap/87338
+	* dwarf2out.c (dwarf2out_inline_entry): Use ASM_OUTPUT_DEBUG_LABEL
+	instead of ASM_GENERATE_INTERNAL_LABEL and ASM_OUTPUT_LABEL.
+---
+ gcc/dwarf2out.c | 7 ++-----
+ 1 file changed, 2 insertions(+), 5 deletions(-)
+
+--- a/gcc/dwarf2out.c
++++ b/gcc/dwarf2out.c
+@@ -27670,11 +27670,8 @@ dwarf2out_inline_entry (tree block)
+   if (cur_line_info_table)
+     ied->view = cur_line_info_table->view;
+ 
+-  char label[MAX_ARTIFICIAL_LABEL_BYTES];
+-
+-  ASM_GENERATE_INTERNAL_LABEL (label, BLOCK_INLINE_ENTRY_LABEL,
+-			       BLOCK_NUMBER (block));
+-  ASM_OUTPUT_LABEL (asm_out_file, label);
++  ASM_OUTPUT_DEBUG_LABEL (asm_out_file, BLOCK_INLINE_ENTRY_LABEL,
++			  BLOCK_NUMBER (block));
+ }
+ 
+ /* Called from finalize_size_functions for size functions so that their body
+-- 
+1.8.5.3
+

diff --git a/9.3.0/gentoo/26_all_disable-riscv32-ABIs.patch b/9.3.0/gentoo/26_all_disable-riscv32-ABIs.patch
new file mode 100644
index 0000000..ad0128a
--- /dev/null
+++ b/9.3.0/gentoo/26_all_disable-riscv32-ABIs.patch
@@ -0,0 +1,53 @@
+Autogenerated patch disabling the 32bit RISCV support
+See https://gcc.gnu.org/PR90419
+
+diff -ruN gcc-9.1.0.orig/gcc/config/riscv/t-linux-multilib gcc-9.1.0/gcc/config/riscv/t-linux-multilib
+--- gcc-9.1.0.orig/gcc/config/riscv/t-linux-multilib	2017-02-06 22:38:37.000000000 +0100
++++ gcc-9.1.0/gcc/config/riscv/t-linux-multilib	2019-05-18 23:04:54.849400774 +0200
+@@ -1,40 +1,18 @@
+ # This file was generated by multilib-generator with the command:
+-#  ./multilib-generator rv32imac-ilp32-rv32ima,rv32imaf,rv32imafd,rv32imafc,rv32imafdc- rv32imafdc-ilp32d-rv32imafd- rv64imac-lp64-rv64ima,rv64imaf,rv64imafd,rv64imafc,rv64imafdc- rv64imafdc-lp64d-rv64imafd-
+-MULTILIB_OPTIONS = march=rv32imac/march=rv32ima/march=rv32imaf/march=rv32imafd/march=rv32imafc/march=rv32imafdc/march=rv32g/march=rv32gc/march=rv64imac/march=rv64ima/march=rv64imaf/march=rv64imafd/march=rv64imafc/march=rv64imafdc/march=rv64g/march=rv64gc mabi=ilp32/mabi=ilp32d/mabi=lp64/mabi=lp64d
+-MULTILIB_DIRNAMES = rv32imac \
+-rv32ima \
+-rv32imaf \
+-rv32imafd \
+-rv32imafc \
+-rv32imafdc \
+-rv32g \
+-rv32gc \
+-rv64imac \
++#  ./multilib-generator rv64imac-lp64-rv64ima,rv64imaf,rv64imafd,rv64imafc,rv64imafdc- rv64imafdc-lp64d-rv64imafd-
++MULTILIB_OPTIONS = march=rv64imac/march=rv64ima/march=rv64imaf/march=rv64imafd/march=rv64imafc/march=rv64imafdc/march=rv64g/march=rv64gc mabi=lp64/mabi=lp64d
++MULTILIB_DIRNAMES = rv64imac \
+ rv64ima \
+ rv64imaf \
+ rv64imafd \
+ rv64imafc \
+ rv64imafdc \
+ rv64g \
+-rv64gc ilp32 \
+-ilp32d \
+-lp64 \
++rv64gc lp64 \
+ lp64d
+-MULTILIB_REQUIRED = march=rv32imac/mabi=ilp32 \
+-march=rv32imafdc/mabi=ilp32d \
+-march=rv64imac/mabi=lp64 \
++MULTILIB_REQUIRED = march=rv64imac/mabi=lp64 \
+ march=rv64imafdc/mabi=lp64d
+-MULTILIB_REUSE = march.rv32imac/mabi.ilp32=march.rv32ima/mabi.ilp32 \
+-march.rv32imac/mabi.ilp32=march.rv32imaf/mabi.ilp32 \
+-march.rv32imac/mabi.ilp32=march.rv32imafd/mabi.ilp32 \
+-march.rv32imac/mabi.ilp32=march.rv32imafc/mabi.ilp32 \
+-march.rv32imac/mabi.ilp32=march.rv32imafdc/mabi.ilp32 \
+-march.rv32imac/mabi.ilp32=march.rv32g/mabi.ilp32 \
+-march.rv32imac/mabi.ilp32=march.rv32gc/mabi.ilp32 \
+-march.rv32imafdc/mabi.ilp32d=march.rv32imafd/mabi.ilp32d \
+-march.rv32imafdc/mabi.ilp32d=march.rv32gc/mabi.ilp32d \
+-march.rv32imafdc/mabi.ilp32d=march.rv32g/mabi.ilp32d \
+-march.rv64imac/mabi.lp64=march.rv64ima/mabi.lp64 \
++MULTILIB_REUSE = march.rv64imac/mabi.lp64=march.rv64ima/mabi.lp64 \
+ march.rv64imac/mabi.lp64=march.rv64imaf/mabi.lp64 \
+ march.rv64imac/mabi.lp64=march.rv64imafd/mabi.lp64 \
+ march.rv64imac/mabi.lp64=march.rv64imafc/mabi.lp64 \

diff --git a/9.3.0/gentoo/README.history b/9.3.0/gentoo/README.history
new file mode 100644
index 0000000..6f2d71a
--- /dev/null
+++ b/9.3.0/gentoo/README.history
@@ -0,0 +1,27 @@
+1		12 Mar 2019
+	+ 01_all_default-fortify-source.patch
+	+ 02_all_default-warn-format-security.patch
+	+ 03_all_default-warn-trampolines.patch
+	+ 04_all_default-ssp-fix.patch
+	+ 05_all_alpha-mieee-default.patch
+	+ 06_all_ia64_note.GNU-stack.patch
+	+ 07_all_i386_libgcc_note.GNU-stack.patch
+	+ 08_all_libiberty-asprintf.patch
+	+ 09_all_libiberty-pic.patch
+	+ 10_all_nopie-all-flags.patch
+	+ 11_all_extra-options.patch
+	+ 12_all_pr55930-dependency-tracking.patch
+	+ 13_all_sh-drop-sysroot-suffix.patch
+	+ 14_all_ia64-TEXTREL.patch
+	+ 15_all_disable-systemtap-switch.patch
+	+ 16_all_m68k-textrel-on-libgcc.patch
+	+ 17_all_respect-build-cxxflags.patch
+	+ 18_all_libgfortran-Werror.patch
+	+ 19_all_libgomp-Werror.patch
+	+ 20_all_libitm-Werror.patch
+	+ 21_all_libatomic-Werror.patch
+	+ 22_all_libbacktrace-Werror.patch
+	+ 23_all_libsanitizer-Werror.patch
+	+ 24_all_libstdcxx-no-vtv.patch
+	+ 25_all_ia64-bootstrap.patch
+	+ 26_all_disable-riscv32-ABIs.patch


^ permalink raw reply related	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2021-12-18 22:00 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-12-18 22:00 [gentoo-commits] proj/gcc-patches:master commit in: 9.3.0/gentoo/ Sam James
  -- strict thread matches above, loose matches on Subject: below --
2021-03-04 11:02 Sergei Trofimovich
2020-11-04  7:47 Sergei Trofimovich
2020-11-01  0:33 Sergei Trofimovich
2020-10-15 21:36 Sergei Trofimovich
2020-08-28 19:03 Sergei Trofimovich
2020-05-29 21:27 Sergei Trofimovich
2020-04-19  9:46 Sergei Trofimovich
2020-04-01  7:04 Sergei Trofimovich
2020-03-31 23:08 Sergei Trofimovich
2020-03-14 10:47 Sergei Trofimovich
2020-03-12 22:36 Sergei Trofimovich

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox