public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] proj/gcc-patches:master commit in: 9.2.0/gentoo/
@ 2019-08-12 23:16 Sergei Trofimovich
  0 siblings, 0 replies; 21+ messages in thread
From: Sergei Trofimovich @ 2019-08-12 23:16 UTC (permalink / raw
  To: gentoo-commits

commit:     b2f1fe64d5b63950a9ca1b3e4306af3aeb05906c
Author:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
AuthorDate: Mon Aug 12 19:36:37 2019 +0000
Commit:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Mon Aug 12 19:36:37 2019 +0000
URL:        https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=b2f1fe64

9.2.0: cut initial patchset, a copy of 9.1.0 patches

Two upstreamed patches removed:
- 26_all_ipa-incomplete.patch
- 27_all_es-po.patch

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

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

diff --git a/9.2.0/gentoo/01_all_default-fortify-source.patch b/9.2.0/gentoo/01_all_default-fortify-source.patch
new file mode 100644
index 0000000..d307474
--- /dev/null
+++ b/9.2.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.2.0/gentoo/02_all_default-warn-format-security.patch b/9.2.0/gentoo/02_all_default-warn-format-security.patch
new file mode 100644
index 0000000..f809abd
--- /dev/null
+++ b/9.2.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.2.0/gentoo/03_all_default-warn-trampolines.patch b/9.2.0/gentoo/03_all_default-warn-trampolines.patch
new file mode 100644
index 0000000..7a644cb
--- /dev/null
+++ b/9.2.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.2.0/gentoo/04_all_default-ssp-fix.patch b/9.2.0/gentoo/04_all_default-ssp-fix.patch
new file mode 100644
index 0000000..d2deac7
--- /dev/null
+++ b/9.2.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.2.0/gentoo/05_all_alpha-mieee-default.patch b/9.2.0/gentoo/05_all_alpha-mieee-default.patch
new file mode 100644
index 0000000..b266d77
--- /dev/null
+++ b/9.2.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.2.0/gentoo/06_all_ia64_note.GNU-stack.patch b/9.2.0/gentoo/06_all_ia64_note.GNU-stack.patch
new file mode 100644
index 0000000..66a787e
--- /dev/null
+++ b/9.2.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.2.0/gentoo/07_all_i386_libgcc_note.GNU-stack.patch b/9.2.0/gentoo/07_all_i386_libgcc_note.GNU-stack.patch
new file mode 100644
index 0000000..7f74945
--- /dev/null
+++ b/9.2.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.2.0/gentoo/08_all_libiberty-asprintf.patch b/9.2.0/gentoo/08_all_libiberty-asprintf.patch
new file mode 100644
index 0000000..bee0c4c
--- /dev/null
+++ b/9.2.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.2.0/gentoo/09_all_libiberty-pic.patch b/9.2.0/gentoo/09_all_libiberty-pic.patch
new file mode 100644
index 0000000..b6160a7
--- /dev/null
+++ b/9.2.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.2.0/gentoo/10_all_nopie-all-flags.patch b/9.2.0/gentoo/10_all_nopie-all-flags.patch
new file mode 100644
index 0000000..48536e6
--- /dev/null
+++ b/9.2.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.2.0/gentoo/11_all_extra-options.patch b/9.2.0/gentoo/11_all_extra-options.patch
new file mode 100644
index 0000000..9187af8
--- /dev/null
+++ b/9.2.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.2.0/gentoo/12_all_pr55930-dependency-tracking.patch b/9.2.0/gentoo/12_all_pr55930-dependency-tracking.patch
new file mode 100644
index 0000000..a8743e0
--- /dev/null
+++ b/9.2.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.2.0/gentoo/13_all_sh-drop-sysroot-suffix.patch b/9.2.0/gentoo/13_all_sh-drop-sysroot-suffix.patch
new file mode 100644
index 0000000..3dadd4c
--- /dev/null
+++ b/9.2.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.2.0/gentoo/14_all_ia64-TEXTREL.patch b/9.2.0/gentoo/14_all_ia64-TEXTREL.patch
new file mode 100644
index 0000000..706dbe5
--- /dev/null
+++ b/9.2.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.2.0/gentoo/15_all_disable-systemtap-switch.patch b/9.2.0/gentoo/15_all_disable-systemtap-switch.patch
new file mode 100644
index 0000000..3914f59
--- /dev/null
+++ b/9.2.0/gentoo/15_all_disable-systemtap-switch.patch
@@ -0,0 +1,142 @@
+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
+@@ -18646,7 +18648,7 @@ else
+   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
+   lt_status=$lt_dlunknown
+   cat > conftest.$ac_ext <<_LT_EOF
+-#line 18649 "configure"
++#line 18651 "configure"
+ #include "confdefs.h"
+ 
+ #if HAVE_DLFCN_H
+@@ -18752,7 +18754,7 @@ else
+   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
+   lt_status=$lt_dlunknown
+   cat > conftest.$ac_ext <<_LT_EOF
+-#line 18755 "configure"
++#line 18757 "configure"
+ #include "confdefs.h"
+ 
+ #if HAVE_DLFCN_H
+@@ -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
+diff --git a/gcc/configure.ac b/gcc/configure.ac
+index 51f520c15..985bbc8fb 100644
+--- 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.2.0/gentoo/16_all_m68k-textrel-on-libgcc.patch b/9.2.0/gentoo/16_all_m68k-textrel-on-libgcc.patch
new file mode 100644
index 0000000..a2aa100
--- /dev/null
+++ b/9.2.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.2.0/gentoo/17_all_respect-build-cxxflags.patch b/9.2.0/gentoo/17_all_respect-build-cxxflags.patch
new file mode 100644
index 0000000..14139ea
--- /dev/null
+++ b/9.2.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.2.0/gentoo/18_all_libgfortran-Werror.patch b/9.2.0/gentoo/18_all_libgfortran-Werror.patch
new file mode 100644
index 0000000..f6c26bf
--- /dev/null
+++ b/9.2.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.2.0/gentoo/19_all_libgomp-Werror.patch b/9.2.0/gentoo/19_all_libgomp-Werror.patch
new file mode 100644
index 0000000..416808a
--- /dev/null
+++ b/9.2.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.2.0/gentoo/20_all_libitm-Werror.patch b/9.2.0/gentoo/20_all_libitm-Werror.patch
new file mode 100644
index 0000000..27181e0
--- /dev/null
+++ b/9.2.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.2.0/gentoo/21_all_libatomic-Werror.patch b/9.2.0/gentoo/21_all_libatomic-Werror.patch
new file mode 100644
index 0000000..0550722
--- /dev/null
+++ b/9.2.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.2.0/gentoo/22_all_libbacktrace-Werror.patch b/9.2.0/gentoo/22_all_libbacktrace-Werror.patch
new file mode 100644
index 0000000..57dd284
--- /dev/null
+++ b/9.2.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.2.0/gentoo/23_all_libsanitizer-Werror.patch b/9.2.0/gentoo/23_all_libsanitizer-Werror.patch
new file mode 100644
index 0000000..0e484a4
--- /dev/null
+++ b/9.2.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.2.0/gentoo/24_all_libstdcxx-no-vtv.patch b/9.2.0/gentoo/24_all_libstdcxx-no-vtv.patch
new file mode 100644
index 0000000..68508bd
--- /dev/null
+++ b/9.2.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.2.0/gentoo/25_all_ia64-bootstrap.patch b/9.2.0/gentoo/25_all_ia64-bootstrap.patch
new file mode 100644
index 0000000..0a0a25b
--- /dev/null
+++ b/9.2.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.2.0/gentoo/26_all_disable-riscv32-ABIs.patch b/9.2.0/gentoo/26_all_disable-riscv32-ABIs.patch
new file mode 100644
index 0000000..ad0128a
--- /dev/null
+++ b/9.2.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.2.0/gentoo/27_all_hppa64-patchable-entry-90751.patch b/9.2.0/gentoo/27_all_hppa64-patchable-entry-90751.patch
new file mode 100644
index 0000000..d93fe0a
--- /dev/null
+++ b/9.2.0/gentoo/27_all_hppa64-patchable-entry-90751.patch
@@ -0,0 +1,120 @@
+https://gcc.gnu.org/PR90751
+
+From 5df07cedc211b67011688e911db34ee18997eedf Mon Sep 17 00:00:00 2001
+From: danglin <danglin@138bc75d-0d04-0410-961f-82ee72b054a4>
+Date: Fri, 7 Jun 2019 23:20:44 +0000
+Subject: [PATCH] 	PR target/90751 	* config/pa/pa-linux.h
+ (ASM_DECLARE_FUNCTION_NAME): Update comment. 	Call pa_output_function_label.
+ 	(TARGET_ASM_FUNCTION_PROLOGUE): define. 	*
+ config/pa/pa-protos.h (pa_output_function_label): Declare. 	*
+ config/pa/pa.c (pa_output_function_prologue): Add ATTRIBUTE_UNUSED 	to
+ declaration. 	(pa_linux_output_function_prologue): Declare. 
+ (TARGET_ASM_FUNCTION_PROLOGUE): Delete define. 
+ (pa_output_function_label): New. 	(pa_output_function_prologue): Revise
+ to use pa_output_function_label. 	(pa_linux_output_function_prologue):
+ New. 	* config/pa/pa.h (TARGET_ASM_FUNCTION_PROLOGUE): Define.
+
+git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-9-branch@272061 138bc75d-0d04-0410-961f-82ee72b054a4
+--- a/gcc/config/pa/pa-linux.h
++++ b/gcc/config/pa/pa-linux.h
+@@ -109,9 +109,14 @@ along with GCC; see the file COPYING3.  If not see
+     {								\
+       ASM_OUTPUT_TYPE_DIRECTIVE (FILE, NAME, "function");	\
+       ASM_DECLARE_RESULT (FILE, DECL_RESULT (DECL));		\
++      pa_output_function_label (FILE);				\
+     }								\
+   while (0)
+ 
++/* Output function prologue for linux.  */
++#undef TARGET_ASM_FUNCTION_PROLOGUE
++#define TARGET_ASM_FUNCTION_PROLOGUE pa_linux_output_function_prologue
++
+ /* As well as globalizing the label, we need to encode the label
+    to ensure a plabel is generated in an indirect call.  */
+ 
+--- a/gcc/config/pa/pa-protos.h
++++ b/gcc/config/pa/pa-protos.h
+@@ -108,6 +108,7 @@ extern void pa_asm_output_aligned_local (FILE *, const char *,
+ extern void pa_hpux_asm_output_external (FILE *, tree, const char *);
+ extern HOST_WIDE_INT pa_initial_elimination_offset (int, int);
+ extern HOST_WIDE_INT pa_function_arg_size (machine_mode, const_tree);
++extern void pa_output_function_label (FILE *);
+ 
+ extern const int pa_magic_milli[];
+ 
+--- a/gcc/config/pa/pa.c
++++ b/gcc/config/pa/pa.c
+@@ -118,7 +118,8 @@ static void set_reg_plus_d (int, int, HOST_WIDE_INT, int);
+ static rtx pa_function_value (const_tree, const_tree, bool);
+ static rtx pa_libcall_value (machine_mode, const_rtx);
+ static bool pa_function_value_regno_p (const unsigned int);
+-static void pa_output_function_prologue (FILE *);
++static void pa_output_function_prologue (FILE *) ATTRIBUTE_UNUSED;
++static void pa_linux_output_function_prologue (FILE *) ATTRIBUTE_UNUSED;
+ static void update_total_code_bytes (unsigned int);
+ static void pa_output_function_epilogue (FILE *);
+ static int pa_adjust_cost (rtx_insn *, int, rtx_insn *, int, unsigned int);
+@@ -262,8 +263,6 @@ static size_t n_deferred_plabels = 0;
+ #undef TARGET_ASM_INTEGER
+ #define TARGET_ASM_INTEGER pa_assemble_integer
+ 
+-#undef TARGET_ASM_FUNCTION_PROLOGUE
+-#define TARGET_ASM_FUNCTION_PROLOGUE pa_output_function_prologue
+ #undef TARGET_ASM_FUNCTION_EPILOGUE
+ #define TARGET_ASM_FUNCTION_EPILOGUE pa_output_function_epilogue
+ 
+@@ -3842,16 +3841,10 @@ pa_compute_frame_size (poly_int64 size, int *fregs_live)
+ 	  & ~(PREFERRED_STACK_BOUNDARY / BITS_PER_UNIT - 1));
+ }
+ 
+-/* On HP-PA, move-double insns between fpu and cpu need an 8-byte block
+-   of memory.  If any fpu reg is used in the function, we allocate
+-   such a block here, at the bottom of the frame, just in case it's needed.
++/* Output function label, and associated .PROC and .CALLINFO statements.  */
+ 
+-   If this function is a leaf procedure, then we may choose not
+-   to do a "save" insn.  The decision about whether or not
+-   to do this is made in regclass.c.  */
+-
+-static void
+-pa_output_function_prologue (FILE *file)
++void
++pa_output_function_label (FILE *file)
+ {
+   /* The function's label and associated .PROC must never be
+      separated and must be output *after* any profiling declarations
+@@ -3897,7 +3890,22 @@ pa_output_function_prologue (FILE *file)
+     fprintf (file, ",ENTRY_FR=%d", fr_saved + 11);
+ 
+   fputs ("\n\t.ENTRY\n", file);
++}
++
++/* Output function prologue.  */
+ 
++static void
++pa_output_function_prologue (FILE *file)
++{
++  pa_output_function_label (file);
++  remove_useless_addtr_insns (0);
++}
++
++/* The label is output by ASM_DECLARE_FUNCTION_NAME on linux.  */
++
++static void
++pa_linux_output_function_prologue (FILE *file ATTRIBUTE_UNUSED)
++{
+   remove_useless_addtr_insns (0);
+ }
+ 
+--- a/gcc/config/pa/pa.h
++++ b/gcc/config/pa/pa.h
+@@ -1305,3 +1305,6 @@ do {									     \
+ 
+ /* Target CPU versions for D.  */
+ #define TARGET_D_CPU_VERSIONS pa_d_target_versions
++
++/* Output default function prologue for hpux.  */
++#define TARGET_ASM_FUNCTION_PROLOGUE pa_output_function_prologue
+-- 
+2.21.0
+

diff --git a/9.2.0/gentoo/README.history b/9.2.0/gentoo/README.history
new file mode 100644
index 0000000..1ce21dd
--- /dev/null
+++ b/9.2.0/gentoo/README.history
@@ -0,0 +1,28 @@
+1		12 Aug 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
+	+ 27_all_hppa64-patchable-entry-90751.patch


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

* [gentoo-commits] proj/gcc-patches:master commit in: 9.2.0/gentoo/
@ 2019-08-13  0:13 Sergei Trofimovich
  0 siblings, 0 replies; 21+ messages in thread
From: Sergei Trofimovich @ 2019-08-13  0:13 UTC (permalink / raw
  To: gentoo-commits

commit:     39341b837bba83478e24f45804830a5c4c743245
Author:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
AuthorDate: Tue Aug 13 00:13:23 2019 +0000
Commit:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Tue Aug 13 00:13:23 2019 +0000
URL:        https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=39341b83

9.2.0: drop 27_all_hppa64-patchable-entry-90751.patch as well

27_all_hppa64-patchable-entry-90751.patch was backported to 9.2.0

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

 .../27_all_hppa64-patchable-entry-90751.patch      | 120 ---------------------
 9.2.0/gentoo/README.history                        |   1 -
 2 files changed, 121 deletions(-)

diff --git a/9.2.0/gentoo/27_all_hppa64-patchable-entry-90751.patch b/9.2.0/gentoo/27_all_hppa64-patchable-entry-90751.patch
deleted file mode 100644
index d93fe0a..0000000
--- a/9.2.0/gentoo/27_all_hppa64-patchable-entry-90751.patch
+++ /dev/null
@@ -1,120 +0,0 @@
-https://gcc.gnu.org/PR90751
-
-From 5df07cedc211b67011688e911db34ee18997eedf Mon Sep 17 00:00:00 2001
-From: danglin <danglin@138bc75d-0d04-0410-961f-82ee72b054a4>
-Date: Fri, 7 Jun 2019 23:20:44 +0000
-Subject: [PATCH] 	PR target/90751 	* config/pa/pa-linux.h
- (ASM_DECLARE_FUNCTION_NAME): Update comment. 	Call pa_output_function_label.
- 	(TARGET_ASM_FUNCTION_PROLOGUE): define. 	*
- config/pa/pa-protos.h (pa_output_function_label): Declare. 	*
- config/pa/pa.c (pa_output_function_prologue): Add ATTRIBUTE_UNUSED 	to
- declaration. 	(pa_linux_output_function_prologue): Declare. 
- (TARGET_ASM_FUNCTION_PROLOGUE): Delete define. 
- (pa_output_function_label): New. 	(pa_output_function_prologue): Revise
- to use pa_output_function_label. 	(pa_linux_output_function_prologue):
- New. 	* config/pa/pa.h (TARGET_ASM_FUNCTION_PROLOGUE): Define.
-
-git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-9-branch@272061 138bc75d-0d04-0410-961f-82ee72b054a4
---- a/gcc/config/pa/pa-linux.h
-+++ b/gcc/config/pa/pa-linux.h
-@@ -109,9 +109,14 @@ along with GCC; see the file COPYING3.  If not see
-     {								\
-       ASM_OUTPUT_TYPE_DIRECTIVE (FILE, NAME, "function");	\
-       ASM_DECLARE_RESULT (FILE, DECL_RESULT (DECL));		\
-+      pa_output_function_label (FILE);				\
-     }								\
-   while (0)
- 
-+/* Output function prologue for linux.  */
-+#undef TARGET_ASM_FUNCTION_PROLOGUE
-+#define TARGET_ASM_FUNCTION_PROLOGUE pa_linux_output_function_prologue
-+
- /* As well as globalizing the label, we need to encode the label
-    to ensure a plabel is generated in an indirect call.  */
- 
---- a/gcc/config/pa/pa-protos.h
-+++ b/gcc/config/pa/pa-protos.h
-@@ -108,6 +108,7 @@ extern void pa_asm_output_aligned_local (FILE *, const char *,
- extern void pa_hpux_asm_output_external (FILE *, tree, const char *);
- extern HOST_WIDE_INT pa_initial_elimination_offset (int, int);
- extern HOST_WIDE_INT pa_function_arg_size (machine_mode, const_tree);
-+extern void pa_output_function_label (FILE *);
- 
- extern const int pa_magic_milli[];
- 
---- a/gcc/config/pa/pa.c
-+++ b/gcc/config/pa/pa.c
-@@ -118,7 +118,8 @@ static void set_reg_plus_d (int, int, HOST_WIDE_INT, int);
- static rtx pa_function_value (const_tree, const_tree, bool);
- static rtx pa_libcall_value (machine_mode, const_rtx);
- static bool pa_function_value_regno_p (const unsigned int);
--static void pa_output_function_prologue (FILE *);
-+static void pa_output_function_prologue (FILE *) ATTRIBUTE_UNUSED;
-+static void pa_linux_output_function_prologue (FILE *) ATTRIBUTE_UNUSED;
- static void update_total_code_bytes (unsigned int);
- static void pa_output_function_epilogue (FILE *);
- static int pa_adjust_cost (rtx_insn *, int, rtx_insn *, int, unsigned int);
-@@ -262,8 +263,6 @@ static size_t n_deferred_plabels = 0;
- #undef TARGET_ASM_INTEGER
- #define TARGET_ASM_INTEGER pa_assemble_integer
- 
--#undef TARGET_ASM_FUNCTION_PROLOGUE
--#define TARGET_ASM_FUNCTION_PROLOGUE pa_output_function_prologue
- #undef TARGET_ASM_FUNCTION_EPILOGUE
- #define TARGET_ASM_FUNCTION_EPILOGUE pa_output_function_epilogue
- 
-@@ -3842,16 +3841,10 @@ pa_compute_frame_size (poly_int64 size, int *fregs_live)
- 	  & ~(PREFERRED_STACK_BOUNDARY / BITS_PER_UNIT - 1));
- }
- 
--/* On HP-PA, move-double insns between fpu and cpu need an 8-byte block
--   of memory.  If any fpu reg is used in the function, we allocate
--   such a block here, at the bottom of the frame, just in case it's needed.
-+/* Output function label, and associated .PROC and .CALLINFO statements.  */
- 
--   If this function is a leaf procedure, then we may choose not
--   to do a "save" insn.  The decision about whether or not
--   to do this is made in regclass.c.  */
--
--static void
--pa_output_function_prologue (FILE *file)
-+void
-+pa_output_function_label (FILE *file)
- {
-   /* The function's label and associated .PROC must never be
-      separated and must be output *after* any profiling declarations
-@@ -3897,7 +3890,22 @@ pa_output_function_prologue (FILE *file)
-     fprintf (file, ",ENTRY_FR=%d", fr_saved + 11);
- 
-   fputs ("\n\t.ENTRY\n", file);
-+}
-+
-+/* Output function prologue.  */
- 
-+static void
-+pa_output_function_prologue (FILE *file)
-+{
-+  pa_output_function_label (file);
-+  remove_useless_addtr_insns (0);
-+}
-+
-+/* The label is output by ASM_DECLARE_FUNCTION_NAME on linux.  */
-+
-+static void
-+pa_linux_output_function_prologue (FILE *file ATTRIBUTE_UNUSED)
-+{
-   remove_useless_addtr_insns (0);
- }
- 
---- a/gcc/config/pa/pa.h
-+++ b/gcc/config/pa/pa.h
-@@ -1305,3 +1305,6 @@ do {									     \
- 
- /* Target CPU versions for D.  */
- #define TARGET_D_CPU_VERSIONS pa_d_target_versions
-+
-+/* Output default function prologue for hpux.  */
-+#define TARGET_ASM_FUNCTION_PROLOGUE pa_output_function_prologue
--- 
-2.21.0
-

diff --git a/9.2.0/gentoo/README.history b/9.2.0/gentoo/README.history
index 1ce21dd..ae5ec16 100644
--- a/9.2.0/gentoo/README.history
+++ b/9.2.0/gentoo/README.history
@@ -25,4 +25,3 @@
 	+ 24_all_libstdcxx-no-vtv.patch
 	+ 25_all_ia64-bootstrap.patch
 	+ 26_all_disable-riscv32-ABIs.patch
-	+ 27_all_hppa64-patchable-entry-90751.patch


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

* [gentoo-commits] proj/gcc-patches:master commit in: 9.2.0/gentoo/
@ 2019-09-12 21:55 Sergei Trofimovich
  0 siblings, 0 replies; 21+ messages in thread
From: Sergei Trofimovich @ 2019-09-12 21:55 UTC (permalink / raw
  To: gentoo-commits

commit:     9bd463dc1be0f9cf00924b50767db97088237b1d
Author:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
AuthorDate: Thu Sep 12 21:53:32 2019 +0000
Commit:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Thu Sep 12 21:53:32 2019 +0000
URL:        https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=9bd463dc

9.2.0: backport 27_all_sparc-PIC-constant-PR91472.patch

Fix gmp test suite failures.

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

 .../gentoo/27_all_sparc-PIC-constant-PR91472.patch | 83 ++++++++++++++++++++++
 9.2.0/gentoo/README.history                        |  3 +
 2 files changed, 86 insertions(+)

diff --git a/9.2.0/gentoo/27_all_sparc-PIC-constant-PR91472.patch b/9.2.0/gentoo/27_all_sparc-PIC-constant-PR91472.patch
new file mode 100644
index 0000000..aeacdde
--- /dev/null
+++ b/9.2.0/gentoo/27_all_sparc-PIC-constant-PR91472.patch
@@ -0,0 +1,83 @@
+https://gcc.gnu.org/PR91472
+Fix gmp test suite failrues.
+
+From 0a09a00c87081e0a8d1d382b33bb0b1ec03875e7 Mon Sep 17 00:00:00 2001
+From: ebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4>
+Date: Sun, 1 Sep 2019 12:55:22 +0000
+Subject: [PATCH] 	PR target/91472 	* config/sparc/sparc.c
+ (sparc_cannot_force_const_mem): Return true 	during LRA/reload in PIC mode
+ if the PIC register hasn't been used yet. 	(sparc_pic_register_p): Test
+ reload_in_progress for consistency's sake.
+
+git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@275270 138bc75d-0d04-0410-961f-82ee72b054a4
+---
+ gcc/config/sparc/sparc.c                      |  9 ++++-
+ .../gcc.c-torture/execute/20190901-1.c        | 36 +++++++++++++++++++
+
+--- a/gcc/config/sparc/sparc.c
++++ b/gcc/config/sparc/sparc.c
+@@ -4201,6 +4201,13 @@ eligible_for_sibcall_delay (rtx_insn *trial)
+ static bool
+ sparc_cannot_force_const_mem (machine_mode mode, rtx x)
+ {
++  /* After IRA has run in PIC mode, it is too late to put anything into the
++     constant pool if the PIC register hasn't already been initialized.  */
++  if ((lra_in_progress || reload_in_progress)
++      && flag_pic
++      && !crtl->uses_pic_offset_table)
++    return true;
++
+   switch (GET_CODE (x))
+     {
+     case CONST_INT:
+@@ -4450,7 +4457,7 @@ sparc_pic_register_p (rtx x)
+     return true;
+ 
+   if (!HARD_REGISTER_P (pic_offset_table_rtx)
+-      && (HARD_REGISTER_P (x) || lra_in_progress)
++      && (HARD_REGISTER_P (x) || lra_in_progress || reload_in_progress)
+       && ORIGINAL_REGNO (x) == REGNO (pic_offset_table_rtx))
+     return true;
+ 
+--- /dev/null
++++ b/gcc/testsuite/gcc.c-torture/execute/20190901-1.c
+@@ -0,0 +1,36 @@
++/* PR target/91472 */
++/* Reported by John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de> */
++
++typedef unsigned int gmp_uint_least32_t;
++
++union ieee_double_extract
++{
++  struct
++    {
++      gmp_uint_least32_t sig:1;
++      gmp_uint_least32_t exp:11;
++      gmp_uint_least32_t manh:20;
++      gmp_uint_least32_t manl:32;
++    } s;
++  double d;
++};
++
++double __attribute__((noipa))
++tests_infinity_d (void)
++{
++  union ieee_double_extract x;
++  x.s.exp = 2047;
++  x.s.manl = 0;
++  x.s.manh = 0;
++  x.s.sig = 0;
++  return x.d;
++}
++
++int
++main (void)
++{
++  double x = tests_infinity_d ();
++  if (x == 0.0)
++    __builtin_abort ();
++  return 0;
++}
+-- 
+2.23.0
+

diff --git a/9.2.0/gentoo/README.history b/9.2.0/gentoo/README.history
index ae5ec16..c34d76c 100644
--- a/9.2.0/gentoo/README.history
+++ b/9.2.0/gentoo/README.history
@@ -1,3 +1,6 @@
+2		TODO
+	+ 27_all_sparc-PIC-constant-PR91472.patch
+
 1		12 Aug 2019
 	+ 01_all_default-fortify-source.patch
 	+ 02_all_default-warn-format-security.patch


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

* [gentoo-commits] proj/gcc-patches:master commit in: 9.2.0/gentoo/
@ 2019-09-20 21:50 Sergei Trofimovich
  0 siblings, 0 replies; 21+ messages in thread
From: Sergei Trofimovich @ 2019-09-20 21:50 UTC (permalink / raw
  To: gentoo-commits

commit:     f762cf0401bbf5efc86031ba284338c0fb74023d
Author:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
AuthorDate: Fri Sep 20 21:49:00 2019 +0000
Commit:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Fri Sep 20 21:49:00 2019 +0000
URL:        https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=f762cf04

9.2.0: packport PR91269 (sparc subreg regression)

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

 9.2.0/gentoo/28_all_sparc-fpu-subregs-91269.patch | 105 ++++++++++++++++++++++
 9.2.0/gentoo/README.history                       |   1 +
 2 files changed, 106 insertions(+)

diff --git a/9.2.0/gentoo/28_all_sparc-fpu-subregs-91269.patch b/9.2.0/gentoo/28_all_sparc-fpu-subregs-91269.patch
new file mode 100644
index 0000000..e21d07d
--- /dev/null
+++ b/9.2.0/gentoo/28_all_sparc-fpu-subregs-91269.patch
@@ -0,0 +1,105 @@
+https://gcc.gnu.org/PR91269
+
+From bebaf06774baca584c7e9f8410d0e49606a11d60 Mon Sep 17 00:00:00 2001
+From: ebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4>
+Date: Fri, 20 Sep 2019 09:42:40 +0000
+Subject: [PATCH] 	PR target/91269 	* config/sparc/sparc.h
+ (HARD_REGNO_CALLER_SAVE_MODE): Define.
+
+git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@275994 138bc75d-0d04-0410-961f-82ee72b054a4
+---
+ gcc/config/sparc/sparc.h       |  7 ++++
+ gcc/testsuite/gcc.dg/pr91269.c | 70 ++++++++++++++++++++++++++++++++++
+
+--- a/gcc/config/sparc/sparc.h
++++ b/gcc/config/sparc/sparc.h
+@@ -711,6 +711,13 @@ along with GCC; see the file COPYING3.  If not see
+    register window instruction in the prologue.  */
+ #define HARD_REGNO_RENAME_OK(FROM, TO) ((FROM) != 1)
+ 
++/* Select a register mode required for caller save of hard regno REGNO.
++   Contrary to what is documented, the default is not the smallest suitable
++   mode but the largest suitable mode for the given (REGNO, NREGS) pair and
++   it quickly creates paradoxical subregs that can be problematic.  */
++#define HARD_REGNO_CALLER_SAVE_MODE(REGNO, NREGS, MODE) \
++  ((MODE) == VOIDmode ? choose_hard_reg_mode (REGNO, NREGS, false) : (MODE))
++
+ /* Specify the registers used for certain standard purposes.
+    The values of these macros are register numbers.  */
+ 
+--- /dev/null
++++ b/gcc/testsuite/gcc.dg/pr91269.c
+@@ -0,0 +1,70 @@
++/* PR target/91269 */
++/* Testcase by Sergei Trofimovich <slyfox@inbox.ru> */
++
++/* { dg-do assemble } */
++/* { dg-options "-O2 -Wno-int-conversion" }  */
++/* { dg-additional-options "-fcall-used-g6 -fPIE -mcpu=niagara4" { target sparc*-*-* } } */
++
++struct m;
++
++enum { a = 2 };
++int b[1];
++int d[2715];
++int e, f, h;
++enum { i = 2 } j;
++inline int c(int k) {
++  char *cp;
++  if (k >= 62 && k <= 247)
++    cp = b[k];
++  if (cp)
++    return 65533;
++  return 2;
++}
++inline int g(int k) {
++  if (k < sizeof(d))
++    return e;
++  return 0;
++}
++
++int u(struct m*, char*, char*);
++
++int l(struct m *k, char n, long o, int *p) {
++  int q, flags = j, r, s, lasttwo = *p;
++  char inptr, outptr;
++  while (inptr) {
++    if (__builtin_expect(h, 0))
++      break;
++    unsigned ch = inptr;
++    if (lasttwo) {
++      long need = lasttwo >> 3;
++      if (__builtin_expect(need > n, 0))
++        break;
++    } else if (s == i) {
++      long t = c(ch);
++      if (t != 65533) {
++        int jch = g(ch);
++        if (jch & 8)
++          continue;
++      }
++    }
++    if (ch <= 5)
++      ;
++    else {
++      long t = c(ch);
++      if (t != 65533)
++        ;
++      else {
++        switch (f >> 8)
++        case 79:
++          q = f == 20308 || f == 20350;
++        if (q)
++          if (j)
++            r = u(k, &inptr, &outptr);
++        s = *p;
++        if (r)
++          if (o && flags & a)
++            break;
++      }
++    }
++  }
++}
+-- 
+2.23.0
+

diff --git a/9.2.0/gentoo/README.history b/9.2.0/gentoo/README.history
index c34d76c..37c8298 100644
--- a/9.2.0/gentoo/README.history
+++ b/9.2.0/gentoo/README.history
@@ -1,5 +1,6 @@
 2		TODO
 	+ 27_all_sparc-PIC-constant-PR91472.patch
+	+ 28_all_sparc-fpu-subregs-91269.patch
 
 1		12 Aug 2019
 	+ 01_all_default-fortify-source.patch


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

* [gentoo-commits] proj/gcc-patches:master commit in: 9.2.0/gentoo/
@ 2019-09-20 23:44 Sergei Trofimovich
  0 siblings, 0 replies; 21+ messages in thread
From: Sergei Trofimovich @ 2019-09-20 23:44 UTC (permalink / raw
  To: gentoo-commits

commit:     0d735eed5eb8d1e0fc7948719e682a3110193e52
Author:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
AuthorDate: Fri Sep 20 23:44:17 2019 +0000
Commit:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Fri Sep 20 23:44:17 2019 +0000
URL:        https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=0d735eed

9.2.0: backport https://gcc.gnu.org/PR91702 (ICE on mips16 code)

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

 9.2.0/gentoo/29_all_mips_split_move-SEGV.patch | 47 ++++++++++++++++++++++++++
 9.2.0/gentoo/README.history                    |  1 +
 2 files changed, 48 insertions(+)

diff --git a/9.2.0/gentoo/29_all_mips_split_move-SEGV.patch b/9.2.0/gentoo/29_all_mips_split_move-SEGV.patch
new file mode 100644
index 0000000..dc154e9
--- /dev/null
+++ b/9.2.0/gentoo/29_all_mips_split_move-SEGV.patch
@@ -0,0 +1,47 @@
+https://gcc.gnu.org/PR91702
+
+From d57faea9337ad595d005687247c3322252f70ba1 Mon Sep 17 00:00:00 2001
+From: rsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>
+Date: Sun, 7 Jul 2019 09:49:14 +0000
+Subject: [PATCH] Fix uninitialised use in mips_split_move
+
+While testing the fix for PR91068, I hit an rtl checking failure
+while building newlib.  mips_split_move was decomposing an address that
+happened to be symbolic and then tried to access the REGNO of the base
+register field, which wasn't initialised but which by chance pointed to
+valid memory.
+
+2019-07-07  Richard Sandiford  <richard.sandiford@arm.com>
+
+gcc/
+	* config/mips/mips.c (mips_split_move): Zero-initialize addr
+	and check whether addr.reg is nonnull before using it.
+
+
+git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@273174 138bc75d-0d04-0410-961f-82ee72b054a4
+---
+ gcc/config/mips/mips.c | 4 ++--
+
+--- a/gcc/config/mips/mips.c
++++ b/gcc/config/mips/mips.c
+@@ -4849,7 +4849,7 @@ mips_split_move (rtx dest, rtx src, enum mips_split_type split_type, rtx insn_)
+      can forward SRC for DEST.  This is most useful if the next insn is a
+      simple store.   */
+   rtx_insn *insn = (rtx_insn *)insn_;
+-  struct mips_address_info addr;
++  struct mips_address_info addr = {};
+   if (insn)
+     {
+       rtx_insn *next = next_nonnote_nondebug_insn_bb (insn);
+@@ -4862,7 +4862,7 @@ mips_split_move (rtx dest, rtx src, enum mips_split_type split_type, rtx insn_)
+ 		{
+ 		  rtx tmp = XEXP (src, 0);
+ 		  mips_classify_address (&addr, tmp, GET_MODE (tmp), true);
+-		  if (REGNO (addr.reg) != REGNO (dest))
++		  if (addr.reg && REGNO (addr.reg) != REGNO (dest))
+ 		    validate_change (next, &SET_SRC (set), src, false);
+ 		}
+ 	      else
+-- 
+2.23.0
+

diff --git a/9.2.0/gentoo/README.history b/9.2.0/gentoo/README.history
index 37c8298..079fbf1 100644
--- a/9.2.0/gentoo/README.history
+++ b/9.2.0/gentoo/README.history
@@ -1,6 +1,7 @@
 2		TODO
 	+ 27_all_sparc-PIC-constant-PR91472.patch
 	+ 28_all_sparc-fpu-subregs-91269.patch
+	+ 29_all_mips_split_move-SEGV.patch
 
 1		12 Aug 2019
 	+ 01_all_default-fortify-source.patch


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

* [gentoo-commits] proj/gcc-patches:master commit in: 9.2.0/gentoo/
@ 2019-09-22  9:11 Sergei Trofimovich
  0 siblings, 0 replies; 21+ messages in thread
From: Sergei Trofimovich @ 2019-09-22  9:11 UTC (permalink / raw
  To: gentoo-commits

commit:     609cee1b4c3a179da56be7ae5cae8564fbf086c7
Author:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
AuthorDate: Sun Sep 22 09:10:39 2019 +0000
Commit:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Sun Sep 22 09:10:39 2019 +0000
URL:        https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=609cee1b

9.2.0: cut 2 patchset

3 new backports:
+ 27_all_sparc-PIC-constant-PR91472.patch: fix -fPIE sparc codegen
+ 28_all_sparc-fpu-subregs-91269.patch: fix another -fPIE sparc codegen
+ 29_all_mips_split_move-SEGV.patch: fix crashes on mips16 code

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

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

diff --git a/9.2.0/gentoo/README.history b/9.2.0/gentoo/README.history
index 079fbf1..a2cbd76 100644
--- a/9.2.0/gentoo/README.history
+++ b/9.2.0/gentoo/README.history
@@ -1,4 +1,4 @@
-2		TODO
+2		22 Sep 2019
 	+ 27_all_sparc-PIC-constant-PR91472.patch
 	+ 28_all_sparc-fpu-subregs-91269.patch
 	+ 29_all_mips_split_move-SEGV.patch


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

* [gentoo-commits] proj/gcc-patches:master commit in: 9.2.0/gentoo/
@ 2019-09-26 22:06 Sergei Trofimovich
  0 siblings, 0 replies; 21+ messages in thread
From: Sergei Trofimovich @ 2019-09-26 22:06 UTC (permalink / raw
  To: gentoo-commits

commit:     f1aedb7402ea1a0dec4d02e85fe7a3889c41f249
Author:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
AuthorDate: Thu Sep 26 22:05:42 2019 +0000
Commit:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Thu Sep 26 22:05:42 2019 +0000
URL:        https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=f1aedb74

9.2.0: backport arm64 -march=native precedence handling, bug #695420

Reported-by: Aaron Bauman
Bug: https://bugs.gentoo.org/695420
Bug: https://gcc.gnu.org/PR69471#c13
Signed-off-by: Sergei Trofimovich <slyfox <AT> gentoo.org>

 9.2.0/gentoo/30_all_arm64-march-native.patch | 90 ++++++++++++++++++++++++++++
 9.2.0/gentoo/README.history                  |  3 +
 2 files changed, 93 insertions(+)

diff --git a/9.2.0/gentoo/30_all_arm64-march-native.patch b/9.2.0/gentoo/30_all_arm64-march-native.patch
new file mode 100644
index 0000000..0fb6f76
--- /dev/null
+++ b/9.2.0/gentoo/30_all_arm64-march-native.patch
@@ -0,0 +1,90 @@
+https://bugs.gentoo.org/695420
+https://gcc.gnu.org/PR69471#c13
+
+From 537fd9d4dcaed8dae6248ec22a50603a591a3752 Mon Sep 17 00:00:00 2001
+From: ktkachov <ktkachov@138bc75d-0d04-0410-961f-82ee72b054a4>
+Date: Thu, 26 Sep 2019 10:52:42 +0000
+Subject: [PATCH] driver: Also prune joined switches with negation
+
+When -march=native is passed to host_detect_local_cpu to the backend,
+it overrides all command lines after it.  That means
+
+$ gcc -march=native -march=armv8-a
+
+is treated as
+
+$ gcc -march=armv8-a -march=native
+
+Prune joined switches with Negative and RejectNegative to allow
+-march=armv8-a to override previous -march=native on command-line.
+
+This is the same fix as was applied for i386 in SVN revision 269164 but for
+aarch64 and arm.
+
+2019-09-26  Matt Turner  <mattst88@gmail.com>
+
+	PR driver/69471
+	* config/aarch64/aarch64.opt (march=): Add Negative(march=).
+	(mtune=): Add Negative(mtune=).
+	(mcpu=): Add Negative(mcpu=).
+	* config/arm/arm.opt: Likewise.
+
+
+git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@276148 138bc75d-0d04-0410-961f-82ee72b054a4
+---
+ gcc/config/aarch64/aarch64.opt | 6 +++---
+ gcc/config/arm/arm.opt         | 6 +++---
+
+--- a/gcc/config/aarch64/aarch64.opt
++++ b/gcc/config/aarch64/aarch64.opt
+@@ -119,15 +119,15 @@ EnumValue
+ Enum(aarch64_tls_size) String(48) Value(48)
+ 
+ march=
+-Target RejectNegative ToLower Joined Var(aarch64_arch_string)
++Target RejectNegative Negative(march=) ToLower Joined Var(aarch64_arch_string)
+ Use features of architecture ARCH.
+ 
+ mcpu=
+-Target RejectNegative ToLower Joined Var(aarch64_cpu_string)
++Target RejectNegative Negative(mcpu=) ToLower Joined Var(aarch64_cpu_string)
+ Use features of and optimize for CPU.
+ 
+ mtune=
+-Target RejectNegative ToLower Joined Var(aarch64_tune_string)
++Target RejectNegative Negative(mtune=) ToLower Joined Var(aarch64_tune_string)
+ Optimize for CPU.
+ 
+ mabi=
+--- a/gcc/config/arm/arm.opt
++++ b/gcc/config/arm/arm.opt
+@@ -82,7 +82,7 @@ mapcs-stack-check
+ Target Report Mask(APCS_STACK) Undocumented
+ 
+ march=
+-Target RejectNegative ToLower Joined Var(arm_arch_string)
++Target RejectNegative Negative(march=) ToLower Joined Var(arm_arch_string)
+ Specify the name of the target architecture.
+ 
+ ; Other arm_arch values are loaded from arm-tables.opt
+@@ -107,7 +107,7 @@ Target Report Mask(CALLER_INTERWORKING)
+ Thumb: Assume function pointers may go to non-Thumb aware code.
+ 
+ mcpu=
+-Target RejectNegative ToLower Joined Var(arm_cpu_string)
++Target RejectNegative Negative(mcpu=) ToLower Joined Var(arm_cpu_string)
+ Specify the name of the target CPU.
+ 
+ mfloat-abi=
+@@ -232,7 +232,7 @@ Target Report Mask(TPCS_LEAF_FRAME)
+ Thumb: Generate (leaf) stack frames even if not needed.
+ 
+ mtune=
+-Target RejectNegative ToLower Joined Var(arm_tune_string)
++Target RejectNegative Negative(mtune=) ToLower Joined Var(arm_tune_string)
+ Tune code for the given processor.
+ 
+ mprint-tune-info
+-- 
+2.23.0
+

diff --git a/9.2.0/gentoo/README.history b/9.2.0/gentoo/README.history
index a2cbd76..cbeef2d 100644
--- a/9.2.0/gentoo/README.history
+++ b/9.2.0/gentoo/README.history
@@ -1,3 +1,6 @@
+3		TODO
+	+ 30_all_arm64-march-native.patch
+
 2		22 Sep 2019
 	+ 27_all_sparc-PIC-constant-PR91472.patch
 	+ 28_all_sparc-fpu-subregs-91269.patch


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

* [gentoo-commits] proj/gcc-patches:master commit in: 9.2.0/gentoo/
@ 2019-11-04  8:30 Sergei Trofimovich
  0 siblings, 0 replies; 21+ messages in thread
From: Sergei Trofimovich @ 2019-11-04  8:30 UTC (permalink / raw
  To: gentoo-commits

commit:     af8edf96ed0717a820a0c38202eb94de54bc2c83
Author:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
AuthorDate: Mon Nov  4 08:28:24 2019 +0000
Commit:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Mon Nov  4 08:28:24 2019 +0000
URL:        https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=af8edf96

9.2.0: cut 3 patchset

New patch:
+ 30_all_arm64-march-native.patch: fix -march= ordering handling on arm64

Dropped patch:
- 27_all_sparc-PIC-constant-PR91472.patch: restore python codegen on sparc

Bug: https://bugs.gentoo.org/697708
Bug: https://bugs.gentoo.org/695420
Signed-off-by: Sergei Trofimovich <slyfox <AT> gentoo.org>

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

diff --git a/9.2.0/gentoo/README.history b/9.2.0/gentoo/README.history
index 95c018c..4f182e3 100644
--- a/9.2.0/gentoo/README.history
+++ b/9.2.0/gentoo/README.history
@@ -1,4 +1,4 @@
-3		TODO
+3		04 Nov 2019
 	+ 30_all_arm64-march-native.patch
 	- 27_all_sparc-PIC-constant-PR91472.patch
 


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

* [gentoo-commits] proj/gcc-patches:master commit in: 9.2.0/gentoo/
@ 2019-11-04  8:30 Sergei Trofimovich
  0 siblings, 0 replies; 21+ messages in thread
From: Sergei Trofimovich @ 2019-11-04  8:30 UTC (permalink / raw
  To: gentoo-commits

commit:     01a86d6fd8497feb5459f4f66a8836a8fae2f5a7
Author:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
AuthorDate: Mon Nov  4 08:21:50 2019 +0000
Commit:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Mon Nov  4 08:21:50 2019 +0000
URL:        https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=01a86d6f

9.2.0: drop 27_all_sparc-PIC-constant-PR91472.patch

PR91472 fixed obscure code generation bug on gmp testsuite but
introduced gcc regression in compiling python.

Let's revert the fix. It will break gmp tests on sparc again
but at least restore python building.

Reported-by: Rolf Eike Beer
Bug: https://bugs.gentoo.org/697708
Bug: https://gcc.gnu.org/PR92095
Signed-off-by: Sergei Trofimovich <slyfox <AT> gentoo.org>

 .../gentoo/27_all_sparc-PIC-constant-PR91472.patch | 83 ----------------------
 9.2.0/gentoo/README.history                        |  1 +
 2 files changed, 1 insertion(+), 83 deletions(-)

diff --git a/9.2.0/gentoo/27_all_sparc-PIC-constant-PR91472.patch b/9.2.0/gentoo/27_all_sparc-PIC-constant-PR91472.patch
deleted file mode 100644
index aeacdde..0000000
--- a/9.2.0/gentoo/27_all_sparc-PIC-constant-PR91472.patch
+++ /dev/null
@@ -1,83 +0,0 @@
-https://gcc.gnu.org/PR91472
-Fix gmp test suite failrues.
-
-From 0a09a00c87081e0a8d1d382b33bb0b1ec03875e7 Mon Sep 17 00:00:00 2001
-From: ebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4>
-Date: Sun, 1 Sep 2019 12:55:22 +0000
-Subject: [PATCH] 	PR target/91472 	* config/sparc/sparc.c
- (sparc_cannot_force_const_mem): Return true 	during LRA/reload in PIC mode
- if the PIC register hasn't been used yet. 	(sparc_pic_register_p): Test
- reload_in_progress for consistency's sake.
-
-git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@275270 138bc75d-0d04-0410-961f-82ee72b054a4
----
- gcc/config/sparc/sparc.c                      |  9 ++++-
- .../gcc.c-torture/execute/20190901-1.c        | 36 +++++++++++++++++++
-
---- a/gcc/config/sparc/sparc.c
-+++ b/gcc/config/sparc/sparc.c
-@@ -4201,6 +4201,13 @@ eligible_for_sibcall_delay (rtx_insn *trial)
- static bool
- sparc_cannot_force_const_mem (machine_mode mode, rtx x)
- {
-+  /* After IRA has run in PIC mode, it is too late to put anything into the
-+     constant pool if the PIC register hasn't already been initialized.  */
-+  if ((lra_in_progress || reload_in_progress)
-+      && flag_pic
-+      && !crtl->uses_pic_offset_table)
-+    return true;
-+
-   switch (GET_CODE (x))
-     {
-     case CONST_INT:
-@@ -4450,7 +4457,7 @@ sparc_pic_register_p (rtx x)
-     return true;
- 
-   if (!HARD_REGISTER_P (pic_offset_table_rtx)
--      && (HARD_REGISTER_P (x) || lra_in_progress)
-+      && (HARD_REGISTER_P (x) || lra_in_progress || reload_in_progress)
-       && ORIGINAL_REGNO (x) == REGNO (pic_offset_table_rtx))
-     return true;
- 
---- /dev/null
-+++ b/gcc/testsuite/gcc.c-torture/execute/20190901-1.c
-@@ -0,0 +1,36 @@
-+/* PR target/91472 */
-+/* Reported by John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de> */
-+
-+typedef unsigned int gmp_uint_least32_t;
-+
-+union ieee_double_extract
-+{
-+  struct
-+    {
-+      gmp_uint_least32_t sig:1;
-+      gmp_uint_least32_t exp:11;
-+      gmp_uint_least32_t manh:20;
-+      gmp_uint_least32_t manl:32;
-+    } s;
-+  double d;
-+};
-+
-+double __attribute__((noipa))
-+tests_infinity_d (void)
-+{
-+  union ieee_double_extract x;
-+  x.s.exp = 2047;
-+  x.s.manl = 0;
-+  x.s.manh = 0;
-+  x.s.sig = 0;
-+  return x.d;
-+}
-+
-+int
-+main (void)
-+{
-+  double x = tests_infinity_d ();
-+  if (x == 0.0)
-+    __builtin_abort ();
-+  return 0;
-+}
--- 
-2.23.0
-

diff --git a/9.2.0/gentoo/README.history b/9.2.0/gentoo/README.history
index cbeef2d..95c018c 100644
--- a/9.2.0/gentoo/README.history
+++ b/9.2.0/gentoo/README.history
@@ -1,5 +1,6 @@
 3		TODO
 	+ 30_all_arm64-march-native.patch
+	- 27_all_sparc-PIC-constant-PR91472.patch
 
 2		22 Sep 2019
 	+ 27_all_sparc-PIC-constant-PR91472.patch


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

* [gentoo-commits] proj/gcc-patches:master commit in: 9.2.0/gentoo/
@ 2019-11-19 22:55 Sergei Trofimovich
  0 siblings, 0 replies; 21+ messages in thread
From: Sergei Trofimovich @ 2019-11-19 22:55 UTC (permalink / raw
  To: gentoo-commits

commit:     e9c37fb661aed82754e6fd374457a88d697e3091
Author:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
AuthorDate: Tue Nov 19 22:55:04 2019 +0000
Commit:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Tue Nov 19 22:55:04 2019 +0000
URL:        https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=e9c37fb6

9.2.0: backport openmp for loop SIGSEGV fix

Reported-by: Marc Vinyals
Bug: https://gcc.gnu.org/PR92504
Bug: https://bugs.gentoo.org/699938
Signed-off-by: Sergei Trofimovich <slyfox <AT> gentoo.org>

 9.2.0/gentoo/31_all_openmp-for-SEGV.patch | 62 +++++++++++++++++++++++++++++++
 9.2.0/gentoo/README.history               |  3 ++
 2 files changed, 65 insertions(+)

diff --git a/9.2.0/gentoo/31_all_openmp-for-SEGV.patch b/9.2.0/gentoo/31_all_openmp-for-SEGV.patch
new file mode 100644
index 0000000..a9399ca
--- /dev/null
+++ b/9.2.0/gentoo/31_all_openmp-for-SEGV.patch
@@ -0,0 +1,62 @@
+https://gcc.gnu.org/PR92504
+https://bugs.gentoo.org/699938
+
+From 5bf4317d82f5cb4c7360e6c9e5cbe8fa577583a3 Mon Sep 17 00:00:00 2001
+From: jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>
+Date: Tue, 19 Nov 2019 08:52:31 +0000
+Subject: [PATCH] 	PR c++/92504 	* semantics.c
+ (handle_omp_for_class_iterator): Don't call 	cp_fully_fold on cond.
+
+	* g++.dg/gomp/pr92504.C: New test.
+
+
+git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@278433 138bc75d-0d04-0410-961f-82ee72b054a4
+---
+ gcc/cp/semantics.c                  |  1 -
+ gcc/testsuite/g++.dg/gomp/pr92504.C | 29 +++++++++++++++++++++++++++++
+
+--- a/gcc/cp/semantics.c
++++ b/gcc/cp/semantics.c
+@@ -8434,7 +8434,6 @@ handle_omp_for_class_iterator (int i, location_t locus, enum tree_code code,
+   if (init && EXPR_HAS_LOCATION (init))
+     elocus = EXPR_LOCATION (init);
+ 
+-  cond = cp_fully_fold (cond);
+   switch (TREE_CODE (cond))
+     {
+     case GT_EXPR:
+--- /dev/null
++++ b/gcc/testsuite/g++.dg/gomp/pr92504.C
+@@ -0,0 +1,29 @@
++// PR c++/92504
++// { dg-do compile { target c++11 } }
++// { dg-additional-options "-O2" }
++
++namespace std {
++  typedef __SIZE_TYPE__ size_t;
++  typedef __PTRDIFF_TYPE__ ptrdiff_t;
++}
++
++struct A {
++  A ();
++  A (const A &);
++  A & operator++ ();
++  bool operator != (const A &) const;
++  std::ptrdiff_t operator - (const A &);
++  A & operator += (std::size_t);
++  int a;
++  A & begin ();
++  A & end ();				// { dg-message "declared here" }
++};
++
++void
++bar ()
++{
++  A a;
++  #pragma omp for
++  for (auto b = a; b != a.end; ++b)	// { dg-error "invalid use of non-static member function" }
++    ;
++}
+-- 
+2.24.0
+

diff --git a/9.2.0/gentoo/README.history b/9.2.0/gentoo/README.history
index 4f182e3..09ae269 100644
--- a/9.2.0/gentoo/README.history
+++ b/9.2.0/gentoo/README.history
@@ -1,3 +1,6 @@
+4		TODO
+	+ 31_all_openmp-for-SEGV.patch
+
 3		04 Nov 2019
 	+ 30_all_arm64-march-native.patch
 	- 27_all_sparc-PIC-constant-PR91472.patch


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

* [gentoo-commits] proj/gcc-patches:master commit in: 9.2.0/gentoo/
@ 2019-11-20  7:29 Sergei Trofimovich
  0 siblings, 0 replies; 21+ messages in thread
From: Sergei Trofimovich @ 2019-11-20  7:29 UTC (permalink / raw
  To: gentoo-commits

commit:     6b896455828ae89e5aa2220493cc224fae315290
Author:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
AuthorDate: Wed Nov 20 07:27:13 2019 +0000
Commit:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Wed Nov 20 07:27:13 2019 +0000
URL:        https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=6b896455

9.2.0: fix gmp test suite failures, take 2

Two new patches:
+ 27_all_sparc-PIC-constant-PR91472.patch: fix gmp test failure
+ 32_all_sparc-PIC-constant-part2.patch: fix PIC register initialization

Bug: https://gcc.gnu.org/PR91472
Bug: https://gcc.gnu.org/PR92095
Bug: https://bugs.gentoo.org/697708
Signed-off-by: Sergei Trofimovich <slyfox <AT> gentoo.org>

 .../gentoo/27_all_sparc-PIC-constant-PR91472.patch |  83 ++++++
 9.2.0/gentoo/32_all_sparc-PIC-constant-part2.patch | 310 +++++++++++++++++++++
 9.2.0/gentoo/README.history                        |   2 +
 3 files changed, 395 insertions(+)

diff --git a/9.2.0/gentoo/27_all_sparc-PIC-constant-PR91472.patch b/9.2.0/gentoo/27_all_sparc-PIC-constant-PR91472.patch
new file mode 100644
index 0000000..aeacdde
--- /dev/null
+++ b/9.2.0/gentoo/27_all_sparc-PIC-constant-PR91472.patch
@@ -0,0 +1,83 @@
+https://gcc.gnu.org/PR91472
+Fix gmp test suite failrues.
+
+From 0a09a00c87081e0a8d1d382b33bb0b1ec03875e7 Mon Sep 17 00:00:00 2001
+From: ebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4>
+Date: Sun, 1 Sep 2019 12:55:22 +0000
+Subject: [PATCH] 	PR target/91472 	* config/sparc/sparc.c
+ (sparc_cannot_force_const_mem): Return true 	during LRA/reload in PIC mode
+ if the PIC register hasn't been used yet. 	(sparc_pic_register_p): Test
+ reload_in_progress for consistency's sake.
+
+git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@275270 138bc75d-0d04-0410-961f-82ee72b054a4
+---
+ gcc/config/sparc/sparc.c                      |  9 ++++-
+ .../gcc.c-torture/execute/20190901-1.c        | 36 +++++++++++++++++++
+
+--- a/gcc/config/sparc/sparc.c
++++ b/gcc/config/sparc/sparc.c
+@@ -4201,6 +4201,13 @@ eligible_for_sibcall_delay (rtx_insn *trial)
+ static bool
+ sparc_cannot_force_const_mem (machine_mode mode, rtx x)
+ {
++  /* After IRA has run in PIC mode, it is too late to put anything into the
++     constant pool if the PIC register hasn't already been initialized.  */
++  if ((lra_in_progress || reload_in_progress)
++      && flag_pic
++      && !crtl->uses_pic_offset_table)
++    return true;
++
+   switch (GET_CODE (x))
+     {
+     case CONST_INT:
+@@ -4450,7 +4457,7 @@ sparc_pic_register_p (rtx x)
+     return true;
+ 
+   if (!HARD_REGISTER_P (pic_offset_table_rtx)
+-      && (HARD_REGISTER_P (x) || lra_in_progress)
++      && (HARD_REGISTER_P (x) || lra_in_progress || reload_in_progress)
+       && ORIGINAL_REGNO (x) == REGNO (pic_offset_table_rtx))
+     return true;
+ 
+--- /dev/null
++++ b/gcc/testsuite/gcc.c-torture/execute/20190901-1.c
+@@ -0,0 +1,36 @@
++/* PR target/91472 */
++/* Reported by John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de> */
++
++typedef unsigned int gmp_uint_least32_t;
++
++union ieee_double_extract
++{
++  struct
++    {
++      gmp_uint_least32_t sig:1;
++      gmp_uint_least32_t exp:11;
++      gmp_uint_least32_t manh:20;
++      gmp_uint_least32_t manl:32;
++    } s;
++  double d;
++};
++
++double __attribute__((noipa))
++tests_infinity_d (void)
++{
++  union ieee_double_extract x;
++  x.s.exp = 2047;
++  x.s.manl = 0;
++  x.s.manh = 0;
++  x.s.sig = 0;
++  return x.d;
++}
++
++int
++main (void)
++{
++  double x = tests_infinity_d ();
++  if (x == 0.0)
++    __builtin_abort ();
++  return 0;
++}
+-- 
+2.23.0
+

diff --git a/9.2.0/gentoo/32_all_sparc-PIC-constant-part2.patch b/9.2.0/gentoo/32_all_sparc-PIC-constant-part2.patch
new file mode 100644
index 0000000..b054f97
--- /dev/null
+++ b/9.2.0/gentoo/32_all_sparc-PIC-constant-part2.patch
@@ -0,0 +1,310 @@
+https://gcc.gnu.org/PR92095
+https://bugs.gentoo.org/697708
+
+
+From 1a839ffee6ffae07948055a81051fad05a8c0b30 Mon Sep 17 00:00:00 2001
+From: ebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4>
+Date: Fri, 8 Nov 2019 12:33:48 +0000
+Subject: [PATCH] 	PR target/92095 	* config/sparc/sparc-protos.h
+ (output_load_pcrel_sym): Declare. 	* config/sparc/sparc.c
+ (sparc_cannot_force_const_mem): Revert latest  	change. 
+ (got_helper_needed): New static variable. 	(output_load_pcrel_sym): New
+ function. 	(get_pc_thunk_name): Remove after inlining... 
+ (load_got_register): ...here.  Rework the initialization of the GOT 
+ register and of the GOT helper. 	(save_local_or_in_reg_p): Test the
+ REGNO of the GOT register. 	(sparc_file_end): Test got_helper_needed to
+ decide whether the GOT 	helper must be emitted.  Use output_asm_insn
+ instead of fprintf. 	(sparc_init_pic_reg): In PIC mode, always initialize
+ the PIC register 	if optimization is enabled. 	*
+ config/sparc/sparc.md (load_pcrel_sym<P:mode>): Emit the assembly 	by
+ calling output_load_pcrel_sym.
+
+git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-9-branch@277967 138bc75d-0d04-0410-961f-82ee72b054a4
+---
+ gcc/config/sparc/sparc-protos.h               |   1 +
+ gcc/config/sparc/sparc.c                      | 121 +++++++++++-------
+ gcc/config/sparc/sparc.md                     |   5 +-
+ .../gcc.c-torture/compile/20191108-1.c        |  14 ++
+ gcc/testsuite/gcc.target/sparc/overflow-3.c   |   2 +-
+ gcc/testsuite/gcc.target/sparc/overflow-4.c   |   2 +-
+ gcc/testsuite/gcc.target/sparc/overflow-5.c   |   2 +-
+
+--- a/gcc/config/sparc/sparc-protos.h
++++ b/gcc/config/sparc/sparc-protos.h
+@@ -69,6 +69,7 @@ extern void sparc_split_reg_mem (rtx, rtx, machine_mode);
+ extern void sparc_split_mem_reg (rtx, rtx, machine_mode);
+ extern int sparc_split_reg_reg_legitimate (rtx, rtx);
+ extern void sparc_split_reg_reg (rtx, rtx, machine_mode);
++extern const char *output_load_pcrel_sym (rtx *);
+ extern const char *output_ubranch (rtx, rtx_insn *);
+ extern const char *output_cbranch (rtx, rtx, int, int, int, rtx_insn *);
+ extern const char *output_return (rtx_insn *);
+--- a/gcc/config/sparc/sparc.c
++++ b/gcc/config/sparc/sparc.c
+@@ -4208,13 +4208,6 @@ eligible_for_sibcall_delay (rtx_insn *trial)
+ static bool
+ sparc_cannot_force_const_mem (machine_mode mode, rtx x)
+ {
+-  /* After IRA has run in PIC mode, it is too late to put anything into the
+-     constant pool if the PIC register hasn't already been initialized.  */
+-  if ((lra_in_progress || reload_in_progress)
+-      && flag_pic
+-      && !crtl->uses_pic_offset_table)
+-    return true;
+-
+   switch (GET_CODE (x))
+     {
+     case CONST_INT:
+@@ -4250,9 +4243,11 @@ sparc_cannot_force_const_mem (machine_mode mode, rtx x)
+ }
+ \f
+ /* Global Offset Table support.  */
+-static GTY(()) rtx got_helper_rtx = NULL_RTX;
+-static GTY(()) rtx got_register_rtx = NULL_RTX;
+ static GTY(()) rtx got_symbol_rtx = NULL_RTX;
++static GTY(()) rtx got_register_rtx = NULL_RTX;
++static GTY(()) rtx got_helper_rtx = NULL_RTX;
++
++static GTY(()) bool got_helper_needed = false;
+ 
+ /* Return the SYMBOL_REF for the Global Offset Table.  */
+ 
+@@ -4265,27 +4260,6 @@ sparc_got (void)
+   return got_symbol_rtx;
+ }
+ 
+-#ifdef HAVE_GAS_HIDDEN
+-# define USE_HIDDEN_LINKONCE 1
+-#else
+-# define USE_HIDDEN_LINKONCE 0
+-#endif
+-
+-static void
+-get_pc_thunk_name (char name[32], unsigned int regno)
+-{
+-  const char *reg_name = reg_names[regno];
+-
+-  /* Skip the leading '%' as that cannot be used in a
+-     symbol name.  */
+-  reg_name += 1;
+-
+-  if (USE_HIDDEN_LINKONCE)
+-    sprintf (name, "__sparc_get_pc_thunk.%s", reg_name);
+-  else
+-    ASM_GENERATE_INTERNAL_LABEL (name, "LADDPC", regno);
+-}
+-
+ /* Wrapper around the load_pcrel_sym{si,di} patterns.  */
+ 
+ static rtx
+@@ -4305,30 +4279,78 @@ gen_load_pcrel_sym (rtx op0, rtx op1, rtx op2)
+   return insn;
+ }
+ 
++/* Output the load_pcrel_sym{si,di} patterns.  */
++
++const char *
++output_load_pcrel_sym (rtx *operands)
++{
++  if (flag_delayed_branch)
++    {
++      output_asm_insn ("sethi\t%%hi(%a1-4), %0", operands);
++      output_asm_insn ("call\t%a2", operands);
++      output_asm_insn (" add\t%0, %%lo(%a1+4), %0", operands);
++    }
++  else
++    {
++      output_asm_insn ("sethi\t%%hi(%a1-8), %0", operands);
++      output_asm_insn ("add\t%0, %%lo(%a1-4), %0", operands);
++      output_asm_insn ("call\t%a2", operands);
++      output_asm_insn (" nop", NULL);
++    }
++
++  if (operands[2] == got_helper_rtx)
++    got_helper_needed = true;
++
++  return "";
++}
++
++#ifdef HAVE_GAS_HIDDEN
++# define USE_HIDDEN_LINKONCE 1
++#else
++# define USE_HIDDEN_LINKONCE 0
++#endif
++
+ /* Emit code to load the GOT register.  */
+ 
+ void
+ load_got_register (void)
+ {
+-  if (!got_register_rtx)
+-    got_register_rtx = gen_rtx_REG (Pmode, GLOBAL_OFFSET_TABLE_REGNUM);
++  rtx insn;
+ 
+   if (TARGET_VXWORKS_RTP)
+-    emit_insn (gen_vxworks_load_got ());
++    {
++      if (!got_register_rtx)
++	got_register_rtx = pic_offset_table_rtx;
++
++      insn = gen_vxworks_load_got ();
++    }
+   else
+     {
++      if (!got_register_rtx)
++	got_register_rtx = gen_rtx_REG (Pmode, GLOBAL_OFFSET_TABLE_REGNUM);
++
+       /* The GOT symbol is subject to a PC-relative relocation so we need a
+ 	 helper function to add the PC value and thus get the final value.  */
+       if (!got_helper_rtx)
+ 	{
+ 	  char name[32];
+-	  get_pc_thunk_name (name, GLOBAL_OFFSET_TABLE_REGNUM);
++
++	  /* Skip the leading '%' as that cannot be used in a symbol name.  */
++	  if (USE_HIDDEN_LINKONCE)
++	    sprintf (name, "__sparc_get_pc_thunk.%s",
++		     reg_names[REGNO (got_register_rtx)] + 1);
++	  else
++	    ASM_GENERATE_INTERNAL_LABEL (name, "LADDPC",
++					 REGNO (got_register_rtx));
++
+ 	  got_helper_rtx = gen_rtx_SYMBOL_REF (Pmode, ggc_strdup (name));
+ 	}
+ 
+-      emit_insn (gen_load_pcrel_sym (got_register_rtx, sparc_got (),
+-				     got_helper_rtx));
++      insn
++	= gen_load_pcrel_sym (got_register_rtx, sparc_got (), got_helper_rtx);
+     }
++
++  emit_insn (insn);
+ }
+ 
+ /* Ensure that we are not using patterns that are not OK with PIC.  */
+@@ -5493,7 +5515,7 @@ save_local_or_in_reg_p (unsigned int regno, int leaf_function)
+     return true;
+ 
+   /* GOT register (%l7) if needed.  */
+-  if (regno == GLOBAL_OFFSET_TABLE_REGNUM && got_register_rtx)
++  if (got_register_rtx && regno == REGNO (got_register_rtx))
+     return true;
+ 
+   /* If the function accesses prior frames, the frame pointer and the return
+@@ -12536,10 +12558,9 @@ static void
+ sparc_file_end (void)
+ {
+   /* If we need to emit the special GOT helper function, do so now.  */
+-  if (got_helper_rtx)
++  if (got_helper_needed)
+     {
+       const char *name = XSTR (got_helper_rtx, 0);
+-      const char *reg_name = reg_names[GLOBAL_OFFSET_TABLE_REGNUM];
+ #ifdef DWARF2_UNWIND_INFO
+       bool do_cfi;
+ #endif
+@@ -12576,17 +12597,22 @@ sparc_file_end (void)
+ #ifdef DWARF2_UNWIND_INFO
+       do_cfi = dwarf2out_do_cfi_asm ();
+       if (do_cfi)
+-	fprintf (asm_out_file, "\t.cfi_startproc\n");
++	output_asm_insn (".cfi_startproc", NULL);
+ #endif
+       if (flag_delayed_branch)
+-	fprintf (asm_out_file, "\tjmp\t%%o7+8\n\t add\t%%o7, %s, %s\n",
+-		 reg_name, reg_name);
++	{
++	  output_asm_insn ("jmp\t%%o7+8", NULL);
++	  output_asm_insn (" add\t%%o7, %0, %0", &got_register_rtx);
++	}
+       else
+-	fprintf (asm_out_file, "\tadd\t%%o7, %s, %s\n\tjmp\t%%o7+8\n\t nop\n",
+-		 reg_name, reg_name);
++	{
++	  output_asm_insn ("add\t%%o7, %0, %0", &got_register_rtx);
++	  output_asm_insn ("jmp\t%%o7+8", NULL);
++	  output_asm_insn (" nop", NULL);
++	}
+ #ifdef DWARF2_UNWIND_INFO
+       if (do_cfi)
+-	fprintf (asm_out_file, "\t.cfi_endproc\n");
++	output_asm_insn (".cfi_endproc", NULL);
+ #endif
+     }
+ 
+@@ -13092,7 +13118,10 @@ sparc_init_pic_reg (void)
+   edge entry_edge;
+   rtx_insn *seq;
+ 
+-  if (!crtl->uses_pic_offset_table)
++  /* In PIC mode, we need to always initialize the PIC register if optimization
++     is enabled, because we are called from IRA and LRA may later force things
++     to the constant pool for optimization purposes.  */
++  if (!flag_pic || (!crtl->uses_pic_offset_table && !optimize))
+     return;
+ 
+   start_sequence ();
+--- a/gcc/config/sparc/sparc.md
++++ b/gcc/config/sparc/sparc.md
+@@ -1604,10 +1604,7 @@
+    (clobber (reg:P O7_REG))]
+   "REGNO (operands[0]) == INTVAL (operands[3])"
+ {
+-  if (flag_delayed_branch)
+-    return "sethi\t%%hi(%a1-4), %0\n\tcall\t%a2\n\t add\t%0, %%lo(%a1+4), %0";
+-  else
+-    return "sethi\t%%hi(%a1-8), %0\n\tadd\t%0, %%lo(%a1-4), %0\n\tcall\t%a2\n\t nop";
++  return output_load_pcrel_sym (operands);
+ }
+   [(set (attr "type") (const_string "multi"))
+    (set (attr "length")
+--- /dev/null
++++ b/gcc/testsuite/gcc.c-torture/compile/20191108-1.c
+@@ -0,0 +1,14 @@
++/* PR target/92095 */
++/* Testcase by Sergei Trofimovich <slyfox@inbox.ru> */
++
++typedef union {
++  double a;
++  int b[2];
++} c;
++
++double d(int e)
++{
++  c f;
++  (&f)->b[0] = 15728640;
++  return e ? -(&f)->a : (&f)->a;
++}
+--- a/gcc/testsuite/gcc.target/sparc/overflow-3.c
++++ b/gcc/testsuite/gcc.target/sparc/overflow-3.c
+@@ -1,6 +1,6 @@
+ /* { dg-do compile } */
+ /* { dg-require-effective-target lp64 } */
+-/* { dg-options "-O" } */
++/* { dg-options "-O -fno-pie" } */
+ 
+ #include <stdbool.h>
+ #include <stdint.h>
+--- a/gcc/testsuite/gcc.target/sparc/overflow-4.c
++++ b/gcc/testsuite/gcc.target/sparc/overflow-4.c
+@@ -1,6 +1,6 @@
+ /* { dg-do compile } */
+ /* { dg-require-effective-target lp64 } */
+-/* { dg-options "-O -mno-vis3 -mno-vis4" } */
++/* { dg-options "-O -fno-pie -mno-vis3 -mno-vis4" } */
+ 
+ #include <stdbool.h>
+ #include <stdint.h>
+--- a/gcc/testsuite/gcc.target/sparc/overflow-5.c
++++ b/gcc/testsuite/gcc.target/sparc/overflow-5.c
+@@ -1,6 +1,6 @@
+ /* { dg-do compile } */
+ /* { dg-require-effective-target lp64 } */
+-/* { dg-options "-O -mvis3" } */
++/* { dg-options "-O -fno-pie -mvis3" } */
+ 
+ #include <stdbool.h>
+ #include <stdint.h>
+-- 
+2.24.0
+

diff --git a/9.2.0/gentoo/README.history b/9.2.0/gentoo/README.history
index 09ae269..1569eac 100644
--- a/9.2.0/gentoo/README.history
+++ b/9.2.0/gentoo/README.history
@@ -1,5 +1,7 @@
 4		TODO
 	+ 31_all_openmp-for-SEGV.patch
+	+ 27_all_sparc-PIC-constant-PR91472.patch
+	+ 32_all_sparc-PIC-constant-part2.patch
 
 3		04 Nov 2019
 	+ 30_all_arm64-march-native.patch


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

* [gentoo-commits] proj/gcc-patches:master commit in: 9.2.0/gentoo/
@ 2019-12-22  0:06 Sergei Trofimovich
  0 siblings, 0 replies; 21+ messages in thread
From: Sergei Trofimovich @ 2019-12-22  0:06 UTC (permalink / raw
  To: gentoo-commits

commit:     ba1c1c9ab955b533393e343bdfd8a0e7d7650639
Author:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
AuthorDate: Sun Dec 22 00:04:55 2019 +0000
Commit:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Sun Dec 22 00:04:55 2019 +0000
URL:        https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=ba1c1c9a

9.2.0: backport PR92831 (':?' lifetime extension)

It's a backport of upstream commit 59693b226e245aeb99.

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

 9.2.0/gentoo/33_all_extend-lifetime.patch | 240 ++++++++++++++++++++++++++++++
 9.2.0/gentoo/README.history               |   1 +
 2 files changed, 241 insertions(+)

diff --git a/9.2.0/gentoo/33_all_extend-lifetime.patch b/9.2.0/gentoo/33_all_extend-lifetime.patch
new file mode 100644
index 0000000..520d491
--- /dev/null
+++ b/9.2.0/gentoo/33_all_extend-lifetime.patch
@@ -0,0 +1,240 @@
+https://github.com/gcc-mirror/gcc/commit/59693b226e245aeb991ab2275a9c37d35da1191b.patch
+https://bugs.gentoo.org/701866
+
+From 59693b226e245aeb991ab2275a9c37d35da1191b Mon Sep 17 00:00:00 2001
+From: jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>
+Date: Fri, 20 Dec 2019 17:37:45 +0000
+Subject: [PATCH] 	Backported from mainline 	2019-12-06  Jakub
+ Jelinek  <jakub@redhat.com>
+
+	PR c++/92831 - CWG 1299, not extending temporary lifetime for ?:
+	* cp-tree.h (extend_ref_init_temps): Add a new argument with NULL
+	default arg.
+	* call.c (set_up_extended_ref_temp): Add COND_GUARD argument, pass it
+	down to extend_ref_init_temps.  Before pushing cleanup, if COND_GUARD
+	is non-NULL, create a bool temporary if needed, initialize to false
+	and guard the cleanup with the temporary being true.
+	(extend_ref_init_temps_1): Add COND_GUARD argument, pass it down
+	to recursive calls and set_up_extended_ref_temp.  Handle COND_EXPR.
+	(extend_ref_init_temps): Add COND_GUARD argument, pass it down to
+	recursive calls and to extend_ref_init_temps_1.
+
+	* g++.dg/cpp0x/temp-extend2.C: New test.
+
+
+git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-9-branch@279669 138bc75d-0d04-0410-961f-82ee72b054a4
+---
+ gcc/cp/call.c                             | 83 +++++++++++++++++++----
+ gcc/cp/cp-tree.h                          |  4 +-
+ gcc/testsuite/g++.dg/cpp0x/temp-extend2.C | 36 ++++++++++
+ 5 files changed, 129 insertions(+), 13 deletions(-)
+ create mode 100644 gcc/testsuite/g++.dg/cpp0x/temp-extend2.C
+
+--- a/gcc/cp/call.c
++++ b/gcc/cp/call.c
+@@ -11449,7 +11449,7 @@ make_temporary_var_for_ref_to_temp (tree decl, tree type)
+ 
+ static tree
+ set_up_extended_ref_temp (tree decl, tree expr, vec<tree, va_gc> **cleanups,
+-			  tree *initp)
++			  tree *initp, tree *cond_guard)
+ {
+   tree init;
+   tree type;
+@@ -11480,7 +11480,8 @@ set_up_extended_ref_temp (tree decl, tree expr, vec<tree, va_gc> **cleanups,
+ 
+   /* Recursively extend temps in this initializer.  */
+   TARGET_EXPR_INITIAL (expr)
+-    = extend_ref_init_temps (decl, TARGET_EXPR_INITIAL (expr), cleanups);
++    = extend_ref_init_temps (decl, TARGET_EXPR_INITIAL (expr), cleanups,
++			     cond_guard);
+ 
+   /* Any reference temp has a non-trivial initializer.  */
+   DECL_NONTRIVIALLY_INITIALIZED_P (var) = true;
+@@ -11521,7 +11522,29 @@ set_up_extended_ref_temp (tree decl, tree expr, vec<tree, va_gc> **cleanups,
+ 	{
+ 	  tree cleanup = cxx_maybe_build_cleanup (var, tf_warning_or_error);
+ 	  if (cleanup)
+-	    vec_safe_push (*cleanups, cleanup);
++	    {
++	      if (cond_guard && cleanup != error_mark_node)
++		{
++		  if (*cond_guard == NULL_TREE)
++		    {
++		      *cond_guard = build_decl (input_location, VAR_DECL,
++						NULL_TREE, boolean_type_node);
++		      DECL_ARTIFICIAL (*cond_guard) = 1;
++		      DECL_IGNORED_P (*cond_guard) = 1;
++		      DECL_CONTEXT (*cond_guard) = current_function_decl;
++		      layout_decl (*cond_guard, 0);
++		      add_decl_expr (*cond_guard);
++		      tree set = cp_build_modify_expr (UNKNOWN_LOCATION,
++						       *cond_guard, NOP_EXPR,
++						       boolean_false_node,
++						       tf_warning_or_error);
++		      finish_expr_stmt (set);
++		    }
++		  cleanup = build3 (COND_EXPR, void_type_node,
++				    *cond_guard, cleanup, NULL_TREE);
++		}
++	      vec_safe_push (*cleanups, cleanup);
++	    }
+ 	}
+ 
+       /* We must be careful to destroy the temporary only
+@@ -11626,7 +11649,8 @@ initialize_reference (tree type, tree expr,
+    which is bound either to a reference or a std::initializer_list.  */
+ 
+ static tree
+-extend_ref_init_temps_1 (tree decl, tree init, vec<tree, va_gc> **cleanups)
++extend_ref_init_temps_1 (tree decl, tree init, vec<tree, va_gc> **cleanups,
++			 tree *cond_guard)
+ {
+   tree sub = init;
+   tree *p;
+@@ -11634,20 +11658,52 @@ extend_ref_init_temps_1 (tree decl, tree init, vec<tree, va_gc> **cleanups)
+   if (TREE_CODE (sub) == COMPOUND_EXPR)
+     {
+       TREE_OPERAND (sub, 1)
+-        = extend_ref_init_temps_1 (decl, TREE_OPERAND (sub, 1), cleanups);
++	= extend_ref_init_temps_1 (decl, TREE_OPERAND (sub, 1), cleanups,
++				   cond_guard);
++      return init;
++    }
++  if (TREE_CODE (sub) == COND_EXPR)
++    {
++      tree cur_cond_guard = NULL_TREE;
++      if (TREE_OPERAND (sub, 1))
++	TREE_OPERAND (sub, 1)
++	  = extend_ref_init_temps_1 (decl, TREE_OPERAND (sub, 1), cleanups,
++				     &cur_cond_guard);
++      if (cur_cond_guard)
++	{
++	  tree set = cp_build_modify_expr (UNKNOWN_LOCATION, cur_cond_guard,
++					   NOP_EXPR, boolean_true_node,
++					   tf_warning_or_error);
++	  TREE_OPERAND (sub, 1)
++	    = cp_build_compound_expr (set, TREE_OPERAND (sub, 1),
++				      tf_warning_or_error);
++	}
++      cur_cond_guard = NULL_TREE;
++      if (TREE_OPERAND (sub, 2))
++	TREE_OPERAND (sub, 2)
++	  = extend_ref_init_temps_1 (decl, TREE_OPERAND (sub, 2), cleanups,
++				     &cur_cond_guard);
++      if (cur_cond_guard)
++	{
++	  tree set = cp_build_modify_expr (UNKNOWN_LOCATION, cur_cond_guard,
++					   NOP_EXPR, boolean_true_node,
++					   tf_warning_or_error);
++	  TREE_OPERAND (sub, 2)
++	    = cp_build_compound_expr (set, TREE_OPERAND (sub, 2),
++				      tf_warning_or_error);
++	}
+       return init;
+     }
+   if (TREE_CODE (sub) != ADDR_EXPR)
+     return init;
+   /* Deal with binding to a subobject.  */
+   for (p = &TREE_OPERAND (sub, 0);
+-       (TREE_CODE (*p) == COMPONENT_REF
+-	|| TREE_CODE (*p) == ARRAY_REF); )
++       TREE_CODE (*p) == COMPONENT_REF || TREE_CODE (*p) == ARRAY_REF; )
+     p = &TREE_OPERAND (*p, 0);
+   if (TREE_CODE (*p) == TARGET_EXPR)
+     {
+       tree subinit = NULL_TREE;
+-      *p = set_up_extended_ref_temp (decl, *p, cleanups, &subinit);
++      *p = set_up_extended_ref_temp (decl, *p, cleanups, &subinit, cond_guard);
+       recompute_tree_invariant_for_addr_expr (sub);
+       if (init != sub)
+ 	init = fold_convert (TREE_TYPE (init), sub);
+@@ -11662,13 +11718,14 @@ extend_ref_init_temps_1 (tree decl, tree init, vec<tree, va_gc> **cleanups)
+    lifetime to match that of DECL.  */
+ 
+ tree
+-extend_ref_init_temps (tree decl, tree init, vec<tree, va_gc> **cleanups)
++extend_ref_init_temps (tree decl, tree init, vec<tree, va_gc> **cleanups,
++		       tree *cond_guard)
+ {
+   tree type = TREE_TYPE (init);
+   if (processing_template_decl)
+     return init;
+   if (TYPE_REF_P (type))
+-    init = extend_ref_init_temps_1 (decl, init, cleanups);
++    init = extend_ref_init_temps_1 (decl, init, cleanups, cond_guard);
+   else
+     {
+       tree ctor = init;
+@@ -11681,7 +11738,8 @@ extend_ref_init_temps (tree decl, tree init, vec<tree, va_gc> **cleanups)
+ 	      /* The temporary array underlying a std::initializer_list
+ 		 is handled like a reference temporary.  */
+ 	      tree array = CONSTRUCTOR_ELT (ctor, 0)->value;
+-	      array = extend_ref_init_temps_1 (decl, array, cleanups);
++	      array = extend_ref_init_temps_1 (decl, array, cleanups,
++					       cond_guard);
+ 	      CONSTRUCTOR_ELT (ctor, 0)->value = array;
+ 	    }
+ 	  else
+@@ -11690,7 +11748,8 @@ extend_ref_init_temps (tree decl, tree init, vec<tree, va_gc> **cleanups)
+ 	      constructor_elt *p;
+ 	      vec<constructor_elt, va_gc> *elts = CONSTRUCTOR_ELTS (ctor);
+ 	      FOR_EACH_VEC_SAFE_ELT (elts, i, p)
+-		p->value = extend_ref_init_temps (decl, p->value, cleanups);
++		p->value = extend_ref_init_temps (decl, p->value, cleanups,
++						  cond_guard);
+ 	    }
+ 	  recompute_constructor_flags (ctor);
+ 	  if (decl_maybe_constant_var_p (decl) && TREE_CONSTANT (ctor))
+--- a/gcc/cp/cp-tree.h
++++ b/gcc/cp/cp-tree.h
+@@ -6229,7 +6229,9 @@ extern tree convert_for_arg_passing		(tree, tree, tsubst_flags_t);
+ extern bool is_properly_derived_from		(tree, tree);
+ extern tree initialize_reference		(tree, tree, int,
+ 						 tsubst_flags_t);
+-extern tree extend_ref_init_temps		(tree, tree, vec<tree, va_gc>**);
++extern tree extend_ref_init_temps		(tree, tree,
++						 vec<tree, va_gc>**,
++						 tree * = NULL);
+ extern tree make_temporary_var_for_ref_to_temp	(tree, tree);
+ extern bool type_has_extended_temps		(tree);
+ extern tree strip_top_quals			(tree);
+--- /dev/null
++++ b/gcc/testsuite/g++.dg/cpp0x/temp-extend2.C
+@@ -0,0 +1,36 @@
++// PR c++/92831
++// { dg-do run { target c++11 } }
++
++template<typename T> using id = T;
++struct S { S () { s++; } ~S () { s--; } S (int) { s++; } static int s; };
++int S::s = 0;
++
++void
++bar (bool cond, bool cond2)
++{
++  if (S::s != (cond ? cond2 ? 7 : 5 : cond2 ? 8 : 9))
++    __builtin_abort ();
++}
++
++void
++foo (bool cond, bool cond2)
++{
++  int i = 1;
++  // temporary array has same lifetime as a
++  S&& a = id<S[3]>{1, 2, 3}[i];
++  // temporary S has same lifetime as b
++  const S& b = static_cast<const S&>(0);
++  // exactly one of the four temporaries is lifetime-extended
++  S&& c = cond ? cond2 ? id<S[3]>{1, 2, 3}[i] : static_cast<S&&>(0)
++	       : cond2 ? id<S[4]>{1, 2, 3, 4}[i] : id<S[5]>{1, 2, 3, 4, 5}[i];
++  bar (cond, cond2);
++}
++
++int
++main ()
++{
++  foo (true, true);
++  foo (true, false);
++  foo (false, true);
++  foo (false, false);
++}

diff --git a/9.2.0/gentoo/README.history b/9.2.0/gentoo/README.history
index 1569eac..3535536 100644
--- a/9.2.0/gentoo/README.history
+++ b/9.2.0/gentoo/README.history
@@ -2,6 +2,7 @@
 	+ 31_all_openmp-for-SEGV.patch
 	+ 27_all_sparc-PIC-constant-PR91472.patch
 	+ 32_all_sparc-PIC-constant-part2.patch
+	+ 33_all_extend-lifetime.patch
 
 3		04 Nov 2019
 	+ 30_all_arm64-march-native.patch


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

* [gentoo-commits] proj/gcc-patches:master commit in: 9.2.0/gentoo/
@ 2019-12-22 11:11 Sergei Trofimovich
  0 siblings, 0 replies; 21+ messages in thread
From: Sergei Trofimovich @ 2019-12-22 11:11 UTC (permalink / raw
  To: gentoo-commits

commit:     35beff919bc59076c5c1aa549e04d8119c559261
Author:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
AuthorDate: Sun Dec 22 11:07:00 2019 +0000
Commit:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Sun Dec 22 11:07:00 2019 +0000
URL:        https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=35beff91

9.2.0: cut 4 patchset

4 new patches:
- 27_all_sparc-PIC-constant-PR91472.patch: fix PIC register alocation
  (bug detected by gmp test suite)
- 31_all_openmp-for-SEGV.patch: fix opemnmp for loop condition folding
- 32_all_sparc-PIC-constant-part2.patch: fix PIC register allocation
  (bug detected by python regressin)
- 33_all_extend-lifetime.patch: fix lifetime extension on ':?' operator
  (bug detected by firefox LTO build

Bug: https://gcc.gnu.org/PR91472
Bug: https://bugs.gentoo.org/699938
Bug: https://gcc.gnu.org/PR92504
Bug: https://bugs.gentoo.org/697708
Bug: https://gcc.gnu.org/PR92095
Bug: https://bugs.gentoo.org/701866
Bug: https://gcc.gnu.org/PR92831
Signed-off-by: Sergei Trofimovich <slyfox <AT> gentoo.org>

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

diff --git a/9.2.0/gentoo/README.history b/9.2.0/gentoo/README.history
index 3535536..3324fed 100644
--- a/9.2.0/gentoo/README.history
+++ b/9.2.0/gentoo/README.history
@@ -1,4 +1,4 @@
-4		TODO
+4		22 Dec 2012
 	+ 31_all_openmp-for-SEGV.patch
 	+ 27_all_sparc-PIC-constant-PR91472.patch
 	+ 32_all_sparc-PIC-constant-part2.patch


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

* [gentoo-commits] proj/gcc-patches:master commit in: 9.2.0/gentoo/
@ 2020-02-06 19:24 Sergei Trofimovich
  0 siblings, 0 replies; 21+ messages in thread
From: Sergei Trofimovich @ 2020-02-06 19:24 UTC (permalink / raw
  To: gentoo-commits

commit:     38039a107e4ac09fc34d9433dfe2fba9a20e1b92
Author:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
AuthorDate: Thu Feb  6 19:22:55 2020 +0000
Commit:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Thu Feb  6 19:22:55 2020 +0000
URL:        https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=38039a10

9.2.0: pull in PR88879 (negative insn cost), bug #707958

Single new upstream patch 34_all_ia64-neg-insn-cost.patch
to allow zstd to build successfully.

Reported-by: Matt Turner
Closes: https://bugs.gentoo.org/707958
Bug: https://gcc.gnu.org/PR88879
Signed-off-by: Sergei Trofimovich <slyfox <AT> gentoo.org>

 9.2.0/gentoo/34_all_ia64-neg-insn-cost.patch | 29 ++++++++++++++++++++++++++++
 9.2.0/gentoo/README.history                  |  3 +++
 2 files changed, 32 insertions(+)

diff --git a/9.2.0/gentoo/34_all_ia64-neg-insn-cost.patch b/9.2.0/gentoo/34_all_ia64-neg-insn-cost.patch
new file mode 100644
index 0000000..7a6bebd
--- /dev/null
+++ b/9.2.0/gentoo/34_all_ia64-neg-insn-cost.patch
@@ -0,0 +1,29 @@
+https://bugs.gentoo.org/707958
+https://gcc.gnu.org/PR88879
+
+Subject: [PATCH] sel-sched: allow negative insn priority (PR 88879)
+From: Alexander Monakov <amonakov@ispras.ru>
+
+	PR rtl-optimization/88879
+	* sel-sched.c (sel_target_adjust_priority): Remove assert.
+
+From-SVN: r271039
+---
+ gcc/ChangeLog   | 5 +++++
+ gcc/sel-sched.c | 2 --
+ 2 files changed, 5 insertions(+), 2 deletions(-)
+
+--- a/gcc/sel-sched.c
++++ b/gcc/sel-sched.c
+@@ -3331,8 +3331,6 @@ sel_target_adjust_priority (expr_t expr)
+   else
+     new_priority = priority;
+ 
+-  gcc_assert (new_priority >= 0);
+-
+   /* If the priority has changed, adjust EXPR_PRIORITY_ADJ accordingly.  */
+   EXPR_PRIORITY_ADJ (expr) = new_priority - EXPR_PRIORITY (expr);
+ 
+-- 
+2.25.0
+

diff --git a/9.2.0/gentoo/README.history b/9.2.0/gentoo/README.history
index 3324fed..0ac54f3 100644
--- a/9.2.0/gentoo/README.history
+++ b/9.2.0/gentoo/README.history
@@ -1,3 +1,6 @@
+5		TODO
+	+ 34_all_ia64-neg-insn-cost.patch
+
 4		22 Dec 2012
 	+ 31_all_openmp-for-SEGV.patch
 	+ 27_all_sparc-PIC-constant-PR91472.patch


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

* [gentoo-commits] proj/gcc-patches:master commit in: 9.2.0/gentoo/
@ 2020-02-06 22:20 Sergei Trofimovich
  0 siblings, 0 replies; 21+ messages in thread
From: Sergei Trofimovich @ 2020-02-06 22:20 UTC (permalink / raw
  To: gentoo-commits

commit:     7d1022a04284035ab567d85e356e14e06aab121d
Author:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
AuthorDate: Thu Feb  6 22:19:38 2020 +0000
Commit:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Thu Feb  6 22:19:38 2020 +0000
URL:        https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=7d1022a0

9.2.0: backport libsanitizer tweaks for glibc-2.31

Reported-by: Mike Lothian
Bug: https://bugs.gentoo.org/708346
Signed-off-by: Sergei Trofimovich <slyfox <AT> gentoo.org>

 .../gentoo/35_all_glibc-2.31-libsanitizer-1.patch  | 40 ++++++++++++
 .../gentoo/36_all_glibc-2.31-libsanitizer-2.patch  | 76 ++++++++++++++++++++++
 9.2.0/gentoo/README.history                        |  2 +
 3 files changed, 118 insertions(+)

diff --git a/9.2.0/gentoo/35_all_glibc-2.31-libsanitizer-1.patch b/9.2.0/gentoo/35_all_glibc-2.31-libsanitizer-1.patch
new file mode 100644
index 0000000..4906ae0
--- /dev/null
+++ b/9.2.0/gentoo/35_all_glibc-2.31-libsanitizer-1.patch
@@ -0,0 +1,40 @@
+https://bugs.gentoo.org/708346
+
+From ce9568e9e9cf6094be30e748821421e703754ffc Mon Sep 17 00:00:00 2001
+From: Jakub Jelinek <jakub@redhat.com>
+Date: Fri, 8 Nov 2019 19:53:18 +0100
+Subject: [PATCH] backport: re PR sanitizer/92154 (new glibc breaks arm
+ bootstrap due to libsanitizer)
+
+	Backported from mainline
+	2019-10-22  Tamar Christina  <tamar.christina@arm.com>
+
+	PR sanitizer/92154
+	* sanitizer_common/sanitizer_platform_limits_posix.cc:
+	Cherry-pick compiler-rt revision r375220.
+
+From-SVN: r277981
+---
+ libsanitizer/ChangeLog                                   | 9 +++++++++
+ .../sanitizer_common/sanitizer_platform_limits_posix.cc  | 6 +++++-
+ 2 files changed, 14 insertions(+), 1 deletion(-)
+
+--- a/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc
++++ b/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc
+@@ -1156,8 +1156,12 @@ CHECK_SIZE_AND_OFFSET(ipc_perm, uid);
+ CHECK_SIZE_AND_OFFSET(ipc_perm, gid);
+ CHECK_SIZE_AND_OFFSET(ipc_perm, cuid);
+ CHECK_SIZE_AND_OFFSET(ipc_perm, cgid);
+-#if !defined(__aarch64__) || !SANITIZER_LINUX || __GLIBC_PREREQ (2, 21)
++#if (!defined(__aarch64__) || !SANITIZER_LINUX || __GLIBC_PREREQ (2, 21)) && \
++    !defined(__arm__)
+ /* On aarch64 glibc 2.20 and earlier provided incorrect mode field.  */
++/* On Arm glibc 2.31 and later provide a different mode field, this field is
++   never used by libsanitizer so we can simply ignore this assert for all glibc
++   versions.  */
+ CHECK_SIZE_AND_OFFSET(ipc_perm, mode);
+ #endif
+ 
+-- 
+2.25.0
+

diff --git a/9.2.0/gentoo/36_all_glibc-2.31-libsanitizer-2.patch b/9.2.0/gentoo/36_all_glibc-2.31-libsanitizer-2.patch
new file mode 100644
index 0000000..1960a11
--- /dev/null
+++ b/9.2.0/gentoo/36_all_glibc-2.31-libsanitizer-2.patch
@@ -0,0 +1,76 @@
+https://bugs.gentoo.org/708346
+
+From 75003cdd23c310ec385344e8040d490e8dd6d2be Mon Sep 17 00:00:00 2001
+From: Jakub Jelinek <jakub@redhat.com>
+Date: Fri, 20 Dec 2019 17:58:35 +0100
+Subject: [PATCH] backport: re PR sanitizer/92154 (new glibc breaks arm
+ bootstrap due to libsanitizer)
+
+	Backported from mainline
+	2019-11-26  Jakub Jelinek  <jakub@redhat.com>
+
+	PR sanitizer/92154
+	* sanitizer_common/sanitizer_platform_limits_posix.h: Cherry-pick
+	llvm-project revision 947f9692440836dcb8d88b74b69dd379d85974ce.
+	* sanitizer_common/sanitizer_platform_limits_posix.cc: Likewise.
+
+From-SVN: r279653
+---
+ libsanitizer/ChangeLog                            | 10 ++++++++++
+ .../sanitizer_platform_limits_posix.cc            |  9 +++------
+ .../sanitizer_platform_limits_posix.h             | 15 +--------------
+ 3 files changed, 14 insertions(+), 20 deletions(-)
+
+--- a/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc
++++ b/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc
+@@ -1156,12 +1156,9 @@ CHECK_SIZE_AND_OFFSET(ipc_perm, uid);
+ CHECK_SIZE_AND_OFFSET(ipc_perm, gid);
+ CHECK_SIZE_AND_OFFSET(ipc_perm, cuid);
+ CHECK_SIZE_AND_OFFSET(ipc_perm, cgid);
+-#if (!defined(__aarch64__) || !SANITIZER_LINUX || __GLIBC_PREREQ (2, 21)) && \
+-    !defined(__arm__)
+-/* On aarch64 glibc 2.20 and earlier provided incorrect mode field.  */
+-/* On Arm glibc 2.31 and later provide a different mode field, this field is
+-   never used by libsanitizer so we can simply ignore this assert for all glibc
+-   versions.  */
++#if !SANITIZER_LINUX || __GLIBC_PREREQ (2, 31)
++/* glibc 2.30 and earlier provided 16-bit mode field instead of 32-bit
++   on many architectures.  */
+ CHECK_SIZE_AND_OFFSET(ipc_perm, mode);
+ #endif
+ 
+diff --git a/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h b/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h
+index 73af92af1e8..6a673a7c995 100644
+--- a/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h
++++ b/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h
+@@ -211,26 +211,13 @@ namespace __sanitizer {
+     u64 __unused1;
+     u64 __unused2;
+ #elif defined(__sparc__)
+-#if defined(__arch64__)
+     unsigned mode;
+-    unsigned short __pad1;
+-#else
+-    unsigned short __pad1;
+-    unsigned short mode;
+     unsigned short __pad2;
+-#endif
+     unsigned short __seq;
+     unsigned long long __unused1;
+     unsigned long long __unused2;
+-#elif defined(__mips__) || defined(__aarch64__) || defined(__s390x__)
+-    unsigned int mode;
+-    unsigned short __seq;
+-    unsigned short __pad1;
+-    unsigned long __unused1;
+-    unsigned long __unused2;
+ #else
+-    unsigned short mode;
+-    unsigned short __pad1;
++    unsigned int mode;
+     unsigned short __seq;
+     unsigned short __pad2;
+ #if defined(__x86_64__) && !defined(_LP64)
+-- 
+2.25.0
+

diff --git a/9.2.0/gentoo/README.history b/9.2.0/gentoo/README.history
index 0ac54f3..01df09a 100644
--- a/9.2.0/gentoo/README.history
+++ b/9.2.0/gentoo/README.history
@@ -1,5 +1,7 @@
 5		TODO
 	+ 34_all_ia64-neg-insn-cost.patch
+	+ 35_all_glibc-2.31-libsanitizer-1.patch
+	+ 36_all_glibc-2.31-libsanitizer-2.patch
 
 4		22 Dec 2012
 	+ 31_all_openmp-for-SEGV.patch


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

* [gentoo-commits] proj/gcc-patches:master commit in: 9.2.0/gentoo/
@ 2020-02-15 19:57 Sergei Trofimovich
  0 siblings, 0 replies; 21+ messages in thread
From: Sergei Trofimovich @ 2020-02-15 19:57 UTC (permalink / raw
  To: gentoo-commits

commit:     13d06bce45982c7abc0d6cb4fb9e07e67a70aadd
Author:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
AuthorDate: Sat Feb 15 19:54:50 2020 +0000
Commit:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Sat Feb 15 19:54:50 2020 +0000
URL:        https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=13d06bce

9.2.0: cut 5 patchset

Three new patches:
+ 34_all_ia64-neg-insn-cost.patch: fix lz4 code generation on ia64
+ 35_all_glibc-2.31-libsanitizer-{1,2}.patch: fix build against glibc-2.31

https://bugs.gentoo.org/707958
https://gcc.gnu.org/PR88879
https://bugs.gentoo.org/708346
Signed-off-by: Sergei Trofimovich <slyfox <AT> gentoo.org>

 9.2.0/gentoo/README.history | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/9.2.0/gentoo/README.history b/9.2.0/gentoo/README.history
index 01df09a..713dcaf 100644
--- a/9.2.0/gentoo/README.history
+++ b/9.2.0/gentoo/README.history
@@ -1,9 +1,9 @@
-5		TODO
+5		15 Feb 2020
 	+ 34_all_ia64-neg-insn-cost.patch
 	+ 35_all_glibc-2.31-libsanitizer-1.patch
 	+ 36_all_glibc-2.31-libsanitizer-2.patch
 
-4		22 Dec 2012
+4		22 Dec 2019
 	+ 31_all_openmp-for-SEGV.patch
 	+ 27_all_sparc-PIC-constant-PR91472.patch
 	+ 32_all_sparc-PIC-constant-part2.patch


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

* [gentoo-commits] proj/gcc-patches:master commit in: 9.2.0/gentoo/
@ 2020-03-01 20:56 Sergei Trofimovich
  0 siblings, 0 replies; 21+ messages in thread
From: Sergei Trofimovich @ 2020-03-01 20:56 UTC (permalink / raw
  To: gentoo-commits

commit:     0573e14f67231cbde43a90c8953896ab0d2d7e58
Author:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
AuthorDate: Sun Mar  1 20:55:32 2020 +0000
Commit:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Sun Mar  1 20:55:32 2020 +0000
URL:        https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=0573e14f

9.2.0: pull upstream 37_all_whitespace-pa.patch

Fix gcc build failure against hppa target.

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

 9.2.0/gentoo/37_all_whitespace-pa.patch | 27 +++++++++++++++++++++++++++
 9.2.0/gentoo/README.history             |  3 +++
 2 files changed, 30 insertions(+)

diff --git a/9.2.0/gentoo/37_all_whitespace-pa.patch b/9.2.0/gentoo/37_all_whitespace-pa.patch
new file mode 100644
index 0000000..ad398df
--- /dev/null
+++ b/9.2.0/gentoo/37_all_whitespace-pa.patch
@@ -0,0 +1,27 @@
+From bd7a5c5dc082707dd62083514bbb88c6f78e5bdb Mon Sep 17 00:00:00 2001
+From: John David Anglin <danglin@gcc.gnu.org>
+Date: Fri, 20 Sep 2019 21:47:56 +0000
+Subject: [PATCH] pa.c (pa_trampoline_init): Remove spurious extended
+ character.
+
+	* config/pa/pa.c (pa_trampoline_init): Remove spurious extended
+	character.
+
+From-SVN: r276007
+---
+ gcc/config/pa/pa.c | 2 +-
+
+--- a/gcc/config/pa/pa.c
++++ b/gcc/config/pa/pa.c
+@@ -10197,7 +10197,7 @@ pa_trampoline_init (rtx m_tramp, tree fndecl, rtx chain_value)
+     }
+ 
+ #ifdef HAVE_ENABLE_EXECUTE_STACK
+-  emit_library_call (gen_rtx_SYMBOL_REF (Pmode, "__enable_execute_stack"),
++  emit_library_call (gen_rtx_SYMBOL_REF (Pmode, "__enable_execute_stack"),
+ 		     LCT_NORMAL, VOIDmode, XEXP (m_tramp, 0), Pmode);
+ #endif
+ }
+-- 
+2.25.0
+

diff --git a/9.2.0/gentoo/README.history b/9.2.0/gentoo/README.history
index 713dcaf..ee72ffd 100644
--- a/9.2.0/gentoo/README.history
+++ b/9.2.0/gentoo/README.history
@@ -1,3 +1,6 @@
+6		TODO
+	+ 37_all_whitespace-pa.patch
+
 5		15 Feb 2020
 	+ 34_all_ia64-neg-insn-cost.patch
 	+ 35_all_glibc-2.31-libsanitizer-1.patch


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

* [gentoo-commits] proj/gcc-patches:master commit in: 9.2.0/gentoo/
@ 2020-03-11 23:46 Sergei Trofimovich
  0 siblings, 0 replies; 21+ messages in thread
From: Sergei Trofimovich @ 2020-03-11 23:46 UTC (permalink / raw
  To: gentoo-commits

commit:     73c75c6b496177402d52502207c9164b13608a05
Author:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
AuthorDate: Wed Mar 11 23:44:36 2020 +0000
Commit:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Wed Mar 11 23:44:36 2020 +0000
URL:        https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=73c75c6b

9.2.0: cut 6 patchset

Single new patch:
- 37_all_whitespace-pa.patch: fix hppa target built with gcc-10

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

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

diff --git a/9.2.0/gentoo/README.history b/9.2.0/gentoo/README.history
index ee72ffd..b0acdb5 100644
--- a/9.2.0/gentoo/README.history
+++ b/9.2.0/gentoo/README.history
@@ -1,4 +1,4 @@
-6		TODO
+6		11 Mar 2019
 	+ 37_all_whitespace-pa.patch
 
 5		15 Feb 2020


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

* [gentoo-commits] proj/gcc-patches:master commit in: 9.2.0/gentoo/
@ 2020-05-29  7:07 Sergei Trofimovich
  0 siblings, 0 replies; 21+ messages in thread
From: Sergei Trofimovich @ 2020-05-29  7:07 UTC (permalink / raw
  To: gentoo-commits

commit:     af4164c093d4682a080c240a9840eb4dbb13e3e4
Author:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
AuthorDate: Fri May 29 07:07:17 2020 +0000
Commit:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Fri May 29 07:07:17 2020 +0000
URL:        https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=af4164c0

9.2.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.2.0/gentoo/38_all_libcpp-ar.patch | 143 ++++++++++++++++++++++++++++++++++++
 9.2.0/gentoo/README.history         |   1 +
 2 files changed, 144 insertions(+)

diff --git a/9.2.0/gentoo/38_all_libcpp-ar.patch b/9.2.0/gentoo/38_all_libcpp-ar.patch
new file mode 100644
index 0000000..55f2944
--- /dev/null
+++ b/9.2.0/gentoo/38_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.2.0/gentoo/README.history b/9.2.0/gentoo/README.history
index b0acdb5..0a433e0 100644
--- a/9.2.0/gentoo/README.history
+++ b/9.2.0/gentoo/README.history
@@ -1,5 +1,6 @@
 6		11 Mar 2019
 	+ 37_all_whitespace-pa.patch
+	+ 38_all_libcpp-ar.patch
 
 5		15 Feb 2020
 	+ 34_all_ia64-neg-insn-cost.patch


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

* [gentoo-commits] proj/gcc-patches:master commit in: 9.2.0/gentoo/
@ 2020-06-05  7:39 Sergei Trofimovich
  0 siblings, 0 replies; 21+ messages in thread
From: Sergei Trofimovich @ 2020-06-05  7:39 UTC (permalink / raw
  To: gentoo-commits

commit:     8de1017bc7cec033dc5447bfc824ca10568b1696
Author:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
AuthorDate: Fri Jun  5 07:39:22 2020 +0000
Commit:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Fri Jun  5 07:39:22 2020 +0000
URL:        https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=8de1017b

9.2.0: clarify that 38_all_libcpp-ar.patch did not get into 6 patchset

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

 9.2.0/gentoo/README.history | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/9.2.0/gentoo/README.history b/9.2.0/gentoo/README.history
index 0a433e0..794d76c 100644
--- a/9.2.0/gentoo/README.history
+++ b/9.2.0/gentoo/README.history
@@ -1,6 +1,8 @@
+7		TODO
+	+ 38_all_libcpp-ar.patch
+
 6		11 Mar 2019
 	+ 37_all_whitespace-pa.patch
-	+ 38_all_libcpp-ar.patch
 
 5		15 Feb 2020
 	+ 34_all_ia64-neg-insn-cost.patch


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

* [gentoo-commits] proj/gcc-patches:master commit in: 9.2.0/gentoo/
@ 2020-08-17 22:26 Sergei Trofimovich
  0 siblings, 0 replies; 21+ messages in thread
From: Sergei Trofimovich @ 2020-08-17 22:26 UTC (permalink / raw
  To: gentoo-commits

commit:     717271374986e434e35d6f8806c0da15c91208ba
Author:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
AuthorDate: Mon Aug 17 22:25:24 2020 +0000
Commit:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Mon Aug 17 22:25:24 2020 +0000
URL:        https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=71727137

9.2.0: abandon branch in favour of 9.3.0

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

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

diff --git a/9.2.0/gentoo/README.history b/9.2.0/gentoo/README.history
index 794d76c..ffd2ed0 100644
--- a/9.2.0/gentoo/README.history
+++ b/9.2.0/gentoo/README.history
@@ -1,4 +1,4 @@
-7		TODO
+7		Abandoned
 	+ 38_all_libcpp-ar.patch
 
 6		11 Mar 2019


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

end of thread, other threads:[~2020-08-17 22:26 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-09-20 23:44 [gentoo-commits] proj/gcc-patches:master commit in: 9.2.0/gentoo/ Sergei Trofimovich
  -- strict thread matches above, loose matches on Subject: below --
2020-08-17 22:26 Sergei Trofimovich
2020-06-05  7:39 Sergei Trofimovich
2020-05-29  7:07 Sergei Trofimovich
2020-03-11 23:46 Sergei Trofimovich
2020-03-01 20:56 Sergei Trofimovich
2020-02-15 19:57 Sergei Trofimovich
2020-02-06 22:20 Sergei Trofimovich
2020-02-06 19:24 Sergei Trofimovich
2019-12-22 11:11 Sergei Trofimovich
2019-12-22  0:06 Sergei Trofimovich
2019-11-20  7:29 Sergei Trofimovich
2019-11-19 22:55 Sergei Trofimovich
2019-11-04  8:30 Sergei Trofimovich
2019-11-04  8:30 Sergei Trofimovich
2019-09-26 22:06 Sergei Trofimovich
2019-09-22  9:11 Sergei Trofimovich
2019-09-20 21:50 Sergei Trofimovich
2019-09-12 21:55 Sergei Trofimovich
2019-08-13  0:13 Sergei Trofimovich
2019-08-12 23:16 Sergei Trofimovich

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