1 |
commit: e2c9eba5f076cfd8e064fdad01b0fa7da030c008 |
2 |
Author: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sat Oct 27 10:06:16 2018 +0000 |
4 |
Commit: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat Oct 27 10:06:16 2018 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=e2c9eba5 |
7 |
|
8 |
6.5.0: cut 1.0 patchset, a copy of 6.4.0-1.8 patchset |
9 |
|
10 |
The only different from 6.4.0-1.8 patchset is dropped |
11 |
patches that are already upstream. |
12 |
|
13 |
22 patches: |
14 |
+ 01_all_default-fortify-source.patch |
15 |
+ 02_all_default-warn-format-security.patch |
16 |
+ 03_all_default-warn-trampolines.patch |
17 |
+ 04_all_default-ssp-fix.patch |
18 |
+ 05_all_alpha-mieee-default.patch |
19 |
+ 06_all_arm_armv4t-default.patch |
20 |
+ 07_all_ia64_note.GNU-stack.patch |
21 |
+ 08_all_superh_default-multilib.patch |
22 |
+ 09_all_libiberty-asprintf.patch |
23 |
+ 10_all_libiberty-pic.patch |
24 |
+ 11_all_nopie-all-flags.patch |
25 |
+ 12_all_extra-options.patch |
26 |
+ 13_all_pr55930-dependency-tracking.patch |
27 |
+ 14_all_asan-signal_h.patch |
28 |
+ 15_all_respect-build-cxxflags.patch |
29 |
+ 16_all_libgfortran-Werror.patch |
30 |
+ 17_all_libgomp-Werror.patch |
31 |
+ 18_all_libitm-Werror.patch |
32 |
+ 19_all_libatomic-Werror.patch |
33 |
+ 20_all_libbacktrace-Werror.patch |
34 |
+ 21_all_libsanitizer-libbacktrace-Werror.patch |
35 |
+ 22_all_libstdcxx-no-vtv.patch |
36 |
|
37 |
Signed-off-by: Sergei Trofimovich <slyfox <AT> gentoo.org> |
38 |
|
39 |
6.5.0/gentoo/01_all_default-fortify-source.patch | 15 ++++ |
40 |
.../02_all_default-warn-format-security.patch | 22 ++++++ |
41 |
6.5.0/gentoo/03_all_default-warn-trampolines.patch | 13 +++ |
42 |
6.5.0/gentoo/04_all_default-ssp-fix.patch | 38 +++++++++ |
43 |
6.5.0/gentoo/05_all_alpha-mieee-default.patch | 38 +++++++++ |
44 |
6.5.0/gentoo/06_all_arm_armv4t-default.patch | 16 ++++ |
45 |
6.5.0/gentoo/07_all_ia64_note.GNU-stack.patch | 92 ++++++++++++++++++++++ |
46 |
6.5.0/gentoo/08_all_superh_default-multilib.patch | 24 ++++++ |
47 |
6.5.0/gentoo/09_all_libiberty-asprintf.patch | 18 +++++ |
48 |
6.5.0/gentoo/10_all_libiberty-pic.patch | 10 +++ |
49 |
6.5.0/gentoo/11_all_nopie-all-flags.patch | 18 +++++ |
50 |
6.5.0/gentoo/12_all_extra-options.patch | 87 ++++++++++++++++++++ |
51 |
.../13_all_pr55930-dependency-tracking.patch | 18 +++++ |
52 |
6.5.0/gentoo/14_all_asan-signal_h.patch | 15 ++++ |
53 |
6.5.0/gentoo/15_all_respect-build-cxxflags.patch | 39 +++++++++ |
54 |
6.5.0/gentoo/16_all_libgfortran-Werror.patch | 20 +++++ |
55 |
6.5.0/gentoo/17_all_libgomp-Werror.patch | 20 +++++ |
56 |
6.5.0/gentoo/18_all_libitm-Werror.patch | 19 +++++ |
57 |
6.5.0/gentoo/19_all_libatomic-Werror.patch | 19 +++++ |
58 |
6.5.0/gentoo/20_all_libbacktrace-Werror.patch | 17 ++++ |
59 |
.../21_all_libsanitizer-libbacktrace-Werror.patch | 17 ++++ |
60 |
6.5.0/gentoo/22_all_libstdcxx-no-vtv.patch | 61 ++++++++++++++ |
61 |
6.5.0/gentoo/README.history | 23 ++++++ |
62 |
23 files changed, 659 insertions(+) |
63 |
|
64 |
diff --git a/6.5.0/gentoo/01_all_default-fortify-source.patch b/6.5.0/gentoo/01_all_default-fortify-source.patch |
65 |
new file mode 100644 |
66 |
index 0000000..36c5762 |
67 |
--- /dev/null |
68 |
+++ b/6.5.0/gentoo/01_all_default-fortify-source.patch |
69 |
@@ -0,0 +1,15 @@ |
70 |
+Enable -D_FORTIFY_SOURCE=2 by default. |
71 |
+ |
72 |
+ |
73 |
+--- a/gcc/c-family/c-cppbuiltin.c |
74 |
++++ b/gcc/c-family/c-cppbuiltin.c |
75 |
+@@ -951,6 +951,9 @@ c_cpp_builtins (cpp_reader *pfile) |
76 |
+ builtin_define_with_value ("__REGISTER_PREFIX__", REGISTER_PREFIX, 0); |
77 |
+ builtin_define_with_value ("__USER_LABEL_PREFIX__", user_label_prefix, 0); |
78 |
+ |
79 |
++ /* Fortify Source enabled by default w/optimization. */ |
80 |
++ cpp_define (pfile, "_FORTIFY_SOURCE=((defined __OPTIMIZE__ && __OPTIMIZE__ > 0) ? 2 : 0)"); |
81 |
++ |
82 |
+ /* Misc. */ |
83 |
+ if (flag_gnu89_inline) |
84 |
+ cpp_define (pfile, "__GNUC_GNU_INLINE__"); |
85 |
|
86 |
diff --git a/6.5.0/gentoo/02_all_default-warn-format-security.patch b/6.5.0/gentoo/02_all_default-warn-format-security.patch |
87 |
new file mode 100644 |
88 |
index 0000000..8994654 |
89 |
--- /dev/null |
90 |
+++ b/6.5.0/gentoo/02_all_default-warn-format-security.patch |
91 |
@@ -0,0 +1,22 @@ |
92 |
+Enable -Wformat and -Wformat-security by default. |
93 |
+ |
94 |
+--- a/gcc/c-family/c.opt 2016-03-23 18:51:56.000000000 +0100 |
95 |
++++ b/gcc/c-family/c.opt 2016-04-28 23:45:54.063351272 +0200 |
96 |
+@@ -459,7 +459,7 @@ C ObjC C++ ObjC++ Var(warn_format_nonlit |
97 |
+ Warn about format strings that are not literals. |
98 |
+ |
99 |
+ Wformat-security |
100 |
+-C ObjC C++ ObjC++ Var(warn_format_security) Warning LangEnabledBy(C ObjC C++ ObjC++,Wformat=, warn_format >= 2, 0) |
101 |
++C ObjC C++ ObjC++ Var(warn_format_security) Init(1) Warning LangEnabledBy(C ObjC C++ ObjC++,Wformat=, warn_format >= 2, 0) |
102 |
+ Warn about possible security problems with format functions. |
103 |
+ |
104 |
+ Wformat-signedness |
105 |
+@@ -475,7 +475,7 @@ C ObjC C++ ObjC++ Var(warn_format_zero_l |
106 |
+ Warn about zero-length formats. |
107 |
+ |
108 |
+ Wformat= |
109 |
+-C ObjC C++ ObjC++ Joined RejectNegative UInteger Var(warn_format) Warning LangEnabledBy(C ObjC C++ ObjC++,Wall, 1, 0) |
110 |
++C ObjC C++ ObjC++ Joined RejectNegative UInteger Var(warn_format) Init(1) Warning LangEnabledBy(C ObjC C++ ObjC++,Wall, 1, 0) |
111 |
+ Warn about printf/scanf/strftime/strfmon format string anomalies. |
112 |
+ |
113 |
+ Wignored-qualifiers |
114 |
|
115 |
diff --git a/6.5.0/gentoo/03_all_default-warn-trampolines.patch b/6.5.0/gentoo/03_all_default-warn-trampolines.patch |
116 |
new file mode 100644 |
117 |
index 0000000..7a644cb |
118 |
--- /dev/null |
119 |
+++ b/6.5.0/gentoo/03_all_default-warn-trampolines.patch |
120 |
@@ -0,0 +1,13 @@ |
121 |
+Enable -Wtrampolines by default. |
122 |
+ |
123 |
+--- a/gcc/common.opt |
124 |
++++ b/gcc/common.opt |
125 |
+@@ -712,7 +712,7 @@ Common Var(warn_system_headers) Warning |
126 |
+ Do not suppress warnings from system headers. |
127 |
+ |
128 |
+ Wtrampolines |
129 |
+-Common Var(warn_trampolines) Warning |
130 |
++Common Var(warn_trampolines) Init(1) Warning |
131 |
+ Warn whenever a trampoline is generated. |
132 |
+ |
133 |
+ Wtype-limits |
134 |
|
135 |
diff --git a/6.5.0/gentoo/04_all_default-ssp-fix.patch b/6.5.0/gentoo/04_all_default-ssp-fix.patch |
136 |
new file mode 100644 |
137 |
index 0000000..cbbd522 |
138 |
--- /dev/null |
139 |
+++ b/6.5.0/gentoo/04_all_default-ssp-fix.patch |
140 |
@@ -0,0 +1,38 @@ |
141 |
+Disable ssp on -nostdlib, -nodefaultlibs and -ffreestanding |
142 |
+Change the buffer size. |
143 |
+ |
144 |
+--- a/gcc/gcc.c 2017-07-04 09:15:57.740793000 +0200 |
145 |
++++ b/gcc/gcc.c 2018-03-02 13:58:44.387741114 +0100 |
146 |
+@@ -857,6 +857,12 @@ proper position among the other output f |
147 |
+ #define LINK_GCC_C_SEQUENCE_SPEC "%G %L %G" |
148 |
+ #endif |
149 |
+ |
150 |
++#ifdef ENABLE_DEFAULT_SSP |
151 |
++#define NO_SSP_SPEC "%{nostdlib|nodefaultlibs|ffreestanding:-fno-stack-protector} " |
152 |
++#else |
153 |
++#define NO_SSP_SPEC "" |
154 |
++#endif |
155 |
++ |
156 |
+ #ifndef LINK_SSP_SPEC |
157 |
+ #ifdef TARGET_LIBC_PROVIDES_SSP |
158 |
+ #define LINK_SSP_SPEC "%{fstack-protector|fstack-protector-all" \ |
159 |
+@@ -1131,7 +1148,7 @@ static const char *cc1_options = |
160 |
+ %{-version:--version}\ |
161 |
+ %{-help=*:--help=%*}\ |
162 |
+ %{!fsyntax-only:%{S:%W{o*}%{!o*:-o %b.s}}}\ |
163 |
+- %{fsyntax-only:-o %j} %{-param*}\ |
164 |
++ %{fsyntax-only:-o %j} %{-param*} " NO_SSP_SPEC "\ |
165 |
+ %{coverage:-fprofile-arcs -ftest-coverage}"; |
166 |
+ |
167 |
+ static const char *asm_options = |
168 |
+--- a/gcc/params.def 2016-03-30 09:47:40.000000000 +0200 |
169 |
++++ b/gcc/params.def 2016-09-19 12:56:58.443179039 +0200 |
170 |
+@@ -673,7 +673,7 @@ DEFPARAM (PARAM_INTEGER_SHARE_LIMIT, |
171 |
+ DEFPARAM (PARAM_SSP_BUFFER_SIZE, |
172 |
+ "ssp-buffer-size", |
173 |
+ "The lower bound for a buffer to be considered for stack smashing protection.", |
174 |
+- 8, 1, 0) |
175 |
++ 4, 1, 0) |
176 |
+ |
177 |
+ DEFPARAM (PARAM_MIN_SIZE_FOR_STACK_SHARING, |
178 |
+ "min-size-for-stack-sharing", |
179 |
|
180 |
diff --git a/6.5.0/gentoo/05_all_alpha-mieee-default.patch b/6.5.0/gentoo/05_all_alpha-mieee-default.patch |
181 |
new file mode 100644 |
182 |
index 0000000..86c5bfe |
183 |
--- /dev/null |
184 |
+++ b/6.5.0/gentoo/05_all_alpha-mieee-default.patch |
185 |
@@ -0,0 +1,38 @@ |
186 |
+Set the default behavior on alpha to use -mieee since the large majority of |
187 |
+time we want this (bad/weird things can happen with packages built without |
188 |
+it). |
189 |
+ |
190 |
+To satisfy those people who may not want -mieee forced on them all the time, |
191 |
+we also provide -mno-ieee. |
192 |
+ |
193 |
+Patch by Mike Frysinger <vapier@g.o> |
194 |
+ |
195 |
+Note: upstream doesn't want to take this due to long standing behavior, and |
196 |
+because it'd make behavior across OS's inconsistent: |
197 |
+ https://gcc.gnu.org/ml/gcc-patches/2003-07/msg02144.html |
198 |
+ |
199 |
+This makes sense for upstream, but Gentoo is more concerned about packages |
200 |
+behaving the same across arches under Linux. |
201 |
+ |
202 |
+--- a/gcc/config/alpha/alpha.h |
203 |
++++ b/gcc/config/alpha/alpha.h |
204 |
+@@ -96,6 +96,8 @@ along with GCC; see the file COPYING3. If not see |
205 |
+ while (0) |
206 |
+ #endif |
207 |
+ |
208 |
++#define CPP_SPEC "%{!no-ieee:-mieee}" |
209 |
++ |
210 |
+ /* Run-time compilation parameters selecting different hardware subsets. */ |
211 |
+ |
212 |
+ /* Which processor to schedule for. The cpu attribute defines a list that |
213 |
+--- a/gcc/config/alpha/alpha.opt |
214 |
++++ b/gcc/config/alpha/alpha.opt |
215 |
+@@ -39,7 +39,7 @@ Target RejectNegative Mask(IEEE_CONFORMANT) |
216 |
+ Request IEEE-conformant math library routines (OSF/1). |
217 |
+ |
218 |
+ mieee |
219 |
+-Target Report RejectNegative Mask(IEEE) |
220 |
++Target Report Mask(IEEE) |
221 |
+ Emit IEEE-conformant code, without inexact exceptions. |
222 |
+ |
223 |
+ mieee-with-inexact |
224 |
|
225 |
diff --git a/6.5.0/gentoo/06_all_arm_armv4t-default.patch b/6.5.0/gentoo/06_all_arm_armv4t-default.patch |
226 |
new file mode 100644 |
227 |
index 0000000..4616cf9 |
228 |
--- /dev/null |
229 |
+++ b/6.5.0/gentoo/06_all_arm_armv4t-default.patch |
230 |
@@ -0,0 +1,16 @@ |
231 |
+gcc defaults to armv5t for all targets even armv4t |
232 |
+ |
233 |
+http://sourceware.org/ml/crossgcc/2008-05/msg00009.html |
234 |
+ |
235 |
+ |
236 |
+--- a/gcc/config/arm/linux-eabi.h |
237 |
++++ b/gcc/config/arm/linux-eabi.h |
238 |
+@@ -45,7 +45,7 @@ |
239 |
+ The ARM10TDMI core is the default for armv5t, so set |
240 |
+ SUBTARGET_CPU_DEFAULT to achieve this. */ |
241 |
+ #undef SUBTARGET_CPU_DEFAULT |
242 |
+-#define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm10tdmi |
243 |
++#define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm9tdmi |
244 |
+ |
245 |
+ /* TARGET_BIG_ENDIAN_DEFAULT is set in |
246 |
+ config.gcc for big endian configurations. */ |
247 |
|
248 |
diff --git a/6.5.0/gentoo/07_all_ia64_note.GNU-stack.patch b/6.5.0/gentoo/07_all_ia64_note.GNU-stack.patch |
249 |
new file mode 100644 |
250 |
index 0000000..66a787e |
251 |
--- /dev/null |
252 |
+++ b/6.5.0/gentoo/07_all_ia64_note.GNU-stack.patch |
253 |
@@ -0,0 +1,92 @@ |
254 |
+http://gcc.gnu.org/PR21098 |
255 |
+ |
256 |
+ |
257 |
+2004-09-20 Jakub Jelinek <jakub@××××××.com> |
258 |
+ |
259 |
+ * config/rs6000/ppc-asm.h: Add .note.GNU-stack section also |
260 |
+ on ppc64-linux. |
261 |
+ |
262 |
+ * config/ia64/lib1funcs.asm: Add .note.GNU-stack section on |
263 |
+ ia64-linux. |
264 |
+ * config/ia64/crtbegin.asm: Likewise. |
265 |
+ * config/ia64/crtend.asm: Likewise. |
266 |
+ * config/ia64/crti.asm: Likewise. |
267 |
+ * config/ia64/crtn.asm: Likewise. |
268 |
+ |
269 |
+2004-05-14 Jakub Jelinek <jakub@××××××.com> |
270 |
+ |
271 |
+ * config/ia64/linux.h (TARGET_ASM_FILE_END): Define. |
272 |
+ |
273 |
+ |
274 |
+--- a/gcc/config/ia64/linux.h |
275 |
++++ b/gcc/config/ia64/linux.h |
276 |
+@@ -24,6 +24,8 @@ a copy of the GCC Runtime Library Exception along with this program; |
277 |
+ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see |
278 |
+ <http://www.gnu.org/licenses/>. */ |
279 |
+ |
280 |
++#define TARGET_ASM_FILE_END file_end_indicate_exec_stack |
281 |
++ |
282 |
+ /* This is for -profile to use -lc_p instead of -lc. */ |
283 |
+ #undef CC1_SPEC |
284 |
+ #define CC1_SPEC "%{profile:-p} %{G*}" |
285 |
+--- a/gcc/config/rs6000/ppc-asm.h |
286 |
++++ b/gcc/config/rs6000/ppc-asm.h |
287 |
+@@ -352,7 +352,7 @@ GLUE(.L,name): \ |
288 |
+ #endif |
289 |
+ #endif |
290 |
+ |
291 |
+-#if defined __linux__ && !defined __powerpc64__ |
292 |
++#if defined __linux__ |
293 |
+ .section .note.GNU-stack |
294 |
+ .previous |
295 |
+ #endif |
296 |
+--- a/libgcc/config/ia64/crtbegin.S |
297 |
++++ b/libgcc/config/ia64/crtbegin.S |
298 |
+@@ -252,3 +252,7 @@ __do_jv_register_classes: |
299 |
+ .weak __cxa_finalize |
300 |
+ #endif |
301 |
+ .weak _Jv_RegisterClasses |
302 |
++ |
303 |
++#ifdef __linux__ |
304 |
++.section .note.GNU-stack; .previous |
305 |
++#endif |
306 |
+--- a/libgcc/config/ia64/crtend.S |
307 |
++++ b/libgcc/config/ia64/crtend.S |
308 |
+@@ -119,3 +119,6 @@ __do_global_ctors_aux: |
309 |
+ |
310 |
+ br.ret.sptk.many rp |
311 |
+ .endp __do_global_ctors_aux |
312 |
++#ifdef __linux__ |
313 |
++.section .note.GNU-stack; .previous |
314 |
++#endif |
315 |
+--- a/libgcc/config/ia64/crti.S |
316 |
++++ b/libgcc/config/ia64/crti.S |
317 |
+@@ -49,5 +49,8 @@ _fini: |
318 |
+ .save rp, r33 |
319 |
+ mov r33 = b0 |
320 |
+ .body |
321 |
++#ifdef __linux__ |
322 |
++.section .note.GNU-stack; .previous |
323 |
++#endif |
324 |
+ |
325 |
+ # end of crti.S |
326 |
+--- a/libgcc/config/ia64/crtn.S |
327 |
++++ b/libgcc/config/ia64/crtn.S |
328 |
+@@ -39,5 +39,8 @@ |
329 |
+ .restore sp |
330 |
+ mov r12 = r35 |
331 |
+ br.ret.sptk.many b0 |
332 |
++#ifdef __linux__ |
333 |
++.section .note.GNU-stack; .previous |
334 |
++#endif |
335 |
+ |
336 |
+ # end of crtn.S |
337 |
+--- a/libgcc/config/ia64/lib1funcs.S |
338 |
++++ b/libgcc/config/ia64/lib1funcs.S |
339 |
+@@ -793,3 +793,6 @@ __floattitf: |
340 |
+ .endp __floattitf |
341 |
+ #endif |
342 |
+ #endif |
343 |
++#ifdef __linux__ |
344 |
++.section .note.GNU-stack; .previous |
345 |
++#endif |
346 |
|
347 |
diff --git a/6.5.0/gentoo/08_all_superh_default-multilib.patch b/6.5.0/gentoo/08_all_superh_default-multilib.patch |
348 |
new file mode 100644 |
349 |
index 0000000..8b638d9 |
350 |
--- /dev/null |
351 |
+++ b/6.5.0/gentoo/08_all_superh_default-multilib.patch |
352 |
@@ -0,0 +1,24 @@ |
353 |
+The gcc-3.x toolchains would contain all the targets by default. With gcc-4, |
354 |
+you have to actually list out the multilibs you want or you will end up with |
355 |
+just one when using targets like 'sh4-linux-gnu'. |
356 |
+ |
357 |
+The resulting toolchain can't even build a kernel as the kernel needs to build |
358 |
+with the nofpu flag to be sure that no fpu ops are generated. |
359 |
+ |
360 |
+Here we restore the gcc-3.x behavior; the additional overhead of building all |
361 |
+of these multilibs by default is negligible. |
362 |
+ |
363 |
+https://bugs.gentoo.org/140205 |
364 |
+https://bugs.gentoo.org/320251 |
365 |
+ |
366 |
+--- a/gcc/config.gcc |
367 |
++++ b/gcc/config.gcc |
368 |
+@@ -2455,7 +2455,7 @@ sh-*-symbianelf* | sh[12346l]*-*-symbianelf* | \ |
369 |
+ if test "$sh_multilibs" = "default" ; then |
370 |
+ case ${target} in |
371 |
+ sh64-superh-linux* | \ |
372 |
+- sh[1234]*) sh_multilibs=${sh_cpu_target} ;; |
373 |
++ sh[1234]*) sh_multilibs=$(echo $(sed -n '/^[[:space:]]*case ${sh_multilib} in/,/)/{s:case ${sh_multilib} in::;s: | *:,:g;s:[\\)]::g;p}' ${srcdir}/config.gcc) | sed 's: ::g') ;; |
374 |
+ sh64* | sh5*) sh_multilibs=m5-32media,m5-32media-nofpu,m5-compact,m5-compact-nofpu,m5-64media,m5-64media-nofpu ;; |
375 |
+ sh-superh-*) sh_multilibs=m4,m4-single,m4-single-only,m4-nofpu ;; |
376 |
+ sh*-*-linux*) sh_multilibs=m1,m3e,m4 ;; |
377 |
|
378 |
diff --git a/6.5.0/gentoo/09_all_libiberty-asprintf.patch b/6.5.0/gentoo/09_all_libiberty-asprintf.patch |
379 |
new file mode 100644 |
380 |
index 0000000..bee0c4c |
381 |
--- /dev/null |
382 |
+++ b/6.5.0/gentoo/09_all_libiberty-asprintf.patch |
383 |
@@ -0,0 +1,18 @@ |
384 |
+2008-07-25 Magnus Granberg <zorry@×××.nu> |
385 |
+ |
386 |
+ * include/libiberty.h (asprintf): Don't declare if defined as a macro |
387 |
+ |
388 |
+--- a/include/libiberty.h |
389 |
++++ b/include/libiberty.h |
390 |
+@@ -609,8 +609,11 @@ extern int pwait (int, int *, int); |
391 |
+ /* Like sprintf but provides a pointer to malloc'd storage, which must |
392 |
+ be freed by the caller. */ |
393 |
+ |
394 |
++/* asprintf may be declared as a macro by glibc with __USE_FORTIFY_LEVEL. */ |
395 |
++#ifndef asprintf |
396 |
+ extern int asprintf (char **, const char *, ...) ATTRIBUTE_PRINTF_2; |
397 |
+ #endif |
398 |
++#endif |
399 |
+ |
400 |
+ #if !HAVE_DECL_VASPRINTF |
401 |
+ /* Like vsprintf but provides a pointer to malloc'd storage, which |
402 |
|
403 |
diff --git a/6.5.0/gentoo/10_all_libiberty-pic.patch b/6.5.0/gentoo/10_all_libiberty-pic.patch |
404 |
new file mode 100644 |
405 |
index 0000000..b6160a7 |
406 |
--- /dev/null |
407 |
+++ b/6.5.0/gentoo/10_all_libiberty-pic.patch |
408 |
@@ -0,0 +1,10 @@ |
409 |
+--- a/libiberty/Makefile.in |
410 |
++++ b/libiberty/Makefile.in |
411 |
+@@ -246,6 +246,7 @@ $(TARGETLIB): $(REQUIRED_OFILES) $(EXTRA_OFILES) $(LIBOBJS) |
412 |
+ $(AR) $(AR_FLAGS) $(TARGETLIB) \ |
413 |
+ $(REQUIRED_OFILES) $(EXTRA_OFILES) $(LIBOBJS); \ |
414 |
+ $(RANLIB) $(TARGETLIB); \ |
415 |
++ cp $(TARGETLIB) ../ ; \ |
416 |
+ cd ..; \ |
417 |
+ else true; fi |
418 |
+ |
419 |
|
420 |
diff --git a/6.5.0/gentoo/11_all_nopie-all-flags.patch b/6.5.0/gentoo/11_all_nopie-all-flags.patch |
421 |
new file mode 100644 |
422 |
index 0000000..48536e6 |
423 |
--- /dev/null |
424 |
+++ b/6.5.0/gentoo/11_all_nopie-all-flags.patch |
425 |
@@ -0,0 +1,18 @@ |
426 |
+We need to pass NO_PIE_CFLAGS to ALL_* so gcc don't fail when |
427 |
+we compile it with older gcc and pie. |
428 |
+ |
429 |
+--- a/gcc/Makefile.in 2015-06-25 19:18:12.000000000 +0200 |
430 |
++++ b/gcc/Makefile.in 2016-04-22 00:12:54.029178860 +0200 |
431 |
+@@ -991,10 +991,10 @@ ALL_CXXFLAGS = $(T_CFLAGS) $(CFLAGS-$@) |
432 |
+ ALL_CPPFLAGS = $(INCLUDES) $(CPPFLAGS) |
433 |
+ |
434 |
+ # This is the variable to use when using $(COMPILER). |
435 |
+-ALL_COMPILERFLAGS = $(ALL_CXXFLAGS) |
436 |
++ALL_COMPILERFLAGS = $(NO_PIE_CFLAGS) $(ALL_CXXFLAGS) |
437 |
+ |
438 |
+ # This is the variable to use when using $(LINKER). |
439 |
+-ALL_LINKERFLAGS = $(ALL_CXXFLAGS) |
440 |
++ALL_LINKERFLAGS = $(NO_PIE_CFLAGS) $(ALL_CXXFLAGS) |
441 |
+ |
442 |
+ # Build and host support libraries. |
443 |
+ |
444 |
|
445 |
diff --git a/6.5.0/gentoo/12_all_extra-options.patch b/6.5.0/gentoo/12_all_extra-options.patch |
446 |
new file mode 100644 |
447 |
index 0000000..ff14c10 |
448 |
--- /dev/null |
449 |
+++ b/6.5.0/gentoo/12_all_extra-options.patch |
450 |
@@ -0,0 +1,87 @@ |
451 |
+On Hardened we add or remove some options like -fstack-check, |
452 |
+-fstack-protector-all, -fstrict_overflow and -z now |
453 |
+ |
454 |
+--- a/libgcc/Makefile.in 2011-11-22 04:01:02.000000000 +0100 |
455 |
++++ b/libgcc/Makefile.in 2011-12-25 15:18:22.449610631 +0100 |
456 |
+@@ -225,7 +225,7 @@ endif |
457 |
+ LIBGCC2_DEBUG_CFLAGS = -g |
458 |
+ LIBGCC2_CFLAGS = -O2 $(LIBGCC2_INCLUDES) $(GCC_CFLAGS) $(HOST_LIBGCC2_CFLAGS) \ |
459 |
+ $(LIBGCC2_DEBUG_CFLAGS) -DIN_LIBGCC2 \ |
460 |
+- -fbuilding-libgcc -fno-stack-protector \ |
461 |
++ -fbuilding-libgcc -fno-stack-protector -fstack-check=no \ |
462 |
+ $(INHIBIT_LIBC_CFLAGS) |
463 |
+ |
464 |
+ # Additional options to use when compiling libgcc2.a. |
465 |
+@@ -279,7 +290,7 @@ INTERNAL_CFLAGS = $(CFLAGS) $(LIBGCC2_CF |
466 |
+ -finhibit-size-directive -fno-inline -fno-exceptions \ |
467 |
+ -fno-zero-initialized-in-bss -fno-toplevel-reorder -fno-tree-vectorize \ |
468 |
+ -fbuilding-libgcc -fno-stack-protector $(FORCE_EXPLICIT_EH_REGISTRY) \ |
469 |
+- $(INHIBIT_LIBC_CFLAGS) |
470 |
++ -fstack-check=no $(INHIBIT_LIBC_CFLAGS) |
471 |
+ |
472 |
+ # Extra flags to use when compiling crt{begin,end}.o. |
473 |
+ CRTSTUFF_T_CFLAGS = |
474 |
+--- a/gcc/defaults.h 2016-01-04 15:30:50.000000000 +0100 |
475 |
++++ b/gcc/defaults.h 2016-05-02 22:23:43.815707806 +0200 |
476 |
+@@ -1398,8 +1398,12 @@ see the files COPYING3 and COPYING.RUNTI |
477 |
+ /* Default value for flag_stack_protect when flag_stack_protect is initialized to -1: |
478 |
+ --enable-default-ssp: Default flag_stack_protect to -fstack-protector-strong. |
479 |
+ --disable-default-ssp: Default flag_stack_protect to 0. |
480 |
++ Hardened: Default flag_stack_protect to -fstack-protector-all. |
481 |
+ */ |
482 |
+ #ifdef ENABLE_DEFAULT_SSP |
483 |
++# ifdef EXTRA_OPTIONS |
484 |
++# define DEFAULT_FLAG_SSP 2 |
485 |
++# endif |
486 |
+ # ifndef DEFAULT_FLAG_SSP |
487 |
+ # define DEFAULT_FLAG_SSP 3 |
488 |
+ # endif |
489 |
+--- a/gcc/gcc.c 2016-02-19 23:18:38.000000000 +0100 |
490 |
++++ b/gcc/gcc.c 2016-05-02 22:56:10.185721270 +0200 |
491 |
+@@ -868,6 +868,13 @@ proper position among the other output f |
492 |
+ #endif |
493 |
+ #endif |
494 |
+ |
495 |
++#define STACK_CHECK_SPEC "%{fstack-check|fstack-check=*:;: -fstack-check} " |
496 |
++#ifdef EXTRA_OPTIONS |
497 |
++#define LINK_NOW_SPEC "%{!nonow:-z now} " |
498 |
++#else |
499 |
++#define LINK_NOW_SPEC "" |
500 |
++#endif |
501 |
++ |
502 |
+ #ifdef ENABLE_DEFAULT_PIE |
503 |
+ #define NO_PIE_SPEC "no-pie|static" |
504 |
+ #define PIE_SPEC NO_PIE_SPEC "|r|shared:;" |
505 |
+@@ -1013,7 +1020,7 @@ proper position among the other output f |
506 |
+ %(linker) " \ |
507 |
+ LINK_PLUGIN_SPEC \ |
508 |
+ "%{flto|flto=*:%<fcompare-debug*} \ |
509 |
+- %{flto} %{fno-lto} %{flto=*} %l " LINK_PIE_SPEC \ |
510 |
++ %{flto} %{fno-lto} %{flto=*} %l " LINK_PIE_SPEC LINK_NOW_SPEC \ |
511 |
+ "%{fuse-ld=*:-fuse-ld=%*} " LINK_COMPRESS_DEBUG_SPEC \ |
512 |
+ "%X %{o*} %{e*} %{N} %{n} %{r}\ |
513 |
+ %{s} %{t} %{u*} %{z} %{Z} %{!nostdlib:%{!nostartfiles:%S}} \ |
514 |
+@@ -1052,7 +1059,11 @@ proper position among the other output f |
515 |
+ |
516 |
+ static const char *asm_debug = ASM_DEBUG_SPEC; |
517 |
+ static const char *cpp_spec = CPP_SPEC; |
518 |
++#ifdef EXTRA_OPTIONS |
519 |
++static const char *cc1_spec = CC1_SPEC STACK_CHECK_SPEC; |
520 |
++#else |
521 |
+ static const char *cc1_spec = CC1_SPEC; |
522 |
++#endif |
523 |
+ static const char *cc1plus_spec = CC1PLUS_SPEC; |
524 |
+ static const char *link_gcc_c_sequence_spec = LINK_GCC_C_SEQUENCE_SPEC; |
525 |
+ static const char *link_ssp_spec = LINK_SSP_SPEC; |
526 |
+--- a/gcc/opts.c 2016-03-17 16:11:35.000000000 +0100 |
527 |
++++ b/gcc/opts.c 2016-04-27 16:48:59.952580580 +0200 |
528 |
+@@ -495,7 +495,9 @@ static const struct default_options defa |
529 |
+ { OPT_LEVELS_2_PLUS, OPT_fschedule_insns2, NULL, 1 }, |
530 |
+ #endif |
531 |
+ { OPT_LEVELS_2_PLUS, OPT_fstrict_aliasing, NULL, 1 }, |
532 |
++#ifndef EXTRA_OPTIONS |
533 |
+ { OPT_LEVELS_2_PLUS, OPT_fstrict_overflow, NULL, 1 }, |
534 |
++#endif |
535 |
+ { OPT_LEVELS_2_PLUS_SPEED_ONLY, OPT_freorder_blocks_algorithm_, NULL, |
536 |
+ REORDER_BLOCKS_ALGORITHM_STC }, |
537 |
+ { OPT_LEVELS_2_PLUS, OPT_freorder_functions, NULL, 1 }, |
538 |
|
539 |
diff --git a/6.5.0/gentoo/13_all_pr55930-dependency-tracking.patch b/6.5.0/gentoo/13_all_pr55930-dependency-tracking.patch |
540 |
new file mode 100644 |
541 |
index 0000000..a8743e0 |
542 |
--- /dev/null |
543 |
+++ b/6.5.0/gentoo/13_all_pr55930-dependency-tracking.patch |
544 |
@@ -0,0 +1,18 @@ |
545 |
+libatomic build failure if configured with --disable-dependency-tracking |
546 |
+load_n.c:115:1: fatal error: opening dependency file .deps/load_1_.lo.Ppo: No such file or directory |
547 |
+ |
548 |
+https://bugs.gentoo.org/463463 |
549 |
+http://gcc.gnu.org/PR55930 |
550 |
+ |
551 |
+--- a/libatomic/Makefile.in |
552 |
++++ b/libatomic/Makefile.in |
553 |
+@@ -298,7 +298,8 @@ PAT_N = $(word 2,$(PAT_SPLIT)) |
554 |
+ PAT_S = $(word 3,$(PAT_SPLIT)) |
555 |
+ IFUNC_DEF = -DIFUNC_ALT=$(PAT_S) |
556 |
+ IFUNC_OPT = $(word $(PAT_S),$(IFUNC_OPTIONS)) |
557 |
+-M_DEPS = -MT $@ -MD -MP -MF $(DEPDIR)/$(@F).Ppo |
558 |
++@AMDEP_TRUE@M_DEPS = -MT $@ -MD -MP -MF $(DEPDIR)/$(@F).Ppo |
559 |
++@AMDEP_FALSE@M_DEPS = |
560 |
+ M_SIZE = -DN=$(PAT_N) |
561 |
+ M_IFUNC = $(if $(PAT_S),$(IFUNC_DEF) $(IFUNC_OPT)) |
562 |
+ M_FILE = $(PAT_BASE)_n.c |
563 |
|
564 |
diff --git a/6.5.0/gentoo/14_all_asan-signal_h.patch b/6.5.0/gentoo/14_all_asan-signal_h.patch |
565 |
new file mode 100644 |
566 |
index 0000000..8711d53 |
567 |
--- /dev/null |
568 |
+++ b/6.5.0/gentoo/14_all_asan-signal_h.patch |
569 |
@@ -0,0 +1,15 @@ |
570 |
+Fix error: ‘SIGSEGV’ was not declared in this scope |
571 |
+ |
572 |
+https://bugs.gentoo.org/629502#c9 |
573 |
+https://patchwork.ozlabs.org/patch/725596/ |
574 |
+ |
575 |
+--- a/libsanitizer/asan/asan_linux.cc |
576 |
++++ b/libsanitizer/asan/asan_linux.cc |
577 |
+@@ -29,6 +29,7 @@ |
578 |
+ #include <dlfcn.h> |
579 |
+ #include <fcntl.h> |
580 |
+ #include <pthread.h> |
581 |
++#include <signal.h> |
582 |
+ #include <stdio.h> |
583 |
+ #include <unistd.h> |
584 |
+ #include <unwind.h> |
585 |
|
586 |
diff --git a/6.5.0/gentoo/15_all_respect-build-cxxflags.patch b/6.5.0/gentoo/15_all_respect-build-cxxflags.patch |
587 |
new file mode 100644 |
588 |
index 0000000..14139ea |
589 |
--- /dev/null |
590 |
+++ b/6.5.0/gentoo/15_all_respect-build-cxxflags.patch |
591 |
@@ -0,0 +1,39 @@ |
592 |
+Pass CXXFLAGS as CXXFLAGS_FOR_BUILD to stage1. |
593 |
+ |
594 |
+Fixes build failure when CXXFLAGS contains |
595 |
+TARGET-specific flags. |
596 |
+ |
597 |
+Tested on x86_64-pc-linux-gnu host as: |
598 |
+ # CFLAGS='-O2 -mfpu=neon-vfpv4' CXXFLAGS='-O2 -mfpu=neon-vfpv4' \ |
599 |
+ armv7a-unknown-linux-gnueabihf-emerge -v1 sys-devel/gcc --quiet-build=n |
600 |
+ |
601 |
+Fix by Peter Levine. |
602 |
+https://bugs.gentoo.org/581406 |
603 |
+--- a/Makefile.in |
604 |
++++ b/Makefile.in |
605 |
+@@ -170,6 +170,7 @@ |
606 |
+ # built for the build system to override those in BASE_FLAGS_TO_PASS. |
607 |
+ EXTRA_BUILD_FLAGS = \ |
608 |
+ CFLAGS="$(CFLAGS_FOR_BUILD)" \ |
609 |
++ CXXFLAGS="$(CXXFLAGS_FOR_BUILD)" \ |
610 |
+ LDFLAGS="$(LDFLAGS_FOR_BUILD)" |
611 |
+ |
612 |
+ # This is the list of directories to built for the host system. |
613 |
+@@ -710,6 +711,7 @@ |
614 |
+ "CC_FOR_BUILD=$(CC_FOR_BUILD)" \ |
615 |
+ "CFLAGS_FOR_BUILD=$(CFLAGS_FOR_BUILD)" \ |
616 |
+ "CXX_FOR_BUILD=$(CXX_FOR_BUILD)" \ |
617 |
++ "CXXFLAGS_FOR_BUILD=$(CXXFLAGS_FOR_BUILD)" \ |
618 |
+ "EXPECT=$(EXPECT)" \ |
619 |
+ "FLEX=$(FLEX)" \ |
620 |
+ "INSTALL=$(INSTALL)" \ |
621 |
+--- a/Makefile.tpl |
622 |
++++ b/Makefile.tpl |
623 |
+@@ -172,6 +172,7 @@ |
624 |
+ # built for the build system to override those in BASE_FLAGS_TO_PASS. |
625 |
+ EXTRA_BUILD_FLAGS = \ |
626 |
+ CFLAGS="$(CFLAGS_FOR_BUILD)" \ |
627 |
++ CXXFLAGS="$(CXXFLAGS_FOR_BUILD)" \ |
628 |
+ LDFLAGS="$(LDFLAGS_FOR_BUILD)" |
629 |
+ |
630 |
+ # This is the list of directories to built for the host system. |
631 |
|
632 |
diff --git a/6.5.0/gentoo/16_all_libgfortran-Werror.patch b/6.5.0/gentoo/16_all_libgfortran-Werror.patch |
633 |
new file mode 100644 |
634 |
index 0000000..f6c26bf |
635 |
--- /dev/null |
636 |
+++ b/6.5.0/gentoo/16_all_libgfortran-Werror.patch |
637 |
@@ -0,0 +1,20 @@ |
638 |
+libgfortran does not respect --disable-werror |
639 |
+ |
640 |
+https://bugs.gentoo.org/433435 |
641 |
+http://gcc.gnu.org/PR54724 |
642 |
+ |
643 |
+ |
644 |
+--- a/libgfortran/configure.ac |
645 |
++++ b/libgfortran/configure.ac |
646 |
+@@ -140,3 +140,3 @@ AM_PROG_CC_C_O |
647 |
+ if test "x$GCC" = "xyes"; then |
648 |
+- AM_FCFLAGS="-I . -Wall -Werror -fimplicit-none -fno-repack-arrays -fno-underscoring" |
649 |
++ AM_FCFLAGS="-I . -Wall -fimplicit-none -fno-repack-arrays -fno-underscoring" |
650 |
+ ## We like to use C11 and C99 routines when available. This makes |
651 |
+--- a/libgfortran/configure |
652 |
++++ b/libgfortran/configure |
653 |
+@@ -5764,3 +5764,3 @@ fi |
654 |
+ # Add -Wall -fno-repack-arrays -fno-underscoring if we are using GCC. |
655 |
+ if test "x$GCC" = "xyes"; then |
656 |
+- AM_FCFLAGS="-I . -Wall -Werror -fimplicit-none -fno-repack-arrays -fno-underscoring" |
657 |
++ AM_FCFLAGS="-I . -Wall -fimplicit-none -fno-repack-arrays -fno-underscoring" |
658 |
|
659 |
diff --git a/6.5.0/gentoo/17_all_libgomp-Werror.patch b/6.5.0/gentoo/17_all_libgomp-Werror.patch |
660 |
new file mode 100644 |
661 |
index 0000000..416808a |
662 |
--- /dev/null |
663 |
+++ b/6.5.0/gentoo/17_all_libgomp-Werror.patch |
664 |
@@ -0,0 +1,20 @@ |
665 |
+libgomp does not respect --disable-werror |
666 |
+ |
667 |
+https://bugs.gentoo.org/229059 |
668 |
+http://gcc.gnu.org/PR38436 |
669 |
+--- a/libgomp/configure.ac |
670 |
++++ b/libgomp/configure.ac |
671 |
+@@ -4282,4 +4282,4 @@ save_CFLAGS="$CFLAGS" |
672 |
+ # Add -Wall -Werror if we are using GCC. |
673 |
+ if test "x$GCC" = "xyes"; then |
674 |
+- XCFLAGS="$XCFLAGS -Wall -Werror" |
675 |
++ XCFLAGS="$XCFLAGS -Wall" |
676 |
+ fi |
677 |
+--- a/libgomp/configure |
678 |
++++ b/libgomp/configure |
679 |
+@@ -4282,4 +4282,4 @@ save_CFLAGS="$CFLAGS" |
680 |
+ # Add -Wall -Werror if we are using GCC. |
681 |
+ if test "x$GCC" = "xyes"; then |
682 |
+- XCFLAGS="$XCFLAGS -Wall -Werror" |
683 |
++ XCFLAGS="$XCFLAGS -Wall" |
684 |
+ fi |
685 |
|
686 |
diff --git a/6.5.0/gentoo/18_all_libitm-Werror.patch b/6.5.0/gentoo/18_all_libitm-Werror.patch |
687 |
new file mode 100644 |
688 |
index 0000000..27181e0 |
689 |
--- /dev/null |
690 |
+++ b/6.5.0/gentoo/18_all_libitm-Werror.patch |
691 |
@@ -0,0 +1,19 @@ |
692 |
+libitm does not respect --disable-werror |
693 |
+ |
694 |
+https://bugs.gentoo.org/475350 |
695 |
+--- a/libitm/configure.ac |
696 |
++++ b/libitm/configure.ac |
697 |
+@@ -4282,4 +4282,4 @@ save_CFLAGS="$CFLAGS" |
698 |
+ # Add -Wall -Werror if we are using GCC. |
699 |
+ if test "x$GCC" = "xyes"; then |
700 |
+- XCFLAGS="$XCFLAGS -Wall -Werror" |
701 |
++ XCFLAGS="$XCFLAGS -Wall" |
702 |
+ fi |
703 |
+--- a/libitm/configure |
704 |
++++ b/libitm/configure |
705 |
+@@ -4282,4 +4282,4 @@ save_CFLAGS="$CFLAGS" |
706 |
+ # Add -Wall -Werror if we are using GCC. |
707 |
+ if test "x$GCC" = "xyes"; then |
708 |
+- XCFLAGS="$XCFLAGS -Wall -Werror" |
709 |
++ XCFLAGS="$XCFLAGS -Wall" |
710 |
+ fi |
711 |
|
712 |
diff --git a/6.5.0/gentoo/19_all_libatomic-Werror.patch b/6.5.0/gentoo/19_all_libatomic-Werror.patch |
713 |
new file mode 100644 |
714 |
index 0000000..0550722 |
715 |
--- /dev/null |
716 |
+++ b/6.5.0/gentoo/19_all_libatomic-Werror.patch |
717 |
@@ -0,0 +1,19 @@ |
718 |
+libatomic does not respect --disable-werror |
719 |
+ |
720 |
+https://bugs.gentoo.org/475350 |
721 |
+--- a/libatomic/configure.ac |
722 |
++++ b/libatomic/configure.ac |
723 |
+@@ -4282,4 +4282,4 @@ save_CFLAGS="$CFLAGS" |
724 |
+ # Add -Wall -Werror if we are using GCC. |
725 |
+ if test "x$GCC" = "xyes"; then |
726 |
+- XCFLAGS="$XCFLAGS -Wall -Werror" |
727 |
++ XCFLAGS="$XCFLAGS -Wall" |
728 |
+ fi |
729 |
+--- a/libatomic/configure |
730 |
++++ b/libatomic/configure |
731 |
+@@ -4282,4 +4282,4 @@ save_CFLAGS="$CFLAGS" |
732 |
+ # Add -Wall -Werror if we are using GCC. |
733 |
+ if test "x$GCC" = "xyes"; then |
734 |
+- XCFLAGS="$XCFLAGS -Wall -Werror" |
735 |
++ XCFLAGS="$XCFLAGS -Wall" |
736 |
+ fi |
737 |
|
738 |
diff --git a/6.5.0/gentoo/20_all_libbacktrace-Werror.patch b/6.5.0/gentoo/20_all_libbacktrace-Werror.patch |
739 |
new file mode 100644 |
740 |
index 0000000..57dd284 |
741 |
--- /dev/null |
742 |
+++ b/6.5.0/gentoo/20_all_libbacktrace-Werror.patch |
743 |
@@ -0,0 +1,17 @@ |
744 |
+libbacktrace does not respect --disable-werror |
745 |
+ |
746 |
+https://bugs.gentoo.org/667104 |
747 |
+--- a/libbacktrace/configure |
748 |
++++ b/libbacktrace/configure |
749 |
+@@ -11634,3 +11634,3 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu |
750 |
+ if test -n "${with_target_subdir}"; then |
751 |
+- WARN_FLAGS="$WARN_FLAGS -Werror" |
752 |
++ WARN_FLAGS="$WARN_FLAGS" |
753 |
+ fi |
754 |
+--- a/libbacktrace/configure.ac |
755 |
++++ b/libbacktrace/configure.ac |
756 |
+@@ -138,3 +138,3 @@ ACX_PROG_CC_WARNING_OPTS([-W -Wall -Wwrite-strings -Wstrict-prototypes \ |
757 |
+ if test -n "${with_target_subdir}"; then |
758 |
+- WARN_FLAGS="$WARN_FLAGS -Werror" |
759 |
++ WARN_FLAGS="$WARN_FLAGS" |
760 |
+ fi |
761 |
|
762 |
diff --git a/6.5.0/gentoo/21_all_libsanitizer-libbacktrace-Werror.patch b/6.5.0/gentoo/21_all_libsanitizer-libbacktrace-Werror.patch |
763 |
new file mode 100644 |
764 |
index 0000000..46a219a |
765 |
--- /dev/null |
766 |
+++ b/6.5.0/gentoo/21_all_libsanitizer-libbacktrace-Werror.patch |
767 |
@@ -0,0 +1,17 @@ |
768 |
+libsanitizer/libbacktrace does not respect --disable-werror |
769 |
+ |
770 |
+https://bugs.gentoo.org/667104 |
771 |
+--- a/libsanitizer/libbacktrace/Makefile.am |
772 |
++++ b/libsanitizer/libbacktrace/Makefile.am |
773 |
+@@ -37,3 +37,3 @@ AM_CPPFLAGS = -I $(top_srcdir)/../include -I $(top_srcdir)/../libgcc \ |
774 |
+ WARN_FLAGS = -W -Wall -Wwrite-strings -Wmissing-format-attribute \ |
775 |
+- -Wcast-qual -Werror |
776 |
++ -Wcast-qual |
777 |
+ C_WARN_FLAGS = $(WARN_FLAGS) -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition |
778 |
+--- a/libsanitizer/libbacktrace/Makefile.in |
779 |
++++ b/libsanitizer/libbacktrace/Makefile.in |
780 |
+@@ -293,3 +293,3 @@ AM_CPPFLAGS = -I $(top_srcdir)/../include -I $(top_srcdir)/../libgcc \ |
781 |
+ WARN_FLAGS = -W -Wall -Wwrite-strings -Wmissing-format-attribute \ |
782 |
+- -Wcast-qual -Werror |
783 |
++ -Wcast-qual |
784 |
+ |
785 |
|
786 |
diff --git a/6.5.0/gentoo/22_all_libstdcxx-no-vtv.patch b/6.5.0/gentoo/22_all_libstdcxx-no-vtv.patch |
787 |
new file mode 100644 |
788 |
index 0000000..68508bd |
789 |
--- /dev/null |
790 |
+++ b/6.5.0/gentoo/22_all_libstdcxx-no-vtv.patch |
791 |
@@ -0,0 +1,61 @@ |
792 |
+Final libstdc++.so should not contain rpath to make libvtv usable. |
793 |
+It's up to final binaries to link against proper libvtv. |
794 |
+ |
795 |
+Bug: https://bugs.gentoo.org/582524 |
796 |
+Bug: https://gcc.gnu.org/PR85884 |
797 |
+--- a/libstdc++-v3/src/Makefile.am |
798 |
++++ b/libstdc++-v3/src/Makefile.am |
799 |
+@@ -217,7 +217,6 @@ CXXLINK = \ |
800 |
+ $(LIBTOOL) --tag CXX \ |
801 |
+ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ |
802 |
+ --mode=link $(CXX) \ |
803 |
+- $(VTV_CXXLINKFLAGS) \ |
804 |
+ $(OPT_LDFLAGS) $(SECTION_LDFLAGS) $(AM_CXXFLAGS) $(LTLDFLAGS) -o $@ |
805 |
+ |
806 |
+ # Symbol versioning for shared libraries. |
807 |
+--- a/libstdc++-v3/src/Makefile.in |
808 |
++++ b/libstdc++-v3/src/Makefile.in |
809 |
+@@ -511,7 +511,6 @@ CXXLINK = \ |
810 |
+ $(LIBTOOL) --tag CXX \ |
811 |
+ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ |
812 |
+ --mode=link $(CXX) \ |
813 |
+- $(VTV_CXXLINKFLAGS) \ |
814 |
+ $(OPT_LDFLAGS) $(SECTION_LDFLAGS) $(AM_CXXFLAGS) $(LTLDFLAGS) -o $@ |
815 |
+ |
816 |
+ @ENABLE_SYMVERS_TRUE@CLEANFILES = libstdc++-symbols.ver $(version_dep) |
817 |
+--- a/libstdc++-v3/src/c++11/Makefile.am |
818 |
++++ b/libstdc++-v3/src/c++11/Makefile.am |
819 |
+@@ -204,5 +204,4 @@ CXXLINK = \ |
820 |
+ $(LIBTOOL) --tag CXX --tag disable-shared \ |
821 |
+ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ |
822 |
+ --mode=link $(CXX) \ |
823 |
+- $(VTV_CXXLINKFLAGS) \ |
824 |
+ $(OPT_LDFLAGS) $(SECTION_LDFLAGS) $(AM_CXXFLAGS) $(LTLDFLAGS) -o $@ |
825 |
+--- a/libstdc++-v3/src/c++11/Makefile.in |
826 |
++++ b/libstdc++-v3/src/c++11/Makefile.in |
827 |
+@@ -496,7 +496,6 @@ CXXLINK = \ |
828 |
+ $(LIBTOOL) --tag CXX --tag disable-shared \ |
829 |
+ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ |
830 |
+ --mode=link $(CXX) \ |
831 |
+- $(VTV_CXXLINKFLAGS) \ |
832 |
+ $(OPT_LDFLAGS) $(SECTION_LDFLAGS) $(AM_CXXFLAGS) $(LTLDFLAGS) -o $@ |
833 |
+ |
834 |
+ all: all-am |
835 |
+--- a/libstdc++-v3/src/c++98/Makefile.am |
836 |
++++ b/libstdc++-v3/src/c++98/Makefile.am |
837 |
+@@ -273,5 +273,4 @@ CXXLINK = \ |
838 |
+ $(LIBTOOL) --tag CXX --tag disable-shared \ |
839 |
+ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ |
840 |
+ --mode=link $(CXX) \ |
841 |
+- $(VTV_CXXLINKFLAGS) \ |
842 |
+ $(OPT_LDFLAGS) $(SECTION_LDFLAGS) $(AM_CXXFLAGS) $(LTLDFLAGS) -o $@ |
843 |
+--- a/libstdc++-v3/src/c++98/Makefile.in |
844 |
++++ b/libstdc++-v3/src/c++98/Makefile.in |
845 |
+@@ -500,7 +500,6 @@ CXXLINK = \ |
846 |
+ $(LIBTOOL) --tag CXX --tag disable-shared \ |
847 |
+ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ |
848 |
+ --mode=link $(CXX) \ |
849 |
+- $(VTV_CXXLINKFLAGS) \ |
850 |
+ $(OPT_LDFLAGS) $(SECTION_LDFLAGS) $(AM_CXXFLAGS) $(LTLDFLAGS) -o $@ |
851 |
+ |
852 |
+ all: all-am |
853 |
|
854 |
diff --git a/6.5.0/gentoo/README.history b/6.5.0/gentoo/README.history |
855 |
new file mode 100644 |
856 |
index 0000000..52b438b |
857 |
--- /dev/null |
858 |
+++ b/6.5.0/gentoo/README.history |
859 |
@@ -0,0 +1,23 @@ |
860 |
+1 27 Oct 2018 |
861 |
+ + 01_all_default-fortify-source.patch |
862 |
+ + 02_all_default-warn-format-security.patch |
863 |
+ + 03_all_default-warn-trampolines.patch |
864 |
+ + 04_all_default-ssp-fix.patch |
865 |
+ + 05_all_alpha-mieee-default.patch |
866 |
+ + 06_all_arm_armv4t-default.patch |
867 |
+ + 07_all_ia64_note.GNU-stack.patch |
868 |
+ + 08_all_superh_default-multilib.patch |
869 |
+ + 09_all_libiberty-asprintf.patch |
870 |
+ + 10_all_libiberty-pic.patch |
871 |
+ + 11_all_nopie-all-flags.patch |
872 |
+ + 12_all_extra-options.patch |
873 |
+ + 13_all_pr55930-dependency-tracking.patch |
874 |
+ + 14_all_asan-signal_h.patch |
875 |
+ + 15_all_respect-build-cxxflags.patch |
876 |
+ + 16_all_libgfortran-Werror.patch |
877 |
+ + 17_all_libgomp-Werror.patch |
878 |
+ + 18_all_libitm-Werror.patch |
879 |
+ + 19_all_libatomic-Werror.patch |
880 |
+ + 20_all_libbacktrace-Werror.patch |
881 |
+ + 21_all_libsanitizer-libbacktrace-Werror.patch |
882 |
+ + 22_all_libstdcxx-no-vtv.patch |