public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] proj/gcc-patches:master commit in: 11.1.0/gentoo/
@ 2021-04-27 17:34 Sergei Trofimovich
  0 siblings, 0 replies; 9+ messages in thread
From: Sergei Trofimovich @ 2021-04-27 17:34 UTC (permalink / raw
  To: gentoo-commits

commit:     7933fad0f5b1e25417a8be652e2b820a7bcf89d4
Author:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
AuthorDate: Tue Apr 27 17:02:54 2021 +0000
Commit:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Tue Apr 27 17:02:54 2021 +0000
URL:        https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=7933fad0

11.1.0: new patchset, a copy of 11.0.0 branch

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

 11.1.0/gentoo/01_all_default-fortify-source.patch  |  22 ++++
 .../02_all_default-warn-format-security.patch      |  22 ++++
 .../gentoo/03_all_default-warn-trampolines.patch   |  13 +++
 11.1.0/gentoo/04_all_nossp-on-nostdlib.patch       |  27 +++++
 11.1.0/gentoo/05_all_alpha-mieee-default.patch     |  39 +++++++
 11.1.0/gentoo/06_all_ia64_note.GNU-stack.patch     |  92 ++++++++++++++++
 11.1.0/gentoo/07_all_libiberty-asprintf.patch      |  18 +++
 11.1.0/gentoo/08_all_libiberty-pic.patch           |  10 ++
 11.1.0/gentoo/09_all_nopie-all-flags.patch         |  18 +++
 11.1.0/gentoo/10_all_sh-drop-sysroot-suffix.patch  |  32 ++++++
 11.1.0/gentoo/11_all_ia64-TEXTREL.patch            |  22 ++++
 .../gentoo/12_all_disable-systemtap-switch.patch   | 122 +++++++++++++++++++++
 11.1.0/gentoo/13_all_m68k-textrel-on-libgcc.patch  |  93 ++++++++++++++++
 11.1.0/gentoo/14_all_respect-build-cxxflags.patch  |  39 +++++++
 11.1.0/gentoo/15_all_libgomp-Werror.patch          |  20 ++++
 11.1.0/gentoo/16_all_libitm-Werror.patch           |  19 ++++
 11.1.0/gentoo/17_all_libatomic-Werror.patch        |  19 ++++
 11.1.0/gentoo/18_all_libbacktrace-Werror.patch     |  17 +++
 11.1.0/gentoo/19_all_libsanitizer-Werror.patch     |  17 +++
 11.1.0/gentoo/20_all_libstdcxx-no-vtv.patch        |  61 +++++++++++
 11.1.0/gentoo/21_all_disable-riscv32-ABIs.patch    |  53 +++++++++
 11.1.0/gentoo/22_all_default_ssp-buffer-size.patch |  14 +++
 11.1.0/gentoo/23_all_EXTRA_OPTIONS-z-now.patch     |  26 +++++
 ...all_EXTRA_OPTIONS-fstack-clash-protection.patch |  65 +++++++++++
 .../25_all_lto-intl-workaround-PR95194.patch       |  20 ++++
 11.1.0/gentoo/26_all_plugin-objdump.patch          |  34 ++++++
 11.1.0/gentoo/README.history                       |  27 +++++
 27 files changed, 961 insertions(+)

diff --git a/11.1.0/gentoo/01_all_default-fortify-source.patch b/11.1.0/gentoo/01_all_default-fortify-source.patch
new file mode 100644
index 0000000..d307474
--- /dev/null
+++ b/11.1.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/11.1.0/gentoo/02_all_default-warn-format-security.patch b/11.1.0/gentoo/02_all_default-warn-format-security.patch
new file mode 100644
index 0000000..f809abd
--- /dev/null
+++ b/11.1.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/11.1.0/gentoo/03_all_default-warn-trampolines.patch b/11.1.0/gentoo/03_all_default-warn-trampolines.patch
new file mode 100644
index 0000000..7a644cb
--- /dev/null
+++ b/11.1.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/11.1.0/gentoo/04_all_nossp-on-nostdlib.patch b/11.1.0/gentoo/04_all_nossp-on-nostdlib.patch
new file mode 100644
index 0000000..4e581a5
--- /dev/null
+++ b/11.1.0/gentoo/04_all_nossp-on-nostdlib.patch
@@ -0,0 +1,27 @@
+Disable ssp on -nostdlib, -nodefaultlibs and -ffreestanding 
+
+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
+ #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 %w%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=single:\

diff --git a/11.1.0/gentoo/05_all_alpha-mieee-default.patch b/11.1.0/gentoo/05_all_alpha-mieee-default.patch
new file mode 100644
index 0000000..cf33f14
--- /dev/null
+++ b/11.1.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 RejectNegative Mask(IEEE)
++Target Mask(IEEE)
+ Emit IEEE-conformant code, without inexact exceptions.
+ 
+ mieee-with-inexact
+

diff --git a/11.1.0/gentoo/06_all_ia64_note.GNU-stack.patch b/11.1.0/gentoo/06_all_ia64_note.GNU-stack.patch
new file mode 100644
index 0000000..66a787e
--- /dev/null
+++ b/11.1.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/11.1.0/gentoo/07_all_libiberty-asprintf.patch b/11.1.0/gentoo/07_all_libiberty-asprintf.patch
new file mode 100644
index 0000000..bee0c4c
--- /dev/null
+++ b/11.1.0/gentoo/07_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/11.1.0/gentoo/08_all_libiberty-pic.patch b/11.1.0/gentoo/08_all_libiberty-pic.patch
new file mode 100644
index 0000000..b6160a7
--- /dev/null
+++ b/11.1.0/gentoo/08_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/11.1.0/gentoo/09_all_nopie-all-flags.patch b/11.1.0/gentoo/09_all_nopie-all-flags.patch
new file mode 100644
index 0000000..48536e6
--- /dev/null
+++ b/11.1.0/gentoo/09_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/11.1.0/gentoo/10_all_sh-drop-sysroot-suffix.patch b/11.1.0/gentoo/10_all_sh-drop-sysroot-suffix.patch
new file mode 100644
index 0000000..3dadd4c
--- /dev/null
+++ b/11.1.0/gentoo/10_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/11.1.0/gentoo/11_all_ia64-TEXTREL.patch b/11.1.0/gentoo/11_all_ia64-TEXTREL.patch
new file mode 100644
index 0000000..706dbe5
--- /dev/null
+++ b/11.1.0/gentoo/11_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/11.1.0/gentoo/12_all_disable-systemtap-switch.patch b/11.1.0/gentoo/12_all_disable-systemtap-switch.patch
new file mode 100644
index 0000000..d5ae8d0
--- /dev/null
+++ b/11.1.0/gentoo/12_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/11.1.0/gentoo/13_all_m68k-textrel-on-libgcc.patch b/11.1.0/gentoo/13_all_m68k-textrel-on-libgcc.patch
new file mode 100644
index 0000000..a2aa100
--- /dev/null
+++ b/11.1.0/gentoo/13_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/11.1.0/gentoo/14_all_respect-build-cxxflags.patch b/11.1.0/gentoo/14_all_respect-build-cxxflags.patch
new file mode 100644
index 0000000..14139ea
--- /dev/null
+++ b/11.1.0/gentoo/14_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/11.1.0/gentoo/15_all_libgomp-Werror.patch b/11.1.0/gentoo/15_all_libgomp-Werror.patch
new file mode 100644
index 0000000..416808a
--- /dev/null
+++ b/11.1.0/gentoo/15_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/11.1.0/gentoo/16_all_libitm-Werror.patch b/11.1.0/gentoo/16_all_libitm-Werror.patch
new file mode 100644
index 0000000..27181e0
--- /dev/null
+++ b/11.1.0/gentoo/16_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/11.1.0/gentoo/17_all_libatomic-Werror.patch b/11.1.0/gentoo/17_all_libatomic-Werror.patch
new file mode 100644
index 0000000..0550722
--- /dev/null
+++ b/11.1.0/gentoo/17_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/11.1.0/gentoo/18_all_libbacktrace-Werror.patch b/11.1.0/gentoo/18_all_libbacktrace-Werror.patch
new file mode 100644
index 0000000..57dd284
--- /dev/null
+++ b/11.1.0/gentoo/18_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/11.1.0/gentoo/19_all_libsanitizer-Werror.patch b/11.1.0/gentoo/19_all_libsanitizer-Werror.patch
new file mode 100644
index 0000000..0e484a4
--- /dev/null
+++ b/11.1.0/gentoo/19_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/11.1.0/gentoo/20_all_libstdcxx-no-vtv.patch b/11.1.0/gentoo/20_all_libstdcxx-no-vtv.patch
new file mode 100644
index 0000000..68508bd
--- /dev/null
+++ b/11.1.0/gentoo/20_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/11.1.0/gentoo/21_all_disable-riscv32-ABIs.patch b/11.1.0/gentoo/21_all_disable-riscv32-ABIs.patch
new file mode 100644
index 0000000..ad0128a
--- /dev/null
+++ b/11.1.0/gentoo/21_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/11.1.0/gentoo/22_all_default_ssp-buffer-size.patch b/11.1.0/gentoo/22_all_default_ssp-buffer-size.patch
new file mode 100644
index 0000000..ae5a707
--- /dev/null
+++ b/11.1.0/gentoo/22_all_default_ssp-buffer-size.patch
@@ -0,0 +1,14 @@
+Change the minimal SSP buffer size.
+
+https://bugs.gentoo.org/484714
+--- a/gcc/params.opt
++++ b/gcc/params.opt
+@@ -849,7 +849,7 @@ Common Joined UInteger Var(param_ssa_name_def_chain_limit) Init(512) Param Optim
+ The maximum number of SSA_NAME assignments to follow in determining a value.
+ 
+ -param=ssp-buffer-size=
+-Common Joined UInteger Var(param_ssp_buffer_size) Init(8) IntegerRange(1, 65536) Param Optimization
++Common Joined UInteger Var(param_ssp_buffer_size) Init(4) IntegerRange(1, 65536) Param Optimization
+ The lower bound for a buffer to be considered for stack smashing protection.
+ 
+ -param=stack-clash-protection-guard-size=

diff --git a/11.1.0/gentoo/23_all_EXTRA_OPTIONS-z-now.patch b/11.1.0/gentoo/23_all_EXTRA_OPTIONS-z-now.patch
new file mode 100644
index 0000000..121dec4
--- /dev/null
+++ b/11.1.0/gentoo/23_all_EXTRA_OPTIONS-z-now.patch
@@ -0,0 +1,26 @@
+On Hardened we add some options like -z now
+
+--- 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/11.1.0/gentoo/24_all_EXTRA_OPTIONS-fstack-clash-protection.patch b/11.1.0/gentoo/24_all_EXTRA_OPTIONS-fstack-clash-protection.patch
new file mode 100644
index 0000000..e836c92
--- /dev/null
+++ b/11.1.0/gentoo/24_all_EXTRA_OPTIONS-fstack-clash-protection.patch
@@ -0,0 +1,65 @@
+On Hardened we add some options like -fstack-clash-protection.
+
+--- 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 Var(flag_stack_clash_protection) Optimization
++Common 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/gcc/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
+   $(NO_PIE_CFLAGS) -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) $(USE_TM_CLONE_REGISTRY)
++  -fno-stack-clash-protection $(INHIBIT_LIBC_CFLAGS) $(USE_TM_CLONE_REGISTRY)
+ 
+ # Extra flags to use when compiling crt{begin,end}.o.
+ CRTSTUFF_T_CFLAGS =

diff --git a/11.1.0/gentoo/25_all_lto-intl-workaround-PR95194.patch b/11.1.0/gentoo/25_all_lto-intl-workaround-PR95194.patch
new file mode 100644
index 0000000..9613216
--- /dev/null
+++ b/11.1.0/gentoo/25_all_lto-intl-workaround-PR95194.patch
@@ -0,0 +1,20 @@
+Trick libintl not to use '_INTL_REDIRECT_ASM' mode as it's
+incompatible with LTO builds.
+
+glibc does not normally use libintl implementations and uses
+it's own primitives. But musl ond others do fall back to libintl.
+
+Reported-by: Andrew Savchenko
+Bug: https://bugs.gentoo.org/723370
+Bug: https://gcc.gnu.org/PR95194
+--- a/intl/libgnuintl.h
++++ b/intl/libgnuintl.h
+@@ -93,7 +93,7 @@ extern "C" {
+    If he doesn't, we choose the method.  A third possible method is
+    _INTL_REDIRECT_ASM, supported only by GCC.  */
+ #if !(defined _INTL_REDIRECT_INLINE || defined _INTL_REDIRECT_MACROS)
+-# if __GNUC__ >= 2 && !defined __APPLE_CC__ && (defined __STDC__ || defined __cplusplus)
++# if __GNUC__ >= 2 && !defined __APPLE_CC__ && (defined __STDC__ || defined __cplusplus) && USE_ASM_ALIASES_THAT_BREAK_LTO
+ #  define _INTL_REDIRECT_ASM
+ # else
+ #  ifdef __cplusplus

diff --git a/11.1.0/gentoo/26_all_plugin-objdump.patch b/11.1.0/gentoo/26_all_plugin-objdump.patch
new file mode 100644
index 0000000..a9c33fd
--- /dev/null
+++ b/11.1.0/gentoo/26_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/11.1.0/gentoo/README.history b/11.1.0/gentoo/README.history
new file mode 100644
index 0000000..b2cb96e
--- /dev/null
+++ b/11.1.0/gentoo/README.history
@@ -0,0 +1,27 @@
+1		27 Apr 2021
+	+ 01_all_default-fortify-source.patch
+	+ 02_all_default-warn-format-security.patch
+	+ 03_all_default-warn-trampolines.patch
+	+ 04_all_nossp-on-nostdlib.patch
+	+ 05_all_alpha-mieee-default.patch
+	+ 06_all_ia64_note.GNU-stack.patch
+	+ 07_all_libiberty-asprintf.patch
+	+ 08_all_libiberty-pic.patch
+	+ 09_all_nopie-all-flags.patch
+	+ 10_all_sh-drop-sysroot-suffix.patch
+	+ 11_all_ia64-TEXTREL.patch
+	+ 12_all_disable-systemtap-switch.patch
+	+ 13_all_m68k-textrel-on-libgcc.patch
+	+ 14_all_respect-build-cxxflags.patch
+	+ 15_all_libgomp-Werror.patch
+	+ 16_all_libitm-Werror.patch
+	+ 17_all_libatomic-Werror.patch
+	+ 18_all_libbacktrace-Werror.patch
+	+ 19_all_libsanitizer-Werror.patch
+	+ 20_all_libstdcxx-no-vtv.patch
+	+ 21_all_disable-riscv32-ABIs.patch
+	+ 22_all_default_ssp-buffer-size.patch
+	+ 23_all_EXTRA_OPTIONS-z-now.patch
+	+ 24_all_EXTRA_OPTIONS-fstack-clash-protection.patch
+	+ 25_all_lto-intl-workaround-PR95194.patch
+	+ 26_all_plugin-objdump.patch


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

* [gentoo-commits] proj/gcc-patches:master commit in: 11.1.0/gentoo/
@ 2021-05-19 17:48 Sergei Trofimovich
  0 siblings, 0 replies; 9+ messages in thread
From: Sergei Trofimovich @ 2021-05-19 17:48 UTC (permalink / raw
  To: gentoo-commits

commit:     4984e512c6bb242ed2734c7c8a2b90ba0c9f44c5
Author:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
AuthorDate: Wed May 19 17:47:55 2021 +0000
Commit:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Wed May 19 17:47:55 2021 +0000
URL:        https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=4984e512

11.1.0: backport msp430 float_to_chars build fix

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

 11.1.0/gentoo/27_all_msp430-f2c.patch | 85 +++++++++++++++++++++++++++++++++++
 11.1.0/gentoo/README.history          |  3 ++
 2 files changed, 88 insertions(+)

diff --git a/11.1.0/gentoo/27_all_msp430-f2c.patch b/11.1.0/gentoo/27_all_msp430-f2c.patch
new file mode 100644
index 0000000..2c9a3c2
--- /dev/null
+++ b/11.1.0/gentoo/27_all_msp430-f2c.patch
@@ -0,0 +1,85 @@
+https://gcc.gnu.org/PR100361
+
+2021-05-18  Joern Rennecke  <joern.rennecke@riscy-ip.com>
+
+    libstdc++: Disable floating_to_chars.cc on 16 bit targets
+    
+    This patch conditionally disables the compilation of floating_to_chars.cc
+    on 16 bit targets, thus fixing a build failure for these targets as
+    the POW10_SPLIT_2 array exceeds the maximum object size.
+
+libstdc++-v3/
+	PR libstdc++/100361
+	* include/std/charconv (to_chars): Hide the overloads for
+	floating-point types for 16 bit targets.
+	* src/c++17/floating_to_chars.cc: Don't compile for 16 bit targets.
+	* testsuite/20_util/to_chars/double.cc: Run this test only on
+	size32plus targets.
+	* testsuite/20_util/to_chars/float.cc: Likewise.
+	* testsuite/20_util/to_chars/long_double.cc: Likewise.
+
+diff --git a/libstdc++-v3/include/std/charconv b/libstdc++-v3/include/std/charconv
+index 193702e677a..ac9c34d4601 100644
+--- a/libstdc++-v3/include/std/charconv
++++ b/libstdc++-v3/include/std/charconv
+@@ -703,7 +703,8 @@ namespace __detail
+ 	     chars_format __fmt = chars_format::general) noexcept;
+ #endif
+ 
+-#if _GLIBCXX_FLOAT_IS_IEEE_BINARY32 && _GLIBCXX_DOUBLE_IS_IEEE_BINARY64
++#if _GLIBCXX_FLOAT_IS_IEEE_BINARY32 && _GLIBCXX_DOUBLE_IS_IEEE_BINARY64 \
++    && __SIZE_WIDTH__ >= 32
+   // Floating-point std::to_chars
+ 
+   // Overloads for float.
+diff --git a/libstdc++-v3/src/c++17/floating_to_chars.cc b/libstdc++-v3/src/c++17/floating_to_chars.cc
+index 1a0abb9e80f..44f547a77b4 100644
+--- a/libstdc++-v3/src/c++17/floating_to_chars.cc
++++ b/libstdc++-v3/src/c++17/floating_to_chars.cc
+@@ -50,7 +50,9 @@ extern "C" int __sprintfieee128(char*, const char*, ...);
+ 
+ // This implementation crucially assumes float/double have the
+ // IEEE binary32/binary64 formats.
+-#if _GLIBCXX_FLOAT_IS_IEEE_BINARY32 && _GLIBCXX_DOUBLE_IS_IEEE_BINARY64
++#if _GLIBCXX_FLOAT_IS_IEEE_BINARY32 && _GLIBCXX_DOUBLE_IS_IEEE_BINARY64 \
++    /* And it also assumes that uint64_t POW10_SPLIT_2[3133][3] is valid.  */\
++    && __SIZE_WIDTH__ >= 32
+ 
+ // Determine the binary format of 'long double'.
+ 
+diff --git a/libstdc++-v3/testsuite/20_util/to_chars/double.cc b/libstdc++-v3/testsuite/20_util/to_chars/double.cc
+index bb6f74424ed..64e62213044 100644
+--- a/libstdc++-v3/testsuite/20_util/to_chars/double.cc
++++ b/libstdc++-v3/testsuite/20_util/to_chars/double.cc
+@@ -33,6 +33,7 @@
+ 
+ // { dg-do run { target c++17 } }
+ // { dg-require-effective-target ieee-floats }
++// { dg-require-effective-target size32plus }
+ 
+ #include <charconv>
+ 
+diff --git a/libstdc++-v3/testsuite/20_util/to_chars/float.cc b/libstdc++-v3/testsuite/20_util/to_chars/float.cc
+index 0c8dd4f66df..73b9081d4ff 100644
+--- a/libstdc++-v3/testsuite/20_util/to_chars/float.cc
++++ b/libstdc++-v3/testsuite/20_util/to_chars/float.cc
+@@ -33,6 +33,7 @@
+ 
+ // { dg-do run { target c++17 } }
+ // { dg-require-effective-target ieee-floats }
++// { dg-require-effective-target size32plus }
+ 
+ #include <charconv>
+ 
+diff --git a/libstdc++-v3/testsuite/20_util/to_chars/long_double.cc b/libstdc++-v3/testsuite/20_util/to_chars/long_double.cc
+index 8cf45ad5e94..447e5368811 100644
+--- a/libstdc++-v3/testsuite/20_util/to_chars/long_double.cc
++++ b/libstdc++-v3/testsuite/20_util/to_chars/long_double.cc
+@@ -35,6 +35,7 @@
+ // { dg-xfail-run-if "Non-conforming printf (see PR98384)" { *-*-solaris* *-*-darwin* } }
+ 
+ // { dg-require-effective-target ieee-floats }
++// { dg-require-effective-target size32plus }
+ 
+ #include <charconv>
+ 

diff --git a/11.1.0/gentoo/README.history b/11.1.0/gentoo/README.history
index b2cb96e..9c9ad5e 100644
--- a/11.1.0/gentoo/README.history
+++ b/11.1.0/gentoo/README.history
@@ -1,3 +1,6 @@
+2		TODO
+	+ 27_all_msp430-f2c.patch
+
 1		27 Apr 2021
 	+ 01_all_default-fortify-source.patch
 	+ 02_all_default-warn-format-security.patch


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

* [gentoo-commits] proj/gcc-patches:master commit in: 11.1.0/gentoo/
@ 2021-05-20 22:14 Sergei Trofimovich
  0 siblings, 0 replies; 9+ messages in thread
From: Sergei Trofimovich @ 2021-05-20 22:14 UTC (permalink / raw
  To: gentoo-commits

commit:     d9ec8d21d27b98b1ae8a0fe33c8917868a14ba63
Author:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
AuthorDate: Thu May 20 22:14:05 2021 +0000
Commit:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Thu May 20 22:14:05 2021 +0000
URL:        https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=d9ec8d21

11.1.0: backport PR100489: union constructor fix

Reported-by: Martin Kolleck
Bug: https://bugs.gentoo.org/788829
Bug: https://gcc.gnu.org/PR100489
Signed-off-by: Sergei Trofimovich <slyfox <AT> gentoo.org>

 11.1.0/gentoo/28_all_ctor-union-PR100489.patch | 156 +++++++++++++++++++++++++
 11.1.0/gentoo/README.history                   |   1 +
 2 files changed, 157 insertions(+)

diff --git a/11.1.0/gentoo/28_all_ctor-union-PR100489.patch b/11.1.0/gentoo/28_all_ctor-union-PR100489.patch
new file mode 100644
index 0000000..1ee1277
--- /dev/null
+++ b/11.1.0/gentoo/28_all_ctor-union-PR100489.patch
@@ -0,0 +1,156 @@
+https://bugs.gentoo.org/788829
+https://gcc.gnu.org/PR100489
+
+From 0a1010428b3861464eb319c629c68cb13b9ca01e Mon Sep 17 00:00:00 2001
+From: Jason Merrill <jason@redhat.com>
+Date: Wed, 19 May 2021 21:12:45 -0400
+Subject: [PATCH] c++: designated init with anonymous union [PR100489]
+
+My patch for PR98463 added an assert that tripped on this testcase, because
+we ended up with a U CONSTRUCTOR with an initializer for a, which is not a
+member of U.  We need to wrap the a initializer in another CONSTRUCTOR for
+the anonymous union.
+
+There was already support for this in process_init_constructor_record, but
+not in process_init_constructor_union.  But since this is about brace
+elision, it really belongs under reshape_init rather than digest_init, so
+this patch moves the handling to reshape_init_class, which also handles
+unions.
+
+	PR c++/100489
+
+gcc/cp/ChangeLog:
+
+	* decl.c (reshape_init_class): Handle designator for
+	member of anonymous aggregate here.
+	* typeck2.c (process_init_constructor_record): Not here.
+
+gcc/testsuite/ChangeLog:
+
+	* g++.dg/cpp2a/desig18.C: New test.
+---
+ gcc/cp/decl.c                        | 33 ++++++++++++++++++++++++----
+ gcc/cp/typeck2.c                     | 26 ----------------------
+ gcc/testsuite/g++.dg/cpp2a/desig18.C | 17 ++++++++++++++
+ 3 files changed, 46 insertions(+), 30 deletions(-)
+ create mode 100644 gcc/testsuite/g++.dg/cpp2a/desig18.C
+
+--- a/gcc/cp/decl.c
++++ b/gcc/cp/decl.c
+@@ -6388,10 +6388,9 @@ reshape_init_class (tree type, reshape_iter *d, bool first_initializer_p,
+ 	      /* We already reshaped this.  */
+ 	      if (field != d->cur->index)
+ 		{
+-		  tree id = DECL_NAME (d->cur->index);
+-		  gcc_assert (id);
+-		  gcc_checking_assert (d->cur->index
+-				       == get_class_binding (type, id));
++		  if (tree id = DECL_NAME (d->cur->index))
++		    gcc_checking_assert (d->cur->index
++					 == get_class_binding (type, id));
+ 		  field = d->cur->index;
+ 		}
+ 	    }
+@@ -6412,6 +6411,32 @@ reshape_init_class (tree type, reshape_iter *d, bool first_initializer_p,
+ 		       d->cur->index);
+ 	      return error_mark_node;
+ 	    }
++
++	  /* If the element is an anonymous union object and the initializer
++	     list is a designated-initializer-list, the anonymous union object
++	     is initialized by the designated-initializer-list { D }, where D
++	     is the designated-initializer-clause naming a member of the
++	     anonymous union object.  */
++	  tree ictx = DECL_CONTEXT (field);
++	  if (!same_type_ignoring_top_level_qualifiers_p (ictx, type))
++	    {
++	      gcc_assert (ANON_AGGR_TYPE_P (ictx));
++	      /* Find the anon aggr that is a direct member of TYPE.  */
++	      while (true)
++		{
++		  tree cctx = TYPE_CONTEXT (ictx);
++		  if (same_type_ignoring_top_level_qualifiers_p (cctx, type))
++		    break;
++		  ictx = cctx;
++		}
++	      /* And then the TYPE member with that anon aggr type.  */
++	      tree aafield = TYPE_FIELDS (type);
++	      for (; aafield; aafield = TREE_CHAIN (aafield))
++		if (TREE_TYPE (aafield) == ictx)
++		  break;
++	      gcc_assert (aafield);
++	      field = aafield;
++	    }
+ 	}
+ 
+       /* If we processed all the member of the class, we are done.  */
+diff --git a/gcc/cp/typeck2.c b/gcc/cp/typeck2.c
+index 4e9632f6a7d..142c6fd8e75 100644
+--- a/gcc/cp/typeck2.c
++++ b/gcc/cp/typeck2.c
+@@ -1511,19 +1511,6 @@ process_init_constructor_record (tree type, tree init, int nested, int flags,
+ 			  || identifier_p (ce->index));
+ 	      if (ce->index == field || ce->index == DECL_NAME (field))
+ 		next = ce->value;
+-	      else if (ANON_AGGR_TYPE_P (fldtype)
+-		       && search_anon_aggr (fldtype,
+-					    TREE_CODE (ce->index) == FIELD_DECL
+-					    ? DECL_NAME (ce->index)
+-					    : ce->index))
+-		/* If the element is an anonymous union object and the
+-		   initializer list is a designated-initializer-list, the
+-		   anonymous union object is initialized by the
+-		   designated-initializer-list { D }, where D is the
+-		   designated-initializer-clause naming a member of the
+-		   anonymous union object.  */
+-		next = build_constructor_single (init_list_type_node,
+-						 ce->index, ce->value);
+ 	      else
+ 		{
+ 		  ce = NULL;
+@@ -1669,19 +1656,6 @@ process_init_constructor_record (tree type, tree init, int nested, int flags,
+ 
+ 		  if (ce->index == field || ce->index == DECL_NAME (field))
+ 		    break;
+-		  if (ANON_AGGR_TYPE_P (TREE_TYPE (field)))
+-		    {
+-		      tree t
+-			= search_anon_aggr (TREE_TYPE (field),
+-					    TREE_CODE (ce->index) == FIELD_DECL
+-					    ? DECL_NAME (ce->index)
+-					    : ce->index);
+-		      if (t)
+-			{
+-			  field = t;
+-			  break;
+-			}
+-		    }
+ 		}
+ 	    }
+ 	  if (field)
+diff --git a/gcc/testsuite/g++.dg/cpp2a/desig18.C b/gcc/testsuite/g++.dg/cpp2a/desig18.C
+new file mode 100644
+index 00000000000..4851579b7c7
+--- /dev/null
++++ b/gcc/testsuite/g++.dg/cpp2a/desig18.C
+@@ -0,0 +1,17 @@
++// PR c++/100489
++// { dg-options "" }
++
++union U
++{
++  union
++  {
++    unsigned char a;
++  };
++
++  unsigned char b[1];
++};
++
++void f(unsigned char a)
++{
++  union U u = { .a = a };
++}
+-- 
+2.31.1
+

diff --git a/11.1.0/gentoo/README.history b/11.1.0/gentoo/README.history
index 9c9ad5e..27dd8ff 100644
--- a/11.1.0/gentoo/README.history
+++ b/11.1.0/gentoo/README.history
@@ -1,5 +1,6 @@
 2		TODO
 	+ 27_all_msp430-f2c.patch
+	+ 28_all_ctor-union-PR100489.patch
 
 1		27 Apr 2021
 	+ 01_all_default-fortify-source.patch


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

* [gentoo-commits] proj/gcc-patches:master commit in: 11.1.0/gentoo/
@ 2021-05-28 22:20 Sergei Trofimovich
  0 siblings, 0 replies; 9+ messages in thread
From: Sergei Trofimovich @ 2021-05-28 22:20 UTC (permalink / raw
  To: gentoo-commits

commit:     f3f23b533c01b783dc53023f9b9f8fe343b151dc
Author:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
AuthorDate: Fri May 28 22:19:31 2021 +0000
Commit:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Fri May 28 22:19:31 2021 +0000
URL:        https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=f3f23b53

11.1.0: backport PR100644: c++: "perfect" implicitly deleted move

Reported-by: Thomas Deutschmann
Bug: https://bugs.gentoo.org/792705
Bug: https://gcc.gnu.org/PR100644
Signed-off-by: Sergei Trofimovich <slyfox <AT> gentoo.org>

 .../gentoo/29_all_perfect-implicit-PR100644.patch  | 69 ++++++++++++++++++++++
 11.1.0/gentoo/README.history                       |  1 +
 2 files changed, 70 insertions(+)

diff --git a/11.1.0/gentoo/29_all_perfect-implicit-PR100644.patch b/11.1.0/gentoo/29_all_perfect-implicit-PR100644.patch
new file mode 100644
index 0000000..35ee13d
--- /dev/null
+++ b/11.1.0/gentoo/29_all_perfect-implicit-PR100644.patch
@@ -0,0 +1,69 @@
+https://gcc.gnu.org/PR100644
+https://bugs.gentoo.org/792705
+
+From 6384e940a6db379b0524465cf6cbbd0996b48485 Mon Sep 17 00:00:00 2001
+From: Jason Merrill <jason@redhat.com>
+Date: Tue, 18 May 2021 12:06:36 -0400
+Subject: [PATCH] c++: "perfect" implicitly deleted move [PR100644]
+
+Here we were ignoring the template constructor because the implicit move
+constructor had all perfect conversions.  But CWG1402 says that an
+implicitly deleted move constructor is ignored by overload resolution; we
+implement that instead by preferring any other candidate in joust, to get
+better diagnostics, but that means we need to handle that case here as well.
+
+gcc/cp/ChangeLog:
+
+	PR c++/100644
+	* call.c (perfect_candidate_p): An implicitly deleted move
+	is not perfect.
+
+gcc/testsuite/ChangeLog:
+
+	* g++.dg/cpp0x/implicit-delete1.C: New test.
+---
+ gcc/cp/call.c                                 |  5 +++++
+ gcc/testsuite/g++.dg/cpp0x/implicit-delete1.C | 20 +++++++++++++++++++
+ 2 files changed, 25 insertions(+)
+ create mode 100644 gcc/testsuite/g++.dg/cpp0x/implicit-delete1.C
+
+--- a/gcc/cp/call.c
++++ b/gcc/cp/call.c
+@@ -5892,6 +5892,11 @@ perfect_candidate_p (z_candidate *cand)
+ {
+   if (cand->viable < 1)
+     return false;
++  /* CWG1402 makes an implicitly deleted move op worse than other
++     candidates.  */
++  if (DECL_DELETED_FN (cand->fn) && DECL_DEFAULTED_FN (cand->fn)
++      && move_fn_p (cand->fn))
++    return false;
+   int len = cand->num_convs;
+   for (int i = 0; i < len; ++i)
+     if (!perfect_conversion_p (cand->convs[i]))
+--- /dev/null
++++ b/gcc/testsuite/g++.dg/cpp0x/implicit-delete1.C
+@@ -0,0 +1,20 @@
++// PR c++/100644
++// { dg-do compile { target c++11 } }
++
++struct NonMovable {
++  NonMovable(NonMovable&&) = delete;
++};
++
++template <class T>
++struct Maybe {
++  NonMovable mMember;
++
++  template <typename U>
++  Maybe(Maybe<U>&&);
++};
++
++void foo(Maybe<int>);
++
++void unlucky(Maybe<int>&& x) {
++  Maybe<int> var{(Maybe<int>&&)x};
++}
+-- 
+2.31.1
+

diff --git a/11.1.0/gentoo/README.history b/11.1.0/gentoo/README.history
index 27dd8ff..00f2ee7 100644
--- a/11.1.0/gentoo/README.history
+++ b/11.1.0/gentoo/README.history
@@ -1,6 +1,7 @@
 2		TODO
 	+ 27_all_msp430-f2c.patch
 	+ 28_all_ctor-union-PR100489.patch
+	+ 29_all_perfect-implicit-PR100644.patch
 
 1		27 Apr 2021
 	+ 01_all_default-fortify-source.patch


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

* [gentoo-commits] proj/gcc-patches:master commit in: 11.1.0/gentoo/
@ 2021-05-29  9:23 Sergei Trofimovich
  0 siblings, 0 replies; 9+ messages in thread
From: Sergei Trofimovich @ 2021-05-29  9:23 UTC (permalink / raw
  To: gentoo-commits

commit:     f0adcd768cd9ceea562a91795774f2453e2da9b9
Author:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
AuthorDate: Sat May 29 09:22:33 2021 +0000
Commit:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Sat May 29 09:22:33 2021 +0000
URL:        https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=f0adcd76

11.1.0: backport PR100767: fix ICE on arm -flto march mix

Reported-by: Gabriel Marcano
Bug: https://bugs.gentoo.org/792291
Bug: https://gcc.gnu.org/PR100767
Signed-off-by: Sergei Trofimovich <slyfox <AT> gentoo.org>

 11.1.0/gentoo/30_all_arm-lto-ICE-march-mix.patch | 153 +++++++++++++++++++++++
 11.1.0/gentoo/README.history                     |   1 +
 2 files changed, 154 insertions(+)

diff --git a/11.1.0/gentoo/30_all_arm-lto-ICE-march-mix.patch b/11.1.0/gentoo/30_all_arm-lto-ICE-march-mix.patch
new file mode 100644
index 0000000..c19e3fa
--- /dev/null
+++ b/11.1.0/gentoo/30_all_arm-lto-ICE-march-mix.patch
@@ -0,0 +1,153 @@
+https://gcc.gnu.org/PR100767
+https://bugs.gentoo.org/792291
+
+From 0faee8bae391fab7e1ba4a494360dd9793e15fb5 Mon Sep 17 00:00:00 2001
+From: Richard Earnshaw <rearnsha@arm.com>
+Date: Thu, 27 May 2021 10:25:37 +0100
+Subject: [PATCH] arm: Remove use of opts_set in arm_configure_build_target
+ [PR100767]
+
+The variable global_options_set is a reflection of which options have
+been explicitly set from the command line in the structure
+global_options.  But it doesn't describe the contents of a
+cl_target_option.  cl_target_option is a set of options to apply and
+once configured should represent a viable set of options without
+needing to know which were explicitly set by the user.
+
+Unfortunately arm_configure_build_target was incorrectly conflating
+the two.  Fortunately, however, we do not really need to know this
+since the various override_options functions should have sanitized the
+target_options values before constructing a cl_target_option
+structure.  It is safe, therefore, to simply drop this parameter to
+arm_configure_build_target and rely on checking that various string
+parameters are non-null before dereferencing them.
+
+gcc:
+
+	PR target/100767
+	* config/arm/arm.c (arm_configure_build_target): Remove parameter
+	opts_set, directly check opts parameters for being non-null.
+	(arm_option_restore): Update call to arm_configure_build_target.
+	(arm_option_override): Likewise.
+	(arm_can_inline_p): Likewise.
+	(arm_valid_target_attribute_tree): Likewise.
+	* config/arm/arm-c.c (arm_pragma_target_parse): Likewise.
+	* config/arm/arm-protos.h (arm_configure_build_target): Adjust
+	prototype.
+
+(cherry picked from commit 262e75d22c350acbdf4c1fb4f224cc5d3d711eff)
+---
+ gcc/config/arm/arm-c.c      |  3 +--
+ gcc/config/arm/arm-protos.h |  3 +--
+ gcc/config/arm/arm.c        | 23 ++++++++++-------------
+ 3 files changed, 12 insertions(+), 17 deletions(-)
+
+--- a/gcc/config/arm/arm-c.c
++++ b/gcc/config/arm/arm-c.c
+@@ -408,8 +408,7 @@ arm_pragma_target_parse (tree args, tree pop_target)
+        target_option_current_node, but not handle_pragma_target.  */
+       target_option_current_node = cur_tree;
+       arm_configure_build_target (&arm_active_target,
+-				  TREE_TARGET_OPTION (cur_tree),
+-				  &global_options_set, false);
++				  TREE_TARGET_OPTION (cur_tree), false);
+     }
+ 
+   /* Update macros if target_node changes. The global state will be restored
+--- a/gcc/config/arm/arm-protos.h
++++ b/gcc/config/arm/arm-protos.h
+@@ -243,8 +243,7 @@ extern bool arm_change_mode_p (tree);
+ extern tree arm_valid_target_attribute_tree (tree, struct gcc_options *,
+ 					     struct gcc_options *);
+ extern void arm_configure_build_target (struct arm_build_target *,
+-					struct cl_target_option *,
+-					struct gcc_options *, bool);
++					struct cl_target_option *, bool);
+ extern void arm_option_reconfigure_globals (void);
+ extern void arm_options_perform_arch_sanity_checks (void);
+ extern void arm_pr_long_calls (struct cpp_reader *);
+--- a/gcc/config/arm/arm.c
++++ b/gcc/config/arm/arm.c
+@@ -3052,9 +3052,10 @@ arm_override_options_after_change (void)
+ /* Implement TARGET_OPTION_RESTORE.  */
+ static void
+ arm_option_restore (struct gcc_options */* opts */,
+-		    struct gcc_options *opts_set, struct cl_target_option *ptr)
++		    struct gcc_options */* opts_set */,
++		    struct cl_target_option *ptr)
+ {
+-  arm_configure_build_target (&arm_active_target, ptr, opts_set, false);
++  arm_configure_build_target (&arm_active_target, ptr, false);
+ }
+ 
+ /* Reset options between modes that the user has specified.  */
+@@ -3177,7 +3178,6 @@ static sbitmap isa_quirkbits;
+ void
+ arm_configure_build_target (struct arm_build_target *target,
+ 			    struct cl_target_option *opts,
+-			    struct gcc_options *opts_set,
+ 			    bool warn_compatible)
+ {
+   const cpu_option *arm_selected_tune = NULL;
+@@ -3192,7 +3192,7 @@ arm_configure_build_target (struct arm_build_target *target,
+   target->core_name = NULL;
+   target->arch_name = NULL;
+ 
+-  if (opts_set->x_arm_arch_string)
++  if (opts->x_arm_arch_string)
+     {
+       arm_selected_arch = arm_parse_arch_option_name (all_architectures,
+ 						      "-march",
+@@ -3200,7 +3200,7 @@ arm_configure_build_target (struct arm_build_target *target,
+       arch_opts = strchr (opts->x_arm_arch_string, '+');
+     }
+ 
+-  if (opts_set->x_arm_cpu_string)
++  if (opts->x_arm_cpu_string)
+     {
+       arm_selected_cpu = arm_parse_cpu_option_name (all_cores, "-mcpu",
+ 						    opts->x_arm_cpu_string);
+@@ -3210,7 +3210,7 @@ arm_configure_build_target (struct arm_build_target *target,
+ 	 options for tuning.  */
+     }
+ 
+-  if (opts_set->x_arm_tune_string)
++  if (opts->x_arm_tune_string)
+     {
+       arm_selected_tune = arm_parse_cpu_option_name (all_cores, "-mtune",
+ 						     opts->x_arm_tune_string);
+@@ -3474,8 +3474,7 @@ arm_option_override (void)
+     }
+ 
+   cl_target_option_save (&opts, &global_options, &global_options_set);
+-  arm_configure_build_target (&arm_active_target, &opts, &global_options_set,
+-			      true);
++  arm_configure_build_target (&arm_active_target, &opts, true);
+ 
+ #ifdef SUBTARGET_OVERRIDE_OPTIONS
+   SUBTARGET_OVERRIDE_OPTIONS;
+@@ -32857,10 +32856,8 @@ arm_can_inline_p (tree caller, tree callee)
+   caller_target.isa = sbitmap_alloc (isa_num_bits);
+   callee_target.isa = sbitmap_alloc (isa_num_bits);
+ 
+-  arm_configure_build_target (&caller_target, caller_opts, &global_options_set,
+-			      false);
+-  arm_configure_build_target (&callee_target, callee_opts, &global_options_set,
+-			      false);
++  arm_configure_build_target (&caller_target, caller_opts, false);
++  arm_configure_build_target (&callee_target, callee_opts, false);
+   if (!bitmap_subset_p (callee_target.isa, caller_target.isa))
+     can_inline = false;
+ 
+@@ -32996,7 +32993,7 @@ arm_valid_target_attribute_tree (tree args, struct gcc_options *opts,
+     return NULL_TREE;
+ 
+   cl_target_option_save (&cl_opts, opts, opts_set);
+-  arm_configure_build_target (&arm_active_target, &cl_opts, opts_set, false);
++  arm_configure_build_target (&arm_active_target, &cl_opts, false);
+   arm_option_check_internal (opts);
+   /* Do any overrides, such as global options arch=xxx.
+      We do this since arm_active_target was overridden.  */
+-- 
+2.31.1
+

diff --git a/11.1.0/gentoo/README.history b/11.1.0/gentoo/README.history
index 00f2ee7..504c233 100644
--- a/11.1.0/gentoo/README.history
+++ b/11.1.0/gentoo/README.history
@@ -2,6 +2,7 @@
 	+ 27_all_msp430-f2c.patch
 	+ 28_all_ctor-union-PR100489.patch
 	+ 29_all_perfect-implicit-PR100644.patch
+	+ 30_all_arm-lto-ICE-march-mix.patch
 
 1		27 Apr 2021
 	+ 01_all_default-fortify-source.patch


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

* [gentoo-commits] proj/gcc-patches:master commit in: 11.1.0/gentoo/
@ 2021-06-08  7:11 Sergei Trofimovich
  0 siblings, 0 replies; 9+ messages in thread
From: Sergei Trofimovich @ 2021-06-08  7:11 UTC (permalink / raw
  To: gentoo-commits

commit:     e5964165059455bd9c45b559c11c470b6c8eb995
Author:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
AuthorDate: Tue Jun  8 07:05:23 2021 +0000
Commit:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Tue Jun  8 07:07:32 2021 +0000
URL:        https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=e5964165

11.1.0: pull upstream c++/PR1100102 (fix tsubst ICE)

Reported-by: Matěj Laitl
Bug: https://bugs.gentoo.org/794775
Bug: https://gcc.gnu.org/PR100102
Signed-off-by: Sergei Trofimovich <slyfox <AT> gentoo.org>

 11.1.0/gentoo/31_all_ICE-tsubst-PR100102.patch | 128 +++++++++++++++++++++++++
 11.1.0/gentoo/README.history                   |   1 +
 2 files changed, 129 insertions(+)

diff --git a/11.1.0/gentoo/31_all_ICE-tsubst-PR100102.patch b/11.1.0/gentoo/31_all_ICE-tsubst-PR100102.patch
new file mode 100644
index 0000000..8c63d8d
--- /dev/null
+++ b/11.1.0/gentoo/31_all_ICE-tsubst-PR100102.patch
@@ -0,0 +1,128 @@
+https://bugs.gentoo.org/794775
+https://gcc.gnu.org/PR100102
+
+From f1feb74046e0feb0596b93bbb822fae02940a90e Mon Sep 17 00:00:00 2001
+From: Patrick Palka <ppalka@redhat.com>
+Date: Fri, 4 Jun 2021 13:46:53 -0400
+Subject: [PATCH] c++: tsubst_function_decl and excess arg levels [PR100102]
+
+Here, when instantiating the dependent alias template
+duration::__is_harmonic with args={{T,U},{int}}, we find ourselves
+substituting the function decl _S_gcd.  Since we have more arg levels
+than _S_gcd has parm levels, an old special case in tsubst_function_decl
+causes us to unwantedly reduce args to its innermost level, yielding
+args={int}, which leads to a nonsensical substitution into the decl
+context and eventually a crash.
+
+The comment for this special case refers to three examples for which we
+ought to see more arg levels than parm levels here, but none of the
+examples actually demonstrate this.  In the first example, when
+defining S<int>::f(U) parms_depth is 2 and args_depth is 1, and
+later when instantiating say S<int>::f<char> both depths are 2.  In the
+second example, when substituting the template friend declaration
+parms_depth is 2 and args_depth is 1, and later when instantiating f
+both depths are 1.  Finally, the third example is invalid since we can't
+specialize a member template of an unspecialized class template like
+that.
+
+Given that this reduction code seems no longer relevant for its
+documented purpose and that it causes problems as in the PR, this patch
+just removes it.  Note that as far as bootstrap/regtest is concerned,
+this code is dead; the below two tests would be the first to reach it.
+
+	PR c++/100102
+
+gcc/cp/ChangeLog:
+
+	* pt.c (tsubst_function_decl): Remove old code for reducing
+	args when it has excess levels.
+
+gcc/testsuite/ChangeLog:
+
+	* g++.dg/cpp0x/alias-decl-72.C: New test.
+	* g++.dg/cpp0x/alias-decl-72a.C: New test.
+
+(cherry picked from commit 5357ab75dedef403b0eebf9277d61d1cbeb5898f)
+---
+ gcc/cp/pt.c                                 | 39 ---------------------
+ gcc/testsuite/g++.dg/cpp0x/alias-decl-72.C  |  9 +++++
+ gcc/testsuite/g++.dg/cpp0x/alias-decl-72a.C |  9 +++++
+ 3 files changed, 18 insertions(+), 39 deletions(-)
+ create mode 100644 gcc/testsuite/g++.dg/cpp0x/alias-decl-72.C
+ create mode 100644 gcc/testsuite/g++.dg/cpp0x/alias-decl-72a.C
+
+--- a/gcc/cp/pt.c
++++ b/gcc/cp/pt.c
+@@ -13954,45 +13954,6 @@ tsubst_function_decl (tree t, tree args, tsubst_flags_t complain,
+ 	  if (tree spec = retrieve_specialization (gen_tmpl, argvec, hash))
+ 	    return spec;
+ 	}
+-
+-      /* We can see more levels of arguments than parameters if
+-	 there was a specialization of a member template, like
+-	 this:
+-
+-	 template <class T> struct S { template <class U> void f(); }
+-	 template <> template <class U> void S<int>::f(U);
+-
+-	 Here, we'll be substituting into the specialization,
+-	 because that's where we can find the code we actually
+-	 want to generate, but we'll have enough arguments for
+-	 the most general template.
+-
+-	 We also deal with the peculiar case:
+-
+-	 template <class T> struct S {
+-	   template <class U> friend void f();
+-	 };
+-	 template <class U> void f() {}
+-	 template S<int>;
+-	 template void f<double>();
+-
+-	 Here, the ARGS for the instantiation of will be {int,
+-	 double}.  But, we only need as many ARGS as there are
+-	 levels of template parameters in CODE_PATTERN.  We are
+-	 careful not to get fooled into reducing the ARGS in
+-	 situations like:
+-
+-	 template <class T> struct S { template <class U> void f(U); }
+-	 template <class T> template <> void S<T>::f(int) {}
+-
+-	 which we can spot because the pattern will be a
+-	 specialization in this case.  */
+-      int args_depth = TMPL_ARGS_DEPTH (args);
+-      int parms_depth =
+-	TMPL_PARMS_DEPTH (DECL_TEMPLATE_PARMS (DECL_TI_TEMPLATE (t)));
+-
+-      if (args_depth > parms_depth && !DECL_TEMPLATE_SPECIALIZATION (t))
+-	args = get_innermost_template_args (args, parms_depth);
+     }
+   else
+     {
+--- /dev/null
++++ b/gcc/testsuite/g++.dg/cpp0x/alias-decl-72.C
+@@ -0,0 +1,9 @@
++// PR c++/100102
++// { dg-do compile { target c++11 } }
++
++template<int()> struct ratio;
++template<class T, class U> struct duration {
++  static constexpr int _S_gcd();
++  template<class> using __is_harmonic = ratio<_S_gcd>;
++  using type = __is_harmonic<int>;
++};
+--- /dev/null
++++ b/gcc/testsuite/g++.dg/cpp0x/alias-decl-72a.C
+@@ -0,0 +1,9 @@
++// PR c++/100102
++// { dg-do compile { target c++11 } }
++
++template<int> struct ratio;
++template<class T> struct duration {
++  static constexpr int _S_gcd();
++  template<class> using __is_harmonic = ratio<(duration::_S_gcd)()>;
++  using type = __is_harmonic<int>;
++};
+-- 
+2.32.0
+

diff --git a/11.1.0/gentoo/README.history b/11.1.0/gentoo/README.history
index 504c233..3702a85 100644
--- a/11.1.0/gentoo/README.history
+++ b/11.1.0/gentoo/README.history
@@ -3,6 +3,7 @@
 	+ 28_all_ctor-union-PR100489.patch
 	+ 29_all_perfect-implicit-PR100644.patch
 	+ 30_all_arm-lto-ICE-march-mix.patch
+	+ 31_all_ICE-tsubst-PR100102.patch
 
 1		27 Apr 2021
 	+ 01_all_default-fortify-source.patch


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

* [gentoo-commits] proj/gcc-patches:master commit in: 11.1.0/gentoo/
@ 2021-06-10  7:36 Sergei Trofimovich
  0 siblings, 0 replies; 9+ messages in thread
From: Sergei Trofimovich @ 2021-06-10  7:36 UTC (permalink / raw
  To: gentoo-commits

commit:     9d40799e2ef69d8650dd59325c0e84b902258b00
Author:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
AuthorDate: Thu Jun 10 07:28:54 2021 +0000
Commit:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Thu Jun 10 07:28:54 2021 +0000
URL:        https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=9d40799e

11.1.0: cut 2 patchset

Five new patches:
+ 27_all_msp430-f2c.patch: fix build on 16-bit targets
+ 28_all_ctor-union-PR100489.patch: fix ICE on some c++ initializers
+ 29_all_perfect-implicit-PR100644.patch: fix move deletion (fireofx build)
+ 30_all_arm-lto-ICE-march-mix.patch: fix LTO ICE on arm -march=/-mtune mix
+ 31_all_ICE-tsubst-PR100102.patch:

Bug: https://gcc.gnu.org/PR100361
Bug: https://bugs.gentoo.org/788829
Bug: https://gcc.gnu.org/PR100489
Bug: https://gcc.gnu.org/PR100644
Bug: https://bugs.gentoo.org/792705
Bug: https://gcc.gnu.org/PR100767
Bug: https://bugs.gentoo.org/792291
Bug: https://bugs.gentoo.org/794775
Bug: https://gcc.gnu.org/PR100102
Signed-off-by: Sergei Trofimovich <slyfox <AT> gentoo.org>

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

diff --git a/11.1.0/gentoo/README.history b/11.1.0/gentoo/README.history
index 3702a85..42534a0 100644
--- a/11.1.0/gentoo/README.history
+++ b/11.1.0/gentoo/README.history
@@ -1,4 +1,4 @@
-2		TODO
+2		08 Jun 2021
 	+ 27_all_msp430-f2c.patch
 	+ 28_all_ctor-union-PR100489.patch
 	+ 29_all_perfect-implicit-PR100644.patch


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

* [gentoo-commits] proj/gcc-patches:master commit in: 11.1.0/gentoo/
@ 2021-07-05 20:30 Sergei Trofimovich
  0 siblings, 0 replies; 9+ messages in thread
From: Sergei Trofimovich @ 2021-07-05 20:30 UTC (permalink / raw
  To: gentoo-commits

commit:     af4af89233cf54d7e0f4426991bcc6508fef78f2
Author:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
AuthorDate: Mon Jul  5 20:26:11 2021 +0000
Commit:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Mon Jul  5 20:26:11 2021 +0000
URL:        https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=af4af892

11.1.0: backport linux/cyclades.h include removal

Upstream sanitizer commit commit: https://reviews.llvm.org/D102059

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

 11.1.0/gentoo/32_all_remove-cyclades.patch | 111 +++++++++++++++++++++++++++++
 11.1.0/gentoo/README.history               |   3 +
 2 files changed, 114 insertions(+)

diff --git a/11.1.0/gentoo/32_all_remove-cyclades.patch b/11.1.0/gentoo/32_all_remove-cyclades.patch
new file mode 100644
index 0000000..2a62fed
--- /dev/null
+++ b/11.1.0/gentoo/32_all_remove-cyclades.patch
@@ -0,0 +1,111 @@
+From 68d5235cb58f988c71b403334cd9482d663841ab Mon Sep 17 00:00:00 2001
+From: Tamar Christina <tamar.christina@arm.com>
+Date: Thu, 20 May 2021 18:55:11 +0100
+Subject: [PATCH] libsanitizer: Remove cyclades inclusion in sanitizer
+
+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
+
+Reviewed By: eugenis
+
+Differential Revision: https://reviews.llvm.org/D102059
+---
+ .../sanitizer_common_interceptors_ioctl.inc           |  9 ---------
+ .../sanitizer_platform_limits_posix.cpp               | 11 -----------
+ .../sanitizer_platform_limits_posix.h                 | 10 ----------
+ 3 files changed, 30 deletions(-)
+
+--- a/libsanitizer/sanitizer_common/sanitizer_common_interceptors_ioctl.inc
++++ b/libsanitizer/sanitizer_common/sanitizer_common_interceptors_ioctl.inc
+@@ -370,15 +370,6 @@ static void ioctl_table_fill() {
+ 
+ #if SANITIZER_GLIBC
+   // _(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);
+--- a/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cpp
++++ b/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cpp
+@@ -143,7 +143,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>
+@@ -460,7 +459,6 @@ unsigned struct_ElfW_Phdr_sz = sizeof(Elf_Phdr);
+ 
+ #if SANITIZER_GLIBC
+   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
+@@ -824,15 +822,6 @@ unsigned struct_ElfW_Phdr_sz = sizeof(Elf_Phdr);
+ #endif // SANITIZER_LINUX
+ 
+ #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;
+--- a/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h
++++ b/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h
+@@ -983,7 +983,6 @@ extern unsigned struct_vt_mode_sz;
+ 
+ #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;
+@@ -1328,15 +1327,6 @@ extern unsigned IOCTL_VT_WAITACTIVE;
+ #endif  // SANITIZER_LINUX
+ 
+ #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.32.0
+

diff --git a/11.1.0/gentoo/README.history b/11.1.0/gentoo/README.history
index 42534a0..de9d95f 100644
--- a/11.1.0/gentoo/README.history
+++ b/11.1.0/gentoo/README.history
@@ -1,3 +1,6 @@
+3		TODO
+	+ 32_all_remove-cyclades.patch
+
 2		08 Jun 2021
 	+ 27_all_msp430-f2c.patch
 	+ 28_all_ctor-union-PR100489.patch


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

* [gentoo-commits] proj/gcc-patches:master commit in: 11.1.0/gentoo/
@ 2021-07-05 20:45 Sergei Trofimovich
  0 siblings, 0 replies; 9+ messages in thread
From: Sergei Trofimovich @ 2021-07-05 20:45 UTC (permalink / raw
  To: gentoo-commits

commit:     6e03e39eea213557d41ee38b2620bec61380a08c
Author:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
AuthorDate: Mon Jul  5 20:35:43 2021 +0000
Commit:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Mon Jul  5 20:42:57 2021 +0000
URL:        https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=6e03e39e

11.1.0: cut 3 patchset

Single new change:
+ 32_all_remove-cyclades.patch: fix build failure against linux-headers-5.13

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

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

diff --git a/11.1.0/gentoo/README.history b/11.1.0/gentoo/README.history
index de9d95f..6baad27 100644
--- a/11.1.0/gentoo/README.history
+++ b/11.1.0/gentoo/README.history
@@ -1,4 +1,4 @@
-3		TODO
+3		05 July 2021
 	+ 32_all_remove-cyclades.patch
 
 2		08 Jun 2021


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

end of thread, other threads:[~2021-07-05 20:46 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-06-08  7:11 [gentoo-commits] proj/gcc-patches:master commit in: 11.1.0/gentoo/ Sergei Trofimovich
  -- strict thread matches above, loose matches on Subject: below --
2021-07-05 20:45 Sergei Trofimovich
2021-07-05 20:30 Sergei Trofimovich
2021-06-10  7:36 Sergei Trofimovich
2021-05-29  9:23 Sergei Trofimovich
2021-05-28 22:20 Sergei Trofimovich
2021-05-20 22:14 Sergei Trofimovich
2021-05-19 17:48 Sergei Trofimovich
2021-04-27 17:34 Sergei Trofimovich

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