public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] proj/gcc-patches:master commit in: 8.2.0/gentoo/
@ 2018-08-08  7:58 Sergei Trofimovich
  0 siblings, 0 replies; 25+ messages in thread
From: Sergei Trofimovich @ 2018-08-08  7:58 UTC (permalink / raw
  To: gentoo-commits

commit:     fb2a38606f5321096364674eba03fa134fcc5b2d
Author:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
AuthorDate: Wed Aug  8 07:57:45 2018 +0000
Commit:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Wed Aug  8 07:57:45 2018 +0000
URL:        https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=fb2a3860

8.2.0: new patchset based on 8.1.0

Changes since 8.1.0: two upstreamed patches removed:

- 93_all_arm-arch.patch
- 96_all_lto-O2-PR85655.patch

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

 8.2.0/gentoo/10_all_default-fortify-source.patch   |  15 +++
 .../11_all_default-warn-format-security.patch      |  22 ++++
 8.2.0/gentoo/12_all_default-warn-trampolines.patch |  13 ++
 8.2.0/gentoo/13_all_default-ssp-fix.patch          |  38 ++++++
 8.2.0/gentoo/25_all_alpha-mieee-default.patch      |  39 ++++++
 8.2.0/gentoo/34_all_ia64_note.GNU-stack.patch      |  92 +++++++++++++
 .../gentoo/35_all_i386_libgcc_note.GNU-stack.patch |  54 ++++++++
 8.2.0/gentoo/50_all_libiberty-asprintf.patch       |  18 +++
 8.2.0/gentoo/51_all_libiberty-pic.patch            |  10 ++
 8.2.0/gentoo/54_all_nopie-all-flags.patch          |  18 +++
 8.2.0/gentoo/55_all_extra-options.patch            |  89 +++++++++++++
 .../90_all_pr55930-dependency-tracking.patch       |  18 +++
 8.2.0/gentoo/92_all_sh-drop-sysroot-suffix.patch   |  32 +++++
 8.2.0/gentoo/94_all_mips-o32-asan.patch            |  37 ++++++
 8.2.0/gentoo/95_all_ia64-TEXTREL.patch             |  22 ++++
 8.2.0/gentoo/97_all_disable-systemtap-switch.patch | 142 +++++++++++++++++++++
 8.2.0/gentoo/README.history                        |  18 +++
 17 files changed, 677 insertions(+)

diff --git a/8.2.0/gentoo/10_all_default-fortify-source.patch b/8.2.0/gentoo/10_all_default-fortify-source.patch
new file mode 100644
index 0000000..36c5762
--- /dev/null
+++ b/8.2.0/gentoo/10_all_default-fortify-source.patch
@@ -0,0 +1,15 @@
+Enable -D_FORTIFY_SOURCE=2 by default.
+
+
+--- a/gcc/c-family/c-cppbuiltin.c
++++ b/gcc/c-family/c-cppbuiltin.c
+@@ -951,6 +951,9 @@ 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);
+ 
++  /* Fortify Source enabled by default w/optimization.  */
++  cpp_define (pfile, "_FORTIFY_SOURCE=((defined __OPTIMIZE__ && __OPTIMIZE__ > 0) ? 2 : 0)");
++
+   /* Misc.  */
+   if (flag_gnu89_inline)
+     cpp_define (pfile, "__GNUC_GNU_INLINE__");

diff --git a/8.2.0/gentoo/11_all_default-warn-format-security.patch b/8.2.0/gentoo/11_all_default-warn-format-security.patch
new file mode 100644
index 0000000..f809abd
--- /dev/null
+++ b/8.2.0/gentoo/11_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/8.2.0/gentoo/12_all_default-warn-trampolines.patch b/8.2.0/gentoo/12_all_default-warn-trampolines.patch
new file mode 100644
index 0000000..7a644cb
--- /dev/null
+++ b/8.2.0/gentoo/12_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/8.2.0/gentoo/13_all_default-ssp-fix.patch b/8.2.0/gentoo/13_all_default-ssp-fix.patch
new file mode 100644
index 0000000..d2deac7
--- /dev/null
+++ b/8.2.0/gentoo/13_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/8.2.0/gentoo/25_all_alpha-mieee-default.patch b/8.2.0/gentoo/25_all_alpha-mieee-default.patch
new file mode 100644
index 0000000..b266d77
--- /dev/null
+++ b/8.2.0/gentoo/25_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/8.2.0/gentoo/34_all_ia64_note.GNU-stack.patch b/8.2.0/gentoo/34_all_ia64_note.GNU-stack.patch
new file mode 100644
index 0000000..66a787e
--- /dev/null
+++ b/8.2.0/gentoo/34_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/8.2.0/gentoo/35_all_i386_libgcc_note.GNU-stack.patch b/8.2.0/gentoo/35_all_i386_libgcc_note.GNU-stack.patch
new file mode 100644
index 0000000..7f74945
--- /dev/null
+++ b/8.2.0/gentoo/35_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/8.2.0/gentoo/50_all_libiberty-asprintf.patch b/8.2.0/gentoo/50_all_libiberty-asprintf.patch
new file mode 100644
index 0000000..bee0c4c
--- /dev/null
+++ b/8.2.0/gentoo/50_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/8.2.0/gentoo/51_all_libiberty-pic.patch b/8.2.0/gentoo/51_all_libiberty-pic.patch
new file mode 100644
index 0000000..b6160a7
--- /dev/null
+++ b/8.2.0/gentoo/51_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/8.2.0/gentoo/54_all_nopie-all-flags.patch b/8.2.0/gentoo/54_all_nopie-all-flags.patch
new file mode 100644
index 0000000..48536e6
--- /dev/null
+++ b/8.2.0/gentoo/54_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/8.2.0/gentoo/55_all_extra-options.patch b/8.2.0/gentoo/55_all_extra-options.patch
new file mode 100644
index 0000000..3e8275f
--- /dev/null
+++ b/8.2.0/gentoo/55_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 ENABLE_ESP
++#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/8.2.0/gentoo/90_all_pr55930-dependency-tracking.patch b/8.2.0/gentoo/90_all_pr55930-dependency-tracking.patch
new file mode 100644
index 0000000..a8743e0
--- /dev/null
+++ b/8.2.0/gentoo/90_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/8.2.0/gentoo/92_all_sh-drop-sysroot-suffix.patch b/8.2.0/gentoo/92_all_sh-drop-sysroot-suffix.patch
new file mode 100644
index 0000000..3dadd4c
--- /dev/null
+++ b/8.2.0/gentoo/92_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/8.2.0/gentoo/94_all_mips-o32-asan.patch b/8.2.0/gentoo/94_all_mips-o32-asan.patch
new file mode 100644
index 0000000..0b14b6a
--- /dev/null
+++ b/8.2.0/gentoo/94_all_mips-o32-asan.patch
@@ -0,0 +1,37 @@
+Update O32 ABI pieces of sanitizer to make it compile again.
+
+https://gcc.gnu.org/bugzilla/PR85663
+diff --git a/libsanitizer/sanitizer_common/sanitizer_atomic_clang_other.h b/libsanitizer/sanitizer_common/sanitizer_atomic_clang_other.h
+index a0605bbbd..253f7b5dc 100644
+--- a/libsanitizer/sanitizer_common/sanitizer_atomic_clang_other.h
++++ b/libsanitizer/sanitizer_common/sanitizer_atomic_clang_other.h
+@@ -37,3 +37,3 @@ static struct {
+   char pad[32 - sizeof(int)];
+-} __attribute__((aligned(32))) lock = {0};
++} __attribute__((aligned(32))) lock = {0, {0,}};
+ 
+diff --git a/libsanitizer/sanitizer_common/sanitizer_platform.h b/libsanitizer/sanitizer_common/sanitizer_platform.h
+index 1eb4d0c61..82875872c 100644
+--- a/libsanitizer/sanitizer_common/sanitizer_platform.h
++++ b/libsanitizer/sanitizer_common/sanitizer_platform.h
+@@ -114,2 +114,11 @@
+ # define SANITIZER_MIPS 1
++# if defined(_MIPS_SIM) && _MIPS_SIM == _ABIO32
++#  define ONE_OF_MIPS_32_N32_64(a, b, c) (a)
++# elif defined(_MIPS_SIM) && _MIPS_SIM == _ABIN32
++#  define ONE_OF_MIPS_32_N32_64(a, b, c) (b)
++# elif defined(_MIPS_SIM) && _MIPS_SIM == _ABI64
++#  define ONE_OF_MIPS_32_N32_64(a, b, c) (c)
++# else
++#  define ONE_OF_MIPS_32_N32_64(a, b, c) sanitizer_platform_unknown_sim
++# endif
+ # if defined(__mips64)
+diff --git a/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h b/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h
+index 4d11d0717..4c6e13830 100644
+--- a/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h
++++ b/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h
+@@ -88,3 +88,3 @@ namespace __sanitizer {
+                  SANITIZER_ANDROID ? FIRST_32_SECOND_64(104, 128) :
+-                                     FIRST_32_SECOND_64(160, 216);
++                                     ONE_OF_MIPS_32_N32_64(144, 160, 216);
+   const unsigned struct_kernel_stat64_sz = 104;

diff --git a/8.2.0/gentoo/95_all_ia64-TEXTREL.patch b/8.2.0/gentoo/95_all_ia64-TEXTREL.patch
new file mode 100644
index 0000000..706dbe5
--- /dev/null
+++ b/8.2.0/gentoo/95_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/8.2.0/gentoo/97_all_disable-systemtap-switch.patch b/8.2.0/gentoo/97_all_disable-systemtap-switch.patch
new file mode 100644
index 0000000..a40df83
--- /dev/null
+++ b/8.2.0/gentoo/97_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 7d69faf549d..5e96c4f99fc 100755
+--- a/gcc/configure
++++ b/gcc/configure
+@@ -946,6 +946,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
+@@ -1688,6 +1689,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
+@@ -18448,7 +18450,7 @@ else
+   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
+   lt_status=$lt_dlunknown
+   cat > conftest.$ac_ext <<_LT_EOF
+-#line 18451 "configure"
++#line 18453 "configure"
+ #include "confdefs.h"
+ 
+ #if HAVE_DLFCN_H
+@@ -18554,7 +18556,7 @@ else
+   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
+   lt_status=$lt_dlunknown
+   cat > conftest.$ac_ext <<_LT_EOF
+-#line 18557 "configure"
++#line 18559 "configure"
+ #include "confdefs.h"
+ 
+ #if HAVE_DLFCN_H
+@@ -29297,17 +29299,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 36124b8ce90..8356e579a20 100644
+--- a/gcc/configure.ac
++++ b/gcc/configure.ac
+@@ -5965,14 +5965,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/8.2.0/gentoo/README.history b/8.2.0/gentoo/README.history
new file mode 100644
index 0000000..4ebb819
--- /dev/null
+++ b/8.2.0/gentoo/README.history
@@ -0,0 +1,18 @@
+1.0		08 Aug 2018
+	+ 95_all_ia64-TEXTREL.patch
+	+ 97_all_disable-systemtap-switch.patch
+	+ 94_all_mips-o32-asan.patch
+	+ 13_all_default-ssp-fix.patch
+	+ 35_all_i386_libgcc_note.GNU-stack.patch
+	+ 55_all_extra-options.patch
+	+ 92_all_sh-drop-sysroot-suffix.patch
+	+ 10_all_default-fortify-source.patch
+	+ 11_all_default-warn-format-security.patch
+	+ 12_all_default-warn-trampolines.patch
+	+ 13_all_default-ssp-fix.patch
+	+ 25_all_alpha-mieee-default.patch
+	+ 34_all_ia64_note.GNU-stack.patch
+	+ 50_all_libiberty-asprintf.patch
+	+ 51_all_libiberty-pic.patch
+	+ 54_all_nopie-all-flags.patch
+	+ 90_all_pr55930-dependency-tracking.patch


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

* [gentoo-commits] proj/gcc-patches:master commit in: 8.2.0/gentoo/
@ 2018-08-08  8:26 Sergei Trofimovich
  0 siblings, 0 replies; 25+ messages in thread
From: Sergei Trofimovich @ 2018-08-08  8:26 UTC (permalink / raw
  To: gentoo-commits

commit:     638b730aa37da5b2abfc92194f83bff0971a692f
Author:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
AuthorDate: Wed Aug  8 08:24:51 2018 +0000
Commit:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Wed Aug  8 08:24:51 2018 +0000
URL:        https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=638b730a

8.2.0: fix TEXTREL in libitm on sh (PR86712)

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

 8.2.0/gentoo/98_all_sh_textrel-on-libitm.patch | 41 ++++++++++++++++++++++++++
 8.2.0/gentoo/README.history                    |  2 ++
 2 files changed, 43 insertions(+)

diff --git a/8.2.0/gentoo/98_all_sh_textrel-on-libitm.patch b/8.2.0/gentoo/98_all_sh_textrel-on-libitm.patch
new file mode 100644
index 0000000..68e50f9
--- /dev/null
+++ b/8.2.0/gentoo/98_all_sh_textrel-on-libitm.patch
@@ -0,0 +1,41 @@
+Backport of upstream https://gcc.gnu.org/PR86712
+
+From 7bb408709cd28034e1bfbd0596887997bcdccee4 Mon Sep 17 00:00:00 2001
+From: law <law@138bc75d-0d04-0410-961f-82ee72b054a4>
+Date: Fri, 3 Aug 2018 20:53:08 +0000
+Subject: [PATCH] 	* config/sh/sjlj.S: Adjust to use PIC vs normal code
+ to avoid 	absolute relocation in a shared library.
+
+git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@263299 138bc75d-0d04-0410-961f-82ee72b054a4
+---
+ libitm/ChangeLog             |   5 +++++
+ libitm/config/sh/.sjlj.S.swp | Bin 0 -> 12288 bytes
+ libitm/config/sh/sjlj.S      |   4 ++--
+ 3 files changed, 7 insertions(+), 2 deletions(-)
+ create mode 100644 libitm/config/sh/.sjlj.S.swp
+
+diff --git a/libitm/config/sh/sjlj.S b/libitm/config/sh/sjlj.S
+index 043f36749be..f265ab8f898 100644
+--- a/libitm/config/sh/sjlj.S
++++ b/libitm/config/sh/sjlj.S
+@@ -53,7 +53,7 @@ _ITM_beginTransaction:
+ #else
+ 	cfi_def_cfa_offset (4*10)
+ #endif
+-#if defined HAVE_ATTRIBUTE_VISIBILITY || !defined __PIC__
++#if !defined __PIC__
+ 	mov.l	.Lbegin, r1
+ 	jsr	@r1
+ 	 mov	r15, r5
+@@ -78,7 +78,7 @@ _ITM_beginTransaction:
+ 
+ 	.align  2
+ .Lbegin:
+-#if defined HAVE_ATTRIBUTE_VISIBILITY || !defined __PIC__
++#if !defined __PIC__
+ 	.long	GTM_begin_transaction
+ #else
+ 	.long	GTM_begin_transaction@PCREL-(.Lbegin0-.)
+-- 
+2.18.0
+

diff --git a/8.2.0/gentoo/README.history b/8.2.0/gentoo/README.history
index 4ebb819..b6ba307 100644
--- a/8.2.0/gentoo/README.history
+++ b/8.2.0/gentoo/README.history
@@ -1,3 +1,5 @@
+1.1		TODO
+	+ 98_all_sh_textrel-on-libitm.patch
 1.0		08 Aug 2018
 	+ 95_all_ia64-TEXTREL.patch
 	+ 97_all_disable-systemtap-switch.patch


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

* [gentoo-commits] proj/gcc-patches:master commit in: 8.2.0/gentoo/
@ 2018-08-08  8:31 Sergei Trofimovich
  0 siblings, 0 replies; 25+ messages in thread
From: Sergei Trofimovich @ 2018-08-08  8:31 UTC (permalink / raw
  To: gentoo-commits

commit:     1601b49ed08693f9df1ff6cbca9eeda722879230
Author:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
AuthorDate: Wed Aug  8 08:29:53 2018 +0000
Commit:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Wed Aug  8 08:29:53 2018 +0000
URL:        https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=1601b49e

8.2.0: fix TEXTREL in libgcc on m68k (PR86224)

This patch is not yet upstream as it will need
symbol export fixes as well. But the patch is
a strict improvement of previous state WRT TEXTRELs.

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

 8.2.0/gentoo/99_all_m68k-textrel-on-libgcc.patch | 93 ++++++++++++++++++++++++
 8.2.0/gentoo/README.history                      |  1 +
 2 files changed, 94 insertions(+)

diff --git a/8.2.0/gentoo/99_all_m68k-textrel-on-libgcc.patch b/8.2.0/gentoo/99_all_m68k-textrel-on-libgcc.patch
new file mode 100644
index 0000000..a2aa100
--- /dev/null
+++ b/8.2.0/gentoo/99_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/8.2.0/gentoo/README.history b/8.2.0/gentoo/README.history
index b6ba307..e16832f 100644
--- a/8.2.0/gentoo/README.history
+++ b/8.2.0/gentoo/README.history
@@ -1,5 +1,6 @@
 1.1		TODO
 	+ 98_all_sh_textrel-on-libitm.patch
+	+ 99_all_m68k-textrel-on-libgcc.patch
 1.0		08 Aug 2018
 	+ 95_all_ia64-TEXTREL.patch
 	+ 97_all_disable-systemtap-switch.patch


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

* [gentoo-commits] proj/gcc-patches:master commit in: 8.2.0/gentoo/
@ 2018-08-08  8:37 Sergei Trofimovich
  0 siblings, 0 replies; 25+ messages in thread
From: Sergei Trofimovich @ 2018-08-08  8:37 UTC (permalink / raw
  To: gentoo-commits

commit:     50495d7af772db3076f1a82e6d460e3cc86cf4f7
Author:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
AuthorDate: Wed Aug  8 08:37:06 2018 +0000
Commit:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Wed Aug  8 08:37:06 2018 +0000
URL:        https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=50495d7a

8.2.0: fix building against isl-0.20 (PR86724)

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

 8.2.0/gentoo/100_all-isl-include.patch | 35 ++++++++++++++++++++++++++++++++++
 8.2.0/gentoo/README.history            |  1 +
 2 files changed, 36 insertions(+)

diff --git a/8.2.0/gentoo/100_all-isl-include.patch b/8.2.0/gentoo/100_all-isl-include.patch
new file mode 100644
index 0000000..bb3bcee
--- /dev/null
+++ b/8.2.0/gentoo/100_all-isl-include.patch
@@ -0,0 +1,35 @@
+https://bugs.gentoo.org/662500
+https://gcc.gnu.org/PR86724
+
+From d6470854446446a4e8b3b958a00e5013ed86ae7f Mon Sep 17 00:00:00 2001
+From: rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>
+Date: Wed, 1 Aug 2018 07:21:08 +0000
+Subject: [PATCH] 2018-08-01  Richard Biener  <rguenther@suse.de>
+
+	PR bootstrap/86724
+	* graphite.h: Include isl/id.h and isl/space.h to allow build
+	with ISL 0.20.
+
+
+git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@263193 138bc75d-0d04-0410-961f-82ee72b054a4
+---
+ gcc/ChangeLog  | 6 ++++++
+ gcc/graphite.h | 2 ++
+ 2 files changed, 8 insertions(+)
+
+diff --git a/gcc/graphite.h b/gcc/graphite.h
+index 4e0e58c60ab..be0a22b3894 100644
+--- a/gcc/graphite.h
++++ b/gcc/graphite.h
+@@ -37,6 +37,8 @@ along with GCC; see the file COPYING3.  If not see
+ #include <isl/schedule.h>
+ #include <isl/ast_build.h>
+ #include <isl/schedule_node.h>
++#include <isl/id.h>
++#include <isl/space.h>
+ 
+ typedef struct poly_dr *poly_dr_p;
+ 
+-- 
+2.18.0
+

diff --git a/8.2.0/gentoo/README.history b/8.2.0/gentoo/README.history
index e16832f..1fdbc92 100644
--- a/8.2.0/gentoo/README.history
+++ b/8.2.0/gentoo/README.history
@@ -1,6 +1,7 @@
 1.1		TODO
 	+ 98_all_sh_textrel-on-libitm.patch
 	+ 99_all_m68k-textrel-on-libgcc.patch
+	+ 100_all-isl-include.patch
 1.0		08 Aug 2018
 	+ 95_all_ia64-TEXTREL.patch
 	+ 97_all_disable-systemtap-switch.patch


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

* [gentoo-commits] proj/gcc-patches:master commit in: 8.2.0/gentoo/
@ 2018-08-12 20:27 Sergei Trofimovich
  0 siblings, 0 replies; 25+ messages in thread
From: Sergei Trofimovich @ 2018-08-12 20:27 UTC (permalink / raw
  To: gentoo-commits

commit:     52dfe784504d5e5ff6f4580d324a6adc3607c5e6
Author:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
AuthorDate: Sun Aug 12 20:16:46 2018 +0000
Commit:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Sun Aug 12 20:16:46 2018 +0000
URL:        https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=52dfe784

8.2.0: release 1.1 patchset

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

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

diff --git a/8.2.0/gentoo/README.history b/8.2.0/gentoo/README.history
index 1fdbc92..2f4460b 100644
--- a/8.2.0/gentoo/README.history
+++ b/8.2.0/gentoo/README.history
@@ -1,4 +1,4 @@
-1.1		TODO
+1.1		12 Aug 2018
 	+ 98_all_sh_textrel-on-libitm.patch
 	+ 99_all_m68k-textrel-on-libgcc.patch
 	+ 100_all-isl-include.patch


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

* [gentoo-commits] proj/gcc-patches:master commit in: 8.2.0/gentoo/
@ 2018-08-12 22:56 Sergei Trofimovich
  0 siblings, 0 replies; 25+ messages in thread
From: Sergei Trofimovich @ 2018-08-12 22:56 UTC (permalink / raw
  To: gentoo-commits

commit:     6e140d8a739d5c78d190a92523972841903c6cac
Author:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
AuthorDate: Sun Aug 12 22:53:34 2018 +0000
Commit:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Sun Aug 12 22:53:34 2018 +0000
URL:        https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=6e140d8a

8.2.0: fix underscore around arch selector

100_all-isl-include.patch was not applied by epatch
as it was not match by _all_ arch selector.

Reported-by: cyrillic
Bug: https://bugs.gentoo.org/662500
Signed-off-by: Sergei Trofimovich <slyfox <AT> gentoo.org>

 8.2.0/gentoo/{100_all-isl-include.patch => 100_all_isl-include.patch} | 0
 8.2.0/gentoo/README.history                                           | 3 +++
 2 files changed, 3 insertions(+)

diff --git a/8.2.0/gentoo/100_all-isl-include.patch b/8.2.0/gentoo/100_all_isl-include.patch
similarity index 100%
rename from 8.2.0/gentoo/100_all-isl-include.patch
rename to 8.2.0/gentoo/100_all_isl-include.patch

diff --git a/8.2.0/gentoo/README.history b/8.2.0/gentoo/README.history
index 2f4460b..04f21ae 100644
--- a/8.2.0/gentoo/README.history
+++ b/8.2.0/gentoo/README.history
@@ -1,3 +1,6 @@
+1.2		12 Aug 2018
+	- 100_all-isl-include.patch
+	+ 100_all_isl-include.patch
 1.1		12 Aug 2018
 	+ 98_all_sh_textrel-on-libitm.patch
 	+ 99_all_m68k-textrel-on-libgcc.patch


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

* [gentoo-commits] proj/gcc-patches:master commit in: 8.2.0/gentoo/
@ 2018-09-15 19:30 Sergei Trofimovich
  0 siblings, 0 replies; 25+ messages in thread
From: Sergei Trofimovich @ 2018-09-15 19:30 UTC (permalink / raw
  To: gentoo-commits

commit:     8f787f42d02e70eda8dd2dd98a56f2fa72c82894
Author:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
AuthorDate: Sat Sep 15 19:29:50 2018 +0000
Commit:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Sat Sep 15 19:29:50 2018 +0000
URL:        https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=8f787f42

8.2.0: fix mmix, PR85666

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

 8.2.0/gentoo/103_all_mmix-fix-85666-p1.patch | 41 ++++++++++++++++++++++++++++
 8.2.0/gentoo/104_all_mmix-fix-85666-p2.patch | 30 ++++++++++++++++++++
 8.2.0/gentoo/README.history                  |  2 ++
 3 files changed, 73 insertions(+)

diff --git a/8.2.0/gentoo/103_all_mmix-fix-85666-p1.patch b/8.2.0/gentoo/103_all_mmix-fix-85666-p1.patch
new file mode 100644
index 0000000..ba74682
--- /dev/null
+++ b/8.2.0/gentoo/103_all_mmix-fix-85666-p1.patch
@@ -0,0 +1,41 @@
+From e66a5c025d0c3f4731a5f65ed2e6dbaf89bfaace Mon Sep 17 00:00:00 2001
+From: hp <hp@138bc75d-0d04-0410-961f-82ee72b054a4>
+Date: Sun, 9 Sep 2018 18:05:48 +0000
+Subject: [PATCH] 	PR target/85666 	* config/mmix/mmix.c
+ (MMIX_CFUN_NEEDS_SAVED_EH_RETURN_ADDRESS): Don't 	call leaf_function_p,
+ instead use has_hard_reg_initial_val.
+
+git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@264182 138bc75d-0d04-0410-961f-82ee72b054a4
+--- a/gcc/config/mmix/mmix.c
++++ b/gcc/config/mmix/mmix.c
+@@ -60,19 +60,16 @@ along with GCC; see the file COPYING3.  If not see
+ 
+ /* We have no means to tell DWARF 2 about the register stack, so we need
+    to store the return address on the stack if an exception can get into
+-   this function.  FIXME: Narrow condition.  Before any whole-function
+-   analysis, df_regs_ever_live_p () isn't initialized.  We know it's up-to-date
+-   after reload_completed; it may contain incorrect information some time
+-   before that.  Within a RTL sequence (after a call to start_sequence,
+-   such as in RTL expanders), leaf_function_p doesn't see all insns
+-   (perhaps any insn).  But regs_ever_live is up-to-date when
+-   leaf_function_p () isn't, so we "or" them together to get accurate
+-   information.  FIXME: Some tweak to leaf_function_p might be
+-   preferable.  */
++   this function.  We'll have an "initial value" recorded for the
++   return-register if we've seen a call instruction emitted.  This note
++   will be inaccurate before instructions are emitted, but the only caller
++   at that time is looking for modulo from stack-boundary, to which the
++   return-address does not contribute, and which is always 0 for MMIX
++   anyway.  Beware of calling leaf_function_p here, as it'll abort if
++   called within a sequence.  */
+ #define MMIX_CFUN_NEEDS_SAVED_EH_RETURN_ADDRESS			\
+  (flag_exceptions						\
+-  && ((reload_completed && df_regs_ever_live_p (MMIX_rJ_REGNUM))	\
+-      || !leaf_function_p ()))
++  && has_hard_reg_initial_val (Pmode, MMIX_INCOMING_RETURN_ADDRESS_REGNUM))
+ 
+ #define IS_MMIX_EH_RETURN_DATA_REG(REGNO)	\
+  (crtl->calls_eh_return		\
+-- 
+2.19.0
+

diff --git a/8.2.0/gentoo/104_all_mmix-fix-85666-p2.patch b/8.2.0/gentoo/104_all_mmix-fix-85666-p2.patch
new file mode 100644
index 0000000..2c0f056
--- /dev/null
+++ b/8.2.0/gentoo/104_all_mmix-fix-85666-p2.patch
@@ -0,0 +1,30 @@
+From 919e63e824a673c63575f753c861c330860e632a Mon Sep 17 00:00:00 2001
+From: hp <hp@138bc75d-0d04-0410-961f-82ee72b054a4>
+Date: Sun, 9 Sep 2018 18:12:14 +0000
+Subject: [PATCH] 	PR target/85666 	* config/mmix/mmix.c
+ (mmix_assemble_integer): Handle byte-size 	non-CONST_INT rtx:es using
+ assemble_integer_with_op ".byte".
+
+git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@264183 138bc75d-0d04-0410-961f-82ee72b054a4
+--- a/gcc/config/mmix/mmix.c
++++ b/gcc/config/mmix/mmix.c
+@@ -1370,8 +1370,14 @@ mmix_assemble_integer (rtx x, unsigned int size, int aligned_p)
+       case 1:
+ 	if (GET_CODE (x) != CONST_INT)
+ 	  {
+-	    aligned_p = 0;
+-	    break;
++	    /* There is no "unaligned byte" op or generic function to
++	       which we can punt, so we have to handle this here.  As
++	       the expression isn't a plain literal, the generated
++	       assembly-code can't be mmixal-equivalent (i.e. "BYTE"
++	       won't work) and thus it's ok to emit the default op
++	       ".byte". */
++	    assemble_integer_with_op ("\t.byte\t", x);
++	    return true;
+ 	  }
+ 	fputs ("\tBYTE\t", asm_out_file);
+ 	mmix_print_operand (asm_out_file, x, 'B');
+-- 
+2.19.0
+

diff --git a/8.2.0/gentoo/README.history b/8.2.0/gentoo/README.history
index b0c5ea5..7e89be2 100644
--- a/8.2.0/gentoo/README.history
+++ b/8.2.0/gentoo/README.history
@@ -1,6 +1,8 @@
 1.3		TODO
 	+ 101_all_x32-fix-eh-return-address.patch
 	+ 102_all_respect-build-cxxflags.patch
+	+ 103_all_mmix-fix-85666-p1.patch
+	+ 104_all_mmix-fix-85666-p2.patch
 1.2		12 Aug 2018
 	- 100_all-isl-include.patch
 	+ 100_all_isl-include.patch


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

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

commit:     8a3809e326d841bf06ea454df1868b3cb68f4058
Author:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
AuthorDate: Sun Sep 23 20:23:28 2018 +0000
Commit:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Sun Sep 23 20:23:28 2018 +0000
URL:        https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=8a3809e3

8.2.0: cut 1.3 release

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

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

diff --git a/8.2.0/gentoo/README.history b/8.2.0/gentoo/README.history
index 7e89be2..ef59543 100644
--- a/8.2.0/gentoo/README.history
+++ b/8.2.0/gentoo/README.history
@@ -1,4 +1,4 @@
-1.3		TODO
+1.3		23 Sep 2018
 	+ 101_all_x32-fix-eh-return-address.patch
 	+ 102_all_respect-build-cxxflags.patch
 	+ 103_all_mmix-fix-85666-p1.patch


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

* [gentoo-commits] proj/gcc-patches:master commit in: 8.2.0/gentoo/
@ 2018-09-30 22:08 Sergei Trofimovich
  0 siblings, 0 replies; 25+ messages in thread
From: Sergei Trofimovich @ 2018-09-30 22:08 UTC (permalink / raw
  To: gentoo-commits

commit:     a7acee064e82c1de695f2303b705fd69884d9e99
Author:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
AuthorDate: Sun Sep 30 22:05:19 2018 +0000
Commit:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Sun Sep 30 22:05:19 2018 +0000
URL:        https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=a7acee06

8.2.0: restore -Werror patches

Five new patches that drop -Werror:
+ 105_all_libgfortran-Werror.patch
+ 106_all_libgomp-Werror.patch
+ 107_all_libitm-Werror.patch
+ 108_all_libatomic-Werror.patch
+ 109_all_libbacktrace-Werror.patch

The patches are no really new: last time Gentoo applied
them on gcc-4.9.x branch but after 5.x they were lost.

Need for them resurfaces after series of fixes that allowed
user to tweak CXXFLAGS (bug #581406)

Reported-by: Jeroen Roovers
Bug: https://bugs.gentoo.org/667104
Signed-off-by: Sergei Trofimovich <slyfox <AT> gentoo.org>

 8.2.0/gentoo/105_all_libgfortran-Werror.patch  | 13 +++++++++++++
 8.2.0/gentoo/106_all_libgomp-Werror.patch      | 20 ++++++++++++++++++++
 8.2.0/gentoo/107_all_libitm-Werror.patch       | 19 +++++++++++++++++++
 8.2.0/gentoo/108_all_libatomic-Werror.patch    | 19 +++++++++++++++++++
 8.2.0/gentoo/109_all_libbacktrace-Werror.patch | 17 +++++++++++++++++
 8.2.0/gentoo/README.history                    | 10 ++++++++++
 6 files changed, 98 insertions(+)

diff --git a/8.2.0/gentoo/105_all_libgfortran-Werror.patch b/8.2.0/gentoo/105_all_libgfortran-Werror.patch
new file mode 100644
index 0000000..c54a469
--- /dev/null
+++ b/8.2.0/gentoo/105_all_libgfortran-Werror.patch
@@ -0,0 +1,13 @@
+libgfortran does not respect --disable-werror
+
+https://bugs.gentoo.org/433435
+http://gcc.gnu.org/PR54724
+
+
+--- 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/8.2.0/gentoo/106_all_libgomp-Werror.patch b/8.2.0/gentoo/106_all_libgomp-Werror.patch
new file mode 100644
index 0000000..416808a
--- /dev/null
+++ b/8.2.0/gentoo/106_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/8.2.0/gentoo/107_all_libitm-Werror.patch b/8.2.0/gentoo/107_all_libitm-Werror.patch
new file mode 100644
index 0000000..27181e0
--- /dev/null
+++ b/8.2.0/gentoo/107_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/8.2.0/gentoo/108_all_libatomic-Werror.patch b/8.2.0/gentoo/108_all_libatomic-Werror.patch
new file mode 100644
index 0000000..0550722
--- /dev/null
+++ b/8.2.0/gentoo/108_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/8.2.0/gentoo/109_all_libbacktrace-Werror.patch b/8.2.0/gentoo/109_all_libbacktrace-Werror.patch
new file mode 100644
index 0000000..57dd284
--- /dev/null
+++ b/8.2.0/gentoo/109_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/8.2.0/gentoo/README.history b/8.2.0/gentoo/README.history
index ef59543..7257433 100644
--- a/8.2.0/gentoo/README.history
+++ b/8.2.0/gentoo/README.history
@@ -1,15 +1,25 @@
+1.4		TODO
+	+ 105_all_libgfortran-Werror.patch
+	+ 106_all_libgomp-Werror.patch
+	+ 107_all_libitm-Werror.patch
+	+ 108_all_libatomic-Werror.patch
+	+ 109_all_libbacktrace-Werror.patch
+
 1.3		23 Sep 2018
 	+ 101_all_x32-fix-eh-return-address.patch
 	+ 102_all_respect-build-cxxflags.patch
 	+ 103_all_mmix-fix-85666-p1.patch
 	+ 104_all_mmix-fix-85666-p2.patch
+
 1.2		12 Aug 2018
 	- 100_all-isl-include.patch
 	+ 100_all_isl-include.patch
+
 1.1		12 Aug 2018
 	+ 98_all_sh_textrel-on-libitm.patch
 	+ 99_all_m68k-textrel-on-libgcc.patch
 	+ 100_all-isl-include.patch
+
 1.0		08 Aug 2018
 	+ 95_all_ia64-TEXTREL.patch
 	+ 97_all_disable-systemtap-switch.patch


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

* [gentoo-commits] proj/gcc-patches:master commit in: 8.2.0/gentoo/
@ 2018-10-01  6:41 Sergei Trofimovich
  0 siblings, 0 replies; 25+ messages in thread
From: Sergei Trofimovich @ 2018-10-01  6:41 UTC (permalink / raw
  To: gentoo-commits

commit:     47a9739ebedfacef2c4b9b154e6a4017a9e6ff77
Author:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
AuthorDate: Mon Oct  1 06:40:50 2018 +0000
Commit:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Mon Oct  1 06:40:50 2018 +0000
URL:        https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=47a9739e

8.2.0: drop -Werror on 110_all_libsanitizer

Reported-by: Jeroen Roovers
Bug: https://bugs.gentoo.org/667104
Signed-off-by: Sergei Trofimovich <slyfox <AT> gentoo.org>

 8.2.0/gentoo/110_all_libsanitizer-Werror.patch | 17 +++++++++++++++++
 8.2.0/gentoo/README.history                    |  1 +
 2 files changed, 18 insertions(+)

diff --git a/8.2.0/gentoo/110_all_libsanitizer-Werror.patch b/8.2.0/gentoo/110_all_libsanitizer-Werror.patch
new file mode 100644
index 0000000..0e484a4
--- /dev/null
+++ b/8.2.0/gentoo/110_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/8.2.0/gentoo/README.history b/8.2.0/gentoo/README.history
index 7257433..dece58a 100644
--- a/8.2.0/gentoo/README.history
+++ b/8.2.0/gentoo/README.history
@@ -4,6 +4,7 @@
 	+ 107_all_libitm-Werror.patch
 	+ 108_all_libatomic-Werror.patch
 	+ 109_all_libbacktrace-Werror.patch
+	+ 110_all_libsanitizer-Werror.patch
 
 1.3		23 Sep 2018
 	+ 101_all_x32-fix-eh-return-address.patch


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

* [gentoo-commits] proj/gcc-patches:master commit in: 8.2.0/gentoo/
@ 2018-10-08 22:05 Sergei Trofimovich
  0 siblings, 0 replies; 25+ messages in thread
From: Sergei Trofimovich @ 2018-10-08 22:05 UTC (permalink / raw
  To: gentoo-commits

commit:     a824358f19e4fe8445a7bdbbe6c3020b9fd32bee
Author:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
AuthorDate: Mon Oct  8 22:04:04 2018 +0000
Commit:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Mon Oct  8 22:04:04 2018 +0000
URL:        https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=a824358f

8.2.0: fix initialization of empty structs

Single new patch: 111_all_ubd-hog-PR85704.patch

Fix indefinite memory consumption.

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

 8.2.0/gentoo/111_all_ubd-hog-PR85704.patch | 146 +++++++++++++++++++++++++++++
 8.2.0/gentoo/README.history                |   3 +
 2 files changed, 149 insertions(+)

diff --git a/8.2.0/gentoo/111_all_ubd-hog-PR85704.patch b/8.2.0/gentoo/111_all_ubd-hog-PR85704.patch
new file mode 100644
index 0000000..de1c6e6
--- /dev/null
+++ b/8.2.0/gentoo/111_all_ubd-hog-PR85704.patch
@@ -0,0 +1,146 @@
+From e15966a15764277e180fdae7a606166c702ec3ca Mon Sep 17 00:00:00 2001
+From: jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>
+Date: Wed, 1 Aug 2018 09:35:34 +0000
+Subject: [PATCH] 	PR c/85704 	* c-typeck.c (init_field_decl_cmp):
+ New function. 	(output_pending_init_elements): Use it for field comparisons 
+ instead of pure bit_position comparisons.
+
+	* gcc.c-torture/compile/pr85704.c: New test.
+
+
+git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-8-branch@263199 138bc75d-0d04-0410-961f-82ee72b054a4
+---
+ gcc/c/c-typeck.c                              | 86 +++++++++++++++----
+ gcc/testsuite/gcc.c-torture/compile/pr85704.c | 10 +++
+ 4 files changed, 91 insertions(+), 17 deletions(-)
+ create mode 100644 gcc/testsuite/gcc.c-torture/compile/pr85704.c
+
+--- a/gcc/c/c-typeck.c
++++ b/gcc/c/c-typeck.c
+@@ -9316,6 +9316,65 @@ output_init_element (location_t loc, tree value, tree origtype,
+     output_pending_init_elements (0, braced_init_obstack);
+ }
+ 
++/* For two FIELD_DECLs in the same chain, return -1 if field1
++   comes before field2, 1 if field1 comes after field2 and
++   0 if field1 == field2.  */
++
++static int
++init_field_decl_cmp (tree field1, tree field2)
++{
++  if (field1 == field2)
++    return 0;
++
++  tree bitpos1 = bit_position (field1);
++  tree bitpos2 = bit_position (field2);
++  if (tree_int_cst_equal (bitpos1, bitpos2))
++    {
++      /* If one of the fields has non-zero bitsize, then that
++	 field must be the last one in a sequence of zero
++	 sized fields, fields after it will have bigger
++	 bit_position.  */
++      if (TREE_TYPE (field1) != error_mark_node
++	  && COMPLETE_TYPE_P (TREE_TYPE (field1))
++	  && integer_nonzerop (TREE_TYPE (field1)))
++	return 1;
++      if (TREE_TYPE (field2) != error_mark_node
++	  && COMPLETE_TYPE_P (TREE_TYPE (field2))
++	  && integer_nonzerop (TREE_TYPE (field2)))
++	return -1;
++      /* Otherwise, fallback to DECL_CHAIN walk to find out
++	 which field comes earlier.  Walk chains of both
++	 fields, so that if field1 and field2 are close to each
++	 other in either order, it is found soon even for large
++	 sequences of zero sized fields.  */
++      tree f1 = field1, f2 = field2;
++      while (1)
++	{
++	  f1 = DECL_CHAIN (f1);
++	  f2 = DECL_CHAIN (f2);
++	  if (f1 == NULL_TREE)
++	    {
++	      gcc_assert (f2);
++	      return 1;
++	    }
++	  if (f2 == NULL_TREE)
++	    return -1;
++	  if (f1 == field2)
++	    return -1;
++	  if (f2 == field1)
++	    return 1;
++	  if (!tree_int_cst_equal (bit_position (f1), bitpos1))
++	    return 1;
++	  if (!tree_int_cst_equal (bit_position (f2), bitpos1))
++	    return -1;
++	}
++    }
++  else if (tree_int_cst_lt (bitpos1, bitpos2))
++    return -1;
++  else
++    return 1;
++}
++
+ /* Output any pending elements which have become next.
+    As we output elements, constructor_unfilled_{fields,index}
+    advances, which may cause other elements to become next;
+@@ -9387,25 +9446,18 @@ output_pending_init_elements (int all, struct obstack * braced_init_obstack)
+ 	}
+       else if (RECORD_OR_UNION_TYPE_P (constructor_type))
+ 	{
+-	  tree ctor_unfilled_bitpos, elt_bitpos;
+-
+ 	  /* If the current record is complete we are done.  */
+ 	  if (constructor_unfilled_fields == NULL_TREE)
+ 	    break;
+ 
+-	  ctor_unfilled_bitpos = bit_position (constructor_unfilled_fields);
+-	  elt_bitpos = bit_position (elt->purpose);
+-	  /* We can't compare fields here because there might be empty
+-	     fields in between.  */
+-	  if (tree_int_cst_equal (elt_bitpos, ctor_unfilled_bitpos))
+-	    {
+-	      constructor_unfilled_fields = elt->purpose;
+-	      output_init_element (input_location, elt->value, elt->origtype,
+-				   true, TREE_TYPE (elt->purpose),
+-				   elt->purpose, false, false,
+-				   braced_init_obstack);
+-	    }
+-	  else if (tree_int_cst_lt (ctor_unfilled_bitpos, elt_bitpos))
++	  int cmp = init_field_decl_cmp (constructor_unfilled_fields,
++					 elt->purpose);
++	  if (cmp == 0)
++	    output_init_element (input_location, elt->value, elt->origtype,
++				 true, TREE_TYPE (elt->purpose),
++				 elt->purpose, false, false,
++				 braced_init_obstack);
++	  else if (cmp < 0)
+ 	    {
+ 	      /* Advance to the next smaller node.  */
+ 	      if (elt->left)
+@@ -9431,8 +9483,8 @@ output_pending_init_elements (int all, struct obstack * braced_init_obstack)
+ 		    elt = elt->parent;
+ 		  elt = elt->parent;
+ 		  if (elt
+-		      && (tree_int_cst_lt (ctor_unfilled_bitpos,
+-					   bit_position (elt->purpose))))
++		      && init_field_decl_cmp (constructor_unfilled_fields,
++					      elt->purpose) < 0)
+ 		    {
+ 		      next = elt->purpose;
+ 		      break;
+--- /dev/null
++++ b/gcc/testsuite/gcc.c-torture/compile/pr85704.c
+@@ -0,0 +1,10 @@
++/* PR c/85704 */
++
++struct C { struct {} c; };
++struct D { int d; struct C e; int f; };
++
++void
++foo (struct D *x)
++{
++  *x = (struct D) { .e = (struct C) { .c = {} } };
++}
+-- 
+2.19.1
+

diff --git a/8.2.0/gentoo/README.history b/8.2.0/gentoo/README.history
index 776f49d..d85e258 100644
--- a/8.2.0/gentoo/README.history
+++ b/8.2.0/gentoo/README.history
@@ -1,3 +1,6 @@
+1.5		TODO
+	+ 111_all_ubd-hog-PR85704.patch
+
 1.4		01 Oct 2018
 	+ 105_all_libgfortran-Werror.patch
 	+ 106_all_libgomp-Werror.patch


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

* [gentoo-commits] proj/gcc-patches:master commit in: 8.2.0/gentoo/
@ 2018-10-08 22:05 Sergei Trofimovich
  0 siblings, 0 replies; 25+ messages in thread
From: Sergei Trofimovich @ 2018-10-08 22:05 UTC (permalink / raw
  To: gentoo-commits

commit:     2ccee0ded67f4044039731e7f521961a5d968867
Author:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
AuthorDate: Mon Oct  1 06:42:45 2018 +0000
Commit:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Mon Oct  1 06:42:45 2018 +0000
URL:        https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=2ccee0de

8.2.0: cut 1.4 patchset

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

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

diff --git a/8.2.0/gentoo/README.history b/8.2.0/gentoo/README.history
index dece58a..776f49d 100644
--- a/8.2.0/gentoo/README.history
+++ b/8.2.0/gentoo/README.history
@@ -1,4 +1,4 @@
-1.4		TODO
+1.4		01 Oct 2018
 	+ 105_all_libgfortran-Werror.patch
 	+ 106_all_libgomp-Werror.patch
 	+ 107_all_libitm-Werror.patch


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

* [gentoo-commits] proj/gcc-patches:master commit in: 8.2.0/gentoo/
@ 2018-10-18 20:40 Sergei Trofimovich
  0 siblings, 0 replies; 25+ messages in thread
From: Sergei Trofimovich @ 2018-10-18 20:40 UTC (permalink / raw
  To: gentoo-commits

commit:     455a1ff3dbd5c06aa8987bfed050fd802ed34607
Author:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
AuthorDate: Thu Oct 18 20:40:09 2018 +0000
Commit:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Thu Oct 18 20:40:09 2018 +0000
URL:        https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=455a1ff3

8.2.0: update 105_all_libgfortran-Werror.patch to include configure.ac

Before this change only configure was update, but not configure.ac.

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

 8.2.0/gentoo/105_all_libgfortran-Werror.patch | 7 +++++++
 8.2.0/gentoo/README.history                   | 1 +
 2 files changed, 8 insertions(+)

diff --git a/8.2.0/gentoo/105_all_libgfortran-Werror.patch b/8.2.0/gentoo/105_all_libgfortran-Werror.patch
index c54a469..f6c26bf 100644
--- a/8.2.0/gentoo/105_all_libgfortran-Werror.patch
+++ b/8.2.0/gentoo/105_all_libgfortran-Werror.patch
@@ -4,6 +4,13 @@ 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

diff --git a/8.2.0/gentoo/README.history b/8.2.0/gentoo/README.history
index d85e258..3a021b7 100644
--- a/8.2.0/gentoo/README.history
+++ b/8.2.0/gentoo/README.history
@@ -1,5 +1,6 @@
 1.5		TODO
 	+ 111_all_ubd-hog-PR85704.patch
+	U 105_all_libgfortran-Werror.patch
 
 1.4		01 Oct 2018
 	+ 105_all_libgfortran-Werror.patch


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

* [gentoo-commits] proj/gcc-patches:master commit in: 8.2.0/gentoo/
@ 2018-10-20  9:40 Sergei Trofimovich
  0 siblings, 0 replies; 25+ messages in thread
From: Sergei Trofimovich @ 2018-10-20  9:40 UTC (permalink / raw
  To: gentoo-commits

commit:     b016826c93875380dc8f570a54bc3652de2fc79e
Author:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
AuthorDate: Sat Oct 20 09:28:23 2018 +0000
Commit:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Sat Oct 20 09:28:23 2018 +0000
URL:        https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=b016826c

8.2.0: drop libstdc++ libking against libvtv

libstdc++ itself provides weak symbols to work
both against present and missing libvtv. Final
binary desides whetned to use vtv or not by
linking against libvtv.

The change drops libvtv RPATH=${build_dir} injection.

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

 8.2.0/gentoo/112_all_libstdcxx-no-vtv.patch | 61 +++++++++++++++++++++++++++++
 8.2.0/gentoo/README.history                 |  1 +
 2 files changed, 62 insertions(+)

diff --git a/8.2.0/gentoo/112_all_libstdcxx-no-vtv.patch b/8.2.0/gentoo/112_all_libstdcxx-no-vtv.patch
new file mode 100644
index 0000000..68508bd
--- /dev/null
+++ b/8.2.0/gentoo/112_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/8.2.0/gentoo/README.history b/8.2.0/gentoo/README.history
index 3a021b7..c046242 100644
--- a/8.2.0/gentoo/README.history
+++ b/8.2.0/gentoo/README.history
@@ -1,6 +1,7 @@
 1.5		TODO
 	+ 111_all_ubd-hog-PR85704.patch
 	U 105_all_libgfortran-Werror.patch
+	+ 112_all_libstdcxx-no-vtv.patch
 
 1.4		01 Oct 2018
 	+ 105_all_libgfortran-Werror.patch


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

* [gentoo-commits] proj/gcc-patches:master commit in: 8.2.0/gentoo/
@ 2018-10-21  9:24 Sergei Trofimovich
  0 siblings, 0 replies; 25+ messages in thread
From: Sergei Trofimovich @ 2018-10-21  9:24 UTC (permalink / raw
  To: gentoo-commits

commit:     3e95a56d5d25f40b0f7cad7801714fe797037fb1
Author:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
AuthorDate: Sun Oct 21 09:22:51 2018 +0000
Commit:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Sun Oct 21 09:22:51 2018 +0000
URL:        https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=3e95a56d

8.2.0: fix ICE on strncmp validation

Reported-by: Toralf Förster
https://bugs.gentoo.org/668044
https://gcc.gnu.org/PR87099
Signed-off-by: Sergei Trofimovich <slyfox <AT> gentoo.org>

 8.2.0/gentoo/113_all_ICE-on-strncmp-PR87099.patch | 86 +++++++++++++++++++++++
 8.2.0/gentoo/README.history                       |  1 +
 2 files changed, 87 insertions(+)

diff --git a/8.2.0/gentoo/113_all_ICE-on-strncmp-PR87099.patch b/8.2.0/gentoo/113_all_ICE-on-strncmp-PR87099.patch
new file mode 100644
index 0000000..7e37b5e
--- /dev/null
+++ b/8.2.0/gentoo/113_all_ICE-on-strncmp-PR87099.patch
@@ -0,0 +1,86 @@
+https://bugs.gentoo.org/668044
+https://gcc.gnu.org/PR87099
+
+From e24ceb4802f0cc1bb9e498af6f5bdd29e556c34b Mon Sep 17 00:00:00 2001
+From: jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>
+Date: Tue, 28 Aug 2018 11:43:22 +0000
+Subject: [PATCH] 	PR middle-end/87099 	* calls.c
+ (maybe_warn_nonstring_arg): Punt early if 	warn_stringop_overflow is
+ zero.  Don't call get_range_strlen 	on 3rd argument, keep iterating until
+ lenrng[1] is INTEGER_CST. 	Only use lenrng[1] if non-NULL and
+ INTEGER_CST.  Don't uselessly 	increment lenrng[0].
+
+	* gcc.dg/pr87099.c: New test.
+
+
+git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-8-branch@263917 138bc75d-0d04-0410-961f-82ee72b054a4
+---
+ gcc/calls.c                    | 12 ++++++++----
+ gcc/testsuite/gcc.dg/pr87099.c | 21 +++++++++++++++++++++
+ 4 files changed, 43 insertions(+), 4 deletions(-)
+ create mode 100644 gcc/testsuite/gcc.dg/pr87099.c
+
+--- a/gcc/calls.c
++++ b/gcc/calls.c
+@@ -1627,6 +1627,9 @@ maybe_warn_nonstring_arg (tree fndecl, tree exp)
+   if (!fndecl || DECL_BUILT_IN_CLASS (fndecl) != BUILT_IN_NORMAL)
+     return;
+ 
++  if (!warn_stringop_overflow)
++    return;
++
+   bool with_bounds = CALL_WITH_BOUNDS_P (exp);
+ 
+   unsigned nargs = call_expr_nargs (exp);
+@@ -1655,7 +1658,10 @@ maybe_warn_nonstring_arg (tree fndecl, tree exp)
+ 	   conservatively as the bound for the unbounded function,
+ 	   and to adjust the range of the bound of the bounded ones.  */
+ 	unsigned stride = with_bounds ? 2 : 1;
+-	for (unsigned argno = 0; argno < nargs && !*lenrng; argno += stride)
++	for (unsigned argno = 0;
++	     argno < MIN (nargs, 2 * stride)
++	     && !(lenrng[1] && TREE_CODE (lenrng[1]) == INTEGER_CST);
++	     argno += stride)
+ 	  {
+ 	    tree arg = CALL_EXPR_ARG (exp, argno);
+ 	    if (!get_attr_nonstring_decl (arg))
+@@ -1693,11 +1699,9 @@ maybe_warn_nonstring_arg (tree fndecl, tree exp)
+   if (bound)
+     get_size_range (bound, bndrng);
+ 
+-  if (*lenrng)
++  if (lenrng[1] && TREE_CODE (lenrng[1]) == INTEGER_CST)
+     {
+       /* Add one for the nul.  */
+-      lenrng[0] = const_binop (PLUS_EXPR, TREE_TYPE (lenrng[0]),
+-			       lenrng[0], size_one_node);
+       lenrng[1] = const_binop (PLUS_EXPR, TREE_TYPE (lenrng[1]),
+ 			       lenrng[1], size_one_node);
+ 
+--- /dev/null
++++ b/gcc/testsuite/gcc.dg/pr87099.c
+@@ -0,0 +1,21 @@
++/* PR middle-end/87099 */
++/* { dg-do compile } */
++/* { dg-options "-Wstringop-overflow" } */
++
++void bar (char *);
++
++int
++foo (int n)
++{
++  char v[n];
++  bar (v);
++  return __builtin_strncmp (&v[1], "aaa", 3);
++}
++
++int
++baz (int n, char *s)
++{
++  char v[n];
++  bar (v);
++  return __builtin_strncmp (&v[1], s, 3);
++}
+-- 
+2.19.1
+

diff --git a/8.2.0/gentoo/README.history b/8.2.0/gentoo/README.history
index c046242..6b549db 100644
--- a/8.2.0/gentoo/README.history
+++ b/8.2.0/gentoo/README.history
@@ -2,6 +2,7 @@
 	+ 111_all_ubd-hog-PR85704.patch
 	U 105_all_libgfortran-Werror.patch
 	+ 112_all_libstdcxx-no-vtv.patch
+	+ 113_all_ICE-on-strncmp-PR87099.patch
 
 1.4		01 Oct 2018
 	+ 105_all_libgfortran-Werror.patch


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

* [gentoo-commits] proj/gcc-patches:master commit in: 8.2.0/gentoo/
@ 2018-10-27  9:04 Sergei Trofimovich
  0 siblings, 0 replies; 25+ messages in thread
From: Sergei Trofimovich @ 2018-10-27  9:04 UTC (permalink / raw
  To: gentoo-commits

commit:     0acfca653cc40f869ae64a161f455624b5e97cab
Author:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
AuthorDate: Sat Oct 27 08:51:41 2018 +0000
Commit:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Sat Oct 27 08:51:41 2018 +0000
URL:        https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=0acfca65

8.2.0: cup 1.5 patchset

+ 111_all_ubd-hog-PR85704.patch
U 105_all_libgfortran-Werror.patch
+ 112_all_libstdcxx-no-vtv.patch
+ 113_all_ICE-on-strncmp-PR87099.patch

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

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

diff --git a/8.2.0/gentoo/README.history b/8.2.0/gentoo/README.history
index 6b549db..a2e8c1b 100644
--- a/8.2.0/gentoo/README.history
+++ b/8.2.0/gentoo/README.history
@@ -1,4 +1,4 @@
-1.5		TODO
+1.5		27 Oct 2018
 	+ 111_all_ubd-hog-PR85704.patch
 	U 105_all_libgfortran-Werror.patch
 	+ 112_all_libstdcxx-no-vtv.patch


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

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

commit:     86549c2ffccd36fbf393a3574167278a412a4d6d
Author:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
AuthorDate: Thu Nov 22 23:52:23 2018 +0000
Commit:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Thu Nov 22 23:52:23 2018 +0000
URL:        https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=86549c2f

8.2.0: pull 10_all_default-fortify-source.patch from Debian, bug #621036

glibc and other packages expect _FORTIFY_SOURCE define to be a number.
Before the patch _FORTIFY_SOURCE was
    ((defined __OPTIMIZE__ && __OPTIMIZE__ > 0) ? 2 : 0)
After the patch it's
    2
(or not set if build is unoptimised).

Reported-by: Martin Kletzander
Bug: https://bugs.gentoo.org/621036
Signed-off-by: Sergei Trofimovich <slyfox <AT> gentoo.org>

 8.2.0/gentoo/10_all_default-fortify-source.patch | 17 ++++++++++++-----
 8.2.0/gentoo/README.history                      |  3 +++
 2 files changed, 15 insertions(+), 5 deletions(-)

diff --git a/8.2.0/gentoo/10_all_default-fortify-source.patch b/8.2.0/gentoo/10_all_default-fortify-source.patch
index 36c5762..d307474 100644
--- a/8.2.0/gentoo/10_all_default-fortify-source.patch
+++ b/8.2.0/gentoo/10_all_default-fortify-source.patch
@@ -1,14 +1,21 @@
-Enable -D_FORTIFY_SOURCE=2 by default.
-
+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,9 @@ c_cpp_builtins (cpp_reader *pfile)
+@@ -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);
  
-+  /* Fortify Source enabled by default w/optimization.  */
-+  cpp_define (pfile, "_FORTIFY_SOURCE=((defined __OPTIMIZE__ && __OPTIMIZE__ > 0) ? 2 : 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)

diff --git a/8.2.0/gentoo/README.history b/8.2.0/gentoo/README.history
index a2e8c1b..52c8a22 100644
--- a/8.2.0/gentoo/README.history
+++ b/8.2.0/gentoo/README.history
@@ -1,3 +1,6 @@
+1.6		TODO
+	U 10_all_default-fortify-source.patch
+
 1.5		27 Oct 2018
 	+ 111_all_ubd-hog-PR85704.patch
 	U 105_all_libgfortran-Werror.patch


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

* [gentoo-commits] proj/gcc-patches:master commit in: 8.2.0/gentoo/
@ 2018-12-01 13:06 Sergei Trofimovich
  0 siblings, 0 replies; 25+ messages in thread
From: Sergei Trofimovich @ 2018-12-01 13:06 UTC (permalink / raw
  To: gentoo-commits

commit:     7c98079352f8d8a7f81260efbdac695688a0f9fa
Author:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
AuthorDate: Sat Dec  1 13:05:16 2018 +0000
Commit:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Sat Dec  1 13:05:16 2018 +0000
URL:        https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=7c980793

8.2.0: cut 1.6 patchset

Single patch update:
U 10_all_default-fortify-source.patch: simplify _FORTIFY_SOURCE default.

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

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

diff --git a/8.2.0/gentoo/README.history b/8.2.0/gentoo/README.history
index 52c8a22..aaccf65 100644
--- a/8.2.0/gentoo/README.history
+++ b/8.2.0/gentoo/README.history
@@ -1,4 +1,4 @@
-1.6		TODO
+1.6		01 Dec 2018
 	U 10_all_default-fortify-source.patch
 
 1.5		27 Oct 2018


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

* [gentoo-commits] proj/gcc-patches:master commit in: 8.2.0/gentoo/
@ 2018-12-10 22:48 Sergei Trofimovich
  0 siblings, 0 replies; 25+ messages in thread
From: Sergei Trofimovich @ 2018-12-10 22:48 UTC (permalink / raw
  To: gentoo-commits

commit:     44f5a4b4d1884a2646f77195c172fe8065295d1d
Author:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
AuthorDate: Mon Dec 10 22:45:41 2018 +0000
Commit:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Mon Dec 10 22:45:41 2018 +0000
URL:        https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=44f5a4b4

8.2.0: fix gcc SIGSEGV on k&r style declarations, bug #672032

Fix gcc SIGSEGV on net-analyzer/netcat-110 (IPA analysis
assumed pointer argument where it was not).

Reported-by: ernsteiswuerfel
https://bugs.gentoo.org/672032
https://gcc.gnu.org/PR88214
Signed-off-by: Sergei Trofimovich <slyfox <AT> gentoo.org>

 8.2.0/gentoo/114_all_kr-decl-PR88214.patch | 46 ++++++++++++++++++++++++++++++
 8.2.0/gentoo/README.history                |  3 ++
 2 files changed, 49 insertions(+)

diff --git a/8.2.0/gentoo/114_all_kr-decl-PR88214.patch b/8.2.0/gentoo/114_all_kr-decl-PR88214.patch
new file mode 100644
index 0000000..182ff07
--- /dev/null
+++ b/8.2.0/gentoo/114_all_kr-decl-PR88214.patch
@@ -0,0 +1,46 @@
+https://bugs.gentoo.org/672032
+https://gcc.gnu.org/PR88214
+
+From a2fd08219c82eba4d1d15f260db98c2e154268f2 Mon Sep 17 00:00:00 2001
+From: jamborm <jamborm@138bc75d-0d04-0410-961f-82ee72b054a4>
+Date: Mon, 10 Dec 2018 12:45:47 +0000
+Subject: [PATCH] [PR 88214] Check that an argument is a pointer
+
+2018-12-10  Martin Jambor  <mjambor@suse.cz>
+
+	PR ipa/88214
+	* ipa-prop.c (determine_locally_known_aggregate_parts): Make sure
+	we check pointers against pointers.
+
+	testsuite/
+	* gcc.dg/ipa/pr88214.c: New test.
+
+git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@266953 138bc75d-0d04-0410-961f-82ee72b054a4
+--- a/gcc/ipa-prop.c
++++ b/gcc/ipa-prop.c
+@@ -1569,7 +1569,8 @@ determine_locally_known_aggregate_parts (gcall *call, tree arg,
+       if (TREE_CODE (arg) == SSA_NAME)
+ 	{
+ 	  tree type_size;
+-          if (!tree_fits_uhwi_p (TYPE_SIZE (TREE_TYPE (arg_type))))
++          if (!tree_fits_uhwi_p (TYPE_SIZE (TREE_TYPE (arg_type)))
++	      || !POINTER_TYPE_P (TREE_TYPE (arg)))
+             return;
+ 	  check_ref = true;
+ 	  arg_base = arg;
+--- /dev/null
++++ b/gcc/testsuite/gcc.dg/ipa/pr88214.c
+@@ -0,0 +1,10 @@
++/* { dg-do compile } */
++/* { dg-options "-O2" } */
++
++void i();
++  short a;
++  void b(e) char * e;
++  {
++    i();
++    b(a);
++  }
+-- 
+2.19.2
+

diff --git a/8.2.0/gentoo/README.history b/8.2.0/gentoo/README.history
index aaccf65..787f60c 100644
--- a/8.2.0/gentoo/README.history
+++ b/8.2.0/gentoo/README.history
@@ -1,3 +1,6 @@
+1.7		TODO
+	+ 114_all_kr-decl-PR88214.patch
+
 1.6		01 Dec 2018
 	U 10_all_default-fortify-source.patch
 


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

* [gentoo-commits] proj/gcc-patches:master commit in: 8.2.0/gentoo/
@ 2018-12-18 22:38 Sergei Trofimovich
  0 siblings, 0 replies; 25+ messages in thread
From: Sergei Trofimovich @ 2018-12-18 22:38 UTC (permalink / raw
  To: gentoo-commits

commit:     134dc72e3b4e140756f00b65688f084188f59d18
Author:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
AuthorDate: Tue Dec 18 22:37:25 2018 +0000
Commit:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Tue Dec 18 22:37:25 2018 +0000
URL:        https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=134dc72e

8.2.0: backport avx2 codegen SIGSEGV, bug #657060

Fixes SIGSEGV when building media-libs/opencv-3.4.1-r1

Reported-by: Johannes Hirte
Bug: https://bugs.gentoo.org/657060
Bug: https://gcc.gnu.org/PR86871
Signed-off-by: Sergei Trofimovich <slyfox <AT> gentoo.org>

 8.2.0/gentoo/115_all_avx2-SIGSEGV-PR86871.patch | 69 +++++++++++++++++++++++++
 8.2.0/gentoo/README.history                     |  1 +
 2 files changed, 70 insertions(+)

diff --git a/8.2.0/gentoo/115_all_avx2-SIGSEGV-PR86871.patch b/8.2.0/gentoo/115_all_avx2-SIGSEGV-PR86871.patch
new file mode 100644
index 0000000..4d24259
--- /dev/null
+++ b/8.2.0/gentoo/115_all_avx2-SIGSEGV-PR86871.patch
@@ -0,0 +1,69 @@
+https://bugs.gentoo.org/657060
+https://gcc.gnu.org/PR86871
+
+From c69949a7ec14a363128cd1445c7153e1ce051eb7 Mon Sep 17 00:00:00 2001
+From: rsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>
+Date: Tue, 14 Aug 2018 09:24:45 +0000
+Subject: [PATCH] Fix invalid assumption in vect_transform_stmt (PR 86871)
+
+The handling of outer-loop uses of inner-loop definitions assumed
+that anything that wasn't a PHI would be a gassign.  It's also
+possible for it to be a gcall.
+
+2018-08-14  Richard Sandiford  <richard.sandiford@arm.com>
+
+gcc/
+	Backport from mainline
+	2018-08-09  Richard Sandiford  <richard.sandiford@arm.com>
+
+	PR tree-optimization/86871
+	* tree-vect-stmts.c (vect_transform_stmt): Use gimple_get_lhs
+	instead of gimple_assign_lhs.
+
+gcc/testsuite/
+	Backport from mainline
+	2018-08-09  Richard Sandiford  <richard.sandiford@arm.com>
+
+	PR tree-optimization/86871
+	* gcc.dg/vect/pr86871.c: New test.
+
+
+git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-8-branch@263528 138bc75d-0d04-0410-961f-82ee72b054a4
+---
+ gcc/testsuite/gcc.dg/vect/pr86871.c | 15 +++++++++++++++
+ gcc/tree-vect-stmts.c               |  2 +-
+ 4 files changed, 33 insertions(+), 1 deletion(-)
+ create mode 100644 gcc/testsuite/gcc.dg/vect/pr86871.c
+
+--- /dev/null
++++ b/gcc/testsuite/gcc.dg/vect/pr86871.c
+@@ -0,0 +1,15 @@
++/* { dg-do compile } */
++
++extern int b[];
++extern int c[];
++void g(int f) {
++  for (; f; f++) {
++    int d = 0;
++    for (int e = -1; e <= 1; e++) {
++      int a = f + e;
++      if (a)
++        d = *(c + a);
++    }
++    *(b + f) = d;
++  }
++ }
+--- a/gcc/tree-vect-stmts.c
++++ b/gcc/tree-vect-stmts.c
+@@ -9602,7 +9602,7 @@ vect_transform_stmt (gimple *stmt, gimple_stmt_iterator *gsi,
+       if (gimple_code (stmt) == GIMPLE_PHI)
+         scalar_dest = PHI_RESULT (stmt);
+       else
+-        scalar_dest = gimple_assign_lhs (stmt);
++        scalar_dest = gimple_get_lhs (stmt);
+ 
+       FOR_EACH_IMM_USE_FAST (use_p, imm_iter, scalar_dest)
+        {
+-- 
+2.20.1
+

diff --git a/8.2.0/gentoo/README.history b/8.2.0/gentoo/README.history
index 787f60c..6e3896c 100644
--- a/8.2.0/gentoo/README.history
+++ b/8.2.0/gentoo/README.history
@@ -1,5 +1,6 @@
 1.7		TODO
 	+ 114_all_kr-decl-PR88214.patch
+	+ 115_all_avx2-SIGSEGV-PR86871.patch
 
 1.6		01 Dec 2018
 	U 10_all_default-fortify-source.patch


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

* [gentoo-commits] proj/gcc-patches:master commit in: 8.2.0/gentoo/
@ 2018-12-26 19:31 Sergei Trofimovich
  0 siblings, 0 replies; 25+ messages in thread
From: Sergei Trofimovich @ 2018-12-26 19:31 UTC (permalink / raw
  To: gentoo-commits

commit:     0a633ecb85d45c7aae97957dd3ad2275299a6474
Author:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
AuthorDate: Wed Dec 26 19:30:55 2018 +0000
Commit:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Wed Dec 26 19:30:55 2018 +0000
URL:        https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=0a633ecb

8.2.0: cut 1.7 patchset

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

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

diff --git a/8.2.0/gentoo/README.history b/8.2.0/gentoo/README.history
index 6e3896c..80fef3b 100644
--- a/8.2.0/gentoo/README.history
+++ b/8.2.0/gentoo/README.history
@@ -1,4 +1,4 @@
-1.7		TODO
+1.7		26 Dec 2018
 	+ 114_all_kr-decl-PR88214.patch
 	+ 115_all_avx2-SIGSEGV-PR86871.patch
 


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

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

commit:     1dfeaca5c52a5a266c7045622362a7c1da0eefc0
Author:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
AuthorDate: Tue Jan 29 20:23:04 2019 +0000
Commit:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Tue Jan 29 20:23:04 2019 +0000
URL:        https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=1dfeaca5

8.2.0: backport ipa/devirt bad code generation, bug #676672

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

 8.2.0/gentoo/116_all_ipa-pgo-PR88561-fix.patch | 115 +++++++++++++++++++++++++
 8.2.0/gentoo/README.history                    |   3 +
 2 files changed, 118 insertions(+)

diff --git a/8.2.0/gentoo/116_all_ipa-pgo-PR88561-fix.patch b/8.2.0/gentoo/116_all_ipa-pgo-PR88561-fix.patch
new file mode 100644
index 0000000..5cc4cc0
--- /dev/null
+++ b/8.2.0/gentoo/116_all_ipa-pgo-PR88561-fix.patch
@@ -0,0 +1,115 @@
+https://gcc.gnu.org/PR88561
+https://bugs.gentoo.org/676672
+
+From 497651ff19a85affaf1273b827db6920384af77d Mon Sep 17 00:00:00 2001
+From: marxin <marxin@138bc75d-0d04-0410-961f-82ee72b054a4>
+Date: Thu, 27 Dec 2018 12:33:00 +0000
+Subject: [PATCH] Backport r267338
+
+2018-12-27  Martin Liska  <mliska@suse.cz>
+
+	Backport from mainline
+	2018-12-15  Jan Hubicka  <hubicka@ucw.cz>
+
+	PR ipa/88561
+	* ipa-polymorphic-call.c
+	(ipa_polymorphic_call_context::ipa_polymorphic_call_context): Handle
+	arguments of thunks correctly.
+	(ipa_polymorphic_call_context::get_dynamic_context): Be ready for
+	NULL instance pinter.
+	* lto-cgraph.c (lto_output_node): Always stream thunk info.
+
+git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-8-branch@267433 138bc75d-0d04-0410-961f-82ee72b054a4
+---
+ gcc/ipa-polymorphic-call.c              |  32 +++++-
+ gcc/lto-cgraph.c                        |   8 +-
+
+--- a/gcc/ipa-polymorphic-call.c
++++ b/gcc/ipa-polymorphic-call.c
+@@ -995,9 +995,22 @@ ipa_polymorphic_call_context::ipa_polymorphic_call_context (tree fndecl,
+ 	{
+ 	  outer_type
+ 	     = TYPE_MAIN_VARIANT (TREE_TYPE (TREE_TYPE (base_pointer)));
++	  cgraph_node *node = cgraph_node::get (current_function_decl);
+ 	  gcc_assert (TREE_CODE (outer_type) == RECORD_TYPE
+ 		      || TREE_CODE (outer_type) == UNION_TYPE);
+ 
++	  /* Handle the case we inlined into a thunk.  In this case
++	     thunk has THIS pointer of type bar, but it really receives
++	     address to its base type foo which sits in bar at
++	     0-thunk.fixed_offset.  It starts with code that adds
++	     think.fixed_offset to the pointer to compensate for this.
++
++	     Because we walked all the way to the begining of thunk, we now
++	     see pointer &bar-thunk.fixed_offset and need to compensate
++	     for it.  */
++	  if (node->thunk.fixed_offset)
++	    offset -= node->thunk.fixed_offset * BITS_PER_UNIT;
++
+ 	  /* Dynamic casting has possibly upcasted the type
+ 	     in the hiearchy.  In this case outer type is less
+ 	     informative than inner type and we should forget
+@@ -1005,7 +1018,11 @@ ipa_polymorphic_call_context::ipa_polymorphic_call_context (tree fndecl,
+ 	  if ((otr_type
+ 	       && !contains_type_p (outer_type, offset,
+ 				    otr_type))
+-	      || !contains_polymorphic_type_p (outer_type))
++	      || !contains_polymorphic_type_p (outer_type)
++	      /* If we compile thunk with virtual offset, the THIS pointer
++		 is adjusted by unknown value.  We can't thus use outer info
++		 at all.  */
++	      || node->thunk.virtual_offset_p)
+ 	    {
+ 	      outer_type = NULL;
+ 	      if (instance)
+@@ -1030,7 +1047,15 @@ ipa_polymorphic_call_context::ipa_polymorphic_call_context (tree fndecl,
+ 	      maybe_in_construction = false;
+ 	    }
+ 	  if (instance)
+-	    *instance = base_pointer;
++	    {
++	      /* If method is expanded thunk, we need to apply thunk offset
++		 to instance pointer.  */
++	      if (node->thunk.virtual_offset_p
++		  || node->thunk.fixed_offset)
++		*instance = NULL;
++	      else
++	        *instance = base_pointer;
++	    }
+ 	  return;
+ 	}
+       /* Non-PODs passed by value are really passed by invisible
+@@ -1547,6 +1572,9 @@ ipa_polymorphic_call_context::get_dynamic_type (tree instance,
+   HOST_WIDE_INT instance_offset = offset;
+   tree instance_outer_type = outer_type;
+ 
++  if (!instance)
++    return false;
++
+   if (otr_type)
+     otr_type = TYPE_MAIN_VARIANT (otr_type);
+ 
+--- a/gcc/lto-cgraph.c
++++ b/gcc/lto-cgraph.c
+@@ -546,7 +546,11 @@ lto_output_node (struct lto_simple_output_block *ob, struct cgraph_node *node,
+   streamer_write_bitpack (&bp);
+   streamer_write_data_stream (ob->main_stream, section, strlen (section) + 1);
+ 
+-  if (node->thunk.thunk_p)
++  /* Stream thunk info always because we use it in
++     ipa_polymorphic_call_context::ipa_polymorphic_call_context
++     to properly interpret THIS pointers for thunks that has been converted
++     to Gimple.  */
++  if (node->definition)
+     {
+       streamer_write_uhwi_stream
+ 	 (ob->main_stream,
+@@ -1317,7 +1321,7 @@ input_node (struct lto_file_decl_data *file_data,
+   if (section)
+     node->set_section_for_node (section);
+ 
+-  if (node->thunk.thunk_p)
++  if (node->definition)
+     {
+       int type = streamer_read_uhwi (ib);
+       HOST_WIDE_INT fixed_offset = streamer_read_uhwi (ib);

diff --git a/8.2.0/gentoo/README.history b/8.2.0/gentoo/README.history
index 80fef3b..a20d870 100644
--- a/8.2.0/gentoo/README.history
+++ b/8.2.0/gentoo/README.history
@@ -1,3 +1,6 @@
+1.8		TODO
+	+ 116_all_ipa-pgo-PR88561-fix.patch
+
 1.7		26 Dec 2018
 	+ 114_all_kr-decl-PR88214.patch
 	+ 115_all_avx2-SIGSEGV-PR86871.patch


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

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

commit:     1fe872f729f1361ee45fb0792ca4194cf9c1caeb
Author:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
AuthorDate: Sun Feb 10 12:08:21 2019 +0000
Commit:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Sun Feb 10 12:08:21 2019 +0000
URL:        https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=1fe872f7

8.2.0: don't enable -fstack-clach-protection by default

In bug #675050 I noticed that -fstack-clash-protection is enabled
not just for hardened users but for USE=ssp users as well.

That was not an intention of the patch. The change enables
-fstack-clach-protection only for -DEXTRA_OPTIONS (hardened users).

See https://bugs.gentoo.org/675050 for longer-term plans to
enable -fstack-clach-protection for more users.

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

 8.2.0/gentoo/55_all_extra-options.patch | 2 +-
 8.2.0/gentoo/README.history             | 1 +
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/8.2.0/gentoo/55_all_extra-options.patch b/8.2.0/gentoo/55_all_extra-options.patch
index 3e8275f..9187af8 100644
--- a/8.2.0/gentoo/55_all_extra-options.patch
+++ b/8.2.0/gentoo/55_all_extra-options.patch
@@ -19,7 +19,7 @@ On Hardened we add some options like -fstack-clash-protection and -z now
  
 +/* Default value for flag_clash_protector when flag_clash_protector is
 +   initialized to -1.  */
-+#ifdef ENABLE_ESP
++#ifdef EXTRA_OPTIONS
 +#define DEFAULT_FLAG_SCP 1
 +#endif
 +#ifndef DEFAULT_FLAG_SCP

diff --git a/8.2.0/gentoo/README.history b/8.2.0/gentoo/README.history
index a20d870..bf28171 100644
--- a/8.2.0/gentoo/README.history
+++ b/8.2.0/gentoo/README.history
@@ -1,5 +1,6 @@
 1.8		TODO
 	+ 116_all_ipa-pgo-PR88561-fix.patch
+	U 55_all_extra-options.patch
 
 1.7		26 Dec 2018
 	+ 114_all_kr-decl-PR88214.patch


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

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

commit:     770623b579388a4f62b15071f778d387a7446f32
Author:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
AuthorDate: Mon Feb 11 21:57:23 2019 +0000
Commit:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Mon Feb 11 21:57:23 2019 +0000
URL:        https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=770623b5

8.2.0: lto: fix target-specific option leak into global constructors

Picked upstream patch as-is:
https://github.com/gcc-mirror/gcc/commit/332446ac24e5b37f441f7c9cb0b97fc36f9f0aa3

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

 8.2.0/gentoo/117_all_lto-ctor-dtor-target.patch | 64 +++++++++++++++++++++++++
 8.2.0/gentoo/README.history                     |  1 +
 2 files changed, 65 insertions(+)

diff --git a/8.2.0/gentoo/117_all_lto-ctor-dtor-target.patch b/8.2.0/gentoo/117_all_lto-ctor-dtor-target.patch
new file mode 100644
index 0000000..206daae
--- /dev/null
+++ b/8.2.0/gentoo/117_all_lto-ctor-dtor-target.patch
@@ -0,0 +1,64 @@
+https://bugs.gentoo.org/677724
+
+Apply file-specific target-specific optimisation to constructors and
+destructors. Fixes leaking of target-specific options from one unit
+to another. On firefox this change fixes -mavx2 leak from files guarded
+by CPU flag detection into other files.
+
+From 332446ac24e5b37f441f7c9cb0b97fc36f9f0aa3 Mon Sep 17 00:00:00 2001
+From: hubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>
+Date: Sat, 15 Dec 2018 10:31:37 +0000
+Subject: [PATCH] 	* ipa.c (cgraph_build_static_cdtor_1): Add
+ OPTIMIZATION and TARGET 	parameters. 	(cgraph_build_static_cdtor):
+ Update. 	(build_cdtor): Use OPTIMIZATION and TARGET of the first real
+ cdtor 	callsed.
+
+git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@267168 138bc75d-0d04-0410-961f-82ee72b054a4
+---
+ gcc/ipa.c     | 12 +++++++++---
+
+--- a/gcc/ipa.c
++++ b/gcc/ipa.c
+@@ -831,7 +831,9 @@ ipa_discover_variable_flags (void)
+    be produced. */
+ 
+ static void
+-cgraph_build_static_cdtor_1 (char which, tree body, int priority, bool final)
++cgraph_build_static_cdtor_1 (char which, tree body, int priority, bool final,
++			     tree optimization,
++			     tree target)
+ {
+   static int counter = 0;
+   char which_buf[16];
+@@ -862,6 +864,8 @@ cgraph_build_static_cdtor_1 (char which, tree body, int priority, bool final)
+ 
+   TREE_STATIC (decl) = 1;
+   TREE_USED (decl) = 1;
++  DECL_FUNCTION_SPECIFIC_OPTIMIZATION (decl) = optimization;
++  DECL_FUNCTION_SPECIFIC_TARGET (decl) = target;
+   DECL_ARTIFICIAL (decl) = 1;
+   DECL_IGNORED_P (decl) = 1;
+   DECL_NO_INSTRUMENT_FUNCTION_ENTRY_EXIT (decl) = 1;
+@@ -911,7 +915,7 @@ cgraph_build_static_cdtor_1 (char which, tree body, int priority, bool final)
+ void
+ cgraph_build_static_cdtor (char which, tree body, int priority)
+ {
+-  cgraph_build_static_cdtor_1 (which, body, priority, false);
++  cgraph_build_static_cdtor_1 (which, body, priority, false, NULL, NULL);
+ }
+ 
+ /* When target does not have ctors and dtors, we call all constructor
+@@ -993,7 +997,9 @@ build_cdtor (bool ctor_p, const vec<tree> &cdtors)
+       gcc_assert (body != NULL_TREE);
+       /* Generate a function to call all the function of like
+ 	 priority.  */
+-      cgraph_build_static_cdtor_1 (ctor_p ? 'I' : 'D', body, priority, true);
++      cgraph_build_static_cdtor_1 (ctor_p ? 'I' : 'D', body, priority, true,
++				   DECL_FUNCTION_SPECIFIC_OPTIMIZATION (cdtors[0]),
++				   DECL_FUNCTION_SPECIFIC_TARGET (cdtors[0]));
+     }
+ }
+ 
+-- 
+2.20.1
+

diff --git a/8.2.0/gentoo/README.history b/8.2.0/gentoo/README.history
index bf28171..17b6738 100644
--- a/8.2.0/gentoo/README.history
+++ b/8.2.0/gentoo/README.history
@@ -1,6 +1,7 @@
 1.8		TODO
 	+ 116_all_ipa-pgo-PR88561-fix.patch
 	U 55_all_extra-options.patch
+	+ 117_all_lto-ctor-dtor-target.patch
 
 1.7		26 Dec 2018
 	+ 114_all_kr-decl-PR88214.patch


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

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

commit:     53384d44430bc1797e586b0f7aaede3874fa5428
Author:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
AuthorDate: Wed Jan  8 22:41:41 2020 +0000
Commit:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Wed Jan  8 22:41:41 2020 +0000
URL:        https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=53384d44

8.2.0: mark unreleased changes abandoned

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

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

diff --git a/8.2.0/gentoo/README.history b/8.2.0/gentoo/README.history
index 17b6738..21d55a8 100644
--- a/8.2.0/gentoo/README.history
+++ b/8.2.0/gentoo/README.history
@@ -1,4 +1,4 @@
-1.8		TODO
+1.8		abandoned in favour of 8.4 branch
 	+ 116_all_ipa-pgo-PR88561-fix.patch
 	U 55_all_extra-options.patch
 	+ 117_all_lto-ctor-dtor-target.patch


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

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

Thread overview: 25+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-12-18 22:38 [gentoo-commits] proj/gcc-patches:master commit in: 8.2.0/gentoo/ Sergei Trofimovich
  -- strict thread matches above, loose matches on Subject: below --
2020-01-08 22:42 Sergei Trofimovich
2019-02-11 21:59 Sergei Trofimovich
2019-02-10 12:12 Sergei Trofimovich
2019-01-29 20:24 Sergei Trofimovich
2018-12-26 19:31 Sergei Trofimovich
2018-12-10 22:48 Sergei Trofimovich
2018-12-01 13:06 Sergei Trofimovich
2018-11-22 23:55 Sergei Trofimovich
2018-10-27  9:04 Sergei Trofimovich
2018-10-21  9:24 Sergei Trofimovich
2018-10-20  9:40 Sergei Trofimovich
2018-10-18 20:40 Sergei Trofimovich
2018-10-08 22:05 Sergei Trofimovich
2018-10-08 22:05 Sergei Trofimovich
2018-10-01  6:41 Sergei Trofimovich
2018-09-30 22:08 Sergei Trofimovich
2018-09-23 20:37 Sergei Trofimovich
2018-09-15 19:30 Sergei Trofimovich
2018-08-12 22:56 Sergei Trofimovich
2018-08-12 20:27 Sergei Trofimovich
2018-08-08  8:37 Sergei Trofimovich
2018-08-08  8:31 Sergei Trofimovich
2018-08-08  8:26 Sergei Trofimovich
2018-08-08  7:58 Sergei Trofimovich

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