Gentoo Archives: gentoo-commits

From: Sergei Trofimovich <slyfox@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/gcc-patches:master commit in: 9.2.0/gentoo/
Date: Mon, 12 Aug 2019 23:16:26
Message-Id: 1565638597.b2f1fe64d5b63950a9ca1b3e4306af3aeb05906c.slyfox@gentoo
1 commit: b2f1fe64d5b63950a9ca1b3e4306af3aeb05906c
2 Author: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
3 AuthorDate: Mon Aug 12 19:36:37 2019 +0000
4 Commit: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
5 CommitDate: Mon Aug 12 19:36:37 2019 +0000
6 URL: https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=b2f1fe64
7
8 9.2.0: cut initial patchset, a copy of 9.1.0 patches
9
10 Two upstreamed patches removed:
11 - 26_all_ipa-incomplete.patch
12 - 27_all_es-po.patch
13
14 Signed-off-by: Sergei Trofimovich <slyfox <AT> gentoo.org>
15
16 9.2.0/gentoo/01_all_default-fortify-source.patch | 22 ++++
17 .../02_all_default-warn-format-security.patch | 22 ++++
18 9.2.0/gentoo/03_all_default-warn-trampolines.patch | 13 ++
19 9.2.0/gentoo/04_all_default-ssp-fix.patch | 38 ++++++
20 9.2.0/gentoo/05_all_alpha-mieee-default.patch | 39 ++++++
21 9.2.0/gentoo/06_all_ia64_note.GNU-stack.patch | 92 +++++++++++++
22 .../gentoo/07_all_i386_libgcc_note.GNU-stack.patch | 54 ++++++++
23 9.2.0/gentoo/08_all_libiberty-asprintf.patch | 18 +++
24 9.2.0/gentoo/09_all_libiberty-pic.patch | 10 ++
25 9.2.0/gentoo/10_all_nopie-all-flags.patch | 18 +++
26 9.2.0/gentoo/11_all_extra-options.patch | 89 +++++++++++++
27 .../12_all_pr55930-dependency-tracking.patch | 18 +++
28 9.2.0/gentoo/13_all_sh-drop-sysroot-suffix.patch | 32 +++++
29 9.2.0/gentoo/14_all_ia64-TEXTREL.patch | 22 ++++
30 9.2.0/gentoo/15_all_disable-systemtap-switch.patch | 142 +++++++++++++++++++++
31 9.2.0/gentoo/16_all_m68k-textrel-on-libgcc.patch | 93 ++++++++++++++
32 9.2.0/gentoo/17_all_respect-build-cxxflags.patch | 39 ++++++
33 9.2.0/gentoo/18_all_libgfortran-Werror.patch | 20 +++
34 9.2.0/gentoo/19_all_libgomp-Werror.patch | 20 +++
35 9.2.0/gentoo/20_all_libitm-Werror.patch | 19 +++
36 9.2.0/gentoo/21_all_libatomic-Werror.patch | 19 +++
37 9.2.0/gentoo/22_all_libbacktrace-Werror.patch | 17 +++
38 9.2.0/gentoo/23_all_libsanitizer-Werror.patch | 17 +++
39 9.2.0/gentoo/24_all_libstdcxx-no-vtv.patch | 61 +++++++++
40 9.2.0/gentoo/25_all_ia64-bootstrap.patch | 41 ++++++
41 9.2.0/gentoo/26_all_disable-riscv32-ABIs.patch | 53 ++++++++
42 .../27_all_hppa64-patchable-entry-90751.patch | 120 +++++++++++++++++
43 9.2.0/gentoo/README.history | 28 ++++
44 28 files changed, 1176 insertions(+)
45
46 diff --git a/9.2.0/gentoo/01_all_default-fortify-source.patch b/9.2.0/gentoo/01_all_default-fortify-source.patch
47 new file mode 100644
48 index 0000000..d307474
49 --- /dev/null
50 +++ b/9.2.0/gentoo/01_all_default-fortify-source.patch
51 @@ -0,0 +1,22 @@
52 +Taken Debian's patch and removed docs matches:
53 + https://salsa.debian.org/toolchain-team/gcc.git
54 +Also see https://bugs.gentoo.org/621036 where
55 +initially Gentoo used too complicated macro.
56 +
57 +# DP: Turn on -D_FORTIFY_SOURCE=2 by default for C, C++, ObjC, ObjC++,
58 +# DP: if the optimization level is > 0
59 +--- a/gcc/c-family/c-cppbuiltin.c
60 ++++ b/gcc/c-family/c-cppbuiltin.c
61 +@@ -951,6 +951,12 @@ c_cpp_builtins (cpp_reader *pfile)
62 + builtin_define_with_value ("__REGISTER_PREFIX__", REGISTER_PREFIX, 0);
63 + builtin_define_with_value ("__USER_LABEL_PREFIX__", user_label_prefix, 0);
64 +
65 ++#if !defined(ACCEL_COMPILER)
66 ++ /* Fortify Source enabled by default for optimization levels > 0 */
67 ++ if (optimize)
68 ++ builtin_define_with_int_value ("_FORTIFY_SOURCE", 2);
69 ++#endif
70 ++
71 + /* Misc. */
72 + if (flag_gnu89_inline)
73 + cpp_define (pfile, "__GNUC_GNU_INLINE__");
74
75 diff --git a/9.2.0/gentoo/02_all_default-warn-format-security.patch b/9.2.0/gentoo/02_all_default-warn-format-security.patch
76 new file mode 100644
77 index 0000000..f809abd
78 --- /dev/null
79 +++ b/9.2.0/gentoo/02_all_default-warn-format-security.patch
80 @@ -0,0 +1,22 @@
81 +Enable -Wformat and -Wformat-security by default.
82 +
83 +--- a/gcc/c-family/c.opt 2016-03-23 18:51:56.000000000 +0100
84 ++++ b/gcc/c-family/c.opt 2016-04-28 23:45:54.063351272 +0200
85 +@@ -459,7 +459,7 @@ C ObjC C++ ObjC++ Var(warn_format_nonlit
86 + Warn about format strings that are not literals.
87 +
88 + Wformat-security
89 +-C ObjC C++ ObjC++ Var(warn_format_security) Warning LangEnabledBy(C ObjC C++ ObjC++,Wformat=, warn_format >= 2, 0)
90 ++C ObjC C++ ObjC++ Var(warn_format_security) Init(1) Warning LangEnabledBy(C ObjC C++ ObjC++,Wformat=, warn_format >= 2, 0)
91 + Warn about possible security problems with format functions.
92 +
93 + Wformat-signedness
94 +@@ -475,7 +475,7 @@ C ObjC C++ ObjC++ Var(warn_format_zero_l
95 + Warn about zero-length formats.
96 +
97 + Wformat=
98 +-C ObjC C++ ObjC++ Joined RejectNegative UInteger Var(warn_format) Warning LangEnabledBy(C ObjC C++ ObjC++,Wall, 1, 0) IntegerRange(0, 2)
99 ++C ObjC C++ ObjC++ Joined RejectNegative UInteger Var(warn_format) Init(1) Warning LangEnabledBy(C ObjC C++ ObjC++,Wall, 1, 0) IntegerRange(0, 2)
100 + Warn about printf/scanf/strftime/strfmon format string anomalies.
101 +
102 + Wignored-qualifiers
103
104 diff --git a/9.2.0/gentoo/03_all_default-warn-trampolines.patch b/9.2.0/gentoo/03_all_default-warn-trampolines.patch
105 new file mode 100644
106 index 0000000..7a644cb
107 --- /dev/null
108 +++ b/9.2.0/gentoo/03_all_default-warn-trampolines.patch
109 @@ -0,0 +1,13 @@
110 +Enable -Wtrampolines by default.
111 +
112 +--- a/gcc/common.opt
113 ++++ b/gcc/common.opt
114 +@@ -712,7 +712,7 @@ Common Var(warn_system_headers) Warning
115 + Do not suppress warnings from system headers.
116 +
117 + Wtrampolines
118 +-Common Var(warn_trampolines) Warning
119 ++Common Var(warn_trampolines) Init(1) Warning
120 + Warn whenever a trampoline is generated.
121 +
122 + Wtype-limits
123
124 diff --git a/9.2.0/gentoo/04_all_default-ssp-fix.patch b/9.2.0/gentoo/04_all_default-ssp-fix.patch
125 new file mode 100644
126 index 0000000..d2deac7
127 --- /dev/null
128 +++ b/9.2.0/gentoo/04_all_default-ssp-fix.patch
129 @@ -0,0 +1,38 @@
130 +Disable ssp on -nostdlib, -nodefaultlibs and -ffreestanding
131 +Change the buffer size.
132 +
133 +--- a/gcc/gcc.c 2017-07-04 09:15:57.740793000 +0200
134 ++++ b/gcc/gcc.c 2018-03-02 13:58:44.387741114 +0100
135 +@@ -857,6 +857,12 @@ proper position among the other output f
136 + #define LINK_GCC_C_SEQUENCE_SPEC "%G %L %G"
137 + #endif
138 +
139 ++#ifdef ENABLE_DEFAULT_SSP
140 ++#define NO_SSP_SPEC "%{nostdlib|nodefaultlibs|ffreestanding:-fno-stack-protector} "
141 ++#else
142 ++#define NO_SSP_SPEC ""
143 ++#endif
144 ++
145 + #ifndef LINK_SSP_SPEC
146 + #ifdef TARGET_LIBC_PROVIDES_SSP
147 + #define LINK_SSP_SPEC "%{fstack-protector|fstack-protector-all" \
148 +@@ -1131,7 +1148,7 @@ static const char *cc1_options =
149 + %{-version:--version}\
150 + %{-help=*:--help=%*}\
151 + %{!fsyntax-only:%{S:%W{o*}%{!o*:-o %b.s}}}\
152 +- %{fsyntax-only:-o %j} %{-param*}\
153 ++ %{fsyntax-only:-o %j} %{-param*} " NO_SSP_SPEC "\
154 + %{coverage:-fprofile-arcs -ftest-coverage}\
155 + %{fprofile-arcs|fprofile-generate*|coverage:\
156 + %{!fprofile-update=singel:\
157 +--- a/gcc/params.def 2016-03-30 09:47:40.000000000 +0200
158 ++++ b/gcc/params.def 2016-09-19 12:56:58.443179039 +0200
159 +@@ -673,7 +673,7 @@ DEFPARAM (PARAM_INTEGER_SHARE_LIMIT,
160 + DEFPARAM (PARAM_SSP_BUFFER_SIZE,
161 + "ssp-buffer-size",
162 + "The lower bound for a buffer to be considered for stack smashing protection.",
163 +- 8, 1, 0)
164 ++ 4, 1, 0)
165 +
166 + DEFPARAM (PARAM_MIN_SIZE_FOR_STACK_SHARING,
167 + "min-size-for-stack-sharing",
168
169 diff --git a/9.2.0/gentoo/05_all_alpha-mieee-default.patch b/9.2.0/gentoo/05_all_alpha-mieee-default.patch
170 new file mode 100644
171 index 0000000..b266d77
172 --- /dev/null
173 +++ b/9.2.0/gentoo/05_all_alpha-mieee-default.patch
174 @@ -0,0 +1,39 @@
175 +Set the default behavior on alpha to use -mieee since the large majority of
176 +time we want this (bad/weird things can happen with packages built without
177 +it).
178 +
179 +To satisfy those people who may not want -mieee forced on them all the time,
180 +we also provide -mno-ieee.
181 +
182 +Patch by Mike Frysinger <vapier@g.o>
183 +
184 +Note: upstream doesn't want to take this due to long standing behavior, and
185 +because it'd make behavior across OS's inconsistent:
186 + https://gcc.gnu.org/ml/gcc-patches/2003-07/msg02144.html
187 +
188 +This makes sense for upstream, but Gentoo is more concerned about packages
189 +behaving the same across arches under Linux.
190 +
191 +--- a/gcc/config/alpha/alpha.h
192 ++++ b/gcc/config/alpha/alpha.h
193 +@@ -96,6 +96,8 @@ along with GCC; see the file COPYING3. If not see
194 + while (0)
195 + #endif
196 +
197 ++#define CPP_SPEC "%{!no-ieee:-mieee}"
198 ++
199 + /* Run-time compilation parameters selecting different hardware subsets. */
200 +
201 + /* Which processor to schedule for. The cpu attribute defines a list that
202 +--- a/gcc/config/alpha/alpha.opt
203 ++++ b/gcc/config/alpha/alpha.opt
204 +@@ -35,7 +35,7 @@
205 + Request IEEE-conformant math library routines (OSF/1).
206 +
207 + mieee
208 +-Target Report RejectNegative Mask(IEEE)
209 ++Target Report Mask(IEEE)
210 + Emit IEEE-conformant code, without inexact exceptions.
211 +
212 + mieee-with-inexact
213 +
214
215 diff --git a/9.2.0/gentoo/06_all_ia64_note.GNU-stack.patch b/9.2.0/gentoo/06_all_ia64_note.GNU-stack.patch
216 new file mode 100644
217 index 0000000..66a787e
218 --- /dev/null
219 +++ b/9.2.0/gentoo/06_all_ia64_note.GNU-stack.patch
220 @@ -0,0 +1,92 @@
221 +http://gcc.gnu.org/PR21098
222 +
223 +
224 +2004-09-20 Jakub Jelinek <jakub@××××××.com>
225 +
226 + * config/rs6000/ppc-asm.h: Add .note.GNU-stack section also
227 + on ppc64-linux.
228 +
229 + * config/ia64/lib1funcs.asm: Add .note.GNU-stack section on
230 + ia64-linux.
231 + * config/ia64/crtbegin.asm: Likewise.
232 + * config/ia64/crtend.asm: Likewise.
233 + * config/ia64/crti.asm: Likewise.
234 + * config/ia64/crtn.asm: Likewise.
235 +
236 +2004-05-14 Jakub Jelinek <jakub@××××××.com>
237 +
238 + * config/ia64/linux.h (TARGET_ASM_FILE_END): Define.
239 +
240 +
241 +--- a/gcc/config/ia64/linux.h
242 ++++ b/gcc/config/ia64/linux.h
243 +@@ -24,6 +24,8 @@ a copy of the GCC Runtime Library Exception along with this program;
244 + see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
245 + <http://www.gnu.org/licenses/>. */
246 +
247 ++#define TARGET_ASM_FILE_END file_end_indicate_exec_stack
248 ++
249 + /* This is for -profile to use -lc_p instead of -lc. */
250 + #undef CC1_SPEC
251 + #define CC1_SPEC "%{profile:-p} %{G*}"
252 +--- a/gcc/config/rs6000/ppc-asm.h
253 ++++ b/gcc/config/rs6000/ppc-asm.h
254 +@@ -352,7 +352,7 @@ GLUE(.L,name): \
255 + #endif
256 + #endif
257 +
258 +-#if defined __linux__ && !defined __powerpc64__
259 ++#if defined __linux__
260 + .section .note.GNU-stack
261 + .previous
262 + #endif
263 +--- a/libgcc/config/ia64/crtbegin.S
264 ++++ b/libgcc/config/ia64/crtbegin.S
265 +@@ -252,3 +252,7 @@ __do_jv_register_classes:
266 + .weak __cxa_finalize
267 + #endif
268 + .weak _Jv_RegisterClasses
269 ++
270 ++#ifdef __linux__
271 ++.section .note.GNU-stack; .previous
272 ++#endif
273 +--- a/libgcc/config/ia64/crtend.S
274 ++++ b/libgcc/config/ia64/crtend.S
275 +@@ -119,3 +119,6 @@ __do_global_ctors_aux:
276 +
277 + br.ret.sptk.many rp
278 + .endp __do_global_ctors_aux
279 ++#ifdef __linux__
280 ++.section .note.GNU-stack; .previous
281 ++#endif
282 +--- a/libgcc/config/ia64/crti.S
283 ++++ b/libgcc/config/ia64/crti.S
284 +@@ -49,5 +49,8 @@ _fini:
285 + .save rp, r33
286 + mov r33 = b0
287 + .body
288 ++#ifdef __linux__
289 ++.section .note.GNU-stack; .previous
290 ++#endif
291 +
292 + # end of crti.S
293 +--- a/libgcc/config/ia64/crtn.S
294 ++++ b/libgcc/config/ia64/crtn.S
295 +@@ -39,5 +39,8 @@
296 + .restore sp
297 + mov r12 = r35
298 + br.ret.sptk.many b0
299 ++#ifdef __linux__
300 ++.section .note.GNU-stack; .previous
301 ++#endif
302 +
303 + # end of crtn.S
304 +--- a/libgcc/config/ia64/lib1funcs.S
305 ++++ b/libgcc/config/ia64/lib1funcs.S
306 +@@ -793,3 +793,6 @@ __floattitf:
307 + .endp __floattitf
308 + #endif
309 + #endif
310 ++#ifdef __linux__
311 ++.section .note.GNU-stack; .previous
312 ++#endif
313
314 diff --git a/9.2.0/gentoo/07_all_i386_libgcc_note.GNU-stack.patch b/9.2.0/gentoo/07_all_i386_libgcc_note.GNU-stack.patch
315 new file mode 100644
316 index 0000000..7f74945
317 --- /dev/null
318 +++ b/9.2.0/gentoo/07_all_i386_libgcc_note.GNU-stack.patch
319 @@ -0,0 +1,54 @@
320 +--- a/libgcc/config/i386/resms64.h 2018-01-03 11:03:58.000000000 +0100
321 ++++ b/libgcc/config/i386/resms64.h 2018-05-01 12:59:48.942833419 +0200
322 +@@ -57,3 +57,6 @@ MS2SYSV_STUB_END(resms64_17)
323 + MS2SYSV_STUB_END(resms64_18)
324 +
325 + #endif /* __x86_64__ */
326 ++#if defined(__linux__) && defined(__ELF__)
327 ++.section .note.GNU-stack,"",%progbits
328 ++#endif
329 +--- a/libgcc/config/i386/resms64f.h 2018-01-03 11:03:58.000000000 +0100
330 ++++ b/libgcc/config/i386/resms64f.h 2018-05-01 13:00:23.422832853 +0200
331 +@@ -55,3 +55,6 @@ MS2SYSV_STUB_END(resms64f_16)
332 + MS2SYSV_STUB_END(resms64f_17)
333 +
334 + #endif /* __x86_64__ */
335 ++#if defined(__linux__) && defined(__ELF__)
336 ++.section .note.GNU-stack,"",%progbits
337 ++#endif
338 +--- a/libgcc/config/i386/resms64fx.h 2018-02-26 20:46:34.000000000 +0100
339 ++++ b/libgcc/config/i386/resms64fx.h 2018-05-01 13:06:49.682826518 +0200
340 +@@ -62,3 +62,6 @@ MS2SYSV_STUB_END(resms64fx_16)
341 + MS2SYSV_STUB_END(resms64fx_17)
342 +
343 + #endif /* __x86_64__ */
344 ++#if defined(__linux__) && defined(__ELF__)
345 ++.section .note.GNU-stack,"",%progbits
346 ++#endif
347 +--- a/libgcc/config/i386/resms64x.h 2018-02-26 20:46:34.000000000 +0100
348 ++++ b/libgcc/config/i386/resms64x.h 2018-05-01 13:07:21.702825993 +0200
349 +@@ -63,3 +63,6 @@ MS2SYSV_STUB_END(resms64x_17)
350 + MS2SYSV_STUB_END(resms64x_18)
351 +
352 + #endif /* __x86_64__ */
353 ++#if defined(__linux__) && defined(__ELF__)
354 ++.section .note.GNU-stack,"",%progbits
355 ++#endif
356 +--- a/libgcc/config/i386/savms64.h 2018-01-03 11:03:58.000000000 +0100
357 ++++ b/libgcc/config/i386/savms64.h 2018-05-01 13:07:48.952825546 +0200
358 +@@ -57,3 +57,6 @@ MS2SYSV_STUB_END(savms64_17)
359 + MS2SYSV_STUB_END(savms64_18)
360 +
361 + #endif /* __x86_64__ */
362 ++#if defined(__linux__) && defined(__ELF__)
363 ++.section .note.GNU-stack,"",%progbits
364 ++#endif
365 +--- a/libgcc/config/i386/savms64f.h 2018-01-03 11:03:58.000000000 +0100
366 ++++ b/libgcc/config/i386/savms64f.h 2018-05-01 13:08:30.082824871 +0200
367 +@@ -55,3 +55,6 @@ MS2SYSV_STUB_END(savms64f_16)
368 + MS2SYSV_STUB_END(savms64f_17)
369 +
370 + #endif /* __x86_64__ */
371 ++#if defined(__linux__) && defined(__ELF__)
372 ++.section .note.GNU-stack,"",%progbits
373 ++#endif
374
375 diff --git a/9.2.0/gentoo/08_all_libiberty-asprintf.patch b/9.2.0/gentoo/08_all_libiberty-asprintf.patch
376 new file mode 100644
377 index 0000000..bee0c4c
378 --- /dev/null
379 +++ b/9.2.0/gentoo/08_all_libiberty-asprintf.patch
380 @@ -0,0 +1,18 @@
381 +2008-07-25 Magnus Granberg <zorry@×××.nu>
382 +
383 + * include/libiberty.h (asprintf): Don't declare if defined as a macro
384 +
385 +--- a/include/libiberty.h
386 ++++ b/include/libiberty.h
387 +@@ -609,8 +609,11 @@ extern int pwait (int, int *, int);
388 + /* Like sprintf but provides a pointer to malloc'd storage, which must
389 + be freed by the caller. */
390 +
391 ++/* asprintf may be declared as a macro by glibc with __USE_FORTIFY_LEVEL. */
392 ++#ifndef asprintf
393 + extern int asprintf (char **, const char *, ...) ATTRIBUTE_PRINTF_2;
394 + #endif
395 ++#endif
396 +
397 + #if !HAVE_DECL_VASPRINTF
398 + /* Like vsprintf but provides a pointer to malloc'd storage, which
399
400 diff --git a/9.2.0/gentoo/09_all_libiberty-pic.patch b/9.2.0/gentoo/09_all_libiberty-pic.patch
401 new file mode 100644
402 index 0000000..b6160a7
403 --- /dev/null
404 +++ b/9.2.0/gentoo/09_all_libiberty-pic.patch
405 @@ -0,0 +1,10 @@
406 +--- a/libiberty/Makefile.in
407 ++++ b/libiberty/Makefile.in
408 +@@ -246,6 +246,7 @@ $(TARGETLIB): $(REQUIRED_OFILES) $(EXTRA_OFILES) $(LIBOBJS)
409 + $(AR) $(AR_FLAGS) $(TARGETLIB) \
410 + $(REQUIRED_OFILES) $(EXTRA_OFILES) $(LIBOBJS); \
411 + $(RANLIB) $(TARGETLIB); \
412 ++ cp $(TARGETLIB) ../ ; \
413 + cd ..; \
414 + else true; fi
415 +
416
417 diff --git a/9.2.0/gentoo/10_all_nopie-all-flags.patch b/9.2.0/gentoo/10_all_nopie-all-flags.patch
418 new file mode 100644
419 index 0000000..48536e6
420 --- /dev/null
421 +++ b/9.2.0/gentoo/10_all_nopie-all-flags.patch
422 @@ -0,0 +1,18 @@
423 +We need to pass NO_PIE_CFLAGS to ALL_* so gcc don't fail when
424 +we compile it with older gcc and pie.
425 +
426 +--- a/gcc/Makefile.in 2015-06-25 19:18:12.000000000 +0200
427 ++++ b/gcc/Makefile.in 2016-04-22 00:12:54.029178860 +0200
428 +@@ -991,10 +991,10 @@ ALL_CXXFLAGS = $(T_CFLAGS) $(CFLAGS-$@)
429 + ALL_CPPFLAGS = $(INCLUDES) $(CPPFLAGS)
430 +
431 + # This is the variable to use when using $(COMPILER).
432 +-ALL_COMPILERFLAGS = $(ALL_CXXFLAGS)
433 ++ALL_COMPILERFLAGS = $(NO_PIE_CFLAGS) $(ALL_CXXFLAGS)
434 +
435 + # This is the variable to use when using $(LINKER).
436 +-ALL_LINKERFLAGS = $(ALL_CXXFLAGS)
437 ++ALL_LINKERFLAGS = $(NO_PIE_CFLAGS) $(ALL_CXXFLAGS)
438 +
439 + # Build and host support libraries.
440 +
441
442 diff --git a/9.2.0/gentoo/11_all_extra-options.patch b/9.2.0/gentoo/11_all_extra-options.patch
443 new file mode 100644
444 index 0000000..9187af8
445 --- /dev/null
446 +++ b/9.2.0/gentoo/11_all_extra-options.patch
447 @@ -0,0 +1,89 @@
448 +On Hardened we add some options like -fstack-clash-protection and -z now
449 +
450 +--- a/gcc/common.opt 2018-03-28 16:51:09.000000000 +0200
451 ++++ a/gcc/common.opt 2018-04-30 15:35:55.274096877 +0200
452 +@@ -2367,7 +2367,7 @@ Common Alias(fstack-check=, specific, no
453 + Insert stack checking code into the program. Same as -fstack-check=specific.
454 +
455 + fstack-clash-protection
456 +-Common Report Var(flag_stack_clash_protection) Optimization
457 ++Common Report Var(flag_stack_clash_protection) Optimization Init(-1)
458 + Insert code to probe each page of stack space as it is allocated to protect
459 + from stack-clash style attacks.
460 +
461 +--- a/gcc/defaults.h 2018-01-03 11:03:58.000000000 +0100
462 ++++ b/gcc/defaults.h 2018-05-01 12:41:29.522851451 +0200
463 +@@ -1435,6 +1435,15 @@ see the files COPYING3 and COPYING.RUNTI
464 + #define STACK_CHECK_MAX_VAR_SIZE (STACK_CHECK_MAX_FRAME_SIZE / 100)
465 + #endif
466 +
467 ++/* Default value for flag_clash_protector when flag_clash_protector is
468 ++ initialized to -1. */
469 ++#ifdef EXTRA_OPTIONS
470 ++#define DEFAULT_FLAG_SCP 1
471 ++#endif
472 ++#ifndef DEFAULT_FLAG_SCP
473 ++#define DEFAULT_FLAG_SCP 0
474 ++#endif
475 ++
476 + /* By default, the C++ compiler will use function addresses in the
477 + vtable entries. Setting this nonzero tells the compiler to use
478 + function descriptors instead. The value of this macro says how
479 +--- a/gcc/toplev.c 2018-02-13 17:18:37.000000000 +0100
480 ++++ b/toplev.c 2018-04-30 16:46:37.244027303 +0200
481 +@@ -1682,6 +1682,10 @@ process_options (void)
482 +
483 + /* -fstack-clash-protection is not currently supported on targets
484 + where the stack grows up. */
485 ++ if (flag_stack_clash_protection == -1)
486 ++ {
487 ++ flag_stack_clash_protection = DEFAULT_FLAG_SCP;
488 ++ }
489 + if (flag_stack_clash_protection && !STACK_GROWS_DOWNWARD)
490 + {
491 + warning_at (UNKNOWN_LOCATION, 0,
492 +
493 +--- a/libgcc/Makefile.in 2011-11-22 04:01:02.000000000 +0100
494 ++++ b/libgcc/Makefile.in 2011-12-25 15:18:22.449610631 +0100
495 +@@ -225,7 +225,7 @@ endif
496 + LIBGCC2_DEBUG_CFLAGS = -g
497 + LIBGCC2_CFLAGS = -O2 $(LIBGCC2_INCLUDES) $(GCC_CFLAGS) $(HOST_LIBGCC2_CFLAGS) \
498 + $(LIBGCC2_DEBUG_CFLAGS) -DIN_LIBGCC2 \
499 +- -fbuilding-libgcc -fno-stack-protector \
500 ++ -fbuilding-libgcc -fno-stack-protector -fno-stack-clash-protection \
501 + $(INHIBIT_LIBC_CFLAGS)
502 +
503 + # Additional options to use when compiling libgcc2.a.
504 +@@ -279,7 +290,7 @@ INTERNAL_CFLAGS = $(CFLAGS) $(LIBGCC2_CF
505 + -finhibit-size-directive -fno-inline -fno-exceptions \
506 + -fno-zero-initialized-in-bss -fno-toplevel-reorder -fno-tree-vectorize \
507 + -fbuilding-libgcc -fno-stack-protector $(FORCE_EXPLICIT_EH_REGISTRY) \
508 +- $(INHIBIT_LIBC_CFLAGS)
509 ++ -fno-stack-clash-protection $(INHIBIT_LIBC_CFLAGS)
510 +
511 + # Extra flags to use when compiling crt{begin,end}.o.
512 + CRTSTUFF_T_CFLAGS =
513 +--- a/gcc/gcc.c 2016-02-19 23:18:38.000000000 +0100
514 ++++ b/gcc/gcc.c 2016-05-02 22:56:10.185721270 +0200
515 +@@ -868,6 +868,12 @@ proper position among the other output f
516 + #endif
517 + #endif
518 +
519 ++#ifdef EXTRA_OPTIONS
520 ++#define LINK_NOW_SPEC "%{!nonow:-z now} "
521 ++#else
522 ++#define LINK_NOW_SPEC ""
523 ++#endif
524 ++
525 + #ifdef ENABLE_DEFAULT_PIE
526 + #define NO_PIE_SPEC "no-pie|static"
527 + #define PIE_SPEC NO_PIE_SPEC "|r|shared:;"
528 +@@ -1013,7 +1020,7 @@ proper position among the other output f
529 + %(linker) " \
530 + LINK_PLUGIN_SPEC \
531 + "%{flto|flto=*:%<fcompare-debug*} \
532 +- %{flto} %{fno-lto} %{flto=*} %l " LINK_PIE_SPEC \
533 ++ %{flto} %{fno-lto} %{flto=*} %l " LINK_PIE_SPEC LINK_NOW_SPEC \
534 + "%{fuse-ld=*:-fuse-ld=%*} " LINK_COMPRESS_DEBUG_SPEC \
535 + "%X %{o*} %{e*} %{N} %{n} %{r}\
536 + %{s} %{t} %{u*} %{z} %{Z} %{!nostdlib:%{!nostartfiles:%S}} \
537
538 diff --git a/9.2.0/gentoo/12_all_pr55930-dependency-tracking.patch b/9.2.0/gentoo/12_all_pr55930-dependency-tracking.patch
539 new file mode 100644
540 index 0000000..a8743e0
541 --- /dev/null
542 +++ b/9.2.0/gentoo/12_all_pr55930-dependency-tracking.patch
543 @@ -0,0 +1,18 @@
544 +libatomic build failure if configured with --disable-dependency-tracking
545 +load_n.c:115:1: fatal error: opening dependency file .deps/load_1_.lo.Ppo: No such file or directory
546 +
547 +https://bugs.gentoo.org/463463
548 +http://gcc.gnu.org/PR55930
549 +
550 +--- a/libatomic/Makefile.in
551 ++++ b/libatomic/Makefile.in
552 +@@ -298,7 +298,8 @@ PAT_N = $(word 2,$(PAT_SPLIT))
553 + PAT_S = $(word 3,$(PAT_SPLIT))
554 + IFUNC_DEF = -DIFUNC_ALT=$(PAT_S)
555 + IFUNC_OPT = $(word $(PAT_S),$(IFUNC_OPTIONS))
556 +-M_DEPS = -MT $@ -MD -MP -MF $(DEPDIR)/$(@F).Ppo
557 ++@AMDEP_TRUE@M_DEPS = -MT $@ -MD -MP -MF $(DEPDIR)/$(@F).Ppo
558 ++@AMDEP_FALSE@M_DEPS =
559 + M_SIZE = -DN=$(PAT_N)
560 + M_IFUNC = $(if $(PAT_S),$(IFUNC_DEF) $(IFUNC_OPT))
561 + M_FILE = $(PAT_BASE)_n.c
562
563 diff --git a/9.2.0/gentoo/13_all_sh-drop-sysroot-suffix.patch b/9.2.0/gentoo/13_all_sh-drop-sysroot-suffix.patch
564 new file mode 100644
565 index 0000000..3dadd4c
566 --- /dev/null
567 +++ b/9.2.0/gentoo/13_all_sh-drop-sysroot-suffix.patch
568 @@ -0,0 +1,32 @@
569 +From 5eeeff19bb4978a8d3c0d53bc81744bc25d82993 Mon Sep 17 00:00:00 2001
570 +From: Sergei Trofimovich <slyfox@g.o>
571 +Date: Sat, 14 Apr 2018 13:07:39 +0100
572 +Subject: [PATCH] gcc/config.gcc: sh-*: Disable sysroot-suffix (PR42947)
573 +
574 +sh-* is a multilib target. It is also one of 2 sysroot-prefix targets.
575 +Unfortunately two options do not mix well. Attempt to use default
576 +multilib flavour always prepends sysroot-prefix.
577 +
578 +Bug: https://bugs.gentoo.org/511548
579 +Bug: https://gcc.gnu.org/PR42947
580 +Signed-off-by: Sergei Trofimovich <slyfox@g.o>
581 +---
582 + gcc/config.gcc | 2 --
583 + 1 file changed, 2 deletions(-)
584 +
585 +diff --git a/gcc/config.gcc b/gcc/config.gcc
586 +index 55c314afdbd..c320f24f123 100644
587 +--- a/gcc/config.gcc
588 ++++ b/gcc/config.gcc
589 +@@ -2866,8 +2866,6 @@ sh-*-elf* | sh[12346l]*-*-elf* | \
590 + if test x${enable_incomplete_targets} = xyes ; then
591 + tm_defines="$tm_defines SUPPORT_SH1=1 SUPPORT_SH2E=1 SUPPORT_SH4=1 SUPPORT_SH4_SINGLE=1 SUPPORT_SH2A=1 SUPPORT_SH2A_SINGLE=1"
592 + fi
593 +- tm_file="$tm_file ./sysroot-suffix.h"
594 +- tmake_file="$tmake_file t-sysroot-suffix"
595 + ;;
596 + sh-*-rtems*)
597 + tmake_file="${tmake_file} sh/t-sh sh/t-rtems"
598 +--
599 +2.17.0
600 +
601
602 diff --git a/9.2.0/gentoo/14_all_ia64-TEXTREL.patch b/9.2.0/gentoo/14_all_ia64-TEXTREL.patch
603 new file mode 100644
604 index 0000000..706dbe5
605 --- /dev/null
606 +++ b/9.2.0/gentoo/14_all_ia64-TEXTREL.patch
607 @@ -0,0 +1,22 @@
608 +Fix textrels on -rdynamic binaries:
609 +Bug: https://gcc.gnu.org/PR84553
610 +Bug: https://bugs.gentoo.org/566118
611 +--- a/gcc/config/ia64/ia64.c
612 ++++ a/gcc/config/ia64/ia64.c
613 +@@ -10838,12 +10838,14 @@ ia64_hpux_reloc_rw_mask (void)
614 +
615 + /* For others, relax this so that relocations to local data goes in
616 + read-only segments, but we still cannot allow global relocations
617 +- in read-only segments. */
618 ++ in read-only segments. Except that use of -rdynamic at link time
619 ++ may make any local data global, so we can't allow local data in
620 ++ read-only segments either. */
621 +
622 + static int
623 + ia64_reloc_rw_mask (void)
624 + {
625 +- return flag_pic ? 3 : 2;
626 ++ return flag_pic ? 3 : 3;
627 + }
628 +
629 + /* Return the section to use for X. The only special thing we do here
630
631 diff --git a/9.2.0/gentoo/15_all_disable-systemtap-switch.patch b/9.2.0/gentoo/15_all_disable-systemtap-switch.patch
632 new file mode 100644
633 index 0000000..3914f59
634 --- /dev/null
635 +++ b/9.2.0/gentoo/15_all_disable-systemtap-switch.patch
636 @@ -0,0 +1,142 @@
637 +From bb510ed7ea82093c924b027489db6f92250a85b3 Mon Sep 17 00:00:00 2001
638 +From: Sergei Trofimovich <slyfox@g.o>
639 +Date: Sat, 12 May 2018 12:56:46 +0100
640 +Subject: [PATCH] gcc/configure.ac: add --disable-systemtap switch
641 +
642 +Before the change systemtap probes were enabled
643 +if target headers had sys/sdt.h at ./configure time.
644 +
645 +After the change explicitly ask to enable or disable
646 +for probe support and not rely on automagic dependency
647 +discovery.
648 +
649 +Bug: https://bugs.gentoo.org/654748
650 +Bug: https://gcc.gnu.org/bugzilla/PR61257
651 +Signed-off-by: Sergei Trofimovich <slyfox@g.o>
652 +---
653 + gcc/configure | 34 ++++++++++++++++++++++++++--------
654 + gcc/configure.ac | 30 ++++++++++++++++++++++--------
655 + 2 files changed, 48 insertions(+), 16 deletions(-)
656 +
657 +diff --git a/gcc/configure b/gcc/configure
658 +index 3dcf7752b..c2049f117 100755
659 +--- a/gcc/configure
660 ++++ b/gcc/configure
661 +@@ -988,6 +988,7 @@ enable_gnu_unique_object
662 + enable_linker_build_id
663 + enable_libssp
664 + enable_default_ssp
665 ++enable_systemtap
666 + with_long_double_128
667 + with_long_double_format
668 + with_gc
669 +@@ -1740,6 +1741,7 @@ Optional Features:
670 + compiler will always pass --build-id to linker
671 + --enable-libssp enable linking against libssp
672 + --enable-default-ssp enable Stack Smashing Protection as default
673 ++ --disable-systemtap enable systemtap static probe points [default=auto]
674 + --enable-maintainer-mode
675 + enable make rules and dependencies not useful (and
676 + sometimes confusing) to the casual installer
677 +@@ -18646,7 +18648,7 @@ else
678 + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
679 + lt_status=$lt_dlunknown
680 + cat > conftest.$ac_ext <<_LT_EOF
681 +-#line 18649 "configure"
682 ++#line 18651 "configure"
683 + #include "confdefs.h"
684 +
685 + #if HAVE_DLFCN_H
686 +@@ -18752,7 +18754,7 @@ else
687 + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
688 + lt_status=$lt_dlunknown
689 + cat > conftest.$ac_ext <<_LT_EOF
690 +-#line 18755 "configure"
691 ++#line 18757 "configure"
692 + #include "confdefs.h"
693 +
694 + #if HAVE_DLFCN_H
695 +@@ -29330,17 +29332,33 @@ fi
696 +
697 + # Test for <sys/sdt.h> on the target.
698 +
699 +-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking sys/sdt.h in the target C library" >&5
700 ++
701 ++# Check whether --enable-systemtap was given.
702 ++if test "${enable_systemtap+set}" = set; then :
703 ++ enableval=$enable_systemtap; enable_systemtap=$enableval
704 ++else
705 ++ enable_systemtap=auto
706 ++fi
707 ++
708 ++
709 ++if test x$enable_systemtap != xno; then
710 ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking sys/sdt.h in the target C library" >&5
711 + $as_echo_n "checking sys/sdt.h in the target C library... " >&6; }
712 +-have_sys_sdt_h=no
713 +-if test -f $target_header_dir/sys/sdt.h; then
714 +- have_sys_sdt_h=yes
715 ++ have_sys_sdt_h=no
716 ++ if test -f $target_header_dir/sys/sdt.h ; then
717 ++ have_sys_sdt_h=yes
718 +
719 + $as_echo "#define HAVE_SYS_SDT_H 1" >>confdefs.h
720 +
721 +-fi
722 +-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_sys_sdt_h" >&5
723 ++ fi
724 ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_sys_sdt_h" >&5
725 + $as_echo "$have_sys_sdt_h" >&6; }
726 ++ if test x$enable_systemtap = xyes ; then
727 ++ if test x$have_sys_sdt_h = xno ; then
728 ++ as_fn_error $? "sys/sdt.h was not found" "$LINENO" 5
729 ++ fi
730 ++ fi
731 ++fi
732 +
733 + # Check if TFmode long double should be used by default or not.
734 + # Some glibc targets used DFmode long double, but with glibc 2.4
735 +diff --git a/gcc/configure.ac b/gcc/configure.ac
736 +index 51f520c15..985bbc8fb 100644
737 +--- a/gcc/configure.ac
738 ++++ b/gcc/configure.ac
739 +@@ -6000,14 +6000,28 @@ AC_SUBST([enable_default_ssp])
740 +
741 + # Test for <sys/sdt.h> on the target.
742 + GCC_TARGET_TEMPLATE([HAVE_SYS_SDT_H])
743 +-AC_MSG_CHECKING(sys/sdt.h in the target C library)
744 +-have_sys_sdt_h=no
745 +-if test -f $target_header_dir/sys/sdt.h; then
746 +- have_sys_sdt_h=yes
747 +- AC_DEFINE(HAVE_SYS_SDT_H, 1,
748 +- [Define if your target C library provides sys/sdt.h])
749 +-fi
750 +-AC_MSG_RESULT($have_sys_sdt_h)
751 ++
752 ++AC_ARG_ENABLE(systemtap,
753 ++[AS_HELP_STRING([--disable-systemtap],
754 ++ [enable systemtap static probe points [default=auto]])],
755 ++ enable_systemtap=$enableval,
756 ++ enable_systemtap=auto)
757 ++
758 ++if test x$enable_systemtap != xno; then
759 ++ AC_MSG_CHECKING(sys/sdt.h in the target C library)
760 ++ have_sys_sdt_h=no
761 ++ if test -f $target_header_dir/sys/sdt.h ; then
762 ++ have_sys_sdt_h=yes
763 ++ AC_DEFINE(HAVE_SYS_SDT_H, 1,
764 ++ [Define if your target C library provides sys/sdt.h])
765 ++ fi
766 ++ AC_MSG_RESULT($have_sys_sdt_h)
767 ++ if test x$enable_systemtap = xyes ; then
768 ++ if test x$have_sys_sdt_h = xno ; then
769 ++ AC_MSG_ERROR([sys/sdt.h was not found])
770 ++ fi
771 ++ fi
772 ++fi
773 +
774 + # Check if TFmode long double should be used by default or not.
775 + # Some glibc targets used DFmode long double, but with glibc 2.4
776 +--
777 +2.17.0
778 +
779
780 diff --git a/9.2.0/gentoo/16_all_m68k-textrel-on-libgcc.patch b/9.2.0/gentoo/16_all_m68k-textrel-on-libgcc.patch
781 new file mode 100644
782 index 0000000..a2aa100
783 --- /dev/null
784 +++ b/9.2.0/gentoo/16_all_m68k-textrel-on-libgcc.patch
785 @@ -0,0 +1,93 @@
786 +https://gcc.gnu.org/PR86224
787 +
788 +From 1d89df42bdaf0745fd2a0d294471ac16f0553707 Mon Sep 17 00:00:00 2001
789 +From: Sergei Trofimovich <slyfox@g.o>
790 +Date: Sat, 28 Jul 2018 11:33:27 +0100
791 +Subject: [PATCH] libgcc: m68k: avoid absolute relocation in shared library
792 +
793 +Signed-off-by: Sergei Trofimovich <slyfox@g.o>
794 +---
795 + libgcc/config/m68k/lb1sf68.S | 19 ++++++++++++++-----
796 + 1 file changed, 14 insertions(+), 5 deletions(-)
797 +
798 +diff --git a/libgcc/config/m68k/lb1sf68.S b/libgcc/config/m68k/lb1sf68.S
799 +index 325a7c17d9b..16c6dc3f5a7 100644
800 +--- a/libgcc/config/m68k/lb1sf68.S
801 ++++ b/libgcc/config/m68k/lb1sf68.S
802 +@@ -435,7 +435,10 @@ $_exception_handler:
803 + .text
804 + FUNC(__mulsi3)
805 + .globl SYM (__mulsi3)
806 ++ .globl SYM (__mulsi3_internal)
807 ++ .hidden SYM (__mulsi3_internal)
808 + SYM (__mulsi3):
809 ++SYM (__mulsi3_internal):
810 + movew sp@(4), d0 /* x0 -> d0 */
811 + muluw sp@(10), d0 /* x0*y1 */
812 + movew sp@(6), d1 /* x1 -> d1 */
813 +@@ -458,7 +461,10 @@ SYM (__mulsi3):
814 + .text
815 + FUNC(__udivsi3)
816 + .globl SYM (__udivsi3)
817 ++ .globl SYM (__udivsi3_internal)
818 ++ .hidden SYM (__udivsi3_internal)
819 + SYM (__udivsi3):
820 ++SYM (__udivsi3_internal):
821 + #ifndef __mcoldfire__
822 + movel d2, sp@-
823 + movel sp@(12), d1 /* d1 = divisor */
824 +@@ -534,7 +540,10 @@ L2: subql IMM (1),d4
825 + .text
826 + FUNC(__divsi3)
827 + .globl SYM (__divsi3)
828 ++ .globl SYM (__divsi3_internal)
829 ++ .hidden SYM (__divsi3_internal)
830 + SYM (__divsi3):
831 ++SYM (__divsi3_internal):
832 + movel d2, sp@-
833 +
834 + moveq IMM (1), d2 /* sign of result stored in d2 (=1 or =-1) */
835 +@@ -557,7 +566,7 @@ L1: movel sp@(8), d0 /* d0 = dividend */
836 +
837 + L2: movel d1, sp@-
838 + movel d0, sp@-
839 +- PICCALL SYM (__udivsi3) /* divide abs(dividend) by abs(divisor) */
840 ++ PICCALL SYM (__udivsi3_internal) /* divide abs(dividend) by abs(divisor) */
841 + addql IMM (8), sp
842 +
843 + tstb d2
844 +@@ -577,13 +586,13 @@ SYM (__umodsi3):
845 + movel sp@(4), d0 /* d0 = dividend */
846 + movel d1, sp@-
847 + movel d0, sp@-
848 +- PICCALL SYM (__udivsi3)
849 ++ PICCALL SYM (__udivsi3_internal)
850 + addql IMM (8), sp
851 + movel sp@(8), d1 /* d1 = divisor */
852 + #ifndef __mcoldfire__
853 + movel d1, sp@-
854 + movel d0, sp@-
855 +- PICCALL SYM (__mulsi3) /* d0 = (a/b)*b */
856 ++ PICCALL SYM (__mulsi3_internal) /* d0 = (a/b)*b */
857 + addql IMM (8), sp
858 + #else
859 + mulsl d1,d0
860 +@@ -603,13 +612,13 @@ SYM (__modsi3):
861 + movel sp@(4), d0 /* d0 = dividend */
862 + movel d1, sp@-
863 + movel d0, sp@-
864 +- PICCALL SYM (__divsi3)
865 ++ PICCALL SYM (__divsi3_internal)
866 + addql IMM (8), sp
867 + movel sp@(8), d1 /* d1 = divisor */
868 + #ifndef __mcoldfire__
869 + movel d1, sp@-
870 + movel d0, sp@-
871 +- PICCALL SYM (__mulsi3) /* d0 = (a/b)*b */
872 ++ PICCALL SYM (__mulsi3_internal) /* d0 = (a/b)*b */
873 + addql IMM (8), sp
874 + #else
875 + mulsl d1,d0
876 +--
877 +2.18.0
878 +
879
880 diff --git a/9.2.0/gentoo/17_all_respect-build-cxxflags.patch b/9.2.0/gentoo/17_all_respect-build-cxxflags.patch
881 new file mode 100644
882 index 0000000..14139ea
883 --- /dev/null
884 +++ b/9.2.0/gentoo/17_all_respect-build-cxxflags.patch
885 @@ -0,0 +1,39 @@
886 +Pass CXXFLAGS as CXXFLAGS_FOR_BUILD to stage1.
887 +
888 +Fixes build failure when CXXFLAGS contains
889 +TARGET-specific flags.
890 +
891 +Tested on x86_64-pc-linux-gnu host as:
892 + # CFLAGS='-O2 -mfpu=neon-vfpv4' CXXFLAGS='-O2 -mfpu=neon-vfpv4' \
893 + armv7a-unknown-linux-gnueabihf-emerge -v1 sys-devel/gcc --quiet-build=n
894 +
895 +Fix by Peter Levine.
896 +https://bugs.gentoo.org/581406
897 +--- a/Makefile.in
898 ++++ b/Makefile.in
899 +@@ -170,6 +170,7 @@
900 + # built for the build system to override those in BASE_FLAGS_TO_PASS.
901 + EXTRA_BUILD_FLAGS = \
902 + CFLAGS="$(CFLAGS_FOR_BUILD)" \
903 ++ CXXFLAGS="$(CXXFLAGS_FOR_BUILD)" \
904 + LDFLAGS="$(LDFLAGS_FOR_BUILD)"
905 +
906 + # This is the list of directories to built for the host system.
907 +@@ -710,6 +711,7 @@
908 + "CC_FOR_BUILD=$(CC_FOR_BUILD)" \
909 + "CFLAGS_FOR_BUILD=$(CFLAGS_FOR_BUILD)" \
910 + "CXX_FOR_BUILD=$(CXX_FOR_BUILD)" \
911 ++ "CXXFLAGS_FOR_BUILD=$(CXXFLAGS_FOR_BUILD)" \
912 + "EXPECT=$(EXPECT)" \
913 + "FLEX=$(FLEX)" \
914 + "INSTALL=$(INSTALL)" \
915 +--- a/Makefile.tpl
916 ++++ b/Makefile.tpl
917 +@@ -172,6 +172,7 @@
918 + # built for the build system to override those in BASE_FLAGS_TO_PASS.
919 + EXTRA_BUILD_FLAGS = \
920 + CFLAGS="$(CFLAGS_FOR_BUILD)" \
921 ++ CXXFLAGS="$(CXXFLAGS_FOR_BUILD)" \
922 + LDFLAGS="$(LDFLAGS_FOR_BUILD)"
923 +
924 + # This is the list of directories to built for the host system.
925
926 diff --git a/9.2.0/gentoo/18_all_libgfortran-Werror.patch b/9.2.0/gentoo/18_all_libgfortran-Werror.patch
927 new file mode 100644
928 index 0000000..f6c26bf
929 --- /dev/null
930 +++ b/9.2.0/gentoo/18_all_libgfortran-Werror.patch
931 @@ -0,0 +1,20 @@
932 +libgfortran does not respect --disable-werror
933 +
934 +https://bugs.gentoo.org/433435
935 +http://gcc.gnu.org/PR54724
936 +
937 +
938 +--- a/libgfortran/configure.ac
939 ++++ b/libgfortran/configure.ac
940 +@@ -140,3 +140,3 @@ AM_PROG_CC_C_O
941 + if test "x$GCC" = "xyes"; then
942 +- AM_FCFLAGS="-I . -Wall -Werror -fimplicit-none -fno-repack-arrays -fno-underscoring"
943 ++ AM_FCFLAGS="-I . -Wall -fimplicit-none -fno-repack-arrays -fno-underscoring"
944 + ## We like to use C11 and C99 routines when available. This makes
945 +--- a/libgfortran/configure
946 ++++ b/libgfortran/configure
947 +@@ -5764,3 +5764,3 @@ fi
948 + # Add -Wall -fno-repack-arrays -fno-underscoring if we are using GCC.
949 + if test "x$GCC" = "xyes"; then
950 +- AM_FCFLAGS="-I . -Wall -Werror -fimplicit-none -fno-repack-arrays -fno-underscoring"
951 ++ AM_FCFLAGS="-I . -Wall -fimplicit-none -fno-repack-arrays -fno-underscoring"
952
953 diff --git a/9.2.0/gentoo/19_all_libgomp-Werror.patch b/9.2.0/gentoo/19_all_libgomp-Werror.patch
954 new file mode 100644
955 index 0000000..416808a
956 --- /dev/null
957 +++ b/9.2.0/gentoo/19_all_libgomp-Werror.patch
958 @@ -0,0 +1,20 @@
959 +libgomp does not respect --disable-werror
960 +
961 +https://bugs.gentoo.org/229059
962 +http://gcc.gnu.org/PR38436
963 +--- a/libgomp/configure.ac
964 ++++ b/libgomp/configure.ac
965 +@@ -4282,4 +4282,4 @@ save_CFLAGS="$CFLAGS"
966 + # Add -Wall -Werror if we are using GCC.
967 + if test "x$GCC" = "xyes"; then
968 +- XCFLAGS="$XCFLAGS -Wall -Werror"
969 ++ XCFLAGS="$XCFLAGS -Wall"
970 + fi
971 +--- a/libgomp/configure
972 ++++ b/libgomp/configure
973 +@@ -4282,4 +4282,4 @@ save_CFLAGS="$CFLAGS"
974 + # Add -Wall -Werror if we are using GCC.
975 + if test "x$GCC" = "xyes"; then
976 +- XCFLAGS="$XCFLAGS -Wall -Werror"
977 ++ XCFLAGS="$XCFLAGS -Wall"
978 + fi
979
980 diff --git a/9.2.0/gentoo/20_all_libitm-Werror.patch b/9.2.0/gentoo/20_all_libitm-Werror.patch
981 new file mode 100644
982 index 0000000..27181e0
983 --- /dev/null
984 +++ b/9.2.0/gentoo/20_all_libitm-Werror.patch
985 @@ -0,0 +1,19 @@
986 +libitm does not respect --disable-werror
987 +
988 +https://bugs.gentoo.org/475350
989 +--- a/libitm/configure.ac
990 ++++ b/libitm/configure.ac
991 +@@ -4282,4 +4282,4 @@ save_CFLAGS="$CFLAGS"
992 + # Add -Wall -Werror if we are using GCC.
993 + if test "x$GCC" = "xyes"; then
994 +- XCFLAGS="$XCFLAGS -Wall -Werror"
995 ++ XCFLAGS="$XCFLAGS -Wall"
996 + fi
997 +--- a/libitm/configure
998 ++++ b/libitm/configure
999 +@@ -4282,4 +4282,4 @@ save_CFLAGS="$CFLAGS"
1000 + # Add -Wall -Werror if we are using GCC.
1001 + if test "x$GCC" = "xyes"; then
1002 +- XCFLAGS="$XCFLAGS -Wall -Werror"
1003 ++ XCFLAGS="$XCFLAGS -Wall"
1004 + fi
1005
1006 diff --git a/9.2.0/gentoo/21_all_libatomic-Werror.patch b/9.2.0/gentoo/21_all_libatomic-Werror.patch
1007 new file mode 100644
1008 index 0000000..0550722
1009 --- /dev/null
1010 +++ b/9.2.0/gentoo/21_all_libatomic-Werror.patch
1011 @@ -0,0 +1,19 @@
1012 +libatomic does not respect --disable-werror
1013 +
1014 +https://bugs.gentoo.org/475350
1015 +--- a/libatomic/configure.ac
1016 ++++ b/libatomic/configure.ac
1017 +@@ -4282,4 +4282,4 @@ save_CFLAGS="$CFLAGS"
1018 + # Add -Wall -Werror if we are using GCC.
1019 + if test "x$GCC" = "xyes"; then
1020 +- XCFLAGS="$XCFLAGS -Wall -Werror"
1021 ++ XCFLAGS="$XCFLAGS -Wall"
1022 + fi
1023 +--- a/libatomic/configure
1024 ++++ b/libatomic/configure
1025 +@@ -4282,4 +4282,4 @@ save_CFLAGS="$CFLAGS"
1026 + # Add -Wall -Werror if we are using GCC.
1027 + if test "x$GCC" = "xyes"; then
1028 +- XCFLAGS="$XCFLAGS -Wall -Werror"
1029 ++ XCFLAGS="$XCFLAGS -Wall"
1030 + fi
1031
1032 diff --git a/9.2.0/gentoo/22_all_libbacktrace-Werror.patch b/9.2.0/gentoo/22_all_libbacktrace-Werror.patch
1033 new file mode 100644
1034 index 0000000..57dd284
1035 --- /dev/null
1036 +++ b/9.2.0/gentoo/22_all_libbacktrace-Werror.patch
1037 @@ -0,0 +1,17 @@
1038 +libbacktrace does not respect --disable-werror
1039 +
1040 +https://bugs.gentoo.org/667104
1041 +--- a/libbacktrace/configure
1042 ++++ b/libbacktrace/configure
1043 +@@ -11634,3 +11634,3 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
1044 + if test -n "${with_target_subdir}"; then
1045 +- WARN_FLAGS="$WARN_FLAGS -Werror"
1046 ++ WARN_FLAGS="$WARN_FLAGS"
1047 + fi
1048 +--- a/libbacktrace/configure.ac
1049 ++++ b/libbacktrace/configure.ac
1050 +@@ -138,3 +138,3 @@ ACX_PROG_CC_WARNING_OPTS([-W -Wall -Wwrite-strings -Wstrict-prototypes \
1051 + if test -n "${with_target_subdir}"; then
1052 +- WARN_FLAGS="$WARN_FLAGS -Werror"
1053 ++ WARN_FLAGS="$WARN_FLAGS"
1054 + fi
1055
1056 diff --git a/9.2.0/gentoo/23_all_libsanitizer-Werror.patch b/9.2.0/gentoo/23_all_libsanitizer-Werror.patch
1057 new file mode 100644
1058 index 0000000..0e484a4
1059 --- /dev/null
1060 +++ b/9.2.0/gentoo/23_all_libsanitizer-Werror.patch
1061 @@ -0,0 +1,17 @@
1062 +libsanitizer does not respect --disable-werror
1063 +
1064 +https://bugs.gentoo.org/667104
1065 +--- a/libsanitizer/libbacktrace/Makefile.am
1066 ++++ b/libsanitizer/libbacktrace/Makefile.am
1067 +@@ -37,3 +37,3 @@ AM_CPPFLAGS = -I $(top_srcdir)/../include -I $(top_srcdir)/../libgcc \
1068 + WARN_FLAGS = -W -Wall -Wwrite-strings -Wmissing-format-attribute \
1069 +- -Wcast-qual -Werror
1070 ++ -Wcast-qual
1071 + C_WARN_FLAGS = $(WARN_FLAGS) -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition
1072 +--- a/libsanitizer/libbacktrace/Makefile.in
1073 ++++ b/libsanitizer/libbacktrace/Makefile.in
1074 +@@ -297,3 +297,3 @@ AM_CPPFLAGS = -I $(top_srcdir)/../include -I $(top_srcdir)/../libgcc \
1075 + WARN_FLAGS = -W -Wall -Wwrite-strings -Wmissing-format-attribute \
1076 +- -Wcast-qual -Werror
1077 ++ -Wcast-qual
1078 +
1079
1080 diff --git a/9.2.0/gentoo/24_all_libstdcxx-no-vtv.patch b/9.2.0/gentoo/24_all_libstdcxx-no-vtv.patch
1081 new file mode 100644
1082 index 0000000..68508bd
1083 --- /dev/null
1084 +++ b/9.2.0/gentoo/24_all_libstdcxx-no-vtv.patch
1085 @@ -0,0 +1,61 @@
1086 +Final libstdc++.so should not contain rpath to make libvtv usable.
1087 +It's up to final binaries to link against proper libvtv.
1088 +
1089 +Bug: https://bugs.gentoo.org/582524
1090 +Bug: https://gcc.gnu.org/PR85884
1091 +--- a/libstdc++-v3/src/Makefile.am
1092 ++++ b/libstdc++-v3/src/Makefile.am
1093 +@@ -217,7 +217,6 @@ CXXLINK = \
1094 + $(LIBTOOL) --tag CXX \
1095 + $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
1096 + --mode=link $(CXX) \
1097 +- $(VTV_CXXLINKFLAGS) \
1098 + $(OPT_LDFLAGS) $(SECTION_LDFLAGS) $(AM_CXXFLAGS) $(LTLDFLAGS) -o $@
1099 +
1100 + # Symbol versioning for shared libraries.
1101 +--- a/libstdc++-v3/src/Makefile.in
1102 ++++ b/libstdc++-v3/src/Makefile.in
1103 +@@ -511,7 +511,6 @@ CXXLINK = \
1104 + $(LIBTOOL) --tag CXX \
1105 + $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
1106 + --mode=link $(CXX) \
1107 +- $(VTV_CXXLINKFLAGS) \
1108 + $(OPT_LDFLAGS) $(SECTION_LDFLAGS) $(AM_CXXFLAGS) $(LTLDFLAGS) -o $@
1109 +
1110 + @ENABLE_SYMVERS_TRUE@CLEANFILES = libstdc++-symbols.ver $(version_dep)
1111 +--- a/libstdc++-v3/src/c++11/Makefile.am
1112 ++++ b/libstdc++-v3/src/c++11/Makefile.am
1113 +@@ -204,5 +204,4 @@ CXXLINK = \
1114 + $(LIBTOOL) --tag CXX --tag disable-shared \
1115 + $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
1116 + --mode=link $(CXX) \
1117 +- $(VTV_CXXLINKFLAGS) \
1118 + $(OPT_LDFLAGS) $(SECTION_LDFLAGS) $(AM_CXXFLAGS) $(LTLDFLAGS) -o $@
1119 +--- a/libstdc++-v3/src/c++11/Makefile.in
1120 ++++ b/libstdc++-v3/src/c++11/Makefile.in
1121 +@@ -496,7 +496,6 @@ CXXLINK = \
1122 + $(LIBTOOL) --tag CXX --tag disable-shared \
1123 + $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
1124 + --mode=link $(CXX) \
1125 +- $(VTV_CXXLINKFLAGS) \
1126 + $(OPT_LDFLAGS) $(SECTION_LDFLAGS) $(AM_CXXFLAGS) $(LTLDFLAGS) -o $@
1127 +
1128 + all: all-am
1129 +--- a/libstdc++-v3/src/c++98/Makefile.am
1130 ++++ b/libstdc++-v3/src/c++98/Makefile.am
1131 +@@ -273,5 +273,4 @@ CXXLINK = \
1132 + $(LIBTOOL) --tag CXX --tag disable-shared \
1133 + $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
1134 + --mode=link $(CXX) \
1135 +- $(VTV_CXXLINKFLAGS) \
1136 + $(OPT_LDFLAGS) $(SECTION_LDFLAGS) $(AM_CXXFLAGS) $(LTLDFLAGS) -o $@
1137 +--- a/libstdc++-v3/src/c++98/Makefile.in
1138 ++++ b/libstdc++-v3/src/c++98/Makefile.in
1139 +@@ -500,7 +500,6 @@ CXXLINK = \
1140 + $(LIBTOOL) --tag CXX --tag disable-shared \
1141 + $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
1142 + --mode=link $(CXX) \
1143 +- $(VTV_CXXLINKFLAGS) \
1144 + $(OPT_LDFLAGS) $(SECTION_LDFLAGS) $(AM_CXXFLAGS) $(LTLDFLAGS) -o $@
1145 +
1146 + all: all-am
1147
1148 diff --git a/9.2.0/gentoo/25_all_ia64-bootstrap.patch b/9.2.0/gentoo/25_all_ia64-bootstrap.patch
1149 new file mode 100644
1150 index 0000000..0a0a25b
1151 --- /dev/null
1152 +++ b/9.2.0/gentoo/25_all_ia64-bootstrap.patch
1153 @@ -0,0 +1,41 @@
1154 +https://gcc.gnu.org/PR87338
1155 +
1156 +From 1cc1dc32fcf6b47db4e6d28f55de343713f824a4 Mon Sep 17 00:00:00 2001
1157 +From: James Clarke <jrtc27@××××××.com>
1158 +Date: Thu, 25 Apr 2019 15:58:55 +0200
1159 +Subject: [PATCH] PR bootstrap/87338: Fix ia64 bootstrap comparison regression
1160 + in r257511
1161 +To: gcc-patches@×××××××.org
1162 +
1163 +By using ASM_OUTPUT_LABEL, r257511 forced the assembler to start a new
1164 +bundle when emitting an inline entry label on. Instead, use
1165 +ASM_OUTPUT_DEBUG_LABEL like for the block begin and end labels so tags are
1166 +emitted rather than labels.
1167 +
1168 +gcc/
1169 + PR bootstrap/87338
1170 + * dwarf2out.c (dwarf2out_inline_entry): Use ASM_OUTPUT_DEBUG_LABEL
1171 + instead of ASM_GENERATE_INTERNAL_LABEL and ASM_OUTPUT_LABEL.
1172 +---
1173 + gcc/dwarf2out.c | 7 ++-----
1174 + 1 file changed, 2 insertions(+), 5 deletions(-)
1175 +
1176 +--- a/gcc/dwarf2out.c
1177 ++++ b/gcc/dwarf2out.c
1178 +@@ -27670,11 +27670,8 @@ dwarf2out_inline_entry (tree block)
1179 + if (cur_line_info_table)
1180 + ied->view = cur_line_info_table->view;
1181 +
1182 +- char label[MAX_ARTIFICIAL_LABEL_BYTES];
1183 +-
1184 +- ASM_GENERATE_INTERNAL_LABEL (label, BLOCK_INLINE_ENTRY_LABEL,
1185 +- BLOCK_NUMBER (block));
1186 +- ASM_OUTPUT_LABEL (asm_out_file, label);
1187 ++ ASM_OUTPUT_DEBUG_LABEL (asm_out_file, BLOCK_INLINE_ENTRY_LABEL,
1188 ++ BLOCK_NUMBER (block));
1189 + }
1190 +
1191 + /* Called from finalize_size_functions for size functions so that their body
1192 +--
1193 +1.8.5.3
1194 +
1195
1196 diff --git a/9.2.0/gentoo/26_all_disable-riscv32-ABIs.patch b/9.2.0/gentoo/26_all_disable-riscv32-ABIs.patch
1197 new file mode 100644
1198 index 0000000..ad0128a
1199 --- /dev/null
1200 +++ b/9.2.0/gentoo/26_all_disable-riscv32-ABIs.patch
1201 @@ -0,0 +1,53 @@
1202 +Autogenerated patch disabling the 32bit RISCV support
1203 +See https://gcc.gnu.org/PR90419
1204 +
1205 +diff -ruN gcc-9.1.0.orig/gcc/config/riscv/t-linux-multilib gcc-9.1.0/gcc/config/riscv/t-linux-multilib
1206 +--- gcc-9.1.0.orig/gcc/config/riscv/t-linux-multilib 2017-02-06 22:38:37.000000000 +0100
1207 ++++ gcc-9.1.0/gcc/config/riscv/t-linux-multilib 2019-05-18 23:04:54.849400774 +0200
1208 +@@ -1,40 +1,18 @@
1209 + # This file was generated by multilib-generator with the command:
1210 +-# ./multilib-generator rv32imac-ilp32-rv32ima,rv32imaf,rv32imafd,rv32imafc,rv32imafdc- rv32imafdc-ilp32d-rv32imafd- rv64imac-lp64-rv64ima,rv64imaf,rv64imafd,rv64imafc,rv64imafdc- rv64imafdc-lp64d-rv64imafd-
1211 +-MULTILIB_OPTIONS = march=rv32imac/march=rv32ima/march=rv32imaf/march=rv32imafd/march=rv32imafc/march=rv32imafdc/march=rv32g/march=rv32gc/march=rv64imac/march=rv64ima/march=rv64imaf/march=rv64imafd/march=rv64imafc/march=rv64imafdc/march=rv64g/march=rv64gc mabi=ilp32/mabi=ilp32d/mabi=lp64/mabi=lp64d
1212 +-MULTILIB_DIRNAMES = rv32imac \
1213 +-rv32ima \
1214 +-rv32imaf \
1215 +-rv32imafd \
1216 +-rv32imafc \
1217 +-rv32imafdc \
1218 +-rv32g \
1219 +-rv32gc \
1220 +-rv64imac \
1221 ++# ./multilib-generator rv64imac-lp64-rv64ima,rv64imaf,rv64imafd,rv64imafc,rv64imafdc- rv64imafdc-lp64d-rv64imafd-
1222 ++MULTILIB_OPTIONS = march=rv64imac/march=rv64ima/march=rv64imaf/march=rv64imafd/march=rv64imafc/march=rv64imafdc/march=rv64g/march=rv64gc mabi=lp64/mabi=lp64d
1223 ++MULTILIB_DIRNAMES = rv64imac \
1224 + rv64ima \
1225 + rv64imaf \
1226 + rv64imafd \
1227 + rv64imafc \
1228 + rv64imafdc \
1229 + rv64g \
1230 +-rv64gc ilp32 \
1231 +-ilp32d \
1232 +-lp64 \
1233 ++rv64gc lp64 \
1234 + lp64d
1235 +-MULTILIB_REQUIRED = march=rv32imac/mabi=ilp32 \
1236 +-march=rv32imafdc/mabi=ilp32d \
1237 +-march=rv64imac/mabi=lp64 \
1238 ++MULTILIB_REQUIRED = march=rv64imac/mabi=lp64 \
1239 + march=rv64imafdc/mabi=lp64d
1240 +-MULTILIB_REUSE = march.rv32imac/mabi.ilp32=march.rv32ima/mabi.ilp32 \
1241 +-march.rv32imac/mabi.ilp32=march.rv32imaf/mabi.ilp32 \
1242 +-march.rv32imac/mabi.ilp32=march.rv32imafd/mabi.ilp32 \
1243 +-march.rv32imac/mabi.ilp32=march.rv32imafc/mabi.ilp32 \
1244 +-march.rv32imac/mabi.ilp32=march.rv32imafdc/mabi.ilp32 \
1245 +-march.rv32imac/mabi.ilp32=march.rv32g/mabi.ilp32 \
1246 +-march.rv32imac/mabi.ilp32=march.rv32gc/mabi.ilp32 \
1247 +-march.rv32imafdc/mabi.ilp32d=march.rv32imafd/mabi.ilp32d \
1248 +-march.rv32imafdc/mabi.ilp32d=march.rv32gc/mabi.ilp32d \
1249 +-march.rv32imafdc/mabi.ilp32d=march.rv32g/mabi.ilp32d \
1250 +-march.rv64imac/mabi.lp64=march.rv64ima/mabi.lp64 \
1251 ++MULTILIB_REUSE = march.rv64imac/mabi.lp64=march.rv64ima/mabi.lp64 \
1252 + march.rv64imac/mabi.lp64=march.rv64imaf/mabi.lp64 \
1253 + march.rv64imac/mabi.lp64=march.rv64imafd/mabi.lp64 \
1254 + march.rv64imac/mabi.lp64=march.rv64imafc/mabi.lp64 \
1255
1256 diff --git a/9.2.0/gentoo/27_all_hppa64-patchable-entry-90751.patch b/9.2.0/gentoo/27_all_hppa64-patchable-entry-90751.patch
1257 new file mode 100644
1258 index 0000000..d93fe0a
1259 --- /dev/null
1260 +++ b/9.2.0/gentoo/27_all_hppa64-patchable-entry-90751.patch
1261 @@ -0,0 +1,120 @@
1262 +https://gcc.gnu.org/PR90751
1263 +
1264 +From 5df07cedc211b67011688e911db34ee18997eedf Mon Sep 17 00:00:00 2001
1265 +From: danglin <danglin@138bc75d-0d04-0410-961f-82ee72b054a4>
1266 +Date: Fri, 7 Jun 2019 23:20:44 +0000
1267 +Subject: [PATCH] PR target/90751 * config/pa/pa-linux.h
1268 + (ASM_DECLARE_FUNCTION_NAME): Update comment. Call pa_output_function_label.
1269 + (TARGET_ASM_FUNCTION_PROLOGUE): define. *
1270 + config/pa/pa-protos.h (pa_output_function_label): Declare. *
1271 + config/pa/pa.c (pa_output_function_prologue): Add ATTRIBUTE_UNUSED to
1272 + declaration. (pa_linux_output_function_prologue): Declare.
1273 + (TARGET_ASM_FUNCTION_PROLOGUE): Delete define.
1274 + (pa_output_function_label): New. (pa_output_function_prologue): Revise
1275 + to use pa_output_function_label. (pa_linux_output_function_prologue):
1276 + New. * config/pa/pa.h (TARGET_ASM_FUNCTION_PROLOGUE): Define.
1277 +
1278 +git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-9-branch@272061 138bc75d-0d04-0410-961f-82ee72b054a4
1279 +--- a/gcc/config/pa/pa-linux.h
1280 ++++ b/gcc/config/pa/pa-linux.h
1281 +@@ -109,9 +109,14 @@ along with GCC; see the file COPYING3. If not see
1282 + { \
1283 + ASM_OUTPUT_TYPE_DIRECTIVE (FILE, NAME, "function"); \
1284 + ASM_DECLARE_RESULT (FILE, DECL_RESULT (DECL)); \
1285 ++ pa_output_function_label (FILE); \
1286 + } \
1287 + while (0)
1288 +
1289 ++/* Output function prologue for linux. */
1290 ++#undef TARGET_ASM_FUNCTION_PROLOGUE
1291 ++#define TARGET_ASM_FUNCTION_PROLOGUE pa_linux_output_function_prologue
1292 ++
1293 + /* As well as globalizing the label, we need to encode the label
1294 + to ensure a plabel is generated in an indirect call. */
1295 +
1296 +--- a/gcc/config/pa/pa-protos.h
1297 ++++ b/gcc/config/pa/pa-protos.h
1298 +@@ -108,6 +108,7 @@ extern void pa_asm_output_aligned_local (FILE *, const char *,
1299 + extern void pa_hpux_asm_output_external (FILE *, tree, const char *);
1300 + extern HOST_WIDE_INT pa_initial_elimination_offset (int, int);
1301 + extern HOST_WIDE_INT pa_function_arg_size (machine_mode, const_tree);
1302 ++extern void pa_output_function_label (FILE *);
1303 +
1304 + extern const int pa_magic_milli[];
1305 +
1306 +--- a/gcc/config/pa/pa.c
1307 ++++ b/gcc/config/pa/pa.c
1308 +@@ -118,7 +118,8 @@ static void set_reg_plus_d (int, int, HOST_WIDE_INT, int);
1309 + static rtx pa_function_value (const_tree, const_tree, bool);
1310 + static rtx pa_libcall_value (machine_mode, const_rtx);
1311 + static bool pa_function_value_regno_p (const unsigned int);
1312 +-static void pa_output_function_prologue (FILE *);
1313 ++static void pa_output_function_prologue (FILE *) ATTRIBUTE_UNUSED;
1314 ++static void pa_linux_output_function_prologue (FILE *) ATTRIBUTE_UNUSED;
1315 + static void update_total_code_bytes (unsigned int);
1316 + static void pa_output_function_epilogue (FILE *);
1317 + static int pa_adjust_cost (rtx_insn *, int, rtx_insn *, int, unsigned int);
1318 +@@ -262,8 +263,6 @@ static size_t n_deferred_plabels = 0;
1319 + #undef TARGET_ASM_INTEGER
1320 + #define TARGET_ASM_INTEGER pa_assemble_integer
1321 +
1322 +-#undef TARGET_ASM_FUNCTION_PROLOGUE
1323 +-#define TARGET_ASM_FUNCTION_PROLOGUE pa_output_function_prologue
1324 + #undef TARGET_ASM_FUNCTION_EPILOGUE
1325 + #define TARGET_ASM_FUNCTION_EPILOGUE pa_output_function_epilogue
1326 +
1327 +@@ -3842,16 +3841,10 @@ pa_compute_frame_size (poly_int64 size, int *fregs_live)
1328 + & ~(PREFERRED_STACK_BOUNDARY / BITS_PER_UNIT - 1));
1329 + }
1330 +
1331 +-/* On HP-PA, move-double insns between fpu and cpu need an 8-byte block
1332 +- of memory. If any fpu reg is used in the function, we allocate
1333 +- such a block here, at the bottom of the frame, just in case it's needed.
1334 ++/* Output function label, and associated .PROC and .CALLINFO statements. */
1335 +
1336 +- If this function is a leaf procedure, then we may choose not
1337 +- to do a "save" insn. The decision about whether or not
1338 +- to do this is made in regclass.c. */
1339 +-
1340 +-static void
1341 +-pa_output_function_prologue (FILE *file)
1342 ++void
1343 ++pa_output_function_label (FILE *file)
1344 + {
1345 + /* The function's label and associated .PROC must never be
1346 + separated and must be output *after* any profiling declarations
1347 +@@ -3897,7 +3890,22 @@ pa_output_function_prologue (FILE *file)
1348 + fprintf (file, ",ENTRY_FR=%d", fr_saved + 11);
1349 +
1350 + fputs ("\n\t.ENTRY\n", file);
1351 ++}
1352 ++
1353 ++/* Output function prologue. */
1354 +
1355 ++static void
1356 ++pa_output_function_prologue (FILE *file)
1357 ++{
1358 ++ pa_output_function_label (file);
1359 ++ remove_useless_addtr_insns (0);
1360 ++}
1361 ++
1362 ++/* The label is output by ASM_DECLARE_FUNCTION_NAME on linux. */
1363 ++
1364 ++static void
1365 ++pa_linux_output_function_prologue (FILE *file ATTRIBUTE_UNUSED)
1366 ++{
1367 + remove_useless_addtr_insns (0);
1368 + }
1369 +
1370 +--- a/gcc/config/pa/pa.h
1371 ++++ b/gcc/config/pa/pa.h
1372 +@@ -1305,3 +1305,6 @@ do { \
1373 +
1374 + /* Target CPU versions for D. */
1375 + #define TARGET_D_CPU_VERSIONS pa_d_target_versions
1376 ++
1377 ++/* Output default function prologue for hpux. */
1378 ++#define TARGET_ASM_FUNCTION_PROLOGUE pa_output_function_prologue
1379 +--
1380 +2.21.0
1381 +
1382
1383 diff --git a/9.2.0/gentoo/README.history b/9.2.0/gentoo/README.history
1384 new file mode 100644
1385 index 0000000..1ce21dd
1386 --- /dev/null
1387 +++ b/9.2.0/gentoo/README.history
1388 @@ -0,0 +1,28 @@
1389 +1 12 Aug 2019
1390 + + 01_all_default-fortify-source.patch
1391 + + 02_all_default-warn-format-security.patch
1392 + + 03_all_default-warn-trampolines.patch
1393 + + 04_all_default-ssp-fix.patch
1394 + + 05_all_alpha-mieee-default.patch
1395 + + 06_all_ia64_note.GNU-stack.patch
1396 + + 07_all_i386_libgcc_note.GNU-stack.patch
1397 + + 08_all_libiberty-asprintf.patch
1398 + + 09_all_libiberty-pic.patch
1399 + + 10_all_nopie-all-flags.patch
1400 + + 11_all_extra-options.patch
1401 + + 12_all_pr55930-dependency-tracking.patch
1402 + + 13_all_sh-drop-sysroot-suffix.patch
1403 + + 14_all_ia64-TEXTREL.patch
1404 + + 15_all_disable-systemtap-switch.patch
1405 + + 16_all_m68k-textrel-on-libgcc.patch
1406 + + 17_all_respect-build-cxxflags.patch
1407 + + 18_all_libgfortran-Werror.patch
1408 + + 19_all_libgomp-Werror.patch
1409 + + 20_all_libitm-Werror.patch
1410 + + 21_all_libatomic-Werror.patch
1411 + + 22_all_libbacktrace-Werror.patch
1412 + + 23_all_libsanitizer-Werror.patch
1413 + + 24_all_libstdcxx-no-vtv.patch
1414 + + 25_all_ia64-bootstrap.patch
1415 + + 26_all_disable-riscv32-ABIs.patch
1416 + + 27_all_hppa64-patchable-entry-90751.patch