1 |
commit: da6194032c31290cbc95cca443964862540e953a |
2 |
Author: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org> |
3 |
AuthorDate: Mon Dec 10 09:52:05 2018 +0000 |
4 |
Commit: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Dec 10 09:52:05 2018 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=da619403 |
7 |
|
8 |
5.5.0: 1.0 patchset, a copy of 5.4.0 patches |
9 |
|
10 |
The only changes from 5.4.0 patches are: |
11 |
- removed backported and upstreamed patches |
12 |
- dropped gcc.info doc patches |
13 |
|
14 |
Signed-off-by: Sergei Trofimovich <slyfox <AT> gentoo.org> |
15 |
|
16 |
5.5.0/gentoo/01_all_gcc-spec-env.patch | 87 +++ |
17 |
5.5.0/gentoo/02_all_default-ssp.patch | 261 +++++++++ |
18 |
5.5.0/gentoo/03_all_default-fortify-source.patch | 15 + |
19 |
.../04_all_default-warn-format-security.patch | 23 + |
20 |
5.5.0/gentoo/05_all_default-warn-trampolines.patch | 14 + |
21 |
5.5.0/gentoo/06_all_msgfmt-libstdc++-link.patch | 39 ++ |
22 |
5.5.0/gentoo/07_all_boehm-gc-execinfo.patch | 188 +++++++ |
23 |
5.5.0/gentoo/08_all_alpha-mieee-default.patch | 38 ++ |
24 |
5.5.0/gentoo/09_all_alpha-asm-mcpu.patch | 17 + |
25 |
5.5.0/gentoo/10_all_arm_armv4t-default.patch | 16 + |
26 |
5.5.0/gentoo/11_all_ia64_note.GNU-stack.patch | 92 +++ |
27 |
.../12_all_libjava-classpath-locale-sort.patch | 57 ++ |
28 |
5.5.0/gentoo/13_all_sh_pr24836_all-archs.patch | 27 + |
29 |
5.5.0/gentoo/14_all_superh_default-multilib.patch | 24 + |
30 |
5.5.0/gentoo/15_all_libiberty-asprintf.patch | 18 + |
31 |
5.5.0/gentoo/16_all_libiberty-pic.patch | 10 + |
32 |
5.5.0/gentoo/17_all_netbsd-Bsymbolic.patch | 13 + |
33 |
5.5.0/gentoo/18_all_libitm-no-fortify-source.patch | 27 + |
34 |
.../19_all_gcc-poison-system-directories.patch | 152 +++++ |
35 |
5.5.0/gentoo/20_all_gcc-5-pr546752.patch | 459 +++++++++++++++ |
36 |
5.5.0/gentoo/21_all_gcc5_isl-dl.patch | 617 +++++++++++++++++++++ |
37 |
5.5.0/gentoo/22_all_gcc-5-pr65958.patch | 215 +++++++ |
38 |
.../23_all_pr55930-dependency-tracking.patch | 18 + |
39 |
.../24_all_compatibility_fix_with_perl_5.26.patch | 29 + |
40 |
...bsanitizer-avoidustat.h-glibc-2.28-part-1.patch | 67 +++ |
41 |
...bsanitizer-avoidustat.h-glibc-2.28-part-2.patch | 32 ++ |
42 |
5.5.0/gentoo/27_all_respect-build-cxxflags.patch | 39 ++ |
43 |
5.5.0/gentoo/28_all_remove-lieee.patch | 47 ++ |
44 |
5.5.0/gentoo/29_all_libgfortran-Werror.patch | 20 + |
45 |
5.5.0/gentoo/30_all_libgomp-Werror.patch | 20 + |
46 |
5.5.0/gentoo/31_all_libitm-Werror.patch | 19 + |
47 |
5.5.0/gentoo/32_all_libatomic-Werror.patch | 19 + |
48 |
5.5.0/gentoo/33_all_libbacktrace-Werror.patch | 17 + |
49 |
.../34_all_libsanitizer-libbacktrace-Werror.patch | 17 + |
50 |
5.5.0/gentoo/35_all_libstdcxx-no-vtv.patch | 61 ++ |
51 |
5.5.0/gentoo/README.history | 36 ++ |
52 |
5.5.0/pie/01_all_gcc53_configure.patch | 156 ++++++ |
53 |
5.5.0/pie/02_all_gcc48_config.in.patch | 32 ++ |
54 |
5.5.0/pie/03_all_gcc51_Makefile.in.patch | 106 ++++ |
55 |
5.5.0/pie/05_all_gcc48_gcc.c.patch | 25 + |
56 |
5.5.0/pie/16_all_gcc47_nopie_option.patch | 16 + |
57 |
5.5.0/pie/20_all_gcc49_config_crtbeginp.patch | 40 ++ |
58 |
5.5.0/pie/24_all_gcc49_invoke.texi.patch | 44 ++ |
59 |
5.5.0/pie/33_all_gcc48_config_rs6000.patch | 34 ++ |
60 |
5.5.0/pie/34_all_gcc51_config_i386.patch | 56 ++ |
61 |
5.5.0/pie/35_all_gcc51_config_arm.patch | 37 ++ |
62 |
5.5.0/pie/36_all_gcc51_config_mips.patch | 43 ++ |
63 |
5.5.0/pie/37_all_gcc48_config_ia64.patch | 30 + |
64 |
5.5.0/pie/40_all_gcc49_config_esp.patch | 140 +++++ |
65 |
5.5.0/pie/README | 19 + |
66 |
5.5.0/pie/README.Changelog | 442 +++++++++++++++ |
67 |
5.5.0/pie/README.history | 363 ++++++++++++ |
68 |
5.5.0/uclibc/90_all_100-uclibc-conf.patch | 33 ++ |
69 |
5.5.0/uclibc/90_all_302-c99-snprintf.patch | 251 +++++++++ |
70 |
54 files changed, 4717 insertions(+) |
71 |
|
72 |
diff --git a/5.5.0/gentoo/01_all_gcc-spec-env.patch b/5.5.0/gentoo/01_all_gcc-spec-env.patch |
73 |
new file mode 100644 |
74 |
index 0000000..214638e |
75 |
--- /dev/null |
76 |
+++ b/5.5.0/gentoo/01_all_gcc-spec-env.patch |
77 |
@@ -0,0 +1,87 @@ |
78 |
+2013-08-22 Magnus Granberg <zorry@g.o> |
79 |
+ |
80 |
+ * gcc/gcc.c (main): Add support for external spec file via the GCC_SPECS env var |
81 |
+ and move the process of the user specifed specs. |
82 |
+ |
83 |
+ This allows us to easily control pie/ssp defaults with gcc-config profiles. |
84 |
+ Original patch by Rob Holland |
85 |
+ Extended to support multiple entries separated by ':' by Kevin F. Quinn |
86 |
+ Modified to use getenv instead of poisoned GET_ENVIRONMENT by Ryan Hill |
87 |
+ Modified to process the GCC_SPECS env var befor DRIVER_SELF_SPECS by Magnus Granberg |
88 |
+ |
89 |
+--- a/gcc/gcc.c |
90 |
++++ b/gcc/gcc.c |
91 |
+@@ -6427,6 +6428,48 @@ main (int argc, char **argv) |
92 |
+ do_option_spec (option_default_specs[i].name, |
93 |
+ option_default_specs[i].spec); |
94 |
+ |
95 |
++#if !(defined (__MSDOS__) || defined (OS2) || defined (VMS) || defined (WIN32)) |
96 |
++ /* Add specs listed in GCC_SPECS. Note; in the process of separating |
97 |
++ * each spec listed, the string is overwritten at token boundaries |
98 |
++ * (':') with '\0', an effect of strtok_r(). |
99 |
++ */ |
100 |
++ specs_file = getenv ("GCC_SPECS"); |
101 |
++ if (specs_file && (strlen(specs_file) > 0)) |
102 |
++ { |
103 |
++ char *spec, *saveptr; |
104 |
++ for (spec=strtok_r(specs_file,":",&saveptr); |
105 |
++ spec!=NULL; |
106 |
++ spec=strtok_r(NULL,":",&saveptr)) |
107 |
++ { |
108 |
++ struct user_specs *user = (struct user_specs *) |
109 |
++ xmalloc (sizeof (struct user_specs)); |
110 |
++ user->next = (struct user_specs *) 0; |
111 |
++ user->filename = spec; |
112 |
++ if (user_specs_tail) |
113 |
++ user_specs_tail->next = user; |
114 |
++ else |
115 |
++ user_specs_head = user; |
116 |
++ user_specs_tail = user; |
117 |
++ } |
118 |
++ } |
119 |
++#endif |
120 |
++ /* Process any user specified specs in the order given on the command |
121 |
++ * line. */ |
122 |
++ for (struct user_specs *uptr = user_specs_head; uptr; uptr = uptr->next) |
123 |
++ { |
124 |
++ char *filename = find_a_file (&startfile_prefixes, uptr->filename, |
125 |
++ R_OK, true); |
126 |
++ read_specs (filename ? filename : uptr->filename, false, true); |
127 |
++ } |
128 |
++ /* Process any user self specs. */ |
129 |
++ { |
130 |
++ struct spec_list *sl; |
131 |
++ for (sl = specs; sl; sl = sl->next) |
132 |
++ if (sl->name_len == sizeof "self_spec" - 1 |
133 |
++ && !strcmp (sl->name, "self_spec")) |
134 |
++ do_self_spec (*sl->ptr_spec); |
135 |
++ } |
136 |
++ |
137 |
+ /* Process DRIVER_SELF_SPECS, adding any new options to the end |
138 |
+ of the command line. */ |
139 |
+ |
140 |
+@@ -6535,24 +6578,6 @@ main (int argc, char **argv) |
141 |
+ PREFIX_PRIORITY_LAST, 0, 1); |
142 |
+ } |
143 |
+ |
144 |
+- /* Process any user specified specs in the order given on the command |
145 |
+- line. */ |
146 |
+- for (struct user_specs *uptr = user_specs_head; uptr; uptr = uptr->next) |
147 |
+- { |
148 |
+- char *filename = find_a_file (&startfile_prefixes, uptr->filename, |
149 |
+- R_OK, true); |
150 |
+- read_specs (filename ? filename : uptr->filename, false, true); |
151 |
+- } |
152 |
+- |
153 |
+- /* Process any user self specs. */ |
154 |
+- { |
155 |
+- struct spec_list *sl; |
156 |
+- for (sl = specs; sl; sl = sl->next) |
157 |
+- if (sl->name_len == sizeof "self_spec" - 1 |
158 |
+- && !strcmp (sl->name, "self_spec")) |
159 |
+- do_self_spec (*sl->ptr_spec); |
160 |
+- } |
161 |
+- |
162 |
+ if (compare_debug) |
163 |
+ { |
164 |
+ enum save_temps save; |
165 |
|
166 |
diff --git a/5.5.0/gentoo/02_all_default-ssp.patch b/5.5.0/gentoo/02_all_default-ssp.patch |
167 |
new file mode 100644 |
168 |
index 0000000..68254ea |
169 |
--- /dev/null |
170 |
+++ b/5.5.0/gentoo/02_all_default-ssp.patch |
171 |
@@ -0,0 +1,261 @@ |
172 |
+2014-04-27 Magnus Granberg <zorry@g.o> |
173 |
+ |
174 |
+ Patch orig: Debian/Ubuntu |
175 |
+ # 484714 |
176 |
+ We Add -fstack-protector-strong as default and change |
177 |
+ ssp-buffer-size |
178 |
+ |
179 |
+--- a/configure.ac |
180 |
++++ b/configure.ac |
181 |
+@@ -3238,6 +3238,9 @@ case $build in |
182 |
+ esac ;; |
183 |
+ esac |
184 |
+ |
185 |
++# Needed when we build with -fstack-protector as default. |
186 |
++stage1_cflags="$stage1_cflags -fno-stack-protector" |
187 |
++ |
188 |
+ AC_SUBST(stage1_cflags) |
189 |
+ |
190 |
+ # Enable --enable-checking in stage1 of the compiler. |
191 |
+--- a/configure |
192 |
++++ b/configure |
193 |
+@@ -14453,7 +14453,8 @@ case $build in |
194 |
+ esac ;; |
195 |
+ esac |
196 |
+ |
197 |
+- |
198 |
++# Needed when we build with -fstack-protector as default. |
199 |
++stage1_cflags="$stage1_cflags -fno-stack-protector" |
200 |
+ |
201 |
+ # Enable --enable-checking in stage1 of the compiler. |
202 |
+ # Check whether --enable-stage1-checking was given. |
203 |
+--- a/Makefile.in |
204 |
++++ b/Makefile.in |
205 |
+@@ -362,7 +362,7 @@ BUILD_PREFIX_1 = @BUILD_PREFIX_1@ |
206 |
+ |
207 |
+ # Flags to pass to stage2 and later makes. They are defined |
208 |
+ # here so that they can be overridden by Makefile fragments. |
209 |
+-BOOT_CFLAGS= -g -O2 |
210 |
++BOOT_CFLAGS= -g -O2 -fno-stack-protector |
211 |
+ BOOT_LDFLAGS= |
212 |
+ BOOT_ADAFLAGS= -gnatpg |
213 |
+ |
214 |
+@@ -408,9 +408,9 @@ GNATMAKE = @GNATMAKE@ |
215 |
+ |
216 |
+ CFLAGS = @CFLAGS@ |
217 |
+ LDFLAGS = @LDFLAGS@ |
218 |
+-LIBCFLAGS = $(CFLAGS) |
219 |
++LIBCFLAGS = $(CFLAGS) -fno-stack-protector |
220 |
+ CXXFLAGS = @CXXFLAGS@ |
221 |
+-LIBCXXFLAGS = $(CXXFLAGS) -fno-implicit-templates |
222 |
++LIBCXXFLAGS = $(CXXFLAGS) -fno-implicit-templates -fno-stack-protector |
223 |
+ GOCFLAGS = $(CFLAGS) |
224 |
+ |
225 |
+ TFLAGS = |
226 |
+--- a/gcc/doc/invoke.texi |
227 |
++++ b/gcc/doc/invoke.texi |
228 |
+@@ -9239,6 +9251,11 @@ Like @option{-fstack-protector} but incl |
229 |
+ be protected --- those that have local array definitions, or have |
230 |
+ references to local frame addresses. |
231 |
+ |
232 |
++NOTE: In Gentoo GCC 4.9.0 and later versions this option is enabled by default |
233 |
++for C, C++, ObjC, and ObjC++ if none of the options @option{-fno-stack-protector}, |
234 |
++@option{-nostdlib}, @option{-ffreestanding}, @option{-fstack-protector}, |
235 |
++@option{-fstack-protector-strong}, or @option{-fstack-protector-all} are found. |
236 |
++ |
237 |
+ @item -fstack-protector-explicit |
238 |
+ @opindex fstack-protector-explicit |
239 |
+ Like @option{-fstack-protector} but only protects those functions which |
240 |
+@@ -9461,6 +9465,9 @@ |
241 |
+ The minimum size of buffers (i.e.@: arrays) that receive stack smashing |
242 |
+ protection when @option{-fstack-protection} is used. |
243 |
+ |
244 |
++NOTE: In Gentoo this is change from "8" to "4", to increase |
245 |
++the number of functions protected by the stack protector. |
246 |
++ |
247 |
+ @item min-size-for-stack-sharing |
248 |
+ The minimum size of variables taking part in stack slot sharing when not |
249 |
+ optimizing. The default value is 32. |
250 |
+--- a/gcc/cp/lang-specs.h |
251 |
++++ b/gcc/cp/lang-specs.h |
252 |
+@@ -46,7 +46,7 @@ along with GCC; see the file COPYING3. If not see |
253 |
+ %(cpp_options) %2 -o %{save-temps*:%b.ii} %{!save-temps*:%g.ii} \n}\ |
254 |
+ cc1plus %{save-temps*|no-integrated-cpp:-fpreprocessed %{save-temps*:%b.ii} %{!save-temps*:%g.ii}}\ |
255 |
+ %{!save-temps*:%{!no-integrated-cpp:%(cpp_unique_options)}}\ |
256 |
+- %(cc1_options) %2\ |
257 |
++ %(cc1_options) %(ssp_default) %2\ |
258 |
+ %{!fsyntax-only:%{!fdump-ada-spec*:-o %g.s %{!o*:--output-pch=%i.gch}\ |
259 |
+ %W{o*:--output-pch=%*}}%V}}}}", |
260 |
+ CPLUSPLUS_CPP_SPEC, 0, 0}, |
261 |
+@@ -57,11 +57,11 @@ along with GCC; see the file COPYING3. If not see |
262 |
+ %(cpp_options) %2 -o %{save-temps*:%b.ii} %{!save-temps*:%g.ii} \n}\ |
263 |
+ cc1plus %{save-temps*|no-integrated-cpp:-fpreprocessed %{save-temps*:%b.ii} %{!save-temps*:%g.ii}}\ |
264 |
+ %{!save-temps*:%{!no-integrated-cpp:%(cpp_unique_options)}}\ |
265 |
+- %(cc1_options) %2\ |
266 |
++ %(cc1_options) %(ssp_default) %2\ |
267 |
+ %{!fsyntax-only:%(invoke_as)}}}}", |
268 |
+ CPLUSPLUS_CPP_SPEC, 0, 0}, |
269 |
+ {".ii", "@c++-cpp-output", 0, 0, 0}, |
270 |
+ {"@c++-cpp-output", |
271 |
+ "%{!M:%{!MM:%{!E:\ |
272 |
+- cc1plus -fpreprocessed %i %(cc1_options) %2\ |
273 |
++ cc1plus -fpreprocessed %i %(cc1_options) %(ssp_default) %2\ |
274 |
+ %{!fsyntax-only:%(invoke_as)}}}}", 0, 0, 0}, |
275 |
+--- a/gcc/gcc.c |
276 |
++++ b/gcc/gcc.c |
277 |
+@@ -651,6 +651,19 @@ proper position among the other output files. */ |
278 |
+ #define LINK_GCC_C_SEQUENCE_SPEC "%G %L %G" |
279 |
+ #endif |
280 |
+ |
281 |
++#ifndef SSP_DEFAULT_SPEC |
282 |
++#if defined ( TARGET_LIBC_PROVIDES_SSP ) && defined ( EFAULT_SSP ) |
283 |
++#define SSP_DEFAULT_SPEC "%{fno-stack-protector|fstack-protector| \ |
284 |
++ fstack-protector-strong|fstack-protector-all| \ |
285 |
++ ffreestanding|nostdlib:;:-fstack-protector-strong}" |
286 |
++/* Add -fno-stack-protector for the use of gcc-specs-ssp. */ |
287 |
++#define CC1_SSP_DEFAULT_SPEC "%{!fno-stack-protector:}" |
288 |
++#else |
289 |
++#define SSP_DEFAULT_SPEC "" |
290 |
++#define CC1_SSP_DEFAULT_SPEC "" |
291 |
++#endif |
292 |
++#endif |
293 |
++ |
294 |
+ #ifndef LINK_SSP_SPEC |
295 |
+ #ifdef TARGET_LIBC_PROVIDES_SSP |
296 |
+ #define LINK_SSP_SPEC "%{fstack-protector:}" |
297 |
+@@ -771,7 +781,7 @@ proper position among the other output f |
298 |
+ |
299 |
+ static const char *asm_debug = ASM_DEBUG_SPEC; |
300 |
+ static const char *cpp_spec = CPP_SPEC; |
301 |
+-static const char *cc1_spec = CC1_SPEC; |
302 |
++static const char *cc1_spec = CC1_SPEC CC1_SSP_DEFAULT_SPEC; |
303 |
+ static const char *cc1plus_spec = CC1PLUS_SPEC; |
304 |
+ static const char *link_gcc_c_sequence_spec = LINK_GCC_C_SEQUENCE_SPEC; |
305 |
+ static const char *link_ssp_spec = LINK_SSP_SPEC; |
306 |
+@@ -777,6 +785,8 @@ static const char *cc1_spec = CC1_SPEC; |
307 |
+ static const char *cc1plus_spec = CC1PLUS_SPEC; |
308 |
+ static const char *link_gcc_c_sequence_spec = LINK_GCC_C_SEQUENCE_SPEC; |
309 |
+ static const char *link_ssp_spec = LINK_SSP_SPEC; |
310 |
++static const char *ssp_default_spec = SSP_DEFAULT_SPEC; |
311 |
++static const char *cc1_ssp_default_spec = CC1_SSP_DEFAULT_SPEC; |
312 |
+ static const char *asm_spec = ASM_SPEC; |
313 |
+ static const char *asm_final_spec = ASM_FINAL_SPEC; |
314 |
+ static const char *link_spec = LINK_SPEC; |
315 |
+@@ -835,7 +844,7 @@ static const char *cpp_unique_options = |
316 |
+ static const char *cpp_options = |
317 |
+ "%(cpp_unique_options) %1 %{m*} %{std*&ansi&trigraphs} %{W*&pedantic*} %{w}\ |
318 |
+ %{f*} %{g*:%{!g0:%{g*} %{!fno-working-directory:-fworking-directory}}} %{O*}\ |
319 |
+- %{undef} %{save-temps*:-fpch-preprocess}"; |
320 |
++ %{undef} %{save-temps*:-fpch-preprocess} %(ssp_default)"; |
321 |
+ |
322 |
+ /* This contains cpp options which are not passed when the preprocessor |
323 |
+ output will be used by another program. */ |
324 |
+@@ -1015,9 +1024,9 @@ static const struct compiler default_compilers[] = |
325 |
+ %{save-temps*|traditional-cpp|no-integrated-cpp:%(trad_capable_cpp) \ |
326 |
+ %(cpp_options) -o %{save-temps*:%b.i} %{!save-temps*:%g.i} \n\ |
327 |
+ cc1 -fpreprocessed %{save-temps*:%b.i} %{!save-temps*:%g.i} \ |
328 |
+- %(cc1_options)}\ |
329 |
++ %(cc1_options) %(ssp_default)}\ |
330 |
+ %{!save-temps*:%{!traditional-cpp:%{!no-integrated-cpp:\ |
331 |
+- cc1 %(cpp_unique_options) %(cc1_options)}}}\ |
332 |
++ cc1 %(cpp_unique_options) %(cc1_options) %(ssp_default)}}}\ |
333 |
+ %{!fsyntax-only:%(invoke_as)}}}}", 0, 0, 1}, |
334 |
+ {"-", |
335 |
+ "%{!E:%e-E or -x required when input is from standard input}\ |
336 |
+@@ -1040,7 +1049,7 @@ static const struct compiler default_compilers[] = |
337 |
+ %W{o*:--output-pch=%*}}%V}}}}}}", 0, 0, 0}, |
338 |
+ {".i", "@cpp-output", 0, 0, 0}, |
339 |
+ {"@cpp-output", |
340 |
+- "%{!M:%{!MM:%{!E:cc1 -fpreprocessed %i %(cc1_options) %{!fsyntax-only:%(invoke_as)}}}}", 0, 0, 0}, |
341 |
++ "%{!M:%{!MM:%{!E:cc1 -fpreprocessed %i %(cc1_options) %(ssp_default) %{!fsyntax-only:%(invoke_as)}}}}", 0, 0, 0}, |
342 |
+ {".s", "@assembler", 0, 0, 0}, |
343 |
+ {"@assembler", |
344 |
+ "%{!M:%{!MM:%{!E:%{!S:as %(asm_debug) %(asm_options) %i %A }}}}", 0, 0, 0}, |
345 |
+@@ -1267,6 +1276,8 @@ static struct spec_list static_specs[] = |
346 |
+ INIT_STATIC_SPEC ("cc1plus", &cc1plus_spec), |
347 |
+ INIT_STATIC_SPEC ("link_gcc_c_sequence", &link_gcc_c_sequence_spec), |
348 |
+ INIT_STATIC_SPEC ("link_ssp", &link_ssp_spec), |
349 |
++ INIT_STATIC_SPEC ("ssp_default", &ssp_default_spec), |
350 |
++ INIT_STATIC_SPEC ("cc1_ssp_default", &cc1_ssp_default_spec), |
351 |
+ INIT_STATIC_SPEC ("endfile", &endfile_spec), |
352 |
+ INIT_STATIC_SPEC ("link", &link_spec), |
353 |
+ INIT_STATIC_SPEC ("lib", &lib_spec), |
354 |
+--- a/gcc/objc/lang-specs.h |
355 |
++++ b/gcc/objc/lang-specs.h |
356 |
+@@ -29,9 +29,9 @@ along with GCC; see the file COPYING3. If not see |
357 |
+ %{traditional|traditional-cpp:\ |
358 |
+ %eGNU Objective C no longer supports traditional compilation}\ |
359 |
+ %{save-temps*|no-integrated-cpp:cc1obj -E %(cpp_options) -o %{save-temps*:%b.mi} %{!save-temps*:%g.mi} \n\ |
360 |
+- cc1obj -fpreprocessed %{save-temps*:%b.mi} %{!save-temps*:%g.mi} %(cc1_options) %{print-objc-runtime-info} %{gen-decls}}\ |
361 |
++ cc1obj -fpreprocessed %{save-temps*:%b.mi} %{!save-temps*:%g.mi} %(cc1_options) %(ssp_default) %{print-objc-runtime-info} %{gen-decls}}\ |
362 |
+ %{!save-temps*:%{!no-integrated-cpp:\ |
363 |
+- cc1obj %(cpp_unique_options) %(cc1_options) %{print-objc-runtime-info} %{gen-decls}}}\ |
364 |
++ cc1obj %(cpp_unique_options) %(cc1_options) %(ssp_default) %{print-objc-runtime-info} %{gen-decls}}}\ |
365 |
+ %{!fsyntax-only:%(invoke_as)}}}}", 0, 0, 0}, |
366 |
+ {"@objective-c-header", |
367 |
+ "%{E|M|MM:cc1obj -E %{traditional|traditional-cpp:-traditional-cpp}\ |
368 |
+@@ -40,18 +40,18 @@ along with GCC; see the file COPYING3. If not see |
369 |
+ %{traditional|traditional-cpp:\ |
370 |
+ %eGNU Objective C no longer supports traditional compilation}\ |
371 |
+ %{save-temps*|no-integrated-cpp:cc1obj -E %(cpp_options) -o %{save-temps*:%b.mi} %{!save-temps*:%g.mi} \n\ |
372 |
+- cc1obj -fpreprocessed %b.mi %(cc1_options) %{print-objc-runtime-info} %{gen-decls}\ |
373 |
++ cc1obj -fpreprocessed %b.mi %(cc1_options) %(ssp_default) %{print-objc-runtime-info} %{gen-decls}\ |
374 |
+ -o %g.s %{!o*:--output-pch=%i.gch}\ |
375 |
+ %W{o*:--output-pch=%*}%V}\ |
376 |
+ %{!save-temps*:%{!no-integrated-cpp:\ |
377 |
+- cc1obj %(cpp_unique_options) %(cc1_options) %{print-objc-runtime-info} %{gen-decls}\ |
378 |
++ cc1obj %(cpp_unique_options) %(cc1_options) %(ssp_default) %{print-objc-runtime-info} %{gen-decls}\ |
379 |
+ -o %g.s %{!o*:--output-pch=%i.gch}\ |
380 |
+ %W{o*:--output-pch=%*}%V}}}}}", 0, 0, 0}, |
381 |
+ {".mi", "@objective-c-cpp-output", 0, 0, 0}, |
382 |
+ {"@objective-c-cpp-output", |
383 |
+- "%{!M:%{!MM:%{!E:cc1obj -fpreprocessed %i %(cc1_options) %{print-objc-runtime-info} %{gen-decls}\ |
384 |
++ "%{!M:%{!MM:%{!E:cc1obj -fpreprocessed %i %(cc1_options) %(ssp_default) %{print-objc-runtime-info} %{gen-decls}\ |
385 |
+ %{!fsyntax-only:%(invoke_as)}}}}", 0, 0, 0}, |
386 |
+ {"@objc-cpp-output", |
387 |
+ "%nobjc-cpp-output is deprecated; please use objective-c-cpp-output instead\n\ |
388 |
+- %{!M:%{!MM:%{!E:cc1obj -fpreprocessed %i %(cc1_options) %{print-objc-runtime-info} %{gen-decls}\ |
389 |
++ %{!M:%{!MM:%{!E:cc1obj -fpreprocessed %i %(cc1_options) %(ssp_default) %{print-objc-runtime-info} %{gen-decls}\ |
390 |
+ %{!fsyntax-only:%(invoke_as)}}}}", 0, 0, 0}, |
391 |
+--- a/gcc/objcp/lang-specs.h |
392 |
++++ b/gcc/objcp/lang-specs.h |
393 |
+@@ -36,7 +36,7 @@ along with GCC; see the file COPYING3. If not see |
394 |
+ %(cpp_options) %2 -o %{save-temps*:%b.mii} %{!save-temps*:%g.mii} \n}\ |
395 |
+ cc1objplus %{save-temps*|no-integrated-cpp:-fpreprocessed %{save-temps*:%b.mii} %{!save-temps*:%g.mii}}\ |
396 |
+ %{!save-temps*:%{!no-integrated-cpp:%(cpp_unique_options)}}\ |
397 |
+- %(cc1_options) %2\ |
398 |
++ %(cc1_options) %(ssp_default) %2\ |
399 |
+ -o %g.s %{!o*:--output-pch=%i.gch} %W{o*:--output-pch=%*}%V}}}", |
400 |
+ CPLUSPLUS_CPP_SPEC, 0, 0}, |
401 |
+ {"@objective-c++", |
402 |
+@@ -46,16 +46,16 @@ along with GCC; see the file COPYING3. If not see |
403 |
+ %(cpp_options) %2 -o %{save-temps*:%b.mii} %{!save-temps*:%g.mii} \n}\ |
404 |
+ cc1objplus %{save-temps*|no-integrated-cpp:-fpreprocessed %{save-temps*:%b.mii} %{!save-temps*:%g.mii}}\ |
405 |
+ %{!save-temps*:%{!no-integrated-cpp:%(cpp_unique_options)}}\ |
406 |
+- %(cc1_options) %2\ |
407 |
++ %(cc1_options) %(ssp_default) %2\ |
408 |
+ %{!fsyntax-only:%(invoke_as)}}}}", |
409 |
+ CPLUSPLUS_CPP_SPEC, 0, 0}, |
410 |
+ {".mii", "@objective-c++-cpp-output", 0, 0, 0}, |
411 |
+ {"@objective-c++-cpp-output", |
412 |
+ "%{!M:%{!MM:%{!E:\ |
413 |
+- cc1objplus -fpreprocessed %i %(cc1_options) %2\ |
414 |
++ cc1objplus -fpreprocessed %i %(cc1_options) %(ssp_default) %2\ |
415 |
+ %{!fsyntax-only:%(invoke_as)}}}}", 0, 0, 0}, |
416 |
+ {"@objc++-cpp-output", |
417 |
+ "%nobjc++-cpp-output is deprecated; please use objective-c++-cpp-output instead\n\ |
418 |
+ %{!M:%{!MM:%{!E:\ |
419 |
+- cc1objplus -fpreprocessed %i %(cc1_options) %2\ |
420 |
++ cc1objplus -fpreprocessed %i %(cc1_options) %(ssp_default) %2\ |
421 |
+ %{!fsyntax-only:%(invoke_as)}}}}", 0, 0, 0}, |
422 |
+--- a/gcc/params.def |
423 |
++++ b/gcc/params.def |
424 |
+@@ -662,7 +662,7 @@ DEFPARAM (PARAM_INTEGER_SHARE_LIMIT, |
425 |
+ DEFPARAM (PARAM_SSP_BUFFER_SIZE, |
426 |
+ "ssp-buffer-size", |
427 |
+ "The lower bound for a buffer to be considered for stack smashing protection", |
428 |
+- 8, 1, 0) |
429 |
++ 4, 1, 0) |
430 |
+ |
431 |
+ /* When we thread through a block we have to make copies of the |
432 |
+ statements within the block. Clearly for large blocks the code |
433 |
|
434 |
diff --git a/5.5.0/gentoo/03_all_default-fortify-source.patch b/5.5.0/gentoo/03_all_default-fortify-source.patch |
435 |
new file mode 100644 |
436 |
index 0000000..36c5762 |
437 |
--- /dev/null |
438 |
+++ b/5.5.0/gentoo/03_all_default-fortify-source.patch |
439 |
@@ -0,0 +1,15 @@ |
440 |
+Enable -D_FORTIFY_SOURCE=2 by default. |
441 |
+ |
442 |
+ |
443 |
+--- a/gcc/c-family/c-cppbuiltin.c |
444 |
++++ b/gcc/c-family/c-cppbuiltin.c |
445 |
+@@ -951,6 +951,9 @@ c_cpp_builtins (cpp_reader *pfile) |
446 |
+ builtin_define_with_value ("__REGISTER_PREFIX__", REGISTER_PREFIX, 0); |
447 |
+ builtin_define_with_value ("__USER_LABEL_PREFIX__", user_label_prefix, 0); |
448 |
+ |
449 |
++ /* Fortify Source enabled by default w/optimization. */ |
450 |
++ cpp_define (pfile, "_FORTIFY_SOURCE=((defined __OPTIMIZE__ && __OPTIMIZE__ > 0) ? 2 : 0)"); |
451 |
++ |
452 |
+ /* Misc. */ |
453 |
+ if (flag_gnu89_inline) |
454 |
+ cpp_define (pfile, "__GNUC_GNU_INLINE__"); |
455 |
|
456 |
diff --git a/5.5.0/gentoo/04_all_default-warn-format-security.patch b/5.5.0/gentoo/04_all_default-warn-format-security.patch |
457 |
new file mode 100644 |
458 |
index 0000000..c1f9a68 |
459 |
--- /dev/null |
460 |
+++ b/5.5.0/gentoo/04_all_default-warn-format-security.patch |
461 |
@@ -0,0 +1,23 @@ |
462 |
+Enable -Wformat and -Wformat-security by default. |
463 |
+ |
464 |
+ |
465 |
+--- a/gcc/c-family/c.opt |
466 |
++++ b/gcc/c-family/c.opt |
467 |
+@@ -412,7 +412,7 @@ C ObjC C++ ObjC++ Var(warn_format_nonliteral) Warning LangEnabledBy(C ObjC C++ O |
468 |
+ Warn about format strings that are not literals |
469 |
+ |
470 |
+ Wformat-security |
471 |
+-C ObjC C++ ObjC++ Var(warn_format_security) Warning LangEnabledBy(C ObjC C++ ObjC++,Wformat=, warn_format >= 2, 0) |
472 |
++C ObjC C++ ObjC++ Var(warn_format_security) Init(1) Warning LangEnabledBy(C ObjC C++ ObjC++,Wformat=, warn_format >= 2, 0) |
473 |
+ Warn about possible security problems with format functions |
474 |
+ |
475 |
+ Wformat-signedness |
476 |
+@@ -424,7 +424,7 @@ C ObjC C++ ObjC++ Var(warn_format_zero_length) Warning LangEnabledBy(C ObjC C++ |
477 |
+ Warn about zero-length formats |
478 |
+ |
479 |
+ Wformat= |
480 |
+-C ObjC C++ ObjC++ Joined RejectNegative UInteger Var(warn_format) Warning LangEnabledBy(C ObjC C++ ObjC++,Wall, 1, 0) |
481 |
++C ObjC C++ ObjC++ Joined RejectNegative UInteger Var(warn_format) Init(1) Warning LangEnabledBy(C ObjC C++ ObjC++,Wall, 1, 0) |
482 |
+ Warn about printf/scanf/strftime/strfmon format string anomalies |
483 |
+ |
484 |
+ Wignored-qualifiers |
485 |
|
486 |
diff --git a/5.5.0/gentoo/05_all_default-warn-trampolines.patch b/5.5.0/gentoo/05_all_default-warn-trampolines.patch |
487 |
new file mode 100644 |
488 |
index 0000000..7d9e2e6 |
489 |
--- /dev/null |
490 |
+++ b/5.5.0/gentoo/05_all_default-warn-trampolines.patch |
491 |
@@ -0,0 +1,14 @@ |
492 |
+Enable -Wtrampolines by default. |
493 |
+ |
494 |
+ |
495 |
+--- a/gcc/common.opt |
496 |
++++ b/gcc/common.opt |
497 |
+@@ -648,7 +648,7 @@ Common Var(warn_system_headers) Warning |
498 |
+ Do not suppress warnings from system headers |
499 |
+ |
500 |
+ Wtrampolines |
501 |
+-Common Var(warn_trampolines) Warning |
502 |
++Common Var(warn_trampolines) Init(1) Warning |
503 |
+ Warn whenever a trampoline is generated |
504 |
+ |
505 |
+ Wtype-limits |
506 |
|
507 |
diff --git a/5.5.0/gentoo/06_all_msgfmt-libstdc++-link.patch b/5.5.0/gentoo/06_all_msgfmt-libstdc++-link.patch |
508 |
new file mode 100644 |
509 |
index 0000000..a70ea50 |
510 |
--- /dev/null |
511 |
+++ b/5.5.0/gentoo/06_all_msgfmt-libstdc++-link.patch |
512 |
@@ -0,0 +1,39 @@ |
513 |
+Ensure that msgfmt doesn't encounter problems during gcc bootstrapping. |
514 |
+ |
515 |
+Solves error messages like the following: |
516 |
+ |
517 |
+msgfmt: /var/tmp/portage/sys-devel/gcc-4.1.2/work/build/./gcc/libgcc_s.so.1: version `GCC_4.2.0' not found (required by /usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/libstdc++.so.6) |
518 |
+ |
519 |
+The libgcc_s.so used during build doesn't satisfy the needs of the |
520 |
+libstdc++.so that msgfmt is linked against. On the other hand, msgfmt |
521 |
+is used as a stand-alone application here, and what library it uses |
522 |
+behind the scenes is of no concern to the gcc build process. |
523 |
+Therefore, simply invoking it "as usual", i.e. without any special |
524 |
+library path, will make it work as expected here. |
525 |
+ |
526 |
+2011-09-19 Martin von Gagern |
527 |
+ |
528 |
+References: |
529 |
+https://bugs.gentoo.org/372377 |
530 |
+https://bugs.gentoo.org/295480 |
531 |
+ |
532 |
+--- gcc-4.1.2.orig/libstdc++-v3/po/Makefile.am |
533 |
++++ gcc-4.1.2/libstdc++-v3/po/Makefile.am |
534 |
+@@ -39,6 +39,7 @@ MSGFMT = msgfmt |
535 |
+ EXTRA_DIST = string_literals.cc POTFILES.in $(PACKAGE).pot $(LOCALE_IN) |
536 |
+ |
537 |
+ .po.mo: |
538 |
++ env --unset=LD_LIBRARY_PATH \ |
539 |
+ $(MSGFMT) -o $@ $< |
540 |
+ |
541 |
+ all-local: all-local-$(USE_NLS) |
542 |
+--- gcc-4.1.2.orig/libstdc++-v3/po/Makefile.in |
543 |
++++ gcc-4.1.2/libstdc++-v3/po/Makefile.in |
544 |
+@@ -419,6 +419,7 @@ uninstall-am: uninstall-info-am |
545 |
+ |
546 |
+ |
547 |
+ .po.mo: |
548 |
++ env --unset=LD_LIBRARY_PATH \ |
549 |
+ $(MSGFMT) -o $@ $< |
550 |
+ |
551 |
+ all-local: all-local-$(USE_NLS) |
552 |
|
553 |
diff --git a/5.5.0/gentoo/07_all_boehm-gc-execinfo.patch b/5.5.0/gentoo/07_all_boehm-gc-execinfo.patch |
554 |
new file mode 100644 |
555 |
index 0000000..773432b |
556 |
--- /dev/null |
557 |
+++ b/5.5.0/gentoo/07_all_boehm-gc-execinfo.patch |
558 |
@@ -0,0 +1,188 @@ |
559 |
+https://github.com/ivmai/bdwgc/pull/123 |
560 |
+https://gcc.gnu.org/ml/gcc-patches/2015-08/msg01839.html |
561 |
+ |
562 |
+From f95967708d08acdeabc0265baeaa1e9005c4bb7b Mon Sep 17 00:00:00 2001 |
563 |
+From: Mike Frysinger <vapier@g.o> |
564 |
+Date: Sat, 29 Aug 2015 19:14:24 -0400 |
565 |
+Subject: [PATCH] boehm-gc: check for execinfo.h directly |
566 |
+ |
567 |
+The current header depends on glibc version checks to determine whether |
568 |
+execinfo.h exists which breaks uClibc. Instead, add an explicit configure |
569 |
+check for it. |
570 |
+ |
571 |
+2015-08-29 Mike Frysinger <vapier@g.o> |
572 |
+ |
573 |
+ * configure.ac: Call AC_CHECK_HEADERS([execinfo.h]). |
574 |
+ * configure: Regenerated. |
575 |
+ * include/gc.h [HAVE_EXECINFO_H]: Define GC_HAVE_BUILTIN_BACKTRACE. |
576 |
+ * include/gc_config.h.in: Regenerated. |
577 |
+--- |
578 |
+ boehm-gc/configure | 105 +++++++++++++++++++++++++++++++++++++++- |
579 |
+ boehm-gc/configure.ac | 3 ++ |
580 |
+ boehm-gc/include/gc.h | 2 +- |
581 |
+ boehm-gc/include/gc_config.h.in | 3 ++ |
582 |
+ 4 files changed, 110 insertions(+), 3 deletions(-) |
583 |
+ |
584 |
+diff --git a/boehm-gc/configure.ac b/boehm-gc/configure.ac |
585 |
+index 1ccfe37e9d86..ea90ab205b53 100644 |
586 |
+--- a/boehm-gc/configure.ac |
587 |
++++ b/boehm-gc/configure.ac |
588 |
+@@ -317,6 +317,9 @@ case "$host" in |
589 |
+ ;; |
590 |
+ esac |
591 |
+ |
592 |
++# Check for various headers. |
593 |
++AC_CHECK_HEADERS([execinfo.h]) |
594 |
++ |
595 |
+ # extra LD Flags which are required for targets |
596 |
+ case "${host}" in |
597 |
+ *-*-darwin*) |
598 |
+diff --git a/boehm-gc/configure b/boehm-gc/configure |
599 |
+index a8e11dab41b3..7d2b1f7401f7 100755 |
600 |
+--- a/boehm-gc/configure |
601 |
++++ b/boehm-gc/configure |
602 |
+@@ -1945,6 +1945,93 @@ $as_echo "$ac_res" >&6; } |
603 |
+ eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} |
604 |
+ |
605 |
+ } # ac_fn_c_check_member |
606 |
++ |
607 |
++# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES |
608 |
++# ------------------------------------------------------- |
609 |
++# Tests whether HEADER exists, giving a warning if it cannot be compiled using |
610 |
++# the include files in INCLUDES and setting the cache variable VAR |
611 |
++# accordingly. |
612 |
++ac_fn_c_check_header_mongrel () |
613 |
++{ |
614 |
++ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack |
615 |
++ if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : |
616 |
++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 |
617 |
++$as_echo_n "checking for $2... " >&6; } |
618 |
++if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : |
619 |
++ $as_echo_n "(cached) " >&6 |
620 |
++fi |
621 |
++eval ac_res=\$$3 |
622 |
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 |
623 |
++$as_echo "$ac_res" >&6; } |
624 |
++else |
625 |
++ # Is the header compilable? |
626 |
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 |
627 |
++$as_echo_n "checking $2 usability... " >&6; } |
628 |
++cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
629 |
++/* end confdefs.h. */ |
630 |
++$4 |
631 |
++#include <$2> |
632 |
++_ACEOF |
633 |
++if ac_fn_c_try_compile "$LINENO"; then : |
634 |
++ ac_header_compiler=yes |
635 |
++else |
636 |
++ ac_header_compiler=no |
637 |
++fi |
638 |
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
639 |
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 |
640 |
++$as_echo "$ac_header_compiler" >&6; } |
641 |
++ |
642 |
++# Is the header present? |
643 |
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 |
644 |
++$as_echo_n "checking $2 presence... " >&6; } |
645 |
++cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
646 |
++/* end confdefs.h. */ |
647 |
++#include <$2> |
648 |
++_ACEOF |
649 |
++if ac_fn_c_try_cpp "$LINENO"; then : |
650 |
++ ac_header_preproc=yes |
651 |
++else |
652 |
++ ac_header_preproc=no |
653 |
++fi |
654 |
++rm -f conftest.err conftest.$ac_ext |
655 |
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 |
656 |
++$as_echo "$ac_header_preproc" >&6; } |
657 |
++ |
658 |
++# So? What about this header? |
659 |
++case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #(( |
660 |
++ yes:no: ) |
661 |
++ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 |
662 |
++$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} |
663 |
++ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 |
664 |
++$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} |
665 |
++ ;; |
666 |
++ no:yes:* ) |
667 |
++ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 |
668 |
++$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} |
669 |
++ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 |
670 |
++$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} |
671 |
++ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 |
672 |
++$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} |
673 |
++ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 |
674 |
++$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} |
675 |
++ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 |
676 |
++$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} |
677 |
++ ;; |
678 |
++esac |
679 |
++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 |
680 |
++$as_echo_n "checking for $2... " >&6; } |
681 |
++if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : |
682 |
++ $as_echo_n "(cached) " >&6 |
683 |
++else |
684 |
++ eval "$3=\$ac_header_compiler" |
685 |
++fi |
686 |
++eval ac_res=\$$3 |
687 |
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 |
688 |
++$as_echo "$ac_res" >&6; } |
689 |
++fi |
690 |
++ eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} |
691 |
++ |
692 |
++} # ac_fn_c_check_header_mongrel |
693 |
+ cat >config.log <<_ACEOF |
694 |
+ This file contains any messages produced by compilers while |
695 |
+ running configure, to aid debugging if configure makes a mistake. |
696 |
+@@ -15053,6 +15140,20 @@ fi |
697 |
+ ;; |
698 |
+ esac |
699 |
+ |
700 |
++# Check for various headers. |
701 |
++for ac_header in execinfo.h |
702 |
++do : |
703 |
++ ac_fn_c_check_header_mongrel "$LINENO" "execinfo.h" "ac_cv_header_execinfo_h" "$ac_includes_default" |
704 |
++if test "x$ac_cv_header_execinfo_h" = x""yes; then : |
705 |
++ cat >>confdefs.h <<_ACEOF |
706 |
++#define HAVE_EXECINFO_H 1 |
707 |
++_ACEOF |
708 |
++ |
709 |
++fi |
710 |
++ |
711 |
++done |
712 |
++ |
713 |
++ |
714 |
+ # extra LD Flags which are required for targets |
715 |
+ case "${host}" in |
716 |
+ *-*-darwin*) |
717 |
+diff --git a/boehm-gc/include/gc.h b/boehm-gc/include/gc.h |
718 |
+index 6b38f2d0e6ca..bf50b294a3a7 100644 |
719 |
+--- a/boehm-gc/include/gc.h |
720 |
++++ b/boehm-gc/include/gc.h |
721 |
+@@ -503,7 +503,7 @@ GC_API GC_PTR GC_malloc_atomic_ignore_off_page GC_PROTO((size_t lb)); |
722 |
+ #if defined(__linux__) || defined(__GLIBC__) |
723 |
+ # include <features.h> |
724 |
+ # if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1 || __GLIBC__ > 2) \ |
725 |
+- && !defined(__ia64__) |
726 |
++ && !defined(__ia64__) && defined(HAVE_EXECINFO_H) |
727 |
+ # ifndef GC_HAVE_BUILTIN_BACKTRACE |
728 |
+ # define GC_HAVE_BUILTIN_BACKTRACE |
729 |
+ # endif |
730 |
+diff --git a/boehm-gc/include/gc_config.h.in b/boehm-gc/include/gc_config.h.in |
731 |
+index 7ef9822c578e..818ce0999553 100644 |
732 |
+--- a/boehm-gc/include/gc_config.h.in |
733 |
++++ b/boehm-gc/include/gc_config.h.in |
734 |
+@@ -75,6 +75,9 @@ |
735 |
+ /* Define to 1 if you have the <dlfcn.h> header file. */ |
736 |
+ #undef HAVE_DLFCN_H |
737 |
+ |
738 |
++/* Define to 1 if you have the <execinfo.h> header file. */ |
739 |
++#undef HAVE_EXECINFO_H |
740 |
++ |
741 |
+ /* Define to 1 if you have the <inttypes.h> header file. */ |
742 |
+ #undef HAVE_INTTYPES_H |
743 |
+ |
744 |
+-- |
745 |
+2.8.2 |
746 |
+ |
747 |
|
748 |
diff --git a/5.5.0/gentoo/08_all_alpha-mieee-default.patch b/5.5.0/gentoo/08_all_alpha-mieee-default.patch |
749 |
new file mode 100644 |
750 |
index 0000000..f66b393 |
751 |
--- /dev/null |
752 |
+++ b/5.5.0/gentoo/08_all_alpha-mieee-default.patch |
753 |
@@ -0,0 +1,38 @@ |
754 |
+Set the default behavior on alpha to use -mieee since the large majority of |
755 |
+time we want this (bad/weird things can happen with packages built without |
756 |
+it). |
757 |
+ |
758 |
+To satisfy those people who may not want -mieee forced on them all the time, |
759 |
+we also provide -mno-ieee. |
760 |
+ |
761 |
+Patch by Mike Frysinger <vapier@g.o> |
762 |
+ |
763 |
+Note: upstream doesn't want to take this due to long standing behavior, and |
764 |
+because it'd make behavior across OS's inconsistent: |
765 |
+ https://gcc.gnu.org/ml/gcc-patches/2003-07/msg02144.html |
766 |
+ |
767 |
+This makes sense for upstream, but Gentoo is more concerned about packages |
768 |
+behaving the same across arches under Linux. |
769 |
+ |
770 |
+--- a/gcc/config/alpha/alpha.h |
771 |
++++ b/gcc/config/alpha/alpha.h |
772 |
+@@ -96,6 +96,8 @@ along with GCC; see the file COPYING3. If not see |
773 |
+ while (0) |
774 |
+ #endif |
775 |
+ |
776 |
++#define CPP_SPEC "%{!no-ieee:-mieee}" |
777 |
++ |
778 |
+ /* Run-time compilation parameters selecting different hardware subsets. */ |
779 |
+ |
780 |
+ /* Which processor to schedule for. The cpu attribute defines a list that |
781 |
+--- a/gcc/config/alpha/alpha.opt |
782 |
++++ b/gcc/config/alpha/alpha.opt |
783 |
+@@ -39,7 +39,7 @@ Target RejectNegative Mask(IEEE_CONFORMANT) |
784 |
+ Request IEEE-conformant math library routines (OSF/1) |
785 |
+ |
786 |
+ mieee |
787 |
+-Target Report RejectNegative Mask(IEEE) |
788 |
++Target Report Mask(IEEE) |
789 |
+ Emit IEEE-conformant code, without inexact exceptions |
790 |
+ |
791 |
+ mieee-with-inexact |
792 |
|
793 |
diff --git a/5.5.0/gentoo/09_all_alpha-asm-mcpu.patch b/5.5.0/gentoo/09_all_alpha-asm-mcpu.patch |
794 |
new file mode 100644 |
795 |
index 0000000..d487333 |
796 |
--- /dev/null |
797 |
+++ b/5.5.0/gentoo/09_all_alpha-asm-mcpu.patch |
798 |
@@ -0,0 +1,17 @@ |
799 |
+https://bugs.gentoo.org/170146 |
800 |
+http://gcc.gnu.org/ml/gcc-patches/2009-11/msg00403.html |
801 |
+https://gcc.gnu.org/viewcvs/gcc?view=revision&revision=223888 |
802 |
+ |
803 |
+alpha: turn -mcpu=<cpu> into -m<cpu> for assembler all the time |
804 |
+ |
805 |
+--- a/gcc/config/alpha/elf.h |
806 |
++++ b/gcc/config/alpha/elf.h |
807 |
+@@ -46,7 +46,7 @@ along with GCC; see the file COPYING3. If not see |
808 |
+ #define CC1_SPEC "%{G*}" |
809 |
+ |
810 |
+ #undef ASM_SPEC |
811 |
+-#define ASM_SPEC "%{G*} %{relax:-relax} %{!gstabs*:-no-mdebug}%{gstabs*:-mdebug}" |
812 |
++#define ASM_SPEC "%{G*} %{relax:-relax} %{!gstabs*:-no-mdebug}%{gstabs*:-mdebug} %{mcpu=*:-m%*}" |
813 |
+ |
814 |
+ #undef IDENT_ASM_OP |
815 |
+ #define IDENT_ASM_OP "\t.ident\t" |
816 |
|
817 |
diff --git a/5.5.0/gentoo/10_all_arm_armv4t-default.patch b/5.5.0/gentoo/10_all_arm_armv4t-default.patch |
818 |
new file mode 100644 |
819 |
index 0000000..4616cf9 |
820 |
--- /dev/null |
821 |
+++ b/5.5.0/gentoo/10_all_arm_armv4t-default.patch |
822 |
@@ -0,0 +1,16 @@ |
823 |
+gcc defaults to armv5t for all targets even armv4t |
824 |
+ |
825 |
+http://sourceware.org/ml/crossgcc/2008-05/msg00009.html |
826 |
+ |
827 |
+ |
828 |
+--- a/gcc/config/arm/linux-eabi.h |
829 |
++++ b/gcc/config/arm/linux-eabi.h |
830 |
+@@ -45,7 +45,7 @@ |
831 |
+ The ARM10TDMI core is the default for armv5t, so set |
832 |
+ SUBTARGET_CPU_DEFAULT to achieve this. */ |
833 |
+ #undef SUBTARGET_CPU_DEFAULT |
834 |
+-#define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm10tdmi |
835 |
++#define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm9tdmi |
836 |
+ |
837 |
+ /* TARGET_BIG_ENDIAN_DEFAULT is set in |
838 |
+ config.gcc for big endian configurations. */ |
839 |
|
840 |
diff --git a/5.5.0/gentoo/11_all_ia64_note.GNU-stack.patch b/5.5.0/gentoo/11_all_ia64_note.GNU-stack.patch |
841 |
new file mode 100644 |
842 |
index 0000000..66a787e |
843 |
--- /dev/null |
844 |
+++ b/5.5.0/gentoo/11_all_ia64_note.GNU-stack.patch |
845 |
@@ -0,0 +1,92 @@ |
846 |
+http://gcc.gnu.org/PR21098 |
847 |
+ |
848 |
+ |
849 |
+2004-09-20 Jakub Jelinek <jakub@××××××.com> |
850 |
+ |
851 |
+ * config/rs6000/ppc-asm.h: Add .note.GNU-stack section also |
852 |
+ on ppc64-linux. |
853 |
+ |
854 |
+ * config/ia64/lib1funcs.asm: Add .note.GNU-stack section on |
855 |
+ ia64-linux. |
856 |
+ * config/ia64/crtbegin.asm: Likewise. |
857 |
+ * config/ia64/crtend.asm: Likewise. |
858 |
+ * config/ia64/crti.asm: Likewise. |
859 |
+ * config/ia64/crtn.asm: Likewise. |
860 |
+ |
861 |
+2004-05-14 Jakub Jelinek <jakub@××××××.com> |
862 |
+ |
863 |
+ * config/ia64/linux.h (TARGET_ASM_FILE_END): Define. |
864 |
+ |
865 |
+ |
866 |
+--- a/gcc/config/ia64/linux.h |
867 |
++++ b/gcc/config/ia64/linux.h |
868 |
+@@ -24,6 +24,8 @@ a copy of the GCC Runtime Library Exception along with this program; |
869 |
+ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see |
870 |
+ <http://www.gnu.org/licenses/>. */ |
871 |
+ |
872 |
++#define TARGET_ASM_FILE_END file_end_indicate_exec_stack |
873 |
++ |
874 |
+ /* This is for -profile to use -lc_p instead of -lc. */ |
875 |
+ #undef CC1_SPEC |
876 |
+ #define CC1_SPEC "%{profile:-p} %{G*}" |
877 |
+--- a/gcc/config/rs6000/ppc-asm.h |
878 |
++++ b/gcc/config/rs6000/ppc-asm.h |
879 |
+@@ -352,7 +352,7 @@ GLUE(.L,name): \ |
880 |
+ #endif |
881 |
+ #endif |
882 |
+ |
883 |
+-#if defined __linux__ && !defined __powerpc64__ |
884 |
++#if defined __linux__ |
885 |
+ .section .note.GNU-stack |
886 |
+ .previous |
887 |
+ #endif |
888 |
+--- a/libgcc/config/ia64/crtbegin.S |
889 |
++++ b/libgcc/config/ia64/crtbegin.S |
890 |
+@@ -252,3 +252,7 @@ __do_jv_register_classes: |
891 |
+ .weak __cxa_finalize |
892 |
+ #endif |
893 |
+ .weak _Jv_RegisterClasses |
894 |
++ |
895 |
++#ifdef __linux__ |
896 |
++.section .note.GNU-stack; .previous |
897 |
++#endif |
898 |
+--- a/libgcc/config/ia64/crtend.S |
899 |
++++ b/libgcc/config/ia64/crtend.S |
900 |
+@@ -119,3 +119,6 @@ __do_global_ctors_aux: |
901 |
+ |
902 |
+ br.ret.sptk.many rp |
903 |
+ .endp __do_global_ctors_aux |
904 |
++#ifdef __linux__ |
905 |
++.section .note.GNU-stack; .previous |
906 |
++#endif |
907 |
+--- a/libgcc/config/ia64/crti.S |
908 |
++++ b/libgcc/config/ia64/crti.S |
909 |
+@@ -49,5 +49,8 @@ _fini: |
910 |
+ .save rp, r33 |
911 |
+ mov r33 = b0 |
912 |
+ .body |
913 |
++#ifdef __linux__ |
914 |
++.section .note.GNU-stack; .previous |
915 |
++#endif |
916 |
+ |
917 |
+ # end of crti.S |
918 |
+--- a/libgcc/config/ia64/crtn.S |
919 |
++++ b/libgcc/config/ia64/crtn.S |
920 |
+@@ -39,5 +39,8 @@ |
921 |
+ .restore sp |
922 |
+ mov r12 = r35 |
923 |
+ br.ret.sptk.many b0 |
924 |
++#ifdef __linux__ |
925 |
++.section .note.GNU-stack; .previous |
926 |
++#endif |
927 |
+ |
928 |
+ # end of crtn.S |
929 |
+--- a/libgcc/config/ia64/lib1funcs.S |
930 |
++++ b/libgcc/config/ia64/lib1funcs.S |
931 |
+@@ -793,3 +793,6 @@ __floattitf: |
932 |
+ .endp __floattitf |
933 |
+ #endif |
934 |
+ #endif |
935 |
++#ifdef __linux__ |
936 |
++.section .note.GNU-stack; .previous |
937 |
++#endif |
938 |
|
939 |
diff --git a/5.5.0/gentoo/12_all_libjava-classpath-locale-sort.patch b/5.5.0/gentoo/12_all_libjava-classpath-locale-sort.patch |
940 |
new file mode 100644 |
941 |
index 0000000..0870939 |
942 |
--- /dev/null |
943 |
+++ b/5.5.0/gentoo/12_all_libjava-classpath-locale-sort.patch |
944 |
@@ -0,0 +1,57 @@ |
945 |
+From 3a52cf750bd9da06cffa7d642f1e74e77bfd8a8c Mon Sep 17 00:00:00 2001 |
946 |
+From: vapier <vapier@138bc75d-0d04-0410-961f-82ee72b054a4> |
947 |
+Date: Mon, 26 Oct 2015 18:32:41 +0000 |
948 |
+Subject: [PATCH] libjava: fix locale handling when sorting JNI methods |
949 |
+MIME-Version: 1.0 |
950 |
+Content-Type: text/plain; charset=UTF-8 |
951 |
+Content-Transfer-Encoding: 8bit |
952 |
+ |
953 |
+When building under LANG=cs_CZ.UTF-8, the JNI method check fails: |
954 |
+ |
955 |
+/bin/bash ../../scripts/check_jni_methods.sh |
956 |
+Found a problem with the JNI methods declared and implemented. |
957 |
+(<) missing in implementation, (>) missing in header files |
958 |
+> Java_gnu_java_awt_peer_gtk_GtkClipboard_advertiseContent |
959 |
+> Java_gnu_java_awt_peer_gtk_GtkClipboard_initNativeState |
960 |
+... lots more ... |
961 |
+ |
962 |
+While the sed commands are run under LC_ALL=C, the two sort commands are |
963 |
+not, and they end up producing unexpected output (for the test). Once we |
964 |
+run both under LC_ALL=C, the check passes. While we're here, we can also |
965 |
+combine latter the `sort|uniq` into `sort -u` to match the earlier code. |
966 |
+ |
967 |
+URL: https://bugs.gentoo.org/563710 |
968 |
+Reported-by: Miroslav Å ulc <fordfrog@g.o> |
969 |
+ |
970 |
+ |
971 |
+git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@229388 138bc75d-0d04-0410-961f-82ee72b054a4 |
972 |
+--- |
973 |
+ libjava/classpath/ChangeLog | 5 +++++ |
974 |
+ libjava/classpath/scripts/check_jni_methods.sh.in | 4 ++-- |
975 |
+ 2 files changed, 7 insertions(+), 2 deletions(-) |
976 |
+ |
977 |
+diff --git a/libjava/classpath/scripts/check_jni_methods.sh.in b/libjava/classpath/scripts/check_jni_methods.sh.in |
978 |
+index facf34b..fb9d104 100644 |
979 |
+--- a/libjava/classpath/scripts/check_jni_methods.sh.in |
980 |
++++ b/libjava/classpath/scripts/check_jni_methods.sh.in |
981 |
+@@ -14,7 +14,7 @@ grep -h '^JNIEXPORT .* Java_' @abs_top_srcdir@/include/*.h | \ |
982 |
+ LC_ALL=C sed -e 's,.*JNICALL \(Java_[a-z_A-Z0-9]*\).*$,\1,' > $TMPFILE |
983 |
+ grep -h '^JNIEXPORT .* Java_' @abs_top_builddir@/include/*.h | \ |
984 |
+ LC_ALL=C sed -e 's,.*JNICALL \(Java_[a-z_A-Z0-9]*\).*$,\1,' >> $TMPFILE |
985 |
+-sort -u $TMPFILE > $TMPFILE4 |
986 |
++LC_ALL=C sort -u $TMPFILE > $TMPFILE4 |
987 |
+ mv $TMPFILE4 $TMPFILE |
988 |
+ |
989 |
+ # Find all methods in the JNI C source files. |
990 |
+@@ -31,7 +31,7 @@ find @abs_top_srcdir@/native/jni -name \*.cpp | \ |
991 |
+ cut -f4 -d\ | \ |
992 |
+ LC_ALL=C sed -e 's,^\JNIEXPORT .* JNICALL \(Java_[a-z_A-Z0-9]*\).*$,\1,' >> $TMPFILE2 |
993 |
+ mv $TMPFILE2 $TMPFILE3 |
994 |
+-sort $TMPFILE3 | uniq > $TMPFILE2 |
995 |
++LC_ALL=C sort -u $TMPFILE3 > $TMPFILE2 |
996 |
+ rm $TMPFILE3 |
997 |
+ |
998 |
+ # Write temporary ignore file. |
999 |
+-- |
1000 |
+2.5.2 |
1001 |
+ |
1002 |
|
1003 |
diff --git a/5.5.0/gentoo/13_all_sh_pr24836_all-archs.patch b/5.5.0/gentoo/13_all_sh_pr24836_all-archs.patch |
1004 |
new file mode 100644 |
1005 |
index 0000000..03db560 |
1006 |
--- /dev/null |
1007 |
+++ b/5.5.0/gentoo/13_all_sh_pr24836_all-archs.patch |
1008 |
@@ -0,0 +1,27 @@ |
1009 |
+gcc/configure doesn't handle all possible SH architectures |
1010 |
+ |
1011 |
+http://gcc.gnu.org/PR24836 |
1012 |
+ |
1013 |
+ |
1014 |
+--- a/gcc/configure.ac |
1015 |
++++ b/gcc/configure.ac |
1016 |
+@@ -2924,7 +2924,7 @@ foo: .long 25 |
1017 |
+ tls_first_minor=14 |
1018 |
+ tls_as_opt="-m64 -Aesame --fatal-warnings" |
1019 |
+ ;; |
1020 |
+- sh-*-* | sh[34]-*-*) |
1021 |
++ sh-*-* | sh[34]*-*-*) |
1022 |
+ conftest_s=' |
1023 |
+ .section ".tdata","awT",@progbits |
1024 |
+ foo: .long 25 |
1025 |
+--- a/gcc/configure |
1026 |
++++ b/gcc/configure |
1027 |
+@@ -22753,7 +22753,7 @@ foo: .long 25 |
1028 |
+ tls_first_minor=14 |
1029 |
+ tls_as_opt="-m64 -Aesame --fatal-warnings" |
1030 |
+ ;; |
1031 |
+- sh-*-* | sh[34]-*-*) |
1032 |
++ sh-*-* | sh[34]*-*-*) |
1033 |
+ conftest_s=' |
1034 |
+ .section ".tdata","awT",@progbits |
1035 |
+ foo: .long 25 |
1036 |
|
1037 |
diff --git a/5.5.0/gentoo/14_all_superh_default-multilib.patch b/5.5.0/gentoo/14_all_superh_default-multilib.patch |
1038 |
new file mode 100644 |
1039 |
index 0000000..8b638d9 |
1040 |
--- /dev/null |
1041 |
+++ b/5.5.0/gentoo/14_all_superh_default-multilib.patch |
1042 |
@@ -0,0 +1,24 @@ |
1043 |
+The gcc-3.x toolchains would contain all the targets by default. With gcc-4, |
1044 |
+you have to actually list out the multilibs you want or you will end up with |
1045 |
+just one when using targets like 'sh4-linux-gnu'. |
1046 |
+ |
1047 |
+The resulting toolchain can't even build a kernel as the kernel needs to build |
1048 |
+with the nofpu flag to be sure that no fpu ops are generated. |
1049 |
+ |
1050 |
+Here we restore the gcc-3.x behavior; the additional overhead of building all |
1051 |
+of these multilibs by default is negligible. |
1052 |
+ |
1053 |
+https://bugs.gentoo.org/140205 |
1054 |
+https://bugs.gentoo.org/320251 |
1055 |
+ |
1056 |
+--- a/gcc/config.gcc |
1057 |
++++ b/gcc/config.gcc |
1058 |
+@@ -2455,7 +2455,7 @@ sh-*-symbianelf* | sh[12346l]*-*-symbianelf* | \ |
1059 |
+ if test "$sh_multilibs" = "default" ; then |
1060 |
+ case ${target} in |
1061 |
+ sh64-superh-linux* | \ |
1062 |
+- sh[1234]*) sh_multilibs=${sh_cpu_target} ;; |
1063 |
++ 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') ;; |
1064 |
+ sh64* | sh5*) sh_multilibs=m5-32media,m5-32media-nofpu,m5-compact,m5-compact-nofpu,m5-64media,m5-64media-nofpu ;; |
1065 |
+ sh-superh-*) sh_multilibs=m4,m4-single,m4-single-only,m4-nofpu ;; |
1066 |
+ sh*-*-linux*) sh_multilibs=m1,m3e,m4 ;; |
1067 |
|
1068 |
diff --git a/5.5.0/gentoo/15_all_libiberty-asprintf.patch b/5.5.0/gentoo/15_all_libiberty-asprintf.patch |
1069 |
new file mode 100644 |
1070 |
index 0000000..bee0c4c |
1071 |
--- /dev/null |
1072 |
+++ b/5.5.0/gentoo/15_all_libiberty-asprintf.patch |
1073 |
@@ -0,0 +1,18 @@ |
1074 |
+2008-07-25 Magnus Granberg <zorry@×××.nu> |
1075 |
+ |
1076 |
+ * include/libiberty.h (asprintf): Don't declare if defined as a macro |
1077 |
+ |
1078 |
+--- a/include/libiberty.h |
1079 |
++++ b/include/libiberty.h |
1080 |
+@@ -609,8 +609,11 @@ extern int pwait (int, int *, int); |
1081 |
+ /* Like sprintf but provides a pointer to malloc'd storage, which must |
1082 |
+ be freed by the caller. */ |
1083 |
+ |
1084 |
++/* asprintf may be declared as a macro by glibc with __USE_FORTIFY_LEVEL. */ |
1085 |
++#ifndef asprintf |
1086 |
+ extern int asprintf (char **, const char *, ...) ATTRIBUTE_PRINTF_2; |
1087 |
+ #endif |
1088 |
++#endif |
1089 |
+ |
1090 |
+ #if !HAVE_DECL_VASPRINTF |
1091 |
+ /* Like vsprintf but provides a pointer to malloc'd storage, which |
1092 |
|
1093 |
diff --git a/5.5.0/gentoo/16_all_libiberty-pic.patch b/5.5.0/gentoo/16_all_libiberty-pic.patch |
1094 |
new file mode 100644 |
1095 |
index 0000000..b6160a7 |
1096 |
--- /dev/null |
1097 |
+++ b/5.5.0/gentoo/16_all_libiberty-pic.patch |
1098 |
@@ -0,0 +1,10 @@ |
1099 |
+--- a/libiberty/Makefile.in |
1100 |
++++ b/libiberty/Makefile.in |
1101 |
+@@ -246,6 +246,7 @@ $(TARGETLIB): $(REQUIRED_OFILES) $(EXTRA_OFILES) $(LIBOBJS) |
1102 |
+ $(AR) $(AR_FLAGS) $(TARGETLIB) \ |
1103 |
+ $(REQUIRED_OFILES) $(EXTRA_OFILES) $(LIBOBJS); \ |
1104 |
+ $(RANLIB) $(TARGETLIB); \ |
1105 |
++ cp $(TARGETLIB) ../ ; \ |
1106 |
+ cd ..; \ |
1107 |
+ else true; fi |
1108 |
+ |
1109 |
|
1110 |
diff --git a/5.5.0/gentoo/17_all_netbsd-Bsymbolic.patch b/5.5.0/gentoo/17_all_netbsd-Bsymbolic.patch |
1111 |
new file mode 100644 |
1112 |
index 0000000..c9b654e |
1113 |
--- /dev/null |
1114 |
+++ b/5.5.0/gentoo/17_all_netbsd-Bsymbolic.patch |
1115 |
@@ -0,0 +1,13 @@ |
1116 |
+https://bugs.gentoo.org/122698 |
1117 |
+https://gcc.gnu.org/ml/gcc-patches/2015-05/msg02854.html |
1118 |
+ |
1119 |
+--- a/gcc/config/netbsd-elf.h |
1120 |
++++ b/gcc/config/netbsd-elf.h |
1121 |
+@@ -70,6 +70,7 @@ along with GCC; see the file COPYING3. If not see |
1122 |
+ #define NETBSD_LINK_SPEC_ELF \ |
1123 |
+ "%{assert*} %{R*} %{rpath*} \ |
1124 |
+ %{shared:-shared} \ |
1125 |
++ %{symbolic:-Bsymbolic} \ |
1126 |
+ %{!shared: \ |
1127 |
+ -dc -dp \ |
1128 |
+ %{!nostdlib: \ |
1129 |
|
1130 |
diff --git a/5.5.0/gentoo/18_all_libitm-no-fortify-source.patch b/5.5.0/gentoo/18_all_libitm-no-fortify-source.patch |
1131 |
new file mode 100644 |
1132 |
index 0000000..5ab15af |
1133 |
--- /dev/null |
1134 |
+++ b/5.5.0/gentoo/18_all_libitm-no-fortify-source.patch |
1135 |
@@ -0,0 +1,27 @@ |
1136 |
+https://bugs.gentoo.org/508852 |
1137 |
+https://gcc.gnu.org/PR61164 |
1138 |
+ |
1139 |
+2014-04-27 Magnus Granberg <zorry@g.o> |
1140 |
+ |
1141 |
+ #508852 |
1142 |
+ * libitm/configure.tgt: Disable FORTIFY |
1143 |
+ |
1144 |
+--- a/libitm/configure.tgt |
1145 |
++++ b/libitm/configure.tgt |
1146 |
+@@ -43,6 +43,16 @@ if test "$gcc_cv_have_tls" = yes ; then |
1147 |
+ esac |
1148 |
+ fi |
1149 |
+ |
1150 |
++# FIXME: error: inlining failed in call to always_inline |
1151 |
++# ‘int vfprintf(FILE*, const char*, __va_list_tag*)’ |
1152 |
++# : function body can be overwritten at link time |
1153 |
++# Disable Fortify in libitm for now. #508852 |
1154 |
++case "${target}" in |
1155 |
++ *-*-linux*) |
1156 |
++ XCFLAGS="${XCFLAGS} -U_FORTIFY_SOURCE" |
1157 |
++ ;; |
1158 |
++esac |
1159 |
++ |
1160 |
+ # Map the target cpu to an ARCH sub-directory. At the same time, |
1161 |
+ # work out any special compilation flags as necessary. |
1162 |
+ case "${target_cpu}" in |
1163 |
|
1164 |
diff --git a/5.5.0/gentoo/19_all_gcc-poison-system-directories.patch b/5.5.0/gentoo/19_all_gcc-poison-system-directories.patch |
1165 |
new file mode 100644 |
1166 |
index 0000000..5ed4549 |
1167 |
--- /dev/null |
1168 |
+++ b/5.5.0/gentoo/19_all_gcc-poison-system-directories.patch |
1169 |
@@ -0,0 +1,152 @@ |
1170 |
+http://cgit.openembedded.org/openembedded-core/tree/meta/recipes-devtools/gcc/gcc-4.9/0016-gcc-poison-system-directories.patch |
1171 |
+ |
1172 |
+From: Khem Raj <raj.khem@×××××.com> |
1173 |
+Date: Fri, 29 Mar 2013 08:59:00 +0400 |
1174 |
+Subject: [PATCH 16/35] gcc: poison-system-directories |
1175 |
+ |
1176 |
+Signed-off-by: Khem Raj <raj.khem@×××××.com> |
1177 |
+ |
1178 |
+Upstream-Status: Inappropriate [distribution: codesourcery] |
1179 |
+--- |
1180 |
+ gcc/Makefile.in | 2 +- |
1181 |
+ gcc/common.opt | 4 ++++ |
1182 |
+ gcc/config.in | 6 ++++++ |
1183 |
+ gcc/configure | 20 ++++++++++++++++++-- |
1184 |
+ gcc/configure.ac | 10 ++++++++++ |
1185 |
+ gcc/doc/invoke.texi | 9 +++++++++ |
1186 |
+ gcc/gcc.c | 2 ++ |
1187 |
+ gcc/incpath.c | 19 +++++++++++++++++++ |
1188 |
+ 8 files changed, 69 insertions(+), 3 deletions(-) |
1189 |
+ |
1190 |
+--- a/gcc/common.opt |
1191 |
++++ b/gcc/common.opt |
1192 |
+@@ -603,6 +603,10 @@ Wpedantic |
1193 |
+ Common Var(pedantic) Init(0) Warning |
1194 |
+ Issue warnings needed for strict compliance to the standard |
1195 |
+ |
1196 |
++Wpoison-system-directories |
1197 |
++Common Var(flag_poison_system_directories) Init(1) Warning |
1198 |
++Warn for -I and -L options using system directories if cross compiling |
1199 |
++ |
1200 |
+ Wreturn-local-addr |
1201 |
+ Common Var(warn_return_local_addr) Init(1) Warning |
1202 |
+ Warn about returning a pointer/reference to a local or temporary variable. |
1203 |
+--- a/gcc/configure.ac |
1204 |
++++ b/gcc/configure.ac |
1205 |
+@@ -5366,6 +5366,16 @@ AC_ARG_ENABLE(version-specific-runtime-l |
1206 |
+ [specify that runtime libraries should be |
1207 |
+ installed in a compiler-specific directory])]) |
1208 |
+ |
1209 |
++AC_ARG_ENABLE([poison-system-directories], |
1210 |
++ AS_HELP_STRING([--enable-poison-system-directories], |
1211 |
++ [warn for use of native system header directories]),, |
1212 |
++ [enable_poison_system_directories=no]) |
1213 |
++if test "x${enable_poison_system_directories}" = "xyes"; then |
1214 |
++ AC_DEFINE([ENABLE_POISON_SYSTEM_DIRECTORIES], |
1215 |
++ [1], |
1216 |
++ [Define to warn for use of native system header directories]) |
1217 |
++fi |
1218 |
++ |
1219 |
+ # Substitute configuration variables |
1220 |
+ AC_SUBST(subdirs) |
1221 |
+ AC_SUBST(srcdir) |
1222 |
+--- a/gcc/configure |
1223 |
++++ b/gcc/configure |
1224 |
+@@ -928,6 +928,7 @@ with_system_zlib |
1225 |
+ enable_maintainer_mode |
1226 |
+ enable_link_mutex |
1227 |
+ enable_version_specific_runtime_libs |
1228 |
++enable_poison_system_directories |
1229 |
+ enable_plugin |
1230 |
+ enable_host_shared |
1231 |
+ enable_libquadmath_support |
1232 |
+@@ -1648,6 +1649,8 @@ Optional Features: |
1233 |
+ --enable-version-specific-runtime-libs |
1234 |
+ specify that runtime libraries should be installed |
1235 |
+ in a compiler-specific directory |
1236 |
++ --enable-poison-system-directories |
1237 |
++ warn for use of native system header directories |
1238 |
+ --enable-plugin enable plugin support |
1239 |
+ --enable-host-shared build host code as shared libraries |
1240 |
+ --disable-libquadmath-support |
1241 |
+@@ -27702,6 +27705,19 @@ if test "${enable_version_specific_runti |
1242 |
+ fi |
1243 |
+ |
1244 |
+ |
1245 |
++# Check whether --enable-poison-system-directories was given. |
1246 |
++if test "${enable_poison_system_directories+set}" = set; then : |
1247 |
++ enableval=$enable_poison_system_directories; |
1248 |
++else |
1249 |
++ enable_poison_system_directories=no |
1250 |
++fi |
1251 |
++ |
1252 |
++if test "x${enable_poison_system_directories}" = "xyes"; then |
1253 |
++ |
1254 |
++$as_echo "#define ENABLE_POISON_SYSTEM_DIRECTORIES 1" >>confdefs.h |
1255 |
++ |
1256 |
++fi |
1257 |
++ |
1258 |
+ # Substitute configuration variables |
1259 |
+ |
1260 |
+ |
1261 |
+--- a/gcc/config.in |
1262 |
++++ b/gcc/config.in |
1263 |
+@@ -138,6 +138,12 @@ |
1264 |
+ #endif |
1265 |
+ |
1266 |
+ |
1267 |
++/* Define to warn for use of native system header directories */ |
1268 |
++#ifndef USED_FOR_TARGET |
1269 |
++#undef ENABLE_POISON_SYSTEM_DIRECTORIES |
1270 |
++#endif |
1271 |
++ |
1272 |
++ |
1273 |
+ /* Define if you want all operations on RTL (the basic data structure of the |
1274 |
+ optimizer and back end) to be checked for dynamic type safety at runtime. |
1275 |
+ This is quite expensive. */ |
1276 |
+--- a/gcc/gcc.c |
1277 |
++++ b/gcc/gcc.c |
1278 |
+@@ -764,6 +764,8 @@ proper position among the other output f |
1279 |
+ "%{fuse-ld=*:-fuse-ld=%*} " LINK_COMPRESS_DEBUG_SPEC \ |
1280 |
+ "%X %{o*} %{e*} %{N} %{n} %{r}\ |
1281 |
+ %{s} %{t} %{u*} %{z} %{Z} %{!nostdlib:%{!nostartfiles:%S}} " VTABLE_VERIFICATION_SPEC " \ |
1282 |
++ %{Wno-poison-system-directories:--no-poison-system-directories}\ |
1283 |
++ %{Werror=poison-system-directories:--error-poison-system-directories}\ |
1284 |
+ %{static:} %{L*} %(mfwrap) %(link_libgcc) " SANITIZER_EARLY_SPEC " %o\ |
1285 |
+ " CHKP_SPEC " \ |
1286 |
+ %{fopenacc|fopenmp|ftree-parallelize-loops=*:%:include(libgomp.spec)%(link_gomp)}\ |
1287 |
+--- a/gcc/incpath.c |
1288 |
++++ b/gcc/incpath.c |
1289 |
+@@ -28,6 +28,7 @@ |
1290 |
+ #include "intl.h" |
1291 |
+ #include "incpath.h" |
1292 |
+ #include "cppdefault.h" |
1293 |
++#include "diagnostic-core.h" |
1294 |
+ |
1295 |
+ /* Microsoft Windows does not natively support inodes. |
1296 |
+ VMS has non-numeric inodes. */ |
1297 |
+@@ -382,6 +383,24 @@ merge_include_chains (const char *sysroo |
1298 |
+ } |
1299 |
+ fprintf (stderr, _("End of search list.\n")); |
1300 |
+ } |
1301 |
++ |
1302 |
++#ifdef ENABLE_POISON_SYSTEM_DIRECTORIES |
1303 |
++ if (flag_poison_system_directories) |
1304 |
++ { |
1305 |
++ struct cpp_dir *p; |
1306 |
++ |
1307 |
++ for (p = heads[QUOTE]; p; p = p->next) |
1308 |
++ { |
1309 |
++ if ((!strncmp (p->name, "/usr/include", 12)) |
1310 |
++ || (!strncmp (p->name, "/usr/local/include", 18)) |
1311 |
++ || (!strncmp (p->name, "/usr/X11R6/include", 18))) |
1312 |
++ warning (OPT_Wpoison_system_directories, |
1313 |
++ "include location \"%s\" is unsafe for " |
1314 |
++ "cross-compilation", |
1315 |
++ p->name); |
1316 |
++ } |
1317 |
++ } |
1318 |
++#endif |
1319 |
+ } |
1320 |
+ |
1321 |
+ /* Use given -I paths for #include "..." but not #include <...>, and |
1322 |
|
1323 |
diff --git a/5.5.0/gentoo/20_all_gcc-5-pr546752.patch b/5.5.0/gentoo/20_all_gcc-5-pr546752.patch |
1324 |
new file mode 100644 |
1325 |
index 0000000..6aa41f2 |
1326 |
--- /dev/null |
1327 |
+++ b/5.5.0/gentoo/20_all_gcc-5-pr546752.patch |
1328 |
@@ -0,0 +1,459 @@ |
1329 |
+https://gcc.gnu.org/PR61929 |
1330 |
+https://bugs.gentoo.org/546752 |
1331 |
+ |
1332 |
+From fc25c6708493bdbf4809f733bc0e68a4ca117ae1 Mon Sep 17 00:00:00 2001 |
1333 |
+From: spop <spop@138bc75d-0d04-0410-961f-82ee72b054a4> |
1334 |
+Date: Fri, 17 Jul 2015 16:34:21 +0000 |
1335 |
+Subject: [PATCH] [graphite] fix pr61929 |
1336 |
+ |
1337 |
+This fixes bootstrap of GCC with BOOT_CFLAGS="-g -O2 -fgraphite-identity |
1338 |
+-floop-nest-optimize -floop-block -floop-interchange -floop-strip-mine". It |
1339 |
+passes regstrap on amd64-linux. A previous change |
1340 |
+(https://gcc.gnu.org/viewcvs/gcc?view=revision&revision=213816), replaced |
1341 |
+isl_int with isl_val because isl_int would be deprecated. Since isl_val has |
1342 |
+stricter checks, it exposed the bug. In the test case (isl_set_max_val) would |
1343 |
+return infinity which would remain unchecked. We now check if the value |
1344 |
+returned is an integer or not, and bail out if it isn't. The other problem was |
1345 |
+that we were allowing all kinds of data-refs in a scop. Now we discard a scop |
1346 |
+if it has any date-ref other than (ARRAY_REF, MEM_REF, COMPONENT_REF). |
1347 |
+ |
1348 |
+ PR middle-end/61929 |
1349 |
+ * graphite-dependences.c (add_pdr_constraints): Renamed |
1350 |
+ pdr->extent to pdr->subscript_sizes. |
1351 |
+ * graphite-interchange.c (build_linearized_memory_access): Add |
1352 |
+ back all gcc_assert's that the "isl_int to isl_val conversion" |
1353 |
+ patch has removed. Refactored. |
1354 |
+ (pdr_stride_in_loop): Renamed pdr->extent to pdr->subscript_sizes. |
1355 |
+ * graphite-poly.c (new_poly_dr): Same. |
1356 |
+ (free_poly_dr): Same. |
1357 |
+ * graphite-poly.h (struct poly_dr): Same. |
1358 |
+ * graphite-scop-detection.c (stmt_has_simple_data_refs_p): Ignore |
1359 |
+ all data references other than ARRAY_REF, MEM_REF, and COMPONENT_REF. |
1360 |
+ * graphite-scop-detection.h: Fix space. |
1361 |
+ * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons): Add |
1362 |
+ back all gcc_assert's removed by a previous patch. |
1363 |
+ (wrap): Remove the_isl_ctx global variable that the same patch has |
1364 |
+ added. |
1365 |
+ (build_loop_iteration_domains): Same. |
1366 |
+ (add_param_constraints): Same. |
1367 |
+ (pdr_add_data_dimensions): Same. Refactored. |
1368 |
+ (build_poly_dr): Renamed extent to subscript_sizes. |
1369 |
+ |
1370 |
+testsuite/ |
1371 |
+ PR middle-end/61929 |
1372 |
+ * gcc.dg/graphite/pr61929.c: New. |
1373 |
+ |
1374 |
+git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@225942 138bc75d-0d04-0410-961f-82ee72b054a4 |
1375 |
+--- |
1376 |
+ gcc/ChangeLog | 25 +++++++++++++++ |
1377 |
+ gcc/graphite-dependences.c | 4 +-- |
1378 |
+ gcc/graphite-interchange.c | 55 +++++++++++++++++---------------- |
1379 |
+ gcc/graphite-poly.c | 6 ++-- |
1380 |
+ gcc/graphite-poly.h | 2 +- |
1381 |
+ gcc/graphite-scop-detection.c | 22 +++++++++---- |
1382 |
+ gcc/graphite-scop-detection.h | 2 +- |
1383 |
+ gcc/graphite-sese-to-poly.c | 54 ++++++++++++++++---------------- |
1384 |
+ gcc/testsuite/ChangeLog | 6 ++++ |
1385 |
+ gcc/testsuite/gcc.dg/graphite/pr61929.c | 19 ++++++++++++ |
1386 |
+ 10 files changed, 128 insertions(+), 67 deletions(-) |
1387 |
+ create mode 100644 gcc/testsuite/gcc.dg/graphite/pr61929.c |
1388 |
+ |
1389 |
+diff --git a/gcc/graphite-dependences.c b/gcc/graphite-dependences.c |
1390 |
+index 50fe73e..af18ecb 100644 |
1391 |
+--- a/gcc/graphite-dependences.c |
1392 |
++++ b/gcc/graphite-dependences.c |
1393 |
+@@ -88,13 +88,13 @@ constrain_domain (isl_map *map, isl_set *s) |
1394 |
+ return isl_map_intersect_domain (map, s); |
1395 |
+ } |
1396 |
+ |
1397 |
+-/* Constrain pdr->accesses with pdr->extent and pbb->domain. */ |
1398 |
++/* Constrain pdr->accesses with pdr->subscript_sizes and pbb->domain. */ |
1399 |
+ |
1400 |
+ static isl_map * |
1401 |
+ add_pdr_constraints (poly_dr_p pdr, poly_bb_p pbb) |
1402 |
+ { |
1403 |
+ isl_map *x = isl_map_intersect_range (isl_map_copy (pdr->accesses), |
1404 |
+- isl_set_copy (pdr->extent)); |
1405 |
++ isl_set_copy (pdr->subscript_sizes)); |
1406 |
+ x = constrain_domain (x, isl_set_copy (pbb->domain)); |
1407 |
+ return x; |
1408 |
+ } |
1409 |
+diff --git a/gcc/graphite-interchange.c b/gcc/graphite-interchange.c |
1410 |
+index aee51a8..03c2c63 100644 |
1411 |
+--- a/gcc/graphite-interchange.c |
1412 |
++++ b/gcc/graphite-interchange.c |
1413 |
+@@ -79,37 +79,40 @@ extern "C" { |
1414 |
+ static isl_constraint * |
1415 |
+ build_linearized_memory_access (isl_map *map, poly_dr_p pdr) |
1416 |
+ { |
1417 |
+- isl_constraint *res; |
1418 |
+ isl_local_space *ls = isl_local_space_from_space (isl_map_get_space (map)); |
1419 |
+- unsigned offset, nsubs; |
1420 |
+- int i; |
1421 |
+- isl_ctx *ctx; |
1422 |
++ isl_constraint *res = isl_equality_alloc (ls); |
1423 |
++ isl_val *size = isl_val_int_from_ui (isl_map_get_ctx (map), 1); |
1424 |
+ |
1425 |
+- isl_val *size, *subsize, *size1; |
1426 |
+- |
1427 |
+- res = isl_equality_alloc (ls); |
1428 |
+- ctx = isl_local_space_get_ctx (ls); |
1429 |
+- size = isl_val_int_from_ui (ctx, 1); |
1430 |
+- |
1431 |
+- nsubs = isl_set_dim (pdr->extent, isl_dim_set); |
1432 |
++ unsigned nsubs = isl_set_dim (pdr->subscript_sizes, isl_dim_set); |
1433 |
+ /* -1 for the already included L dimension. */ |
1434 |
+- offset = isl_map_dim (map, isl_dim_out) - 1 - nsubs; |
1435 |
++ unsigned offset = isl_map_dim (map, isl_dim_out) - 1 - nsubs; |
1436 |
+ res = isl_constraint_set_coefficient_si (res, isl_dim_out, offset + nsubs, -1); |
1437 |
+- /* Go through all subscripts from last to first. First dimension |
1438 |
++ /* Go through all subscripts from last to first. The dimension "i=0" |
1439 |
+ is the alias set, ignore it. */ |
1440 |
+- for (i = nsubs - 1; i >= 1; i--) |
1441 |
++ for (int i = nsubs - 1; i >= 1; i--) |
1442 |
+ { |
1443 |
+- isl_space *dc; |
1444 |
+- isl_aff *aff; |
1445 |
+- |
1446 |
+- size1 = isl_val_copy (size); |
1447 |
+- res = isl_constraint_set_coefficient_val (res, isl_dim_out, offset + i, size); |
1448 |
+- dc = isl_set_get_space (pdr->extent); |
1449 |
+- aff = isl_aff_zero_on_domain (isl_local_space_from_space (dc)); |
1450 |
+- aff = isl_aff_set_coefficient_si (aff, isl_dim_in, i, 1); |
1451 |
+- subsize = isl_set_max_val (pdr->extent, aff); |
1452 |
+- isl_aff_free (aff); |
1453 |
+- size = isl_val_mul (size1, subsize); |
1454 |
++ isl_aff *extract_dim; |
1455 |
++ res = isl_constraint_set_coefficient_val (res, isl_dim_out, offset + i, |
1456 |
++ isl_val_copy (size)); |
1457 |
++ isl_space *dc = isl_set_get_space (pdr->subscript_sizes); |
1458 |
++ extract_dim = isl_aff_zero_on_domain (isl_local_space_from_space (dc)); |
1459 |
++ extract_dim = isl_aff_set_coefficient_si (extract_dim, isl_dim_in, i, 1); |
1460 |
++ isl_val *max = isl_set_max_val (pdr->subscript_sizes, extract_dim); |
1461 |
++ isl_aff_free (extract_dim); |
1462 |
++ |
1463 |
++ /* The result is NULL in case of an error, the optimal value in case there |
1464 |
++ is one, negative infinity or infinity if the problem is unbounded and |
1465 |
++ NaN if the problem is empty. */ |
1466 |
++ gcc_assert (max); |
1467 |
++ |
1468 |
++ /* When one of the dimensions cannot be computed, we cannot build the size |
1469 |
++ of the array for any outer dimensions. */ |
1470 |
++ if (!isl_val_is_int (max)) |
1471 |
++ { |
1472 |
++ isl_val_free (max); |
1473 |
++ break; |
1474 |
++ } |
1475 |
++ size = isl_val_mul (size, max); |
1476 |
+ } |
1477 |
+ |
1478 |
+ isl_val_free (size); |
1479 |
+@@ -176,7 +179,7 @@ pdr_stride_in_loop (mpz_t stride, graphite_dim_t depth, poly_dr_p pdr) |
1480 |
+ |
1481 |
+ /* pdr->accesses: [P1..nb_param,I1..nb_domain]->[a,S1..nb_subscript] |
1482 |
+ ??? [P] not used for PDRs? |
1483 |
+- pdr->extent: [a,S1..nb_subscript] |
1484 |
++ pdr->subscript_sizes: [a,S1..nb_subscript] |
1485 |
+ pbb->domain: [P1..nb_param,I1..nb_domain] |
1486 |
+ pbb->transformed: [P1..nb_param,I1..nb_domain]->[T1..Tnb_sctr] |
1487 |
+ [T] includes local vars (currently unused) |
1488 |
+diff --git a/gcc/graphite-poly.c b/gcc/graphite-poly.c |
1489 |
+index bcd08d8..2eff5a5a 100644 |
1490 |
+--- a/gcc/graphite-poly.c |
1491 |
++++ b/gcc/graphite-poly.c |
1492 |
+@@ -270,7 +270,7 @@ apply_poly_transforms (scop_p scop) |
1493 |
+ void |
1494 |
+ new_poly_dr (poly_bb_p pbb, int dr_base_object_set, |
1495 |
+ enum poly_dr_type type, void *cdr, graphite_dim_t nb_subscripts, |
1496 |
+- isl_map *acc, isl_set *extent) |
1497 |
++ isl_map *acc, isl_set *subscript_sizes) |
1498 |
+ { |
1499 |
+ static int id = 0; |
1500 |
+ poly_dr_p pdr = XNEW (struct poly_dr); |
1501 |
+@@ -280,7 +280,7 @@ new_poly_dr (poly_bb_p pbb, int dr_base_object_set, |
1502 |
+ PDR_NB_REFS (pdr) = 1; |
1503 |
+ PDR_PBB (pdr) = pbb; |
1504 |
+ pdr->accesses = acc; |
1505 |
+- pdr->extent = extent; |
1506 |
++ pdr->subscript_sizes = subscript_sizes; |
1507 |
+ PDR_TYPE (pdr) = type; |
1508 |
+ PDR_CDR (pdr) = cdr; |
1509 |
+ PDR_NB_SUBSCRIPTS (pdr) = nb_subscripts; |
1510 |
+@@ -293,7 +293,7 @@ void |
1511 |
+ free_poly_dr (poly_dr_p pdr) |
1512 |
+ { |
1513 |
+ isl_map_free (pdr->accesses); |
1514 |
+- isl_set_free (pdr->extent); |
1515 |
++ isl_set_free (pdr->subscript_sizes); |
1516 |
+ XDELETE (pdr); |
1517 |
+ } |
1518 |
+ |
1519 |
+diff --git a/gcc/graphite-poly.h b/gcc/graphite-poly.h |
1520 |
+index 7ffd18e..82e1217 100644 |
1521 |
+--- a/gcc/graphite-poly.h |
1522 |
++++ b/gcc/graphite-poly.h |
1523 |
+@@ -177,7 +177,7 @@ struct poly_dr |
1524 |
+ |
1525 |
+ In the example, the vector "R C O I L P" is "7 7 3 2 0 1". */ |
1526 |
+ isl_map *accesses; |
1527 |
+- isl_set *extent; |
1528 |
++ isl_set *subscript_sizes; |
1529 |
+ |
1530 |
+ /* Data reference's base object set number, we must assure 2 pdrs are in the |
1531 |
+ same base object set before dependency checking. */ |
1532 |
+diff --git a/gcc/graphite-scop-detection.c b/gcc/graphite-scop-detection.c |
1533 |
+index 4fb4e02..28de4ab 100644 |
1534 |
+--- a/gcc/graphite-scop-detection.c |
1535 |
++++ b/gcc/graphite-scop-detection.c |
1536 |
+@@ -289,7 +289,6 @@ stmt_has_simple_data_refs_p (loop_p outermost_loop ATTRIBUTE_UNUSED, |
1537 |
+ gimple stmt) |
1538 |
+ { |
1539 |
+ data_reference_p dr; |
1540 |
+- unsigned i; |
1541 |
+ int j; |
1542 |
+ bool res = true; |
1543 |
+ vec<data_reference_p> drs = vNULL; |
1544 |
+@@ -302,18 +301,29 @@ stmt_has_simple_data_refs_p (loop_p outermost_loop ATTRIBUTE_UNUSED, |
1545 |
+ stmt, &drs); |
1546 |
+ |
1547 |
+ FOR_EACH_VEC_ELT (drs, j, dr) |
1548 |
+- for (i = 0; i < DR_NUM_DIMENSIONS (dr); i++) |
1549 |
+- if (!graphite_can_represent_scev (DR_ACCESS_FN (dr, i))) |
1550 |
++ { |
1551 |
++ int nb_subscripts = DR_NUM_DIMENSIONS (dr); |
1552 |
++ tree ref = DR_REF (dr); |
1553 |
++ |
1554 |
++ for (int i = nb_subscripts - 1; i >= 0; i--) |
1555 |
+ { |
1556 |
+- res = false; |
1557 |
+- goto done; |
1558 |
++ if (!graphite_can_represent_scev (DR_ACCESS_FN (dr, i)) |
1559 |
++ || (TREE_CODE (ref) != ARRAY_REF |
1560 |
++ && TREE_CODE (ref) != MEM_REF |
1561 |
++ && TREE_CODE (ref) != COMPONENT_REF)) |
1562 |
++ { |
1563 |
++ free_data_refs (drs); |
1564 |
++ return false; |
1565 |
++ } |
1566 |
++ |
1567 |
++ ref = TREE_OPERAND (ref, 0); |
1568 |
+ } |
1569 |
++ } |
1570 |
+ |
1571 |
+ free_data_refs (drs); |
1572 |
+ drs.create (0); |
1573 |
+ } |
1574 |
+ |
1575 |
+- done: |
1576 |
+ free_data_refs (drs); |
1577 |
+ return res; |
1578 |
+ } |
1579 |
+diff --git a/gcc/graphite-scop-detection.h b/gcc/graphite-scop-detection.h |
1580 |
+index 8e794c3..4511796 100644 |
1581 |
+--- a/gcc/graphite-scop-detection.h |
1582 |
++++ b/gcc/graphite-scop-detection.h |
1583 |
+@@ -23,7 +23,7 @@ along with GCC; see the file COPYING3. If not see |
1584 |
+ #define GCC_GRAPHITE_SCOP_DETECTION_H |
1585 |
+ |
1586 |
+ extern void build_scops (vec<scop_p> *); |
1587 |
+-extern void dot_all_scops (vec<scop_p> ); |
1588 |
++extern void dot_all_scops (vec<scop_p>); |
1589 |
+ extern void dot_scop (scop_p); |
1590 |
+ |
1591 |
+ #endif /* GCC_GRAPHITE_SCOP_DETECTION_H */ |
1592 |
+diff --git a/gcc/graphite-sese-to-poly.c b/gcc/graphite-sese-to-poly.c |
1593 |
+index aaecab4..1e234fe 100644 |
1594 |
+--- a/gcc/graphite-sese-to-poly.c |
1595 |
++++ b/gcc/graphite-sese-to-poly.c |
1596 |
+@@ -497,6 +497,7 @@ build_pbb_scattering_polyhedrons (isl_aff *static_sched, |
1597 |
+ (isl_local_space_from_space (isl_map_get_space (pbb->schedule))); |
1598 |
+ |
1599 |
+ val = isl_aff_get_coefficient_val (static_sched, isl_dim_in, i / 2); |
1600 |
++ gcc_assert (val && isl_val_is_int (val)); |
1601 |
+ |
1602 |
+ val = isl_val_neg (val); |
1603 |
+ c = isl_constraint_set_constant_val (c, val); |
1604 |
+@@ -719,14 +720,12 @@ extract_affine_int (tree e, __isl_take isl_space *space) |
1605 |
+ |
1606 |
+ /* Compute pwaff mod 2^width. */ |
1607 |
+ |
1608 |
+-extern isl_ctx *the_isl_ctx; |
1609 |
+- |
1610 |
+ static isl_pw_aff * |
1611 |
+ wrap (isl_pw_aff *pwaff, unsigned width) |
1612 |
+ { |
1613 |
+ isl_val *mod; |
1614 |
+ |
1615 |
+- mod = isl_val_int_from_ui(the_isl_ctx, width); |
1616 |
++ mod = isl_val_int_from_ui (isl_pw_aff_get_ctx (pwaff), width); |
1617 |
+ mod = isl_val_2exp (mod); |
1618 |
+ pwaff = isl_pw_aff_mod_val (pwaff, mod); |
1619 |
+ |
1620 |
+@@ -1012,7 +1011,7 @@ build_loop_iteration_domains (scop_p scop, struct loop *loop, |
1621 |
+ (isl_local_space_from_space (isl_space_copy (space))); |
1622 |
+ c = isl_constraint_set_coefficient_si (c, isl_dim_set, pos, -1); |
1623 |
+ tree_int_to_gmp (nb_iters, g); |
1624 |
+- v = isl_val_int_from_gmp (the_isl_ctx, g); |
1625 |
++ v = isl_val_int_from_gmp (scop->ctx, g); |
1626 |
+ c = isl_constraint_set_constant_val (c, v); |
1627 |
+ inner = isl_set_add_constraint (inner, c); |
1628 |
+ } |
1629 |
+@@ -1067,7 +1066,7 @@ build_loop_iteration_domains (scop_p scop, struct loop *loop, |
1630 |
+ c = isl_inequality_alloc |
1631 |
+ (isl_local_space_from_space (isl_space_copy (space))); |
1632 |
+ c = isl_constraint_set_coefficient_si (c, isl_dim_set, pos, -1); |
1633 |
+- v = isl_val_int_from_gmp (the_isl_ctx, g); |
1634 |
++ v = isl_val_int_from_gmp (scop->ctx, g); |
1635 |
+ mpz_clear (g); |
1636 |
+ c = isl_constraint_set_constant_val (c, v); |
1637 |
+ inner = isl_set_add_constraint (inner, c); |
1638 |
+@@ -1335,7 +1334,7 @@ add_param_constraints (scop_p scop, graphite_dim_t p) |
1639 |
+ c = isl_inequality_alloc (isl_local_space_from_space (space)); |
1640 |
+ mpz_init (g); |
1641 |
+ tree_int_to_gmp (lb, g); |
1642 |
+- v = isl_val_int_from_gmp (the_isl_ctx, g); |
1643 |
++ v = isl_val_int_from_gmp (scop->ctx, g); |
1644 |
+ v = isl_val_neg (v); |
1645 |
+ mpz_clear (g); |
1646 |
+ c = isl_constraint_set_constant_val (c, v); |
1647 |
+@@ -1355,7 +1354,7 @@ add_param_constraints (scop_p scop, graphite_dim_t p) |
1648 |
+ |
1649 |
+ mpz_init (g); |
1650 |
+ tree_int_to_gmp (ub, g); |
1651 |
+- v = isl_val_int_from_gmp (the_isl_ctx, g); |
1652 |
++ v = isl_val_int_from_gmp (scop->ctx, g); |
1653 |
+ mpz_clear (g); |
1654 |
+ c = isl_constraint_set_constant_val (c, v); |
1655 |
+ c = isl_constraint_set_coefficient_si (c, isl_dim_param, p, -1); |
1656 |
+@@ -1491,20 +1490,19 @@ pdr_add_memory_accesses (isl_map *acc, data_reference_p dr, poly_bb_p pbb) |
1657 |
+ domain. */ |
1658 |
+ |
1659 |
+ static isl_set * |
1660 |
+-pdr_add_data_dimensions (isl_set *extent, scop_p scop, data_reference_p dr) |
1661 |
++pdr_add_data_dimensions (isl_set *subscript_sizes, scop_p scop, |
1662 |
++ data_reference_p dr) |
1663 |
+ { |
1664 |
+ tree ref = DR_REF (dr); |
1665 |
+- int i, nb_subscripts = DR_NUM_DIMENSIONS (dr); |
1666 |
+ |
1667 |
+- for (i = nb_subscripts - 1; i >= 0; i--, ref = TREE_OPERAND (ref, 0)) |
1668 |
++ int nb_subscripts = DR_NUM_DIMENSIONS (dr); |
1669 |
++ for (int i = nb_subscripts - 1; i >= 0; i--, ref = TREE_OPERAND (ref, 0)) |
1670 |
+ { |
1671 |
+- tree low, high; |
1672 |
+- |
1673 |
+ if (TREE_CODE (ref) != ARRAY_REF) |
1674 |
+- break; |
1675 |
++ return subscript_sizes; |
1676 |
+ |
1677 |
+- low = array_ref_low_bound (ref); |
1678 |
+- high = array_ref_up_bound (ref); |
1679 |
++ tree low = array_ref_low_bound (ref); |
1680 |
++ tree high = array_ref_up_bound (ref); |
1681 |
+ |
1682 |
+ /* XXX The PPL code dealt separately with |
1683 |
+ subscript - low >= 0 and high - subscript >= 0 in case one of |
1684 |
+@@ -1522,10 +1520,10 @@ pdr_add_data_dimensions (isl_set *extent, scop_p scop, data_reference_p dr) |
1685 |
+ isl_aff *aff; |
1686 |
+ isl_set *univ, *lbs, *ubs; |
1687 |
+ isl_pw_aff *index; |
1688 |
+- isl_space *space; |
1689 |
+ isl_set *valid; |
1690 |
+- isl_pw_aff *lb = extract_affine_int (low, isl_set_get_space (extent)); |
1691 |
+- isl_pw_aff *ub = extract_affine_int (high, isl_set_get_space (extent)); |
1692 |
++ isl_space *space = isl_set_get_space (subscript_sizes); |
1693 |
++ isl_pw_aff *lb = extract_affine_int (low, isl_space_copy (space)); |
1694 |
++ isl_pw_aff *ub = extract_affine_int (high, isl_space_copy (space)); |
1695 |
+ |
1696 |
+ /* high >= 0 */ |
1697 |
+ valid = isl_pw_aff_nonneg_set (isl_pw_aff_copy (ub)); |
1698 |
+@@ -1533,25 +1531,24 @@ pdr_add_data_dimensions (isl_set *extent, scop_p scop, data_reference_p dr) |
1699 |
+ isl_set_dim (valid, isl_dim_set)); |
1700 |
+ scop->context = isl_set_intersect (scop->context, valid); |
1701 |
+ |
1702 |
+- space = isl_set_get_space (extent); |
1703 |
+ aff = isl_aff_zero_on_domain (isl_local_space_from_space (space)); |
1704 |
+ aff = isl_aff_add_coefficient_si (aff, isl_dim_in, i + 1, 1); |
1705 |
+ univ = isl_set_universe (isl_space_domain (isl_aff_get_space (aff))); |
1706 |
+ index = isl_pw_aff_alloc (univ, aff); |
1707 |
+ |
1708 |
+- id = isl_set_get_tuple_id (extent); |
1709 |
++ id = isl_set_get_tuple_id (subscript_sizes); |
1710 |
+ lb = isl_pw_aff_set_tuple_id (lb, isl_dim_in, isl_id_copy (id)); |
1711 |
+ ub = isl_pw_aff_set_tuple_id (ub, isl_dim_in, id); |
1712 |
+ |
1713 |
+ /* low <= sub_i <= high */ |
1714 |
+ lbs = isl_pw_aff_ge_set (isl_pw_aff_copy (index), lb); |
1715 |
+ ubs = isl_pw_aff_le_set (index, ub); |
1716 |
+- extent = isl_set_intersect (extent, lbs); |
1717 |
+- extent = isl_set_intersect (extent, ubs); |
1718 |
++ subscript_sizes = isl_set_intersect (subscript_sizes, lbs); |
1719 |
++ subscript_sizes = isl_set_intersect (subscript_sizes, ubs); |
1720 |
+ } |
1721 |
+ } |
1722 |
+ |
1723 |
+- return extent; |
1724 |
++ return subscript_sizes; |
1725 |
+ } |
1726 |
+ |
1727 |
+ /* Build data accesses for DR in PBB. */ |
1728 |
+@@ -1561,7 +1558,7 @@ build_poly_dr (data_reference_p dr, poly_bb_p pbb) |
1729 |
+ { |
1730 |
+ int dr_base_object_set; |
1731 |
+ isl_map *acc; |
1732 |
+- isl_set *extent; |
1733 |
++ isl_set *subscript_sizes; |
1734 |
+ scop_p scop = PBB_SCOP (pbb); |
1735 |
+ |
1736 |
+ { |
1737 |
+@@ -1588,9 +1585,10 @@ build_poly_dr (data_reference_p dr, poly_bb_p pbb) |
1738 |
+ alias_set_num = *(bap->alias_set); |
1739 |
+ |
1740 |
+ space = isl_space_set_tuple_id (space, isl_dim_set, id); |
1741 |
+- extent = isl_set_nat_universe (space); |
1742 |
+- extent = isl_set_fix_si (extent, isl_dim_set, 0, alias_set_num); |
1743 |
+- extent = pdr_add_data_dimensions (extent, scop, dr); |
1744 |
++ subscript_sizes = isl_set_nat_universe (space); |
1745 |
++ subscript_sizes = isl_set_fix_si (subscript_sizes, isl_dim_set, 0, |
1746 |
++ alias_set_num); |
1747 |
++ subscript_sizes = pdr_add_data_dimensions (subscript_sizes, scop, dr); |
1748 |
+ } |
1749 |
+ |
1750 |
+ gcc_assert (dr->aux); |
1751 |
+@@ -1598,7 +1596,7 @@ build_poly_dr (data_reference_p dr, poly_bb_p pbb) |
1752 |
+ |
1753 |
+ new_poly_dr (pbb, dr_base_object_set, |
1754 |
+ DR_IS_READ (dr) ? PDR_READ : PDR_WRITE, |
1755 |
+- dr, DR_NUM_DIMENSIONS (dr), acc, extent); |
1756 |
++ dr, DR_NUM_DIMENSIONS (dr), acc, subscript_sizes); |
1757 |
+ } |
1758 |
+ |
1759 |
+ /* Write to FILE the alias graph of data references in DIMACS format. */ |
1760 |
+diff --git a/gcc/testsuite/gcc.dg/graphite/pr61929.c b/gcc/testsuite/gcc.dg/graphite/pr61929.c |
1761 |
+new file mode 100644 |
1762 |
+index 0000000..9999ebf |
1763 |
+--- /dev/null |
1764 |
++++ b/gcc/testsuite/gcc.dg/graphite/pr61929.c |
1765 |
+@@ -0,0 +1,19 @@ |
1766 |
++/* { dg-do compile } */ |
1767 |
++/* { dg-options "-O2 -ftree-loop-linear -floop-strip-mine" } */ |
1768 |
++ |
1769 |
++typedef struct m { |
1770 |
++ char *A; |
1771 |
++ char *B; |
1772 |
++} mystruct; |
1773 |
++mystruct arr[52]; |
1774 |
++ |
1775 |
++void main () {} |
1776 |
++void generateICE (void) |
1777 |
++{ |
1778 |
++ int i; |
1779 |
++ for (i=0; i<52; i++) |
1780 |
++ { |
1781 |
++ arr[i].A = ""; |
1782 |
++ arr[i].B = 0; |
1783 |
++ } |
1784 |
++} |
1785 |
+-- |
1786 |
+2.4.4 |
1787 |
+ |
1788 |
|
1789 |
diff --git a/5.5.0/gentoo/21_all_gcc5_isl-dl.patch b/5.5.0/gentoo/21_all_gcc5_isl-dl.patch |
1790 |
new file mode 100644 |
1791 |
index 0000000..aff6aec |
1792 |
--- /dev/null |
1793 |
+++ b/5.5.0/gentoo/21_all_gcc5_isl-dl.patch |
1794 |
@@ -0,0 +1,617 @@ |
1795 |
+dlopen cloog-isl library rather than link to it directly. This prevents |
1796 |
+cloog upgrades that change the soname from breaking the compiler. |
1797 |
+ |
1798 |
+http://pkgs.fedoraproject.org/cgit/gcc.git/tree/gcc5-isl-dl.patch |
1799 |
+ |
1800 |
+In FreeBSD dlopen is part of libc so we can't just hardcode -ldl. |
1801 |
+We abuse the existing plugin check logic to pull out that info. |
1802 |
+ |
1803 |
+extended by Gentoo to support isl-0.15 |
1804 |
+https://bugs.gentoo.org/552278 |
1805 |
+ |
1806 |
+--- gcc/Makefile.in.jj 2012-12-13 17:09:20.000000000 +0100 |
1807 |
++++ gcc/Makefile.in 2012-12-14 11:45:22.585670055 +0100 |
1808 |
+@@ -1006,7 +1006,7 @@ BUILD_LIBDEPS= $(BUILD_LIBIBERTY) |
1809 |
+ # and the system's installed libraries. |
1810 |
+ LIBS = @LIBS@ libcommon.a $(CPPLIB) $(LIBINTL) $(LIBICONV) $(LIBBACKTRACE) \ |
1811 |
+ $(LIBIBERTY) $(LIBDECNUMBER) $(HOST_LIBS) |
1812 |
+-BACKENDLIBS = $(ISLLIBS) $(GMPLIBS) $(PLUGINLIBS) $(HOST_LIBS) \ |
1813 |
++BACKENDLIBS = $(if $(ISLLIBS),@DL_LIB@) $(GMPLIBS) $(PLUGINLIBS) $(HOST_LIBS) \ |
1814 |
+ $(ZLIB) |
1815 |
+ # Any system libraries needed just for GNAT. |
1816 |
+ SYSLIBS = @GNAT_LIBEXC@ |
1817 |
+@@ -2050,6 +2050,15 @@ $(out_object_file): $(out_file) |
1818 |
+ $(common_out_object_file): $(common_out_file) |
1819 |
+ $(COMPILE) $< |
1820 |
+ $(POSTCOMPILE) |
1821 |
++ |
1822 |
++graphite%.o : \ |
1823 |
++ ALL_CFLAGS := -O $(filter-out -fkeep-inline-functions, $(ALL_CFLAGS)) |
1824 |
++graphite.o : \ |
1825 |
++ ALL_CFLAGS := -O $(filter-out -fkeep-inline-functions, $(ALL_CFLAGS)) |
1826 |
++graphite%.o : \ |
1827 |
++ ALL_CXXFLAGS := -O $(filter-out -fkeep-inline-functions, $(ALL_CXXFLAGS)) |
1828 |
++graphite.o : \ |
1829 |
++ ALL_CXXFLAGS := -O $(filter-out -fkeep-inline-functions, $(ALL_CXXFLAGS)) |
1830 |
+ # |
1831 |
+ # Generate header and source files from the machine description, |
1832 |
+ # and compile them. |
1833 |
+--- gcc/configure |
1834 |
++++ gcc/configure |
1835 |
+@@ -604,6 +604,7 @@ PICFLAG |
1836 |
+ enable_host_shared |
1837 |
+ enable_plugin |
1838 |
+ pluginlibs |
1839 |
++DL_LIB |
1840 |
+ ISLINC |
1841 |
+ ISLLIBS |
1842 |
+ GMPINC |
1843 |
+@@ -28285,6 +28286,7 @@ $as_echo "unable to check" >&6; } |
1844 |
+ fi |
1845 |
+ |
1846 |
+ # Check -ldl |
1847 |
++ DL_LIB= |
1848 |
+ saved_LIBS="$LIBS" |
1849 |
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5 |
1850 |
+ $as_echo_n "checking for library containing dlopen... " >&6; } |
1851 |
+@@ -28344,6 +28346,7 @@ fi |
1852 |
+ |
1853 |
+ if test x"$ac_cv_search_dlopen" = x"-ldl"; then |
1854 |
+ pluginlibs="$pluginlibs -ldl" |
1855 |
++ DL_LIB=$ac_cv_search_dlopen |
1856 |
+ fi |
1857 |
+ LIBS="$saved_LIBS" |
1858 |
+ |
1859 |
+--- gcc/graphite-poly.h.jj 2012-12-13 11:31:27.000000000 +0100 |
1860 |
++++ gcc/graphite-poly.h 2012-12-14 13:41:41.970800726 +0100 |
1861 |
+@@ -22,6 +22,493 @@ along with GCC; see the file COPYING3. |
1862 |
+ #ifndef GCC_GRAPHITE_POLY_H |
1863 |
+ #define GCC_GRAPHITE_POLY_H |
1864 |
+ |
1865 |
++#include <isl/aff.h> |
1866 |
++#include <isl/constraint.h> |
1867 |
++#include <isl/union_set.h> |
1868 |
++#include <isl/schedule.h> |
1869 |
++#include <isl/ilp.h> |
1870 |
++#include <isl/flow.h> |
1871 |
++#include <isl/options.h> |
1872 |
++#include <isl/ast.h> |
1873 |
++#include <isl/ast_build.h> |
1874 |
++#include <isl/val_gmp.h> |
1875 |
++#include <dlfcn.h> |
1876 |
++#ifdef HAVE_ISL_SCHED_CONSTRAINTS_COMPUTE_SCHEDULE |
1877 |
++#define DYNSYM_ZERO_DISTANCE DYNSYM (isl_band_member_is_coincident) |
1878 |
++#else |
1879 |
++#define DYNSYM_ZERO_DISTANCE DYNSYM (isl_band_member_is_zero_distance) |
1880 |
++#endif |
1881 |
++#ifdef HAVE_ISL_OPTIONS_SET_SCHEDULE_SERIALIZE_SCCS |
1882 |
++#define DYNSYM_FUSE DYNSYM (isl_options_set_schedule_serialize_sccs) |
1883 |
++#else |
1884 |
++#define DYNSYM_FUSE DYNSYM (isl_options_set_schedule_fuse) |
1885 |
++#endif |
1886 |
++#define DYNSYMS \ |
1887 |
++ DYNSYM (isl_aff_add_coefficient_si); \ |
1888 |
++ DYNSYM (isl_aff_free); \ |
1889 |
++ DYNSYM (isl_aff_get_space); \ |
1890 |
++ DYNSYM (isl_aff_set_coefficient_si); \ |
1891 |
++ DYNSYM (isl_aff_set_constant_si); \ |
1892 |
++ DYNSYM (isl_aff_zero_on_domain); \ |
1893 |
++ DYNSYM (isl_band_free); \ |
1894 |
++ DYNSYM (isl_band_get_children); \ |
1895 |
++ DYNSYM (isl_band_get_partial_schedule); \ |
1896 |
++ DYNSYM (isl_band_has_children); \ |
1897 |
++ DYNSYM (isl_band_list_free); \ |
1898 |
++ DYNSYM (isl_band_list_get_band); \ |
1899 |
++ DYNSYM (isl_band_list_get_ctx); \ |
1900 |
++ DYNSYM (isl_band_list_n_band); \ |
1901 |
++ DYNSYM_ZERO_DISTANCE; \ |
1902 |
++ DYNSYM (isl_band_n_member); \ |
1903 |
++ DYNSYM (isl_basic_map_add_constraint); \ |
1904 |
++ DYNSYM (isl_basic_map_project_out); \ |
1905 |
++ DYNSYM (isl_basic_map_universe); \ |
1906 |
++ DYNSYM (isl_constraint_set_coefficient_si); \ |
1907 |
++ DYNSYM (isl_constraint_set_constant_si); \ |
1908 |
++ DYNSYM (isl_ctx_alloc); \ |
1909 |
++ DYNSYM (isl_ctx_free); \ |
1910 |
++ DYNSYM (isl_equality_alloc); \ |
1911 |
++ DYNSYM (isl_id_alloc); \ |
1912 |
++ DYNSYM (isl_id_copy); \ |
1913 |
++ DYNSYM (isl_id_free); \ |
1914 |
++ DYNSYM (isl_inequality_alloc); \ |
1915 |
++ DYNSYM (isl_local_space_copy); \ |
1916 |
++ DYNSYM (isl_local_space_free); \ |
1917 |
++ DYNSYM (isl_local_space_from_space); \ |
1918 |
++ DYNSYM (isl_local_space_range); \ |
1919 |
++ DYNSYM (isl_map_add_constraint); \ |
1920 |
++ DYNSYM (isl_map_add_dims); \ |
1921 |
++ DYNSYM (isl_map_align_params); \ |
1922 |
++ DYNSYM (isl_map_apply_range); \ |
1923 |
++ DYNSYM (isl_map_copy); \ |
1924 |
++ DYNSYM (isl_map_dim); \ |
1925 |
++ DYNSYM (isl_map_dump); \ |
1926 |
++ DYNSYM (isl_map_equate); \ |
1927 |
++ DYNSYM (isl_map_fix_si); \ |
1928 |
++ DYNSYM (isl_map_flat_product); \ |
1929 |
++ DYNSYM (isl_map_flat_range_product); \ |
1930 |
++ DYNSYM (isl_map_free); \ |
1931 |
++ DYNSYM (isl_map_from_basic_map); \ |
1932 |
++ DYNSYM (isl_map_from_pw_aff); \ |
1933 |
++ DYNSYM (isl_map_from_union_map); \ |
1934 |
++ DYNSYM (isl_map_get_ctx); \ |
1935 |
++ DYNSYM (isl_map_get_space); \ |
1936 |
++ DYNSYM (isl_map_get_tuple_id); \ |
1937 |
++ DYNSYM (isl_map_insert_dims); \ |
1938 |
++ DYNSYM (isl_map_intersect); \ |
1939 |
++ DYNSYM (isl_map_intersect_domain); \ |
1940 |
++ DYNSYM (isl_map_intersect_range); \ |
1941 |
++ DYNSYM (isl_map_is_empty); \ |
1942 |
++ DYNSYM (isl_map_lex_ge); \ |
1943 |
++ DYNSYM (isl_map_lex_le); \ |
1944 |
++ DYNSYM (isl_map_n_out); \ |
1945 |
++ DYNSYM (isl_map_range); \ |
1946 |
++ DYNSYM (isl_map_set_tuple_id); \ |
1947 |
++ DYNSYM (isl_map_universe); \ |
1948 |
++ DYNSYM (isl_options_set_on_error); \ |
1949 |
++ DYNSYM_FUSE; \ |
1950 |
++ DYNSYM (isl_options_set_schedule_max_constant_term); \ |
1951 |
++ DYNSYM (isl_options_set_schedule_maximize_band_depth); \ |
1952 |
++ DYNSYM (isl_printer_free); \ |
1953 |
++ DYNSYM (isl_printer_print_aff); \ |
1954 |
++ DYNSYM (isl_printer_print_constraint); \ |
1955 |
++ DYNSYM (isl_printer_print_map); \ |
1956 |
++ DYNSYM (isl_printer_print_set); \ |
1957 |
++ DYNSYM (isl_printer_to_file); \ |
1958 |
++ DYNSYM (isl_pw_aff_add); \ |
1959 |
++ DYNSYM (isl_pw_aff_alloc); \ |
1960 |
++ DYNSYM (isl_pw_aff_copy); \ |
1961 |
++ DYNSYM (isl_pw_aff_eq_set); \ |
1962 |
++ DYNSYM (isl_pw_aff_free); \ |
1963 |
++ DYNSYM (isl_pw_aff_from_aff); \ |
1964 |
++ DYNSYM (isl_pw_aff_get_ctx); \ |
1965 |
++ DYNSYM (isl_pw_aff_ge_set); \ |
1966 |
++ DYNSYM (isl_pw_aff_gt_set); \ |
1967 |
++ DYNSYM (isl_pw_aff_is_cst); \ |
1968 |
++ DYNSYM (isl_pw_aff_le_set); \ |
1969 |
++ DYNSYM (isl_pw_aff_lt_set); \ |
1970 |
++ DYNSYM (isl_pw_aff_mul); \ |
1971 |
++ DYNSYM (isl_pw_aff_ne_set); \ |
1972 |
++ DYNSYM (isl_pw_aff_nonneg_set); \ |
1973 |
++ DYNSYM (isl_pw_aff_set_tuple_id); \ |
1974 |
++ DYNSYM (isl_pw_aff_sub); \ |
1975 |
++ DYNSYM (isl_pw_aff_zero_set); \ |
1976 |
++ DYNSYM (isl_schedule_free); \ |
1977 |
++ DYNSYM (isl_schedule_get_band_forest); \ |
1978 |
++ DYNSYM (isl_set_add_constraint); \ |
1979 |
++ DYNSYM (isl_set_add_dims); \ |
1980 |
++ DYNSYM (isl_set_apply); \ |
1981 |
++ DYNSYM (isl_set_coalesce); \ |
1982 |
++ DYNSYM (isl_set_copy); \ |
1983 |
++ DYNSYM (isl_set_dim); \ |
1984 |
++ DYNSYM (isl_set_fix_si); \ |
1985 |
++ DYNSYM (isl_set_free); \ |
1986 |
++ DYNSYM (isl_set_get_space); \ |
1987 |
++ DYNSYM (isl_set_get_tuple_id); \ |
1988 |
++ DYNSYM (isl_set_intersect); \ |
1989 |
++ DYNSYM (isl_set_is_empty); \ |
1990 |
++ DYNSYM (isl_set_n_dim); \ |
1991 |
++ DYNSYM (isl_set_nat_universe); \ |
1992 |
++ DYNSYM (isl_set_project_out); \ |
1993 |
++ DYNSYM (isl_set_set_tuple_id); \ |
1994 |
++ DYNSYM (isl_set_universe); \ |
1995 |
++ DYNSYM (isl_space_add_dims); \ |
1996 |
++ DYNSYM (isl_space_alloc); \ |
1997 |
++ DYNSYM (isl_space_copy); \ |
1998 |
++ DYNSYM (isl_space_dim); \ |
1999 |
++ DYNSYM (isl_space_domain); \ |
2000 |
++ DYNSYM (isl_space_find_dim_by_id); \ |
2001 |
++ DYNSYM (isl_space_free); \ |
2002 |
++ DYNSYM (isl_space_from_domain); \ |
2003 |
++ DYNSYM (isl_space_get_tuple_id); \ |
2004 |
++ DYNSYM (isl_space_params_alloc); \ |
2005 |
++ DYNSYM (isl_space_range); \ |
2006 |
++ DYNSYM (isl_space_set_alloc); \ |
2007 |
++ DYNSYM (isl_space_set_dim_id); \ |
2008 |
++ DYNSYM (isl_space_set_tuple_id); \ |
2009 |
++ DYNSYM (isl_union_map_add_map); \ |
2010 |
++ DYNSYM (isl_union_map_align_params); \ |
2011 |
++ DYNSYM (isl_union_map_apply_domain); \ |
2012 |
++ DYNSYM (isl_union_map_apply_range); \ |
2013 |
++ DYNSYM (isl_union_map_compute_flow); \ |
2014 |
++ DYNSYM (isl_union_map_copy); \ |
2015 |
++ DYNSYM (isl_union_map_empty); \ |
2016 |
++ DYNSYM (isl_union_map_flat_range_product); \ |
2017 |
++ DYNSYM (isl_union_map_foreach_map); \ |
2018 |
++ DYNSYM (isl_union_map_free); \ |
2019 |
++ DYNSYM (isl_union_map_from_map); \ |
2020 |
++ DYNSYM (isl_union_map_get_ctx); \ |
2021 |
++ DYNSYM (isl_union_map_get_space); \ |
2022 |
++ DYNSYM (isl_union_map_gist_domain); \ |
2023 |
++ DYNSYM (isl_union_map_gist_range); \ |
2024 |
++ DYNSYM (isl_union_map_intersect_domain); \ |
2025 |
++ DYNSYM (isl_union_map_is_empty); \ |
2026 |
++ DYNSYM (isl_union_map_subtract); \ |
2027 |
++ DYNSYM (isl_union_map_union); \ |
2028 |
++ DYNSYM (isl_union_set_add_set); \ |
2029 |
++ DYNSYM (isl_union_set_compute_schedule); \ |
2030 |
++ DYNSYM (isl_union_set_copy); \ |
2031 |
++ DYNSYM (isl_union_set_empty); \ |
2032 |
++ DYNSYM (isl_union_set_from_set); \ |
2033 |
++ DYNSYM (isl_aff_add_constant_val); \ |
2034 |
++ DYNSYM (isl_aff_get_coefficient_val); \ |
2035 |
++ DYNSYM (isl_aff_get_ctx); \ |
2036 |
++ DYNSYM (isl_aff_mod_val); \ |
2037 |
++ DYNSYM (isl_ast_build_ast_from_schedule); \ |
2038 |
++ DYNSYM (isl_ast_build_free); \ |
2039 |
++ DYNSYM (isl_ast_build_from_context); \ |
2040 |
++ DYNSYM (isl_ast_build_get_ctx); \ |
2041 |
++ DYNSYM (isl_ast_build_get_schedule); \ |
2042 |
++ DYNSYM (isl_ast_build_get_schedule_space); \ |
2043 |
++ DYNSYM (isl_ast_build_set_before_each_for); \ |
2044 |
++ DYNSYM (isl_ast_build_set_options); \ |
2045 |
++ DYNSYM (isl_ast_expr_free); \ |
2046 |
++ DYNSYM (isl_ast_expr_from_val); \ |
2047 |
++ DYNSYM (isl_ast_expr_get_ctx); \ |
2048 |
++ DYNSYM (isl_ast_expr_get_id); \ |
2049 |
++ DYNSYM (isl_ast_expr_get_op_arg); \ |
2050 |
++ DYNSYM (isl_ast_expr_get_op_n_arg); \ |
2051 |
++ DYNSYM (isl_ast_expr_get_op_type); \ |
2052 |
++ DYNSYM (isl_ast_expr_get_type); \ |
2053 |
++ DYNSYM (isl_ast_expr_get_val); \ |
2054 |
++ DYNSYM (isl_ast_expr_sub); \ |
2055 |
++ DYNSYM (isl_ast_node_block_get_children); \ |
2056 |
++ DYNSYM (isl_ast_node_for_get_body); \ |
2057 |
++ DYNSYM (isl_ast_node_for_get_cond); \ |
2058 |
++ DYNSYM (isl_ast_node_for_get_inc); \ |
2059 |
++ DYNSYM (isl_ast_node_for_get_init); \ |
2060 |
++ DYNSYM (isl_ast_node_for_get_iterator); \ |
2061 |
++ DYNSYM (isl_ast_node_free); \ |
2062 |
++ DYNSYM (isl_ast_node_get_annotation); \ |
2063 |
++ DYNSYM (isl_ast_node_get_type); \ |
2064 |
++ DYNSYM (isl_ast_node_if_get_cond); \ |
2065 |
++ DYNSYM (isl_ast_node_if_get_else); \ |
2066 |
++ DYNSYM (isl_ast_node_if_get_then); \ |
2067 |
++ DYNSYM (isl_ast_node_list_free); \ |
2068 |
++ DYNSYM (isl_ast_node_list_get_ast_node); \ |
2069 |
++ DYNSYM (isl_ast_node_list_n_ast_node); \ |
2070 |
++ DYNSYM (isl_ast_node_user_get_expr); \ |
2071 |
++ DYNSYM (isl_constraint_set_coefficient_val); \ |
2072 |
++ DYNSYM (isl_constraint_set_constant_val); \ |
2073 |
++ DYNSYM (isl_id_get_user); \ |
2074 |
++ DYNSYM (isl_local_space_get_ctx); \ |
2075 |
++ DYNSYM (isl_map_fix_val); \ |
2076 |
++ DYNSYM (isl_options_set_ast_build_atomic_upper_bound); \ |
2077 |
++ DYNSYM (isl_printer_print_ast_node); \ |
2078 |
++ DYNSYM (isl_printer_print_str); \ |
2079 |
++ DYNSYM (isl_printer_set_output_format); \ |
2080 |
++ DYNSYM (isl_pw_aff_mod_val); \ |
2081 |
++ DYNSYM (isl_schedule_constraints_compute_schedule); \ |
2082 |
++ DYNSYM (isl_schedule_constraints_on_domain); \ |
2083 |
++ DYNSYM (isl_schedule_constraints_set_coincidence); \ |
2084 |
++ DYNSYM (isl_schedule_constraints_set_proximity); \ |
2085 |
++ DYNSYM (isl_schedule_constraints_set_validity); \ |
2086 |
++ DYNSYM (isl_set_get_dim_id); \ |
2087 |
++ DYNSYM (isl_set_max_val); \ |
2088 |
++ DYNSYM (isl_set_min_val); \ |
2089 |
++ DYNSYM (isl_set_params); \ |
2090 |
++ DYNSYM (isl_space_align_params); \ |
2091 |
++ DYNSYM (isl_space_map_from_domain_and_range); \ |
2092 |
++ DYNSYM (isl_space_set_tuple_name); \ |
2093 |
++ DYNSYM (isl_space_wrap); \ |
2094 |
++ DYNSYM (isl_union_map_from_domain_and_range); \ |
2095 |
++ DYNSYM (isl_union_map_range); \ |
2096 |
++ DYNSYM (isl_union_set_union); \ |
2097 |
++ DYNSYM (isl_union_set_universe); \ |
2098 |
++ DYNSYM (isl_val_2exp); \ |
2099 |
++ DYNSYM (isl_val_add_ui); \ |
2100 |
++ DYNSYM (isl_val_copy); \ |
2101 |
++ DYNSYM (isl_val_free); \ |
2102 |
++ DYNSYM (isl_val_get_num_gmp); \ |
2103 |
++ DYNSYM (isl_val_int_from_gmp); \ |
2104 |
++ DYNSYM (isl_val_int_from_si); \ |
2105 |
++ DYNSYM (isl_val_int_from_ui); \ |
2106 |
++ DYNSYM (isl_val_is_int); \ |
2107 |
++ DYNSYM (isl_val_mul); \ |
2108 |
++ DYNSYM (isl_val_neg); \ |
2109 |
++ DYNSYM (isl_val_sub); |
2110 |
++ |
2111 |
++extern struct isl_pointers_s__ |
2112 |
++{ |
2113 |
++ bool inited; |
2114 |
++ void *h; |
2115 |
++#define DYNSYM(x) __typeof (x) *p_##x |
2116 |
++ DYNSYMS |
2117 |
++#undef DYNSYM |
2118 |
++} isl_pointers__; |
2119 |
++ |
2120 |
++#define isl_aff_add_coefficient_si (*isl_pointers__.p_isl_aff_add_coefficient_si) |
2121 |
++#define isl_aff_free (*isl_pointers__.p_isl_aff_free) |
2122 |
++#define isl_aff_get_space (*isl_pointers__.p_isl_aff_get_space) |
2123 |
++#define isl_aff_set_coefficient_si (*isl_pointers__.p_isl_aff_set_coefficient_si) |
2124 |
++#define isl_aff_set_constant_si (*isl_pointers__.p_isl_aff_set_constant_si) |
2125 |
++#define isl_aff_zero_on_domain (*isl_pointers__.p_isl_aff_zero_on_domain) |
2126 |
++#define isl_band_free (*isl_pointers__.p_isl_band_free) |
2127 |
++#define isl_band_get_children (*isl_pointers__.p_isl_band_get_children) |
2128 |
++#define isl_band_get_partial_schedule (*isl_pointers__.p_isl_band_get_partial_schedule) |
2129 |
++#define isl_band_has_children (*isl_pointers__.p_isl_band_has_children) |
2130 |
++#define isl_band_list_free (*isl_pointers__.p_isl_band_list_free) |
2131 |
++#define isl_band_list_get_band (*isl_pointers__.p_isl_band_list_get_band) |
2132 |
++#define isl_band_list_get_ctx (*isl_pointers__.p_isl_band_list_get_ctx) |
2133 |
++#define isl_band_list_n_band (*isl_pointers__.p_isl_band_list_n_band) |
2134 |
++#ifdef HAVE_ISL_SCHED_CONSTRAINTS_COMPUTE_SCHEDULE |
2135 |
++#define isl_band_member_is_coincident (*isl_pointers__.p_isl_band_member_is_coincident) |
2136 |
++#else |
2137 |
++#define isl_band_member_is_zero_distance (*isl_pointers__.p_isl_band_member_is_zero_distance) |
2138 |
++#endif |
2139 |
++#define isl_band_n_member (*isl_pointers__.p_isl_band_n_member) |
2140 |
++#define isl_basic_map_add_constraint (*isl_pointers__.p_isl_basic_map_add_constraint) |
2141 |
++#define isl_basic_map_project_out (*isl_pointers__.p_isl_basic_map_project_out) |
2142 |
++#define isl_basic_map_universe (*isl_pointers__.p_isl_basic_map_universe) |
2143 |
++#define isl_constraint_set_coefficient_si (*isl_pointers__.p_isl_constraint_set_coefficient_si) |
2144 |
++#define isl_constraint_set_constant_si (*isl_pointers__.p_isl_constraint_set_constant_si) |
2145 |
++#define isl_ctx_alloc (*isl_pointers__.p_isl_ctx_alloc) |
2146 |
++#define isl_ctx_free (*isl_pointers__.p_isl_ctx_free) |
2147 |
++#define isl_equality_alloc (*isl_pointers__.p_isl_equality_alloc) |
2148 |
++#define isl_id_alloc (*isl_pointers__.p_isl_id_alloc) |
2149 |
++#define isl_id_copy (*isl_pointers__.p_isl_id_copy) |
2150 |
++#define isl_id_free (*isl_pointers__.p_isl_id_free) |
2151 |
++#define isl_inequality_alloc (*isl_pointers__.p_isl_inequality_alloc) |
2152 |
++#define isl_local_space_copy (*isl_pointers__.p_isl_local_space_copy) |
2153 |
++#define isl_local_space_free (*isl_pointers__.p_isl_local_space_free) |
2154 |
++#define isl_local_space_from_space (*isl_pointers__.p_isl_local_space_from_space) |
2155 |
++#define isl_local_space_range (*isl_pointers__.p_isl_local_space_range) |
2156 |
++#define isl_map_add_constraint (*isl_pointers__.p_isl_map_add_constraint) |
2157 |
++#define isl_map_add_dims (*isl_pointers__.p_isl_map_add_dims) |
2158 |
++#define isl_map_align_params (*isl_pointers__.p_isl_map_align_params) |
2159 |
++#define isl_map_apply_range (*isl_pointers__.p_isl_map_apply_range) |
2160 |
++#define isl_map_copy (*isl_pointers__.p_isl_map_copy) |
2161 |
++#define isl_map_dim (*isl_pointers__.p_isl_map_dim) |
2162 |
++#define isl_map_dump (*isl_pointers__.p_isl_map_dump) |
2163 |
++#define isl_map_equate (*isl_pointers__.p_isl_map_equate) |
2164 |
++#define isl_map_fix_si (*isl_pointers__.p_isl_map_fix_si) |
2165 |
++#define isl_map_flat_product (*isl_pointers__.p_isl_map_flat_product) |
2166 |
++#define isl_map_flat_range_product (*isl_pointers__.p_isl_map_flat_range_product) |
2167 |
++#define isl_map_free (*isl_pointers__.p_isl_map_free) |
2168 |
++#define isl_map_from_basic_map (*isl_pointers__.p_isl_map_from_basic_map) |
2169 |
++#define isl_map_from_pw_aff (*isl_pointers__.p_isl_map_from_pw_aff) |
2170 |
++#define isl_map_from_union_map (*isl_pointers__.p_isl_map_from_union_map) |
2171 |
++#define isl_map_get_ctx (*isl_pointers__.p_isl_map_get_ctx) |
2172 |
++#define isl_map_get_space (*isl_pointers__.p_isl_map_get_space) |
2173 |
++#define isl_map_get_tuple_id (*isl_pointers__.p_isl_map_get_tuple_id) |
2174 |
++#define isl_map_insert_dims (*isl_pointers__.p_isl_map_insert_dims) |
2175 |
++#define isl_map_intersect (*isl_pointers__.p_isl_map_intersect) |
2176 |
++#define isl_map_intersect_domain (*isl_pointers__.p_isl_map_intersect_domain) |
2177 |
++#define isl_map_intersect_range (*isl_pointers__.p_isl_map_intersect_range) |
2178 |
++#define isl_map_is_empty (*isl_pointers__.p_isl_map_is_empty) |
2179 |
++#define isl_map_lex_ge (*isl_pointers__.p_isl_map_lex_ge) |
2180 |
++#define isl_map_lex_le (*isl_pointers__.p_isl_map_lex_le) |
2181 |
++#define isl_map_n_out (*isl_pointers__.p_isl_map_n_out) |
2182 |
++#define isl_map_range (*isl_pointers__.p_isl_map_range) |
2183 |
++#define isl_map_set_tuple_id (*isl_pointers__.p_isl_map_set_tuple_id) |
2184 |
++#define isl_map_universe (*isl_pointers__.p_isl_map_universe) |
2185 |
++#define isl_options_set_on_error (*isl_pointers__.p_isl_options_set_on_error) |
2186 |
++#ifdef HAVE_ISL_OPTIONS_SET_SCHEDULE_SERIALIZE_SCCS |
2187 |
++#define isl_options_set_schedule_serialize_sccs (*isl_pointers__.p_isl_options_set_schedule_serialize_sccs) |
2188 |
++#else |
2189 |
++#define isl_options_set_schedule_fuse (*isl_pointers__.p_isl_options_set_schedule_fuse) |
2190 |
++#endif |
2191 |
++#define isl_options_set_schedule_max_constant_term (*isl_pointers__.p_isl_options_set_schedule_max_constant_term) |
2192 |
++#define isl_options_set_schedule_maximize_band_depth (*isl_pointers__.p_isl_options_set_schedule_maximize_band_depth) |
2193 |
++#define isl_printer_free (*isl_pointers__.p_isl_printer_free) |
2194 |
++#define isl_printer_print_aff (*isl_pointers__.p_isl_printer_print_aff) |
2195 |
++#define isl_printer_print_constraint (*isl_pointers__.p_isl_printer_print_constraint) |
2196 |
++#define isl_printer_print_map (*isl_pointers__.p_isl_printer_print_map) |
2197 |
++#define isl_printer_print_set (*isl_pointers__.p_isl_printer_print_set) |
2198 |
++#define isl_printer_to_file (*isl_pointers__.p_isl_printer_to_file) |
2199 |
++#define isl_pw_aff_add (*isl_pointers__.p_isl_pw_aff_add) |
2200 |
++#define isl_pw_aff_alloc (*isl_pointers__.p_isl_pw_aff_alloc) |
2201 |
++#define isl_pw_aff_copy (*isl_pointers__.p_isl_pw_aff_copy) |
2202 |
++#define isl_pw_aff_eq_set (*isl_pointers__.p_isl_pw_aff_eq_set) |
2203 |
++#define isl_pw_aff_free (*isl_pointers__.p_isl_pw_aff_free) |
2204 |
++#define isl_pw_aff_from_aff (*isl_pointers__.p_isl_pw_aff_from_aff) |
2205 |
++#define isl_pw_aff_get_ctx (*isl_pointers__.p_isl_pw_aff_get_ctx) |
2206 |
++#define isl_pw_aff_ge_set (*isl_pointers__.p_isl_pw_aff_ge_set) |
2207 |
++#define isl_pw_aff_gt_set (*isl_pointers__.p_isl_pw_aff_gt_set) |
2208 |
++#define isl_pw_aff_is_cst (*isl_pointers__.p_isl_pw_aff_is_cst) |
2209 |
++#define isl_pw_aff_le_set (*isl_pointers__.p_isl_pw_aff_le_set) |
2210 |
++#define isl_pw_aff_lt_set (*isl_pointers__.p_isl_pw_aff_lt_set) |
2211 |
++#define isl_pw_aff_mul (*isl_pointers__.p_isl_pw_aff_mul) |
2212 |
++#define isl_pw_aff_ne_set (*isl_pointers__.p_isl_pw_aff_ne_set) |
2213 |
++#define isl_pw_aff_nonneg_set (*isl_pointers__.p_isl_pw_aff_nonneg_set) |
2214 |
++#define isl_pw_aff_set_tuple_id (*isl_pointers__.p_isl_pw_aff_set_tuple_id) |
2215 |
++#define isl_pw_aff_sub (*isl_pointers__.p_isl_pw_aff_sub) |
2216 |
++#define isl_pw_aff_zero_set (*isl_pointers__.p_isl_pw_aff_zero_set) |
2217 |
++#define isl_schedule_free (*isl_pointers__.p_isl_schedule_free) |
2218 |
++#define isl_schedule_get_band_forest (*isl_pointers__.p_isl_schedule_get_band_forest) |
2219 |
++#define isl_set_add_constraint (*isl_pointers__.p_isl_set_add_constraint) |
2220 |
++#define isl_set_add_dims (*isl_pointers__.p_isl_set_add_dims) |
2221 |
++#define isl_set_apply (*isl_pointers__.p_isl_set_apply) |
2222 |
++#define isl_set_coalesce (*isl_pointers__.p_isl_set_coalesce) |
2223 |
++#define isl_set_copy (*isl_pointers__.p_isl_set_copy) |
2224 |
++#define isl_set_dim (*isl_pointers__.p_isl_set_dim) |
2225 |
++#define isl_set_fix_si (*isl_pointers__.p_isl_set_fix_si) |
2226 |
++#define isl_set_free (*isl_pointers__.p_isl_set_free) |
2227 |
++#define isl_set_get_space (*isl_pointers__.p_isl_set_get_space) |
2228 |
++#define isl_set_get_tuple_id (*isl_pointers__.p_isl_set_get_tuple_id) |
2229 |
++#define isl_set_intersect (*isl_pointers__.p_isl_set_intersect) |
2230 |
++#define isl_set_is_empty (*isl_pointers__.p_isl_set_is_empty) |
2231 |
++#define isl_set_n_dim (*isl_pointers__.p_isl_set_n_dim) |
2232 |
++#define isl_set_nat_universe (*isl_pointers__.p_isl_set_nat_universe) |
2233 |
++#define isl_set_project_out (*isl_pointers__.p_isl_set_project_out) |
2234 |
++#define isl_set_set_tuple_id (*isl_pointers__.p_isl_set_set_tuple_id) |
2235 |
++#define isl_set_universe (*isl_pointers__.p_isl_set_universe) |
2236 |
++#define isl_space_add_dims (*isl_pointers__.p_isl_space_add_dims) |
2237 |
++#define isl_space_alloc (*isl_pointers__.p_isl_space_alloc) |
2238 |
++#define isl_space_copy (*isl_pointers__.p_isl_space_copy) |
2239 |
++#define isl_space_dim (*isl_pointers__.p_isl_space_dim) |
2240 |
++#define isl_space_domain (*isl_pointers__.p_isl_space_domain) |
2241 |
++#define isl_space_find_dim_by_id (*isl_pointers__.p_isl_space_find_dim_by_id) |
2242 |
++#define isl_space_free (*isl_pointers__.p_isl_space_free) |
2243 |
++#define isl_space_from_domain (*isl_pointers__.p_isl_space_from_domain) |
2244 |
++#define isl_space_get_tuple_id (*isl_pointers__.p_isl_space_get_tuple_id) |
2245 |
++#define isl_space_params_alloc (*isl_pointers__.p_isl_space_params_alloc) |
2246 |
++#define isl_space_range (*isl_pointers__.p_isl_space_range) |
2247 |
++#define isl_space_set_alloc (*isl_pointers__.p_isl_space_set_alloc) |
2248 |
++#define isl_space_set_dim_id (*isl_pointers__.p_isl_space_set_dim_id) |
2249 |
++#define isl_space_set_tuple_id (*isl_pointers__.p_isl_space_set_tuple_id) |
2250 |
++#define isl_union_map_add_map (*isl_pointers__.p_isl_union_map_add_map) |
2251 |
++#define isl_union_map_align_params (*isl_pointers__.p_isl_union_map_align_params) |
2252 |
++#define isl_union_map_apply_domain (*isl_pointers__.p_isl_union_map_apply_domain) |
2253 |
++#define isl_union_map_apply_range (*isl_pointers__.p_isl_union_map_apply_range) |
2254 |
++#define isl_union_map_compute_flow (*isl_pointers__.p_isl_union_map_compute_flow) |
2255 |
++#define isl_union_map_copy (*isl_pointers__.p_isl_union_map_copy) |
2256 |
++#define isl_union_map_empty (*isl_pointers__.p_isl_union_map_empty) |
2257 |
++#define isl_union_map_flat_range_product (*isl_pointers__.p_isl_union_map_flat_range_product) |
2258 |
++#define isl_union_map_foreach_map (*isl_pointers__.p_isl_union_map_foreach_map) |
2259 |
++#define isl_union_map_free (*isl_pointers__.p_isl_union_map_free) |
2260 |
++#define isl_union_map_from_map (*isl_pointers__.p_isl_union_map_from_map) |
2261 |
++#define isl_union_map_get_ctx (*isl_pointers__.p_isl_union_map_get_ctx) |
2262 |
++#define isl_union_map_get_space (*isl_pointers__.p_isl_union_map_get_space) |
2263 |
++#define isl_union_map_gist_domain (*isl_pointers__.p_isl_union_map_gist_domain) |
2264 |
++#define isl_union_map_gist_range (*isl_pointers__.p_isl_union_map_gist_range) |
2265 |
++#define isl_union_map_intersect_domain (*isl_pointers__.p_isl_union_map_intersect_domain) |
2266 |
++#define isl_union_map_is_empty (*isl_pointers__.p_isl_union_map_is_empty) |
2267 |
++#define isl_union_map_subtract (*isl_pointers__.p_isl_union_map_subtract) |
2268 |
++#define isl_union_map_union (*isl_pointers__.p_isl_union_map_union) |
2269 |
++#define isl_union_set_add_set (*isl_pointers__.p_isl_union_set_add_set) |
2270 |
++#define isl_union_set_compute_schedule (*isl_pointers__.p_isl_union_set_compute_schedule) |
2271 |
++#define isl_union_set_copy (*isl_pointers__.p_isl_union_set_copy) |
2272 |
++#define isl_union_set_empty (*isl_pointers__.p_isl_union_set_empty) |
2273 |
++#define isl_union_set_from_set (*isl_pointers__.p_isl_union_set_from_set) |
2274 |
++#define isl_aff_add_constant_val (*isl_pointers__.p_isl_aff_add_constant_val) |
2275 |
++#define isl_aff_get_coefficient_val (*isl_pointers__.p_isl_aff_get_coefficient_val) |
2276 |
++#define isl_aff_get_ctx (*isl_pointers__.p_isl_aff_get_ctx) |
2277 |
++#define isl_aff_mod_val (*isl_pointers__.p_isl_aff_mod_val) |
2278 |
++#define isl_ast_build_ast_from_schedule (*isl_pointers__.p_isl_ast_build_ast_from_schedule) |
2279 |
++#define isl_ast_build_free (*isl_pointers__.p_isl_ast_build_free) |
2280 |
++#define isl_ast_build_from_context (*isl_pointers__.p_isl_ast_build_from_context) |
2281 |
++#define isl_ast_build_get_ctx (*isl_pointers__.p_isl_ast_build_get_ctx) |
2282 |
++#define isl_ast_build_get_schedule (*isl_pointers__.p_isl_ast_build_get_schedule) |
2283 |
++#define isl_ast_build_get_schedule_space (*isl_pointers__.p_isl_ast_build_get_schedule_space) |
2284 |
++#define isl_ast_build_set_before_each_for (*isl_pointers__.p_isl_ast_build_set_before_each_for) |
2285 |
++#define isl_ast_build_set_options (*isl_pointers__.p_isl_ast_build_set_options) |
2286 |
++#define isl_ast_expr_free (*isl_pointers__.p_isl_ast_expr_free) |
2287 |
++#define isl_ast_expr_from_val (*isl_pointers__.p_isl_ast_expr_from_val) |
2288 |
++#define isl_ast_expr_get_ctx (*isl_pointers__.p_isl_ast_expr_get_ctx) |
2289 |
++#define isl_ast_expr_get_id (*isl_pointers__.p_isl_ast_expr_get_id) |
2290 |
++#define isl_ast_expr_get_op_arg (*isl_pointers__.p_isl_ast_expr_get_op_arg) |
2291 |
++#define isl_ast_expr_get_op_n_arg (*isl_pointers__.p_isl_ast_expr_get_op_n_arg) |
2292 |
++#define isl_ast_expr_get_op_type (*isl_pointers__.p_isl_ast_expr_get_op_type) |
2293 |
++#define isl_ast_expr_get_type (*isl_pointers__.p_isl_ast_expr_get_type) |
2294 |
++#define isl_ast_expr_get_val (*isl_pointers__.p_isl_ast_expr_get_val) |
2295 |
++#define isl_ast_expr_sub (*isl_pointers__.p_isl_ast_expr_sub) |
2296 |
++#define isl_ast_node_block_get_children (*isl_pointers__.p_isl_ast_node_block_get_children) |
2297 |
++#define isl_ast_node_for_get_body (*isl_pointers__.p_isl_ast_node_for_get_body) |
2298 |
++#define isl_ast_node_for_get_cond (*isl_pointers__.p_isl_ast_node_for_get_cond) |
2299 |
++#define isl_ast_node_for_get_inc (*isl_pointers__.p_isl_ast_node_for_get_inc) |
2300 |
++#define isl_ast_node_for_get_init (*isl_pointers__.p_isl_ast_node_for_get_init) |
2301 |
++#define isl_ast_node_for_get_iterator (*isl_pointers__.p_isl_ast_node_for_get_iterator) |
2302 |
++#define isl_ast_node_free (*isl_pointers__.p_isl_ast_node_free) |
2303 |
++#define isl_ast_node_get_annotation (*isl_pointers__.p_isl_ast_node_get_annotation) |
2304 |
++#define isl_ast_node_get_type (*isl_pointers__.p_isl_ast_node_get_type) |
2305 |
++#define isl_ast_node_if_get_cond (*isl_pointers__.p_isl_ast_node_if_get_cond) |
2306 |
++#define isl_ast_node_if_get_else (*isl_pointers__.p_isl_ast_node_if_get_else) |
2307 |
++#define isl_ast_node_if_get_then (*isl_pointers__.p_isl_ast_node_if_get_then) |
2308 |
++#define isl_ast_node_list_free (*isl_pointers__.p_isl_ast_node_list_free) |
2309 |
++#define isl_ast_node_list_get_ast_node (*isl_pointers__.p_isl_ast_node_list_get_ast_node) |
2310 |
++#define isl_ast_node_list_n_ast_node (*isl_pointers__.p_isl_ast_node_list_n_ast_node) |
2311 |
++#define isl_ast_node_user_get_expr (*isl_pointers__.p_isl_ast_node_user_get_expr) |
2312 |
++#define isl_constraint_set_coefficient_val (*isl_pointers__.p_isl_constraint_set_coefficient_val) |
2313 |
++#define isl_constraint_set_constant_val (*isl_pointers__.p_isl_constraint_set_constant_val) |
2314 |
++#define isl_id_get_user (*isl_pointers__.p_isl_id_get_user) |
2315 |
++#define isl_local_space_get_ctx (*isl_pointers__.p_isl_local_space_get_ctx) |
2316 |
++#define isl_map_fix_val (*isl_pointers__.p_isl_map_fix_val) |
2317 |
++#define isl_options_set_ast_build_atomic_upper_bound (*isl_pointers__.p_isl_options_set_ast_build_atomic_upper_bound) |
2318 |
++#define isl_printer_print_ast_node (*isl_pointers__.p_isl_printer_print_ast_node) |
2319 |
++#define isl_printer_print_str (*isl_pointers__.p_isl_printer_print_str) |
2320 |
++#define isl_printer_set_output_format (*isl_pointers__.p_isl_printer_set_output_format) |
2321 |
++#define isl_pw_aff_mod_val (*isl_pointers__.p_isl_pw_aff_mod_val) |
2322 |
++#define isl_schedule_constraints_compute_schedule (*isl_pointers__.p_isl_schedule_constraints_compute_schedule) |
2323 |
++#define isl_schedule_constraints_on_domain (*isl_pointers__.p_isl_schedule_constraints_on_domain) |
2324 |
++#define isl_schedule_constraints_set_coincidence (*isl_pointers__.p_isl_schedule_constraints_set_coincidence) |
2325 |
++#define isl_schedule_constraints_set_proximity (*isl_pointers__.p_isl_schedule_constraints_set_proximity) |
2326 |
++#define isl_schedule_constraints_set_validity (*isl_pointers__.p_isl_schedule_constraints_set_validity) |
2327 |
++#define isl_set_get_dim_id (*isl_pointers__.p_isl_set_get_dim_id) |
2328 |
++#define isl_set_max_val (*isl_pointers__.p_isl_set_max_val) |
2329 |
++#define isl_set_min_val (*isl_pointers__.p_isl_set_min_val) |
2330 |
++#define isl_set_params (*isl_pointers__.p_isl_set_params) |
2331 |
++#define isl_space_align_params (*isl_pointers__.p_isl_space_align_params) |
2332 |
++#define isl_space_map_from_domain_and_range (*isl_pointers__.p_isl_space_map_from_domain_and_range) |
2333 |
++#define isl_space_set_tuple_name (*isl_pointers__.p_isl_space_set_tuple_name) |
2334 |
++#define isl_space_wrap (*isl_pointers__.p_isl_space_wrap) |
2335 |
++#define isl_union_map_from_domain_and_range (*isl_pointers__.p_isl_union_map_from_domain_and_range) |
2336 |
++#define isl_union_map_range (*isl_pointers__.p_isl_union_map_range) |
2337 |
++#define isl_union_set_union (*isl_pointers__.p_isl_union_set_union) |
2338 |
++#define isl_union_set_universe (*isl_pointers__.p_isl_union_set_universe) |
2339 |
++#define isl_val_2exp (*isl_pointers__.p_isl_val_2exp) |
2340 |
++#define isl_val_add_ui (*isl_pointers__.p_isl_val_add_ui) |
2341 |
++#define isl_val_copy (*isl_pointers__.p_isl_val_copy) |
2342 |
++#define isl_val_free (*isl_pointers__.p_isl_val_free) |
2343 |
++#define isl_val_get_num_gmp (*isl_pointers__.p_isl_val_get_num_gmp) |
2344 |
++#define isl_val_int_from_gmp (*isl_pointers__.p_isl_val_int_from_gmp) |
2345 |
++#define isl_val_int_from_si (*isl_pointers__.p_isl_val_int_from_si) |
2346 |
++#define isl_val_int_from_ui (*isl_pointers__.p_isl_val_int_from_ui) |
2347 |
++#define isl_val_is_int (*isl_pointers__.p_isl_val_is_int) |
2348 |
++#define isl_val_mul (*isl_pointers__.p_isl_val_mul) |
2349 |
++#define isl_val_neg (*isl_pointers__.p_isl_val_neg) |
2350 |
++#define isl_val_sub (*isl_pointers__.p_isl_val_sub) |
2351 |
++ |
2352 |
+ typedef struct poly_dr *poly_dr_p; |
2353 |
+ |
2354 |
+ typedef struct poly_bb *poly_bb_p; |
2355 |
+--- gcc/graphite.c.jj 2012-12-13 11:31:00.000000000 +0100 |
2356 |
++++ gcc/graphite.c 2012-12-14 13:40:44.155136961 +0100 |
2357 |
+@@ -90,6 +90,38 @@ along with GCC; see the file COPYING3. |
2358 |
+ #include "graphite-isl-ast-to-gimple.h" |
2359 |
+ #include "graphite-sese-to-poly.h" |
2360 |
+ |
2361 |
++__typeof (isl_pointers__) isl_pointers__; |
2362 |
++ |
2363 |
++static bool |
2364 |
++init_isl_pointers (void) |
2365 |
++{ |
2366 |
++ void *h; |
2367 |
++ |
2368 |
++ if (isl_pointers__.inited) |
2369 |
++ return isl_pointers__.h != NULL; |
2370 |
++#ifdef HAVE_ISL_OPTIONS_SET_SCHEDULE_SERIALIZE_SCCS |
2371 |
++ h = dlopen ("libisl.so.15", RTLD_LAZY); |
2372 |
++#else |
2373 |
++ h = dlopen ("libisl.so.13", RTLD_LAZY); |
2374 |
++#endif |
2375 |
++ isl_pointers__.h = h; |
2376 |
++ if (h == NULL) |
2377 |
++ return false; |
2378 |
++#define DYNSYM(x) \ |
2379 |
++ do \ |
2380 |
++ { \ |
2381 |
++ union { __typeof (isl_pointers__.p_##x) p; void *q; } u; \ |
2382 |
++ u.q = dlsym (h, #x); \ |
2383 |
++ if (u.q == NULL) \ |
2384 |
++ return false; \ |
2385 |
++ isl_pointers__.p_##x = u.p; \ |
2386 |
++ } \ |
2387 |
++ while (0) |
2388 |
++ DYNSYMS |
2389 |
++#undef DYNSYM |
2390 |
++ return true; |
2391 |
++} |
2392 |
++ |
2393 |
+ /* Print global statistics to FILE. */ |
2394 |
+ |
2395 |
+ static void |
2396 |
+@@ -285,6 +313,15 @@ graphite_transform_loops (void) |
2397 |
+ if (parallelized_function_p (cfun->decl)) |
2398 |
+ return; |
2399 |
+ |
2400 |
++ if (number_of_loops (cfun) <= 1) |
2401 |
++ return; |
2402 |
++ |
2403 |
++ if (!init_isl_pointers ()) |
2404 |
++ { |
2405 |
++ sorry ("Graphite loop optimizations cannot be used; rebuild gcc to fix"); |
2406 |
++ return; |
2407 |
++ } |
2408 |
++ |
2409 |
+ ctx = isl_ctx_alloc (); |
2410 |
+ isl_options_set_on_error (ctx, ISL_ON_ERROR_ABORT); |
2411 |
+ if (!graphite_initialize (ctx)) |
2412 |
|
2413 |
diff --git a/5.5.0/gentoo/22_all_gcc-5-pr65958.patch b/5.5.0/gentoo/22_all_gcc-5-pr65958.patch |
2414 |
new file mode 100644 |
2415 |
index 0000000..61d9c27 |
2416 |
--- /dev/null |
2417 |
+++ b/5.5.0/gentoo/22_all_gcc-5-pr65958.patch |
2418 |
@@ -0,0 +1,215 @@ |
2419 |
+https://bugs.gentoo.org/518598 |
2420 |
+https://gcc.gnu.org/PR65958 |
2421 |
+ |
2422 |
+fix alloca behavior with vla's for all arches |
2423 |
+ |
2424 |
+From 6ad0a0bc2db129994d44470b070e91d9584f0132 Mon Sep 17 00:00:00 2001 |
2425 |
+From: ebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4> |
2426 |
+Date: Fri, 4 Dec 2015 11:57:15 +0000 |
2427 |
+Subject: [PATCH] |
2428 |
+ |
2429 |
+git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@231260 138bc75d-0d04-0410-961f-82ee72b054a4 |
2430 |
+--- |
2431 |
+ gcc/ChangeLog | 15 +++++++++++++++ |
2432 |
+ gcc/doc/extend.texi | 4 +--- |
2433 |
+ gcc/doc/generic.texi | 14 +++++++++----- |
2434 |
+ gcc/gimplify.c | 38 ++++++++++++++++++++++++++++---------- |
2435 |
+ gcc/testsuite/ChangeLog | 4 ++++ |
2436 |
+ gcc/testsuite/gcc.dg/vla-24.c | 31 +++++++++++++++++++++++++++++++ |
2437 |
+ 6 files changed, 88 insertions(+), 18 deletions(-) |
2438 |
+ create mode 100644 gcc/testsuite/gcc.dg/vla-24.c |
2439 |
+ |
2440 |
+2015-12-04 Eric Botcazou <ebotcazou@×××××××.com> |
2441 |
+ |
2442 |
+ PR middle-end/65958 |
2443 |
+ * gimplify.c (struct gimplify_ctx): Turn boolean fields into 1-bit |
2444 |
+ fields, add keep_stack and reorder them. |
2445 |
+ (gimplify_bind_expr): Save gimplify_ctxp->keep_stack on entry then |
2446 |
+ set it to false. Do not insert a stack save/restore pair if it has |
2447 |
+ been set to true by the gimplification of the statements. |
2448 |
+ Restore it to the saved value on exit if it is still false. |
2449 |
+ (gimplify_vla_decl): Do not set gimplify_ctxp->save_stack here. |
2450 |
+ (gimplify_call_expr) <BUILT_IN_ALLOCA[_WITH_ALIGN]>: New case. Set |
2451 |
+ either save_stack or keep_stack depending on CALL_ALLOCA_FOR_VAR_P. |
2452 |
+ * doc/extend.texi (Variable Length): Document new behavior. |
2453 |
+ * doc/generic.texi (Blocks): Document new handling of VLAs. |
2454 |
+ |
2455 |
+diff --git a/gcc/doc/extend.texi b/gcc/doc/extend.texi |
2456 |
+index 63fce0f..6a5e2b8 100644 |
2457 |
+--- a/gcc/doc/extend.texi |
2458 |
++++ b/gcc/doc/extend.texi |
2459 |
+@@ -1658,9 +1658,7 @@ variable-length arrays are more elegant. |
2460 |
+ There are other differences between these two methods. Space allocated |
2461 |
+ with @code{alloca} exists until the containing @emph{function} returns. |
2462 |
+ The space for a variable-length array is deallocated as soon as the array |
2463 |
+-name's scope ends. (If you use both variable-length arrays and |
2464 |
+-@code{alloca} in the same function, deallocation of a variable-length array |
2465 |
+-also deallocates anything more recently allocated with @code{alloca}.) |
2466 |
++name's scope ends, unless you also use @code{alloca} in this scope. |
2467 |
+ |
2468 |
+ You can also use variable-length arrays as arguments to functions: |
2469 |
+ |
2470 |
+diff --git a/gcc/doc/generic.texi b/gcc/doc/generic.texi |
2471 |
+index bbafad9..f6b4397 100644 |
2472 |
+--- a/gcc/doc/generic.texi |
2473 |
++++ b/gcc/doc/generic.texi |
2474 |
+@@ -1950,11 +1950,15 @@ this initialization replaces the @code{DECL_STMT}. These variables |
2475 |
+ will never require cleanups. The scope of these variables is just the |
2476 |
+ body |
2477 |
+ |
2478 |
+-Variable-length arrays (VLAs) complicate this process, as their |
2479 |
+-size often refers to variables initialized earlier in the block. |
2480 |
+-To handle this, we currently split the block at that point, and |
2481 |
+-move the VLA into a new, inner @code{BIND_EXPR}. This strategy |
2482 |
+-may change in the future. |
2483 |
++Variable-length arrays (VLAs) complicate this process, as their size |
2484 |
++often refers to variables initialized earlier in the block and their |
2485 |
++initialization involves an explicit stack allocation. To handle this, |
2486 |
++we add an indirection and replace them with a pointer to stack space |
2487 |
++allocated by means of @code{alloca}. In most cases, we also arrange |
2488 |
++for this space to be reclaimed when the enclosing @code{BIND_EXPR} is |
2489 |
++exited, the exception to this being when there is an explicit call to |
2490 |
++@code{alloca} in the source code, in which case the stack is left |
2491 |
++depressed on exit of the @code{BIND_EXPR}. |
2492 |
+ |
2493 |
+ A C++ program will usually contain more @code{BIND_EXPR}s than |
2494 |
+ there are syntactic blocks in the source code, since several C++ |
2495 |
+diff --git a/gcc/gimplify.c b/gcc/gimplify.c |
2496 |
+index 7146a01..80c6bf2 100644 |
2497 |
+--- a/gcc/gimplify.c |
2498 |
++++ b/gcc/gimplify.c |
2499 |
+@@ -155,10 +155,11 @@ struct gimplify_ctx |
2500 |
+ hash_table<gimplify_hasher> *temp_htab; |
2501 |
+ |
2502 |
+ int conditions; |
2503 |
+- bool save_stack; |
2504 |
+- bool into_ssa; |
2505 |
+- bool allow_rhs_cond_expr; |
2506 |
+- bool in_cleanup_point_expr; |
2507 |
++ unsigned into_ssa : 1; |
2508 |
++ unsigned allow_rhs_cond_expr : 1; |
2509 |
++ unsigned in_cleanup_point_expr : 1; |
2510 |
++ unsigned keep_stack : 1; |
2511 |
++ unsigned save_stack : 1; |
2512 |
+ }; |
2513 |
+ |
2514 |
+ struct gimplify_omp_ctx |
2515 |
+@@ -1080,6 +1081,7 @@ static enum gimplify_status |
2516 |
+ gimplify_bind_expr (tree *expr_p, gimple_seq *pre_p) |
2517 |
+ { |
2518 |
+ tree bind_expr = *expr_p; |
2519 |
++ bool old_keep_stack = gimplify_ctxp->keep_stack; |
2520 |
+ bool old_save_stack = gimplify_ctxp->save_stack; |
2521 |
+ tree t; |
2522 |
+ gbind *bind_stmt; |
2523 |
+@@ -1129,9 +1131,10 @@ gimplify_bind_expr (tree *expr_p, gimple_seq *pre_p) |
2524 |
+ } |
2525 |
+ |
2526 |
+ bind_stmt = gimple_build_bind (BIND_EXPR_VARS (bind_expr), NULL, |
2527 |
+- BIND_EXPR_BLOCK (bind_expr)); |
2528 |
++ BIND_EXPR_BLOCK (bind_expr)); |
2529 |
+ gimple_push_bind_expr (bind_stmt); |
2530 |
+ |
2531 |
++ gimplify_ctxp->keep_stack = false; |
2532 |
+ gimplify_ctxp->save_stack = false; |
2533 |
+ |
2534 |
+ /* Gimplify the body into the GIMPLE_BIND tuple's body. */ |
2535 |
+@@ -1154,7 +1157,10 @@ gimplify_bind_expr (tree *expr_p, gimple_seq *pre_p) |
2536 |
+ |
2537 |
+ cleanup = NULL; |
2538 |
+ stack_save = NULL; |
2539 |
+- if (gimplify_ctxp->save_stack) |
2540 |
++ |
2541 |
++ /* If the code both contains VLAs and calls alloca, then we cannot reclaim |
2542 |
++ the stack space allocated to the VLAs. */ |
2543 |
++ if (gimplify_ctxp->save_stack && !gimplify_ctxp->keep_stack) |
2544 |
+ { |
2545 |
+ gcall *stack_restore; |
2546 |
+ |
2547 |
+@@ -1236,7 +1242,11 @@ gimplify_bind_expr (tree *expr_p, gimple_seq *pre_p) |
2548 |
+ gimple_bind_set_body (bind_stmt, new_body); |
2549 |
+ } |
2550 |
+ |
2551 |
++ /* keep_stack propagates all the way up to the outermost BIND_EXPR. */ |
2552 |
++ if (!gimplify_ctxp->keep_stack) |
2553 |
++ gimplify_ctxp->keep_stack = old_keep_stack; |
2554 |
+ gimplify_ctxp->save_stack = old_save_stack; |
2555 |
++ |
2556 |
+ gimple_pop_bind_expr (); |
2557 |
+ |
2558 |
+ gimplify_seq_add_stmt (pre_p, bind_stmt); |
2559 |
+@@ -1393,10 +1403,6 @@ gimplify_vla_decl (tree decl, gimple_seq *seq_p) |
2560 |
+ t = build2 (MODIFY_EXPR, TREE_TYPE (addr), addr, t); |
2561 |
+ |
2562 |
+ gimplify_and_add (t, seq_p); |
2563 |
+- |
2564 |
+- /* Indicate that we need to restore the stack level when the |
2565 |
+- enclosing BIND_EXPR is exited. */ |
2566 |
+- gimplify_ctxp->save_stack = true; |
2567 |
+ } |
2568 |
+ |
2569 |
+ /* A helper function to be called via walk_tree. Mark all labels under *TP |
2570 |
+@@ -2377,6 +2383,18 @@ gimplify_call_expr (tree *expr_p, gimple_seq *pre_p, bool want_value) |
2571 |
+ && DECL_BUILT_IN_CLASS (fndecl) == BUILT_IN_NORMAL) |
2572 |
+ switch (DECL_FUNCTION_CODE (fndecl)) |
2573 |
+ { |
2574 |
++ case BUILT_IN_ALLOCA: |
2575 |
++ case BUILT_IN_ALLOCA_WITH_ALIGN: |
2576 |
++ /* If the call has been built for a variable-sized object, then we |
2577 |
++ want to restore the stack level when the enclosing BIND_EXPR is |
2578 |
++ exited to reclaim the allocated space; otherwise, we precisely |
2579 |
++ need to do the opposite and preserve the latest stack level. */ |
2580 |
++ if (CALL_ALLOCA_FOR_VAR_P (*expr_p)) |
2581 |
++ gimplify_ctxp->save_stack = true; |
2582 |
++ else |
2583 |
++ gimplify_ctxp->keep_stack = true; |
2584 |
++ break; |
2585 |
++ |
2586 |
+ case BUILT_IN_VA_START: |
2587 |
+ { |
2588 |
+ builtin_va_start_p = TRUE; |
2589 |
+ |
2590 |
+2015-12-04 Eric Botcazou <ebotcazou@×××××××.com> |
2591 |
+ |
2592 |
+ * gcc.dg/vla-24.c: New test. |
2593 |
+ |
2594 |
+diff --git a/gcc/testsuite/gcc.dg/vla-24.c b/gcc/testsuite/gcc.dg/vla-24.c |
2595 |
+new file mode 100644 |
2596 |
+index 0000000..5bd5fed |
2597 |
+--- /dev/null |
2598 |
++++ b/gcc/testsuite/gcc.dg/vla-24.c |
2599 |
+@@ -0,0 +1,31 @@ |
2600 |
++/* PR middle-end/65958 */ |
2601 |
++ |
2602 |
++/* { dg-do run } */ |
2603 |
++/* { dg-options "-std=gnu99" } */ |
2604 |
++ |
2605 |
++extern void abort (void); |
2606 |
++ |
2607 |
++int foo (int n) |
2608 |
++{ |
2609 |
++ char *p, *q; |
2610 |
++ |
2611 |
++ if (1) |
2612 |
++ { |
2613 |
++ char i[n]; |
2614 |
++ p = __builtin_alloca (8); |
2615 |
++ p[0] = 1; |
2616 |
++ } |
2617 |
++ |
2618 |
++ q = __builtin_alloca (64); |
2619 |
++ __builtin_memset (q, 0, 64); |
2620 |
++ |
2621 |
++ return !p[0]; |
2622 |
++} |
2623 |
++ |
2624 |
++int main (void) |
2625 |
++{ |
2626 |
++ if (foo (48) != 0) |
2627 |
++ abort (); |
2628 |
++ |
2629 |
++ return 0; |
2630 |
++} |
2631 |
+-- |
2632 |
+2.6.2 |
2633 |
+ |
2634 |
|
2635 |
diff --git a/5.5.0/gentoo/23_all_pr55930-dependency-tracking.patch b/5.5.0/gentoo/23_all_pr55930-dependency-tracking.patch |
2636 |
new file mode 100644 |
2637 |
index 0000000..a8743e0 |
2638 |
--- /dev/null |
2639 |
+++ b/5.5.0/gentoo/23_all_pr55930-dependency-tracking.patch |
2640 |
@@ -0,0 +1,18 @@ |
2641 |
+libatomic build failure if configured with --disable-dependency-tracking |
2642 |
+load_n.c:115:1: fatal error: opening dependency file .deps/load_1_.lo.Ppo: No such file or directory |
2643 |
+ |
2644 |
+https://bugs.gentoo.org/463463 |
2645 |
+http://gcc.gnu.org/PR55930 |
2646 |
+ |
2647 |
+--- a/libatomic/Makefile.in |
2648 |
++++ b/libatomic/Makefile.in |
2649 |
+@@ -298,7 +298,8 @@ PAT_N = $(word 2,$(PAT_SPLIT)) |
2650 |
+ PAT_S = $(word 3,$(PAT_SPLIT)) |
2651 |
+ IFUNC_DEF = -DIFUNC_ALT=$(PAT_S) |
2652 |
+ IFUNC_OPT = $(word $(PAT_S),$(IFUNC_OPTIONS)) |
2653 |
+-M_DEPS = -MT $@ -MD -MP -MF $(DEPDIR)/$(@F).Ppo |
2654 |
++@AMDEP_TRUE@M_DEPS = -MT $@ -MD -MP -MF $(DEPDIR)/$(@F).Ppo |
2655 |
++@AMDEP_FALSE@M_DEPS = |
2656 |
+ M_SIZE = -DN=$(PAT_N) |
2657 |
+ M_IFUNC = $(if $(PAT_S),$(IFUNC_DEF) $(IFUNC_OPT)) |
2658 |
+ M_FILE = $(PAT_BASE)_n.c |
2659 |
|
2660 |
diff --git a/5.5.0/gentoo/24_all_compatibility_fix_with_perl_5.26.patch b/5.5.0/gentoo/24_all_compatibility_fix_with_perl_5.26.patch |
2661 |
new file mode 100644 |
2662 |
index 0000000..1d16c2b |
2663 |
--- /dev/null |
2664 |
+++ b/5.5.0/gentoo/24_all_compatibility_fix_with_perl_5.26.patch |
2665 |
@@ -0,0 +1,29 @@ |
2666 |
+https://bugs.gentoo.org/show_bug.cgi?id=620164 |
2667 |
+ |
2668 |
+Unescaped left brace in regex is now a fatal error. |
2669 |
+ |
2670 |
+ |
2671 |
+diff -ruN gcc-5.4.0.orig/contrib/texi2pod.pl gcc-5.4.0/contrib/texi2pod.pl |
2672 |
+--- gcc-5.4.0.orig/contrib/texi2pod.pl 2014-08-11 09:29:41.000000000 +0200 |
2673 |
++++ gcc-5.4.0/contrib/texi2pod.pl 2017-05-29 20:03:29.763162185 +0200 |
2674 |
+@@ -316,7 +316,7 @@ |
2675 |
+ @columns = (); |
2676 |
+ for $column (split (/\s*\@tab\s*/, $1)) { |
2677 |
+ # @strong{...} is used a @headitem work-alike |
2678 |
+- $column =~ s/^\@strong{(.*)}$/$1/; |
2679 |
++ $column =~ s/^\@strong\{(.*)}$/$1/; |
2680 |
+ push @columns, $column; |
2681 |
+ } |
2682 |
+ $_ = "\n=item ".join (" : ", @columns)."\n"; |
2683 |
+diff -ruN gcc-5.4.0.orig/libjava/classpath/doc/texi2pod.pl gcc-5.4.0/libjava/classpath/doc/texi2pod.pl |
2684 |
+--- gcc-5.4.0.orig/libjava/classpath/doc/texi2pod.pl 2007-06-04 01:18:43.000000000 +0200 |
2685 |
++++ gcc-5.4.0/libjava/classpath/doc/texi2pod.pl 2017-05-29 20:04:45.912165337 +0200 |
2686 |
+@@ -311,7 +311,7 @@ |
2687 |
+ @columns = (); |
2688 |
+ for $column (split (/\s*\@tab\s*/, $1)) { |
2689 |
+ # @strong{...} is used a @headitem work-alike |
2690 |
+- $column =~ s/^\@strong{(.*)}$/$1/; |
2691 |
++ $column =~ s/^\@strong\{(.*)}$/$1/; |
2692 |
+ push @columns, $column; |
2693 |
+ } |
2694 |
+ $_ = "\n=item ".join (" : ", @columns)."\n"; |
2695 |
|
2696 |
diff --git a/5.5.0/gentoo/25_all_libsanitizer-avoidustat.h-glibc-2.28-part-1.patch b/5.5.0/gentoo/25_all_libsanitizer-avoidustat.h-glibc-2.28-part-1.patch |
2697 |
new file mode 100644 |
2698 |
index 0000000..a2da9b1 |
2699 |
--- /dev/null |
2700 |
+++ b/5.5.0/gentoo/25_all_libsanitizer-avoidustat.h-glibc-2.28-part-1.patch |
2701 |
@@ -0,0 +1,67 @@ |
2702 |
+From 61f38c64c01a15560026115a157b7021ec67bd3b Mon Sep 17 00:00:00 2001 |
2703 |
+From: hjl <hjl@138bc75d-0d04-0410-961f-82ee72b054a4> |
2704 |
+Date: Thu, 24 May 2018 20:21:54 +0000 |
2705 |
+Subject: [PATCH] libsanitizer: Use pre-computed size of struct ustat for Linux |
2706 |
+ |
2707 |
+Cherry-pick compiler-rt revision 333213: |
2708 |
+ |
2709 |
+<sys/ustat.h> has been removed from glibc 2.28 by: |
2710 |
+ |
2711 |
+commit cf2478d53ad7071e84c724a986b56fe17f4f4ca7 |
2712 |
+Author: Adhemerval Zanella <adhemerval.zanella@××××××.org> |
2713 |
+Date: Sun Mar 18 11:28:59 2018 +0800 |
2714 |
+ |
2715 |
+ Deprecate ustat syscall interface |
2716 |
+ |
2717 |
+This patch uses pre-computed size of struct ustat for Linux. |
2718 |
+ |
2719 |
+ PR sanitizer/85835 |
2720 |
+ * sanitizer_common/sanitizer_platform_limits_posix.cc: Don't |
2721 |
+ include <sys/ustat.h> for Linux. |
2722 |
+ (SIZEOF_STRUCT_USTAT): New. |
2723 |
+ (struct_ustat_sz): Use SIZEOF_STRUCT_USTAT for Linux. |
2724 |
+ |
2725 |
+ |
2726 |
+ |
2727 |
+git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-7-branch@260688 138bc75d-0d04-0410-961f-82ee72b054a4 |
2728 |
+--- |
2729 |
+ libsanitizer/ChangeLog | 8 ++++++++ |
2730 |
+ .../sanitizer_platform_limits_posix.cc | 15 +++++++++++++-- |
2731 |
+ 2 files changed, 21 insertions(+), 2 deletions(-) |
2732 |
+ |
2733 |
+diff --git a/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc b/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc |
2734 |
+index 31a5e697eae..8017afd21c5 100644 |
2735 |
+--- a/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc |
2736 |
++++ b/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc |
2737 |
+@@ -154,7 +154,6 @@ typedef struct user_fpregs elf_fpregset_t; |
2738 |
+ # include <sys/procfs.h> |
2739 |
+ #endif |
2740 |
+ #include <sys/user.h> |
2741 |
+-#include <sys/ustat.h> |
2742 |
+ #include <linux/cyclades.h> |
2743 |
+ #include <linux/if_eql.h> |
2744 |
+ #include <linux/if_plip.h> |
2745 |
+@@ -247,7 +246,19 @@ namespace __sanitizer { |
2746 |
+ #endif // SANITIZER_LINUX || SANITIZER_FREEBSD |
2747 |
+ |
2748 |
+ #if SANITIZER_LINUX && !SANITIZER_ANDROID |
2749 |
+- unsigned struct_ustat_sz = sizeof(struct ustat); |
2750 |
++ // Use pre-computed size of struct ustat to avoid <sys/ustat.h> which |
2751 |
++ // has been removed from glibc 2.28. |
2752 |
++#if defined(__aarch64__) || defined(__s390x__) || defined (__mips64) \ |
2753 |
++ || defined(__powerpc64__) || defined(__arch64__) || defined(__sparcv9) \ |
2754 |
++ || defined(__x86_64__) |
2755 |
++#define SIZEOF_STRUCT_USTAT 32 |
2756 |
++#elif defined(__arm__) || defined(__i386__) || defined(__mips__) \ |
2757 |
++ || defined(__powerpc__) || defined(__s390__) |
2758 |
++#define SIZEOF_STRUCT_USTAT 20 |
2759 |
++#else |
2760 |
++#error Unknown size of struct ustat |
2761 |
++#endif |
2762 |
++ unsigned struct_ustat_sz = SIZEOF_STRUCT_USTAT; |
2763 |
+ unsigned struct_rlimit64_sz = sizeof(struct rlimit64); |
2764 |
+ unsigned struct_statvfs64_sz = sizeof(struct statvfs64); |
2765 |
+ #endif // SANITIZER_LINUX && !SANITIZER_ANDROID |
2766 |
+-- |
2767 |
+2.18.0 |
2768 |
+ |
2769 |
|
2770 |
diff --git a/5.5.0/gentoo/26_all_libsanitizer-avoidustat.h-glibc-2.28-part-2.patch b/5.5.0/gentoo/26_all_libsanitizer-avoidustat.h-glibc-2.28-part-2.patch |
2771 |
new file mode 100644 |
2772 |
index 0000000..e9b5c8f |
2773 |
--- /dev/null |
2774 |
+++ b/5.5.0/gentoo/26_all_libsanitizer-avoidustat.h-glibc-2.28-part-2.patch |
2775 |
@@ -0,0 +1,32 @@ |
2776 |
+From 6a7c93905151724f7169612d64a5c8ce45dff9fb Mon Sep 17 00:00:00 2001 |
2777 |
+From: doko <doko@138bc75d-0d04-0410-961f-82ee72b054a4> |
2778 |
+Date: Thu, 31 May 2018 09:59:35 +0000 |
2779 |
+Subject: [PATCH] 2018-05-31 Matthias Klose <doko@××××××.com> |
2780 |
+ |
2781 |
+ PR sanitizer/86012 |
2782 |
+ * sanitizer_common/sanitizer_platform_limits_posix.cc: Define |
2783 |
+ SIZEOF_STRUCT_USTAT for 32bit sparc. |
2784 |
+ |
2785 |
+ |
2786 |
+git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-7-branch@260992 138bc75d-0d04-0410-961f-82ee72b054a4 |
2787 |
+--- |
2788 |
+ libsanitizer/ChangeLog | 6 ++++++ |
2789 |
+ .../sanitizer_common/sanitizer_platform_limits_posix.cc | 2 +- |
2790 |
+ 2 files changed, 7 insertions(+), 1 deletion(-) |
2791 |
+ |
2792 |
+diff --git a/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc b/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc |
2793 |
+index 8017afd21c5..97eae3fc7bc 100644 |
2794 |
+--- a/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc |
2795 |
++++ b/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc |
2796 |
+@@ -253,7 +253,7 @@ namespace __sanitizer { |
2797 |
+ || defined(__x86_64__) |
2798 |
+ #define SIZEOF_STRUCT_USTAT 32 |
2799 |
+ #elif defined(__arm__) || defined(__i386__) || defined(__mips__) \ |
2800 |
+- || defined(__powerpc__) || defined(__s390__) |
2801 |
++ || defined(__powerpc__) || defined(__s390__) || defined(__sparc__) |
2802 |
+ #define SIZEOF_STRUCT_USTAT 20 |
2803 |
+ #else |
2804 |
+ #error Unknown size of struct ustat |
2805 |
+-- |
2806 |
+2.18.0 |
2807 |
+ |
2808 |
|
2809 |
diff --git a/5.5.0/gentoo/27_all_respect-build-cxxflags.patch b/5.5.0/gentoo/27_all_respect-build-cxxflags.patch |
2810 |
new file mode 100644 |
2811 |
index 0000000..14139ea |
2812 |
--- /dev/null |
2813 |
+++ b/5.5.0/gentoo/27_all_respect-build-cxxflags.patch |
2814 |
@@ -0,0 +1,39 @@ |
2815 |
+Pass CXXFLAGS as CXXFLAGS_FOR_BUILD to stage1. |
2816 |
+ |
2817 |
+Fixes build failure when CXXFLAGS contains |
2818 |
+TARGET-specific flags. |
2819 |
+ |
2820 |
+Tested on x86_64-pc-linux-gnu host as: |
2821 |
+ # CFLAGS='-O2 -mfpu=neon-vfpv4' CXXFLAGS='-O2 -mfpu=neon-vfpv4' \ |
2822 |
+ armv7a-unknown-linux-gnueabihf-emerge -v1 sys-devel/gcc --quiet-build=n |
2823 |
+ |
2824 |
+Fix by Peter Levine. |
2825 |
+https://bugs.gentoo.org/581406 |
2826 |
+--- a/Makefile.in |
2827 |
++++ b/Makefile.in |
2828 |
+@@ -170,6 +170,7 @@ |
2829 |
+ # built for the build system to override those in BASE_FLAGS_TO_PASS. |
2830 |
+ EXTRA_BUILD_FLAGS = \ |
2831 |
+ CFLAGS="$(CFLAGS_FOR_BUILD)" \ |
2832 |
++ CXXFLAGS="$(CXXFLAGS_FOR_BUILD)" \ |
2833 |
+ LDFLAGS="$(LDFLAGS_FOR_BUILD)" |
2834 |
+ |
2835 |
+ # This is the list of directories to built for the host system. |
2836 |
+@@ -710,6 +711,7 @@ |
2837 |
+ "CC_FOR_BUILD=$(CC_FOR_BUILD)" \ |
2838 |
+ "CFLAGS_FOR_BUILD=$(CFLAGS_FOR_BUILD)" \ |
2839 |
+ "CXX_FOR_BUILD=$(CXX_FOR_BUILD)" \ |
2840 |
++ "CXXFLAGS_FOR_BUILD=$(CXXFLAGS_FOR_BUILD)" \ |
2841 |
+ "EXPECT=$(EXPECT)" \ |
2842 |
+ "FLEX=$(FLEX)" \ |
2843 |
+ "INSTALL=$(INSTALL)" \ |
2844 |
+--- a/Makefile.tpl |
2845 |
++++ b/Makefile.tpl |
2846 |
+@@ -172,6 +172,7 @@ |
2847 |
+ # built for the build system to override those in BASE_FLAGS_TO_PASS. |
2848 |
+ EXTRA_BUILD_FLAGS = \ |
2849 |
+ CFLAGS="$(CFLAGS_FOR_BUILD)" \ |
2850 |
++ CXXFLAGS="$(CXXFLAGS_FOR_BUILD)" \ |
2851 |
+ LDFLAGS="$(LDFLAGS_FOR_BUILD)" |
2852 |
+ |
2853 |
+ # This is the list of directories to built for the host system. |
2854 |
|
2855 |
diff --git a/5.5.0/gentoo/28_all_remove-lieee.patch b/5.5.0/gentoo/28_all_remove-lieee.patch |
2856 |
new file mode 100644 |
2857 |
index 0000000..390a3b0 |
2858 |
--- /dev/null |
2859 |
+++ b/5.5.0/gentoo/28_all_remove-lieee.patch |
2860 |
@@ -0,0 +1,47 @@ |
2861 |
+Modern glibc stopped providing ieee.a |
2862 |
+ |
2863 |
+From 401a6ba8d6aa5a92acaedae24b84c59d284f446d Mon Sep 17 00:00:00 2001 |
2864 |
+From: rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4> |
2865 |
+Date: Thu, 12 Jul 2018 11:53:34 +0000 |
2866 |
+Subject: [PATCH] 2018-07-12 Richard Biener <rguenther@××××.de> |
2867 |
+ |
2868 |
+ PR target/84829 |
2869 |
+ * config/gnu-user.h (GNU_USER_TARGET_NO_PTHREADS_LIB_SPEC): |
2870 |
+ Remove -mieee-fp handling. |
2871 |
+ |
2872 |
+ * gcc.target/i386/pr84829.c: New testcase. |
2873 |
+ |
2874 |
+ |
2875 |
+git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@262582 138bc75d-0d04-0410-961f-82ee72b054a4 |
2876 |
+--- |
2877 |
+ gcc/ChangeLog | 6 ++++++ |
2878 |
+ gcc/config/gnu-user.h | 2 +- |
2879 |
+ gcc/testsuite/ChangeLog | 5 +++++ |
2880 |
+ gcc/testsuite/gcc.target/i386/pr84829.c | 7 +++++++ |
2881 |
+ 4 files changed, 19 insertions(+), 1 deletion(-) |
2882 |
+ create mode 100644 gcc/testsuite/gcc.target/i386/pr84829.c |
2883 |
+ |
2884 |
+--- a/gcc/config/gnu-user.h |
2885 |
++++ b/gcc/config/gnu-user.h |
2886 |
+@@ -120,7 +120,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see |
2887 |
+ |
2888 |
+ #define GNU_USER_TARGET_NO_PTHREADS_LIB_SPEC \ |
2889 |
+ "%{shared:-lc} \ |
2890 |
+- %{!shared:%{mieee-fp:-lieee} %{profile:-lc_p}%{!profile:-lc}}" |
2891 |
++ %{!shared:%{profile:-lc_p}%{!profile:-lc}}" |
2892 |
+ |
2893 |
+ #define GNU_USER_TARGET_LIB_SPEC \ |
2894 |
+ "%{pthread:-lpthread} " \ |
2895 |
+--- /dev/null |
2896 |
++++ b/gcc/testsuite/gcc.target/i386/pr84829.c |
2897 |
+@@ -0,0 +1,7 @@ |
2898 |
++/* { dg-do link } */ |
2899 |
++/* { dg-options "-mieee-fp" } */ |
2900 |
++ |
2901 |
++int main() |
2902 |
++{ |
2903 |
++ return 0; |
2904 |
++} |
2905 |
+-- |
2906 |
+2.19.0 |
2907 |
+ |
2908 |
|
2909 |
diff --git a/5.5.0/gentoo/29_all_libgfortran-Werror.patch b/5.5.0/gentoo/29_all_libgfortran-Werror.patch |
2910 |
new file mode 100644 |
2911 |
index 0000000..f6c26bf |
2912 |
--- /dev/null |
2913 |
+++ b/5.5.0/gentoo/29_all_libgfortran-Werror.patch |
2914 |
@@ -0,0 +1,20 @@ |
2915 |
+libgfortran does not respect --disable-werror |
2916 |
+ |
2917 |
+https://bugs.gentoo.org/433435 |
2918 |
+http://gcc.gnu.org/PR54724 |
2919 |
+ |
2920 |
+ |
2921 |
+--- a/libgfortran/configure.ac |
2922 |
++++ b/libgfortran/configure.ac |
2923 |
+@@ -140,3 +140,3 @@ AM_PROG_CC_C_O |
2924 |
+ if test "x$GCC" = "xyes"; then |
2925 |
+- AM_FCFLAGS="-I . -Wall -Werror -fimplicit-none -fno-repack-arrays -fno-underscoring" |
2926 |
++ AM_FCFLAGS="-I . -Wall -fimplicit-none -fno-repack-arrays -fno-underscoring" |
2927 |
+ ## We like to use C11 and C99 routines when available. This makes |
2928 |
+--- a/libgfortran/configure |
2929 |
++++ b/libgfortran/configure |
2930 |
+@@ -5764,3 +5764,3 @@ fi |
2931 |
+ # Add -Wall -fno-repack-arrays -fno-underscoring if we are using GCC. |
2932 |
+ if test "x$GCC" = "xyes"; then |
2933 |
+- AM_FCFLAGS="-I . -Wall -Werror -fimplicit-none -fno-repack-arrays -fno-underscoring" |
2934 |
++ AM_FCFLAGS="-I . -Wall -fimplicit-none -fno-repack-arrays -fno-underscoring" |
2935 |
|
2936 |
diff --git a/5.5.0/gentoo/30_all_libgomp-Werror.patch b/5.5.0/gentoo/30_all_libgomp-Werror.patch |
2937 |
new file mode 100644 |
2938 |
index 0000000..416808a |
2939 |
--- /dev/null |
2940 |
+++ b/5.5.0/gentoo/30_all_libgomp-Werror.patch |
2941 |
@@ -0,0 +1,20 @@ |
2942 |
+libgomp does not respect --disable-werror |
2943 |
+ |
2944 |
+https://bugs.gentoo.org/229059 |
2945 |
+http://gcc.gnu.org/PR38436 |
2946 |
+--- a/libgomp/configure.ac |
2947 |
++++ b/libgomp/configure.ac |
2948 |
+@@ -4282,4 +4282,4 @@ save_CFLAGS="$CFLAGS" |
2949 |
+ # Add -Wall -Werror if we are using GCC. |
2950 |
+ if test "x$GCC" = "xyes"; then |
2951 |
+- XCFLAGS="$XCFLAGS -Wall -Werror" |
2952 |
++ XCFLAGS="$XCFLAGS -Wall" |
2953 |
+ fi |
2954 |
+--- a/libgomp/configure |
2955 |
++++ b/libgomp/configure |
2956 |
+@@ -4282,4 +4282,4 @@ save_CFLAGS="$CFLAGS" |
2957 |
+ # Add -Wall -Werror if we are using GCC. |
2958 |
+ if test "x$GCC" = "xyes"; then |
2959 |
+- XCFLAGS="$XCFLAGS -Wall -Werror" |
2960 |
++ XCFLAGS="$XCFLAGS -Wall" |
2961 |
+ fi |
2962 |
|
2963 |
diff --git a/5.5.0/gentoo/31_all_libitm-Werror.patch b/5.5.0/gentoo/31_all_libitm-Werror.patch |
2964 |
new file mode 100644 |
2965 |
index 0000000..27181e0 |
2966 |
--- /dev/null |
2967 |
+++ b/5.5.0/gentoo/31_all_libitm-Werror.patch |
2968 |
@@ -0,0 +1,19 @@ |
2969 |
+libitm does not respect --disable-werror |
2970 |
+ |
2971 |
+https://bugs.gentoo.org/475350 |
2972 |
+--- a/libitm/configure.ac |
2973 |
++++ b/libitm/configure.ac |
2974 |
+@@ -4282,4 +4282,4 @@ save_CFLAGS="$CFLAGS" |
2975 |
+ # Add -Wall -Werror if we are using GCC. |
2976 |
+ if test "x$GCC" = "xyes"; then |
2977 |
+- XCFLAGS="$XCFLAGS -Wall -Werror" |
2978 |
++ XCFLAGS="$XCFLAGS -Wall" |
2979 |
+ fi |
2980 |
+--- a/libitm/configure |
2981 |
++++ b/libitm/configure |
2982 |
+@@ -4282,4 +4282,4 @@ save_CFLAGS="$CFLAGS" |
2983 |
+ # Add -Wall -Werror if we are using GCC. |
2984 |
+ if test "x$GCC" = "xyes"; then |
2985 |
+- XCFLAGS="$XCFLAGS -Wall -Werror" |
2986 |
++ XCFLAGS="$XCFLAGS -Wall" |
2987 |
+ fi |
2988 |
|
2989 |
diff --git a/5.5.0/gentoo/32_all_libatomic-Werror.patch b/5.5.0/gentoo/32_all_libatomic-Werror.patch |
2990 |
new file mode 100644 |
2991 |
index 0000000..0550722 |
2992 |
--- /dev/null |
2993 |
+++ b/5.5.0/gentoo/32_all_libatomic-Werror.patch |
2994 |
@@ -0,0 +1,19 @@ |
2995 |
+libatomic does not respect --disable-werror |
2996 |
+ |
2997 |
+https://bugs.gentoo.org/475350 |
2998 |
+--- a/libatomic/configure.ac |
2999 |
++++ b/libatomic/configure.ac |
3000 |
+@@ -4282,4 +4282,4 @@ save_CFLAGS="$CFLAGS" |
3001 |
+ # Add -Wall -Werror if we are using GCC. |
3002 |
+ if test "x$GCC" = "xyes"; then |
3003 |
+- XCFLAGS="$XCFLAGS -Wall -Werror" |
3004 |
++ XCFLAGS="$XCFLAGS -Wall" |
3005 |
+ fi |
3006 |
+--- a/libatomic/configure |
3007 |
++++ b/libatomic/configure |
3008 |
+@@ -4282,4 +4282,4 @@ save_CFLAGS="$CFLAGS" |
3009 |
+ # Add -Wall -Werror if we are using GCC. |
3010 |
+ if test "x$GCC" = "xyes"; then |
3011 |
+- XCFLAGS="$XCFLAGS -Wall -Werror" |
3012 |
++ XCFLAGS="$XCFLAGS -Wall" |
3013 |
+ fi |
3014 |
|
3015 |
diff --git a/5.5.0/gentoo/33_all_libbacktrace-Werror.patch b/5.5.0/gentoo/33_all_libbacktrace-Werror.patch |
3016 |
new file mode 100644 |
3017 |
index 0000000..57dd284 |
3018 |
--- /dev/null |
3019 |
+++ b/5.5.0/gentoo/33_all_libbacktrace-Werror.patch |
3020 |
@@ -0,0 +1,17 @@ |
3021 |
+libbacktrace does not respect --disable-werror |
3022 |
+ |
3023 |
+https://bugs.gentoo.org/667104 |
3024 |
+--- a/libbacktrace/configure |
3025 |
++++ b/libbacktrace/configure |
3026 |
+@@ -11634,3 +11634,3 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu |
3027 |
+ if test -n "${with_target_subdir}"; then |
3028 |
+- WARN_FLAGS="$WARN_FLAGS -Werror" |
3029 |
++ WARN_FLAGS="$WARN_FLAGS" |
3030 |
+ fi |
3031 |
+--- a/libbacktrace/configure.ac |
3032 |
++++ b/libbacktrace/configure.ac |
3033 |
+@@ -138,3 +138,3 @@ ACX_PROG_CC_WARNING_OPTS([-W -Wall -Wwrite-strings -Wstrict-prototypes \ |
3034 |
+ if test -n "${with_target_subdir}"; then |
3035 |
+- WARN_FLAGS="$WARN_FLAGS -Werror" |
3036 |
++ WARN_FLAGS="$WARN_FLAGS" |
3037 |
+ fi |
3038 |
|
3039 |
diff --git a/5.5.0/gentoo/34_all_libsanitizer-libbacktrace-Werror.patch b/5.5.0/gentoo/34_all_libsanitizer-libbacktrace-Werror.patch |
3040 |
new file mode 100644 |
3041 |
index 0000000..46a219a |
3042 |
--- /dev/null |
3043 |
+++ b/5.5.0/gentoo/34_all_libsanitizer-libbacktrace-Werror.patch |
3044 |
@@ -0,0 +1,17 @@ |
3045 |
+libsanitizer/libbacktrace does not respect --disable-werror |
3046 |
+ |
3047 |
+https://bugs.gentoo.org/667104 |
3048 |
+--- a/libsanitizer/libbacktrace/Makefile.am |
3049 |
++++ b/libsanitizer/libbacktrace/Makefile.am |
3050 |
+@@ -37,3 +37,3 @@ AM_CPPFLAGS = -I $(top_srcdir)/../include -I $(top_srcdir)/../libgcc \ |
3051 |
+ WARN_FLAGS = -W -Wall -Wwrite-strings -Wmissing-format-attribute \ |
3052 |
+- -Wcast-qual -Werror |
3053 |
++ -Wcast-qual |
3054 |
+ C_WARN_FLAGS = $(WARN_FLAGS) -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition |
3055 |
+--- a/libsanitizer/libbacktrace/Makefile.in |
3056 |
++++ b/libsanitizer/libbacktrace/Makefile.in |
3057 |
+@@ -293,3 +293,3 @@ AM_CPPFLAGS = -I $(top_srcdir)/../include -I $(top_srcdir)/../libgcc \ |
3058 |
+ WARN_FLAGS = -W -Wall -Wwrite-strings -Wmissing-format-attribute \ |
3059 |
+- -Wcast-qual -Werror |
3060 |
++ -Wcast-qual |
3061 |
+ |
3062 |
|
3063 |
diff --git a/5.5.0/gentoo/35_all_libstdcxx-no-vtv.patch b/5.5.0/gentoo/35_all_libstdcxx-no-vtv.patch |
3064 |
new file mode 100644 |
3065 |
index 0000000..68508bd |
3066 |
--- /dev/null |
3067 |
+++ b/5.5.0/gentoo/35_all_libstdcxx-no-vtv.patch |
3068 |
@@ -0,0 +1,61 @@ |
3069 |
+Final libstdc++.so should not contain rpath to make libvtv usable. |
3070 |
+It's up to final binaries to link against proper libvtv. |
3071 |
+ |
3072 |
+Bug: https://bugs.gentoo.org/582524 |
3073 |
+Bug: https://gcc.gnu.org/PR85884 |
3074 |
+--- a/libstdc++-v3/src/Makefile.am |
3075 |
++++ b/libstdc++-v3/src/Makefile.am |
3076 |
+@@ -217,7 +217,6 @@ CXXLINK = \ |
3077 |
+ $(LIBTOOL) --tag CXX \ |
3078 |
+ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ |
3079 |
+ --mode=link $(CXX) \ |
3080 |
+- $(VTV_CXXLINKFLAGS) \ |
3081 |
+ $(OPT_LDFLAGS) $(SECTION_LDFLAGS) $(AM_CXXFLAGS) $(LTLDFLAGS) -o $@ |
3082 |
+ |
3083 |
+ # Symbol versioning for shared libraries. |
3084 |
+--- a/libstdc++-v3/src/Makefile.in |
3085 |
++++ b/libstdc++-v3/src/Makefile.in |
3086 |
+@@ -511,7 +511,6 @@ CXXLINK = \ |
3087 |
+ $(LIBTOOL) --tag CXX \ |
3088 |
+ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ |
3089 |
+ --mode=link $(CXX) \ |
3090 |
+- $(VTV_CXXLINKFLAGS) \ |
3091 |
+ $(OPT_LDFLAGS) $(SECTION_LDFLAGS) $(AM_CXXFLAGS) $(LTLDFLAGS) -o $@ |
3092 |
+ |
3093 |
+ @ENABLE_SYMVERS_TRUE@CLEANFILES = libstdc++-symbols.ver $(version_dep) |
3094 |
+--- a/libstdc++-v3/src/c++11/Makefile.am |
3095 |
++++ b/libstdc++-v3/src/c++11/Makefile.am |
3096 |
+@@ -204,5 +204,4 @@ CXXLINK = \ |
3097 |
+ $(LIBTOOL) --tag CXX --tag disable-shared \ |
3098 |
+ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ |
3099 |
+ --mode=link $(CXX) \ |
3100 |
+- $(VTV_CXXLINKFLAGS) \ |
3101 |
+ $(OPT_LDFLAGS) $(SECTION_LDFLAGS) $(AM_CXXFLAGS) $(LTLDFLAGS) -o $@ |
3102 |
+--- a/libstdc++-v3/src/c++11/Makefile.in |
3103 |
++++ b/libstdc++-v3/src/c++11/Makefile.in |
3104 |
+@@ -496,7 +496,6 @@ CXXLINK = \ |
3105 |
+ $(LIBTOOL) --tag CXX --tag disable-shared \ |
3106 |
+ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ |
3107 |
+ --mode=link $(CXX) \ |
3108 |
+- $(VTV_CXXLINKFLAGS) \ |
3109 |
+ $(OPT_LDFLAGS) $(SECTION_LDFLAGS) $(AM_CXXFLAGS) $(LTLDFLAGS) -o $@ |
3110 |
+ |
3111 |
+ all: all-am |
3112 |
+--- a/libstdc++-v3/src/c++98/Makefile.am |
3113 |
++++ b/libstdc++-v3/src/c++98/Makefile.am |
3114 |
+@@ -273,5 +273,4 @@ CXXLINK = \ |
3115 |
+ $(LIBTOOL) --tag CXX --tag disable-shared \ |
3116 |
+ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ |
3117 |
+ --mode=link $(CXX) \ |
3118 |
+- $(VTV_CXXLINKFLAGS) \ |
3119 |
+ $(OPT_LDFLAGS) $(SECTION_LDFLAGS) $(AM_CXXFLAGS) $(LTLDFLAGS) -o $@ |
3120 |
+--- a/libstdc++-v3/src/c++98/Makefile.in |
3121 |
++++ b/libstdc++-v3/src/c++98/Makefile.in |
3122 |
+@@ -500,7 +500,6 @@ CXXLINK = \ |
3123 |
+ $(LIBTOOL) --tag CXX --tag disable-shared \ |
3124 |
+ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ |
3125 |
+ --mode=link $(CXX) \ |
3126 |
+- $(VTV_CXXLINKFLAGS) \ |
3127 |
+ $(OPT_LDFLAGS) $(SECTION_LDFLAGS) $(AM_CXXFLAGS) $(LTLDFLAGS) -o $@ |
3128 |
+ |
3129 |
+ all: all-am |
3130 |
|
3131 |
diff --git a/5.5.0/gentoo/README.history b/5.5.0/gentoo/README.history |
3132 |
new file mode 100644 |
3133 |
index 0000000..237416d |
3134 |
--- /dev/null |
3135 |
+++ b/5.5.0/gentoo/README.history |
3136 |
@@ -0,0 +1,36 @@ |
3137 |
+1.0 10 Dec 2018 |
3138 |
+ + 01_all_gcc-spec-env.patch |
3139 |
+ + 02_all_default-ssp.patch |
3140 |
+ + 03_all_default-fortify-source.patch |
3141 |
+ + 04_all_default-warn-format-security.patch |
3142 |
+ + 05_all_default-warn-trampolines.patch |
3143 |
+ + 06_all_msgfmt-libstdc++-link.patch |
3144 |
+ + 07_all_boehm-gc-execinfo.patch |
3145 |
+ + 08_all_alpha-mieee-default.patch |
3146 |
+ + 09_all_alpha-asm-mcpu.patch |
3147 |
+ + 10_all_arm_armv4t-default.patch |
3148 |
+ + 11_all_ia64_note.GNU-stack.patch |
3149 |
+ + 12_all_libjava-classpath-locale-sort.patch |
3150 |
+ + 13_all_sh_pr24836_all-archs.patch |
3151 |
+ + 14_all_superh_default-multilib.patch |
3152 |
+ + 15_all_libiberty-asprintf.patch |
3153 |
+ + 16_all_libiberty-pic.patch |
3154 |
+ + 17_all_netbsd-Bsymbolic.patch |
3155 |
+ + 18_all_libitm-no-fortify-source.patch |
3156 |
+ + 19_all_gcc-poison-system-directories.patch |
3157 |
+ + 20_all_gcc-5-pr546752.patch |
3158 |
+ + 21_all_gcc5_isl-dl.patch |
3159 |
+ + 22_all_gcc-5-pr65958.patch |
3160 |
+ + 23_all_pr55930-dependency-tracking.patch |
3161 |
+ + 24_all_compatibility_fix_with_perl_5.26.patch |
3162 |
+ + 25_all_libsanitizer-avoidustat.h-glibc-2.28-part-1.patch |
3163 |
+ + 26_all_libsanitizer-avoidustat.h-glibc-2.28-part-2.patch |
3164 |
+ + 27_all_respect-build-cxxflags.patch |
3165 |
+ + 28_all_remove-lieee.patch |
3166 |
+ + 29_all_libgfortran-Werror.patch |
3167 |
+ + 30_all_libgomp-Werror.patch |
3168 |
+ + 31_all_libitm-Werror.patch |
3169 |
+ + 32_all_libatomic-Werror.patch |
3170 |
+ + 33_all_libbacktrace-Werror.patch |
3171 |
+ + 34_all_libsanitizer-libbacktrace-Werror.patch |
3172 |
+ + 35_all_libstdcxx-no-vtv.patch |
3173 |
|
3174 |
diff --git a/5.5.0/pie/01_all_gcc53_configure.patch b/5.5.0/pie/01_all_gcc53_configure.patch |
3175 |
new file mode 100644 |
3176 |
index 0000000..a32a69d |
3177 |
--- /dev/null |
3178 |
+++ b/5.5.0/pie/01_all_gcc53_configure.patch |
3179 |
@@ -0,0 +1,156 @@ |
3180 |
+2013-12-30 Magnus Granberg <zorry@g.o> |
3181 |
+ |
3182 |
+ * gcc/configure.ac Add --enable-esp and define ENABLE_ESP. |
3183 |
+ Check if we support crtbeginP and define ENABLE_CRTBEGINP. |
3184 |
+ * gcc/configure Regenerated |
3185 |
+ |
3186 |
+ |
3187 |
+--- a/gcc/configure.ac |
3188 |
++++ b/gcc/configure.ac |
3189 |
+@@ -5130,6 +5130,55 @@ if test x"${LINKER_HASH_STYLE}" != x; th |
3190 |
+ [The linker hash style]) |
3191 |
+ fi |
3192 |
+ |
3193 |
++# -------------- |
3194 |
++# Esp checks |
3195 |
++# -------------- |
3196 |
++ |
3197 |
++# Check whether --enable-esp was given and target have the support. |
3198 |
++AC_ARG_ENABLE([esp], |
3199 |
++[AS_HELP_STRING([--enable-esp], |
3200 |
++ [Enable Stack protector and Position independent executable as |
3201 |
++ default if we have suppot for it when compiling |
3202 |
++ and link with -z now as default. |
3203 |
++ Linux targets supported i*86, x86_64, x32, |
3204 |
++ powerpc, powerpc64, ia64, arm and mips.])], |
3205 |
++ enable_esp=$enableval, |
3206 |
++ enable_esp=no) |
3207 |
++if test "$enable_esp" = yes; then |
3208 |
++ AC_MSG_CHECKING([if $target support esp]) |
3209 |
++ case "$target" in |
3210 |
++ i?86*-*-linux* | x86_64-*-linux* | powerpc*-*-linux* | mips-*-linux* | arm*-*-linux* | ia64-*-linux*) |
3211 |
++ AC_DEFINE([ENABLE_ESP], [1], |
3212 |
++ [Define if your target support esp and you have enable it.]) |
3213 |
++ ;; |
3214 |
++ *) |
3215 |
++ enable_esp=no |
3216 |
++ ;; |
3217 |
++ esac |
3218 |
++AC_MSG_RESULT($enable_esp) |
3219 |
++fi |
3220 |
++AC_SUBST([enable_esp]) |
3221 |
++ |
3222 |
++enable_crtbeginP=no |
3223 |
++if test "$enable_esp" = yes; then |
3224 |
++ AC_MSG_CHECKING([checking for crtbeginP.o support]) |
3225 |
++ if test "$enable_esp" = yes; then |
3226 |
++ case "$target" in |
3227 |
++ ia64*-*-linux*) |
3228 |
++ ;; |
3229 |
++ *-*-linux*) |
3230 |
++ if test "x$gcc_cv_ld_pie" = xyes -a "x$lt_cv_prog_compiler_static_works" = xyes; then |
3231 |
++ enable_crtbeginP=yes |
3232 |
++ AC_DEFINE([ENABLE_CRTBEGINP], [1], |
3233 |
++ [Define if your compiler will support crtbeginP.]) |
3234 |
++ fi |
3235 |
++ ;; |
3236 |
++ esac |
3237 |
++ fi |
3238 |
++ AC_MSG_RESULT($enable_crtbeginP) |
3239 |
++fi |
3240 |
++AC_SUBST([enable_crtbeginP]) |
3241 |
++ |
3242 |
+ # Configure the subdirectories |
3243 |
+ # AC_CONFIG_SUBDIRS($subdirs) |
3244 |
+ |
3245 |
+--- a/gcc/configure |
3246 |
++++ b/gcc/configure |
3247 |
+@@ -600,6 +600,8 @@ ac_includes_default="\ |
3248 |
+ |
3249 |
+ ac_subst_vars='LTLIBOBJS |
3250 |
+ LIBOBJS |
3251 |
++enable_crtbeginP |
3252 |
++enable_esp |
3253 |
+ PICFLAG |
3254 |
+ enable_host_shared |
3255 |
+ enable_plugin |
3256 |
+@@ -938,6 +940,7 @@ enable_host_shared |
3257 |
+ enable_libquadmath_support |
3258 |
+ with_linker_hash_style |
3259 |
+ with_diagnostics_color |
3260 |
++enable_esp |
3261 |
+ ' |
3262 |
+ ac_precious_vars='build_alias |
3263 |
+ host_alias |
3264 |
+@@ -1674,6 +1677,11 @@ Optional Features: |
3265 |
+ --enable-host-shared build host code as shared libraries |
3266 |
+ --disable-libquadmath-support |
3267 |
+ disable libquadmath support for Fortran |
3268 |
++ --enable-esp Enable Stack protector and Position independent |
3269 |
++ executable as default if we have suppot for it when |
3270 |
++ compiling and link with -z now as default. Linux |
3271 |
++ targets supported i*86, x86_64, x32, powerpc, |
3272 |
++ powerpc64, ia64, arm and mips. |
3273 |
+ |
3274 |
+ Optional Packages: |
3275 |
+ --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] |
3276 |
+@@ -28657,6 +28665,59 @@ cat > gcc-driver-name.h <<EOF |
3277 |
+ #define GCC_DRIVER_NAME "${target_noncanonical}-gcc-${gcc_BASEVER}${exeext}" |
3278 |
+ EOF |
3279 |
+ |
3280 |
++# -------------- |
3281 |
++# Esp checks |
3282 |
++# -------------- |
3283 |
++ |
3284 |
++# Check whether --enable-esp was given and target have the support. |
3285 |
++# Check whether --enable-esp was given. |
3286 |
++if test "${enable_esp+set}" = set; then : |
3287 |
++ enableval=$enable_esp; enable_esp=$enableval |
3288 |
++else |
3289 |
++ enable_esp=no |
3290 |
++fi |
3291 |
++ |
3292 |
++if test "$enable_esp" = yes; then |
3293 |
++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $target support esp" >&5 |
3294 |
++$as_echo_n "checking if $target support esp... " >&6; } |
3295 |
++ case "$target" in |
3296 |
++ i?86*-*-linux* | x86_64-*-linux* | powerpc*-*-linux* | mips-*-linux* | arm*-*-linux* | ia64-*-linux*) |
3297 |
++ |
3298 |
++$as_echo "#define ENABLE_ESP 1" >>confdefs.h |
3299 |
++ |
3300 |
++ ;; |
3301 |
++ *) |
3302 |
++ enable_esp=no |
3303 |
++ ;; |
3304 |
++ esac |
3305 |
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_esp" >&5 |
3306 |
++$as_echo "$enable_esp" >&6; } |
3307 |
++fi |
3308 |
++ |
3309 |
++ |
3310 |
++enable_crtbeginP=no |
3311 |
++if test "$enable_esp" = yes; then |
3312 |
++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking checking for crtbeginP.o support" >&5 |
3313 |
++$as_echo_n "checking checking for crtbeginP.o support... " >&6; } |
3314 |
++ if test "$enable_esp" = yes; then |
3315 |
++ case "$target" in |
3316 |
++ ia64*-*-linux*) |
3317 |
++ ;; |
3318 |
++ *-*-linux*) |
3319 |
++ if test "x$gcc_cv_ld_pie" = xyes -a "x$lt_cv_prog_compiler_static_works" = xyes; then |
3320 |
++ enable_crtbeginP=yes |
3321 |
++ |
3322 |
++$as_echo "#define ENABLE_CRTBEGINP 1" >>confdefs.h |
3323 |
++ |
3324 |
++ fi |
3325 |
++ ;; |
3326 |
++ esac |
3327 |
++ fi |
3328 |
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_crtbeginP" >&5 |
3329 |
++$as_echo "$enable_crtbeginP" >&6; } |
3330 |
++fi |
3331 |
++ |
3332 |
++ |
3333 |
+ # Configure the subdirectories |
3334 |
+ # AC_CONFIG_SUBDIRS($subdirs) |
3335 |
+ |
3336 |
|
3337 |
diff --git a/5.5.0/pie/02_all_gcc48_config.in.patch b/5.5.0/pie/02_all_gcc48_config.in.patch |
3338 |
new file mode 100644 |
3339 |
index 0000000..3b4747b |
3340 |
--- /dev/null |
3341 |
+++ b/5.5.0/pie/02_all_gcc48_config.in.patch |
3342 |
@@ -0,0 +1,32 @@ |
3343 |
+2013-02-13 Magnus Granberg <zorry@g.o> |
3344 |
+ |
3345 |
+ * gcc/config.in Add ENABLE_CRTBEGINP, ENABLE_ESP |
3346 |
+ |
3347 |
+--- gcc/config.in 2009-04-21 11:08:08.000000000 +0200 |
3348 |
++++ gcc/config.in 2009-05-12 00:10:08.000000000 +0200 |
3349 |
+@@ -46,6 +46,12 @@ |
3350 |
+ #endif |
3351 |
+ |
3352 |
+ |
3353 |
++/* Define to 1 to enable crtbeginP.o. */ |
3354 |
++#ifndef USED_FOR_TARGET |
3355 |
++#undef ENABLE_CRTBEGINP |
3356 |
++#endif |
3357 |
++ |
3358 |
++ |
3359 |
+ /* Define to 1 to specify that we are using the BID decimal floating point |
3360 |
+ format instead of DPD */ |
3361 |
+ #ifndef USED_FOR_TARGET |
3362 |
+@@ -65,6 +65,12 @@ |
3363 |
+ #endif |
3364 |
+ |
3365 |
+ |
3366 |
++/* Define to 1 to enable esp. */ |
3367 |
++#ifndef USED_FOR_TARGET |
3368 |
++#undef ENABLE_ESP |
3369 |
++#endif |
3370 |
++ |
3371 |
++ |
3372 |
+ /* Define to 1 to enable fixed-point arithmetic extension to C. */ |
3373 |
+ #ifndef USED_FOR_TARGET |
3374 |
+ #undef ENABLE_FIXED_POINT |
3375 |
|
3376 |
diff --git a/5.5.0/pie/03_all_gcc51_Makefile.in.patch b/5.5.0/pie/03_all_gcc51_Makefile.in.patch |
3377 |
new file mode 100644 |
3378 |
index 0000000..6aac099 |
3379 |
--- /dev/null |
3380 |
+++ b/5.5.0/pie/03_all_gcc51_Makefile.in.patch |
3381 |
@@ -0,0 +1,106 @@ |
3382 |
+2015-04-23 Magnus Granberg <zorry@g.o> |
3383 |
+ |
3384 |
+ * gcc/Makefile.in Add -fno-PIE. to ALL_CFLAGS and |
3385 |
+ ALL_CXXFLAGS if enable_esp yes. |
3386 |
+ Echo enable_esp and enable_crtbeginP to tmp-libgcc.mvars. |
3387 |
+ * libgcc/Makefile.in Add crtbeginP.o to EXTRA_PARTS if enable_crtbeginP yes |
3388 |
+ We add new file crtbeginP.o if enable_crtbeginP yes |
3389 |
+ Add -fno-PIE. to CRTSTUFF_CFLAGS. |
3390 |
+ Disable -fstack-check |
3391 |
+ |
3392 |
+--- a/gcc/Makefile.in 2011-11-09 02:20:14.000000000 +0100 |
3393 |
++++ b/gcc/Makefile.in 2011-12-24 22:28:08.864804375 +0100 |
3394 |
+@@ -247,6 +247,14 @@ LINKER_FLAGS = $(CFLAGS) |
3395 |
+ endif |
3396 |
+ endif |
3397 |
+ |
3398 |
++# We don't want to compile the compiler with -fPIE, it make PCH fail. |
3399 |
++enable_esp = @enable_esp@ |
3400 |
++ifeq ($(enable_esp),yes) |
3401 |
++ESP_NOPIE_CFLAGS = -fno-PIE |
3402 |
++else |
3403 |
++ESP_NOPIE_CFLAGS= |
3404 |
++endif |
3405 |
++ |
3406 |
+ # ------------------------------------------- |
3407 |
+ # Programs which operate on the build machine |
3408 |
+ # ------------------------------------------- |
3409 |
+@@ -974,12 +982,13 @@ INTERNAL_CFLAGS = -DIN_GCC @CROSS@ |
3410 |
+ |
3411 |
+ # This is the variable actually used when we compile. If you change this, |
3412 |
+ # you probably want to update BUILD_CFLAGS in configure.ac |
3413 |
+-ALL_CFLAGS = $(T_CFLAGS) $(CFLAGS-$@) \ |
3414 |
++ALL_CFLAGS = $(ESP_NOPIE_CFLAGS) $(T_CFLAGS) $(CFLAGS-$@) \ |
3415 |
+ $(CFLAGS) $(INTERNAL_CFLAGS) $(COVERAGE_FLAGS) $(WARN_CFLAGS) @DEFS@ |
3416 |
+ |
3417 |
+ # The C++ version. |
3418 |
+-ALL_CXXFLAGS = $(T_CFLAGS) $(CFLAGS-$@) $(CXXFLAGS) $(INTERNAL_CFLAGS) \ |
3419 |
+- $(COVERAGE_FLAGS) $(NOEXCEPTION_FLAGS) $(WARN_CXXFLAGS) @DEFS@ |
3420 |
++ALL_CXXFLAGS = $(ESP_NOPIE_CFLAGS) $(T_CFLAGS) $(CFLAGS-$@) $(CXXFLAGS) \ |
3421 |
++ $(INTERNAL_CFLAGS) $(COVERAGE_FLAGS) $(NOEXCEPTION_FLAGS) \ |
3422 |
++ $(WARN_CXXFLAGS) @DEFS@ |
3423 |
+ |
3424 |
+ # Likewise. Put INCLUDES at the beginning: this way, if some autoconf macro |
3425 |
+ # puts -I options in CPPFLAGS, our include files in the srcdir will always |
3426 |
+@@ -1814,6 +1823,8 @@ libgcc.mvars: config.status Makefile spe |
3427 |
+ echo GCC_CFLAGS = '$(GCC_CFLAGS)' >> tmp-libgcc.mvars |
3428 |
+ echo INHIBIT_LIBC_CFLAGS = '$(INHIBIT_LIBC_CFLAGS)' >> tmp-libgcc.mvars |
3429 |
+ echo TARGET_SYSTEM_ROOT = '$(TARGET_SYSTEM_ROOT)' >> tmp-libgcc.mvars |
3430 |
++ echo enable_esp = '$(enable_esp)' >> tmp-libgcc.mvars |
3431 |
++ echo enable_crtbeginP = '@enable_crtbeginP@' >> tmp-libgcc.mvars |
3432 |
+ |
3433 |
+ mv tmp-libgcc.mvars libgcc.mvars |
3434 |
+ |
3435 |
+--- a/libgcc/Makefile.in 2011-11-22 04:01:02.000000000 +0100 |
3436 |
++++ b/libgcc/Makefile.in 2011-12-25 15:18:22.449610631 +0100 |
3437 |
+@@ -219,6 +219,17 @@ else |
3438 |
+ DECNUMINC = |
3439 |
+ endif |
3440 |
+ |
3441 |
++ifeq ($(enable_esp),yes) |
3442 |
++ESP_NOPIE_CFLAGS = -fno-PIE |
3443 |
++else |
3444 |
++ESP_NOPIE_CFLAGS= |
3445 |
++endif |
3446 |
++ |
3447 |
++# We add crtbeginP.o to the EXTRA_PARTS list if enable_crtbeginP = yes |
3448 |
++ifeq ($(enable_crtbeginP),yes) |
3449 |
++EXTRA_PARTS += crtbeginP.o |
3450 |
++endif |
3451 |
++ |
3452 |
+ # Options to use when compiling libgcc2.a. |
3453 |
+ # |
3454 |
+ LIBGCC2_DEBUG_CFLAGS = -g |
3455 |
+@@ -225,7 +225,7 @@ endif |
3456 |
+ LIBGCC2_DEBUG_CFLAGS = -g |
3457 |
+ LIBGCC2_CFLAGS = -O2 $(LIBGCC2_INCLUDES) $(GCC_CFLAGS) $(HOST_LIBGCC2_CFLAGS) \ |
3458 |
+ $(LIBGCC2_DEBUG_CFLAGS) -DIN_LIBGCC2 \ |
3459 |
+- -fbuilding-libgcc -fno-stack-protector \ |
3460 |
++ -fbuilding-libgcc -fno-stack-protector -fstack-check=no \ |
3461 |
+ $(INHIBIT_LIBC_CFLAGS) |
3462 |
+ |
3463 |
+ # Additional options to use when compiling libgcc2.a. |
3464 |
+@@ -279,7 +290,7 @@ INTERNAL_CFLAGS = $(CFLAGS) $(LIBGCC2_CF |
3465 |
+ -finhibit-size-directive -fno-inline -fno-exceptions \ |
3466 |
+ -fno-zero-initialized-in-bss -fno-toplevel-reorder -fno-tree-vectorize \ |
3467 |
+ -fbuilding-libgcc -fno-stack-protector $(FORCE_EXPLICIT_EH_REGISTRY) \ |
3468 |
+- $(INHIBIT_LIBC_CFLAGS) |
3469 |
++ $(ESP_NOPIE_CFLAGS) -fstack-check=no $(INHIBIT_LIBC_CFLAGS) |
3470 |
+ |
3471 |
+ # Extra flags to use when compiling crt{begin,end}.o. |
3472 |
+ CRTSTUFF_T_CFLAGS = |
3473 |
+@@ -966,6 +977,13 @@ crtendS$(objext): $(srcdir)/crtstuff.c |
3474 |
+ # This is a version of crtbegin for -static links. |
3475 |
+ crtbeginT$(objext): $(srcdir)/crtstuff.c |
3476 |
+ $(crt_compile) $(CRTSTUFF_T_CFLAGS) -c $< -DCRT_BEGIN -DCRTSTUFFT_O |
3477 |
++ |
3478 |
++# This is a version of crtbegin for -static -fPIE links. |
3479 |
++ifeq ($(enable_crtbeginP),yes) |
3480 |
++crtbeginP$(objext): $(srcdir)/crtstuff.c |
3481 |
++ $(crt_compile) $(CRTSTUFF_T_CFLAGS_S) \ |
3482 |
++ -c $< -DCRT_BEGIN -DCRTSTUFFT_O -DCRTSTUFFS_O |
3483 |
++endif |
3484 |
+ |
3485 |
+ ifeq ($(enable_vtable_verify),yes) |
3486 |
+ # These are used in vtable verification; see comments in source files for |
3487 |
+ |
3488 |
\ No newline at end of file |
3489 |
|
3490 |
diff --git a/5.5.0/pie/05_all_gcc48_gcc.c.patch b/5.5.0/pie/05_all_gcc48_gcc.c.patch |
3491 |
new file mode 100644 |
3492 |
index 0000000..ddfcafd |
3493 |
--- /dev/null |
3494 |
+++ b/5.5.0/pie/05_all_gcc48_gcc.c.patch |
3495 |
@@ -0,0 +1,25 @@ |
3496 |
+2014-01-01 Magnus Granberg <zorry@g.o> |
3497 |
+ |
3498 |
+ * gcc/gcc.c include esp.h |
3499 |
+ static const char *cc1_spec We set that in esp.h if ENABLE_ESP. |
3500 |
+ |
3501 |
+--- gcc/gcc.c 2010-01-21 10:29:30.000000000 -0500 |
3502 |
++++ gcc/gcc.c 2010-01-29 23:29:16.000000000 -0500 |
3503 |
+@@ -44,6 +44,7 @@ |
3504 |
+ #include "opts.h" |
3505 |
+ #include "params.h" |
3506 |
+ #include "vec.h" |
3507 |
++#include "config/esp.h" /* for --enable-esp support */ |
3508 |
+ #include "filenames.h" |
3509 |
+ |
3510 |
+ /* By default there is no special suffix for target executables. */ |
3511 |
+@@ -822,7 +823,9 @@ |
3512 |
+ |
3513 |
+ static const char *asm_debug; |
3514 |
+ static const char *cpp_spec = CPP_SPEC; |
3515 |
++#ifndef ENABLE_ESP |
3516 |
+ static const char *cc1_spec = CC1_SPEC CC1_SSP_DEFAULT_SPEC; |
3517 |
++#endif |
3518 |
+ static const char *cc1plus_spec = CC1PLUS_SPEC; |
3519 |
+ static const char *link_gcc_c_sequence_spec = LINK_GCC_C_SEQUENCE_SPEC; |
3520 |
+ static const char *link_ssp_spec = LINK_SSP_SPEC; |
3521 |
|
3522 |
diff --git a/5.5.0/pie/16_all_gcc47_nopie_option.patch b/5.5.0/pie/16_all_gcc47_nopie_option.patch |
3523 |
new file mode 100644 |
3524 |
index 0000000..ed9a961 |
3525 |
--- /dev/null |
3526 |
+++ b/5.5.0/pie/16_all_gcc47_nopie_option.patch |
3527 |
@@ -0,0 +1,16 @@ |
3528 |
+2012-01-24 Magnus Granberg <zorry@g.o> |
3529 |
+ |
3530 |
+ * gcc/common.opt Add -nopie |
3531 |
+ |
3532 |
+--- a/gcc/common.opt 2011-11-23 19:51:17.000000000 +0100 |
3533 |
++++ b//gcc/common.opt 2012-01-24 16:56:24.302224357 +0100 |
3534 |
+@@ -2280,6 +2280,9 @@ Driver |
3535 |
+ nodefaultlibs |
3536 |
+ Driver |
3537 |
+ |
3538 |
++nopie |
3539 |
++Driver |
3540 |
++ |
3541 |
+ nostartfiles |
3542 |
+ Driver |
3543 |
+ |
3544 |
|
3545 |
diff --git a/5.5.0/pie/20_all_gcc49_config_crtbeginp.patch b/5.5.0/pie/20_all_gcc49_config_crtbeginp.patch |
3546 |
new file mode 100644 |
3547 |
index 0000000..4bd5c18 |
3548 |
--- /dev/null |
3549 |
+++ b/5.5.0/pie/20_all_gcc49_config_crtbeginp.patch |
3550 |
@@ -0,0 +1,40 @@ |
3551 |
+2014-04-23 Magnus Granberg <zorry@g.o> |
3552 |
+ |
3553 |
+ * gcc/config/gnu-user.h If ENABLE_CRTBEGINP, -static and -pie use crtbegineP.o. |
3554 |
+ * gcc/config/rs6000/sysv4.h If ENABLE_CRTBEGINP, -static and -pie use crtbegineP.o. |
3555 |
+ |
3556 |
+--- gcc/config/gnu-user.h 2014-01-02 23:23:26.000000000 +0100 |
3557 |
++++ gcc/config/gnu-user.h 2014-04-23 00:55:06.390265454 +0200 |
3558 |
+@@ -40,7 +40,15 @@ see the files COPYING3 and COPYING.RUNTI |
3559 |
+ provides part of the support for getting C++ file-scope static |
3560 |
+ object constructed before entering `main'. */ |
3561 |
+ |
3562 |
+-#if defined HAVE_LD_PIE |
3563 |
++#if defined (HAVE_LD_PIE) && defined (ENABLE_CRTBEGINP) |
3564 |
++#define GNU_USER_TARGET_STARTFILE_SPEC \ |
3565 |
++ "%{!shared: %{pg|p|profile:gcrt1.o%s;pie:Scrt1.o%s;:crt1.o%s}} \ |
3566 |
++ crti.o%s %{static:%{pie:crtbeginP.o%s;:crtbeginT.o%s}; \ |
3567 |
++ shared|pie:crtbeginS.o%s;:crtbegin.o%s} \ |
3568 |
++ %{fvtable-verify=none:%s; \ |
3569 |
++ fvtable-verify=preinit:vtv_start_preinit.o%s; \ |
3570 |
++ fvtable-verify=std:vtv_start.o%s}" |
3571 |
++#elif defined (HAVE_LD_PIE) && ! defined (ENABLE_CRTBEGINP) |
3572 |
+ #define GNU_USER_TARGET_STARTFILE_SPEC \ |
3573 |
+ "%{!shared: %{pg|p|profile:gcrt1.o%s;pie:Scrt1.o%s;:crt1.o%s}} \ |
3574 |
+ crti.o%s %{static:crtbeginT.o%s;shared|pie:crtbeginS.o%s;:crtbegin.o%s} \ |
3575 |
+--- gcc/config/rs6000/sysv4.h 2009-04-10 01:23:07.000000000 +0200 |
3576 |
++++ gcc/config/rs6000/sysv4.h 2009-09-08 04:41:50.000000000 +0200 |
3577 |
+@@ -883,7 +883,12 @@ |
3578 |
+ %{!mnewlib: %{pthread:-lpthread} %{shared:-lc} \ |
3579 |
+ %{!shared: %{profile:-lc_p} %{!profile:-lc}}}" |
3580 |
+ |
3581 |
+-#ifdef HAVE_LD_PIE |
3582 |
++#if defined (HAVE_LD_PIE) && defined (ENABLE_CRTBEGINP) |
3583 |
++#define STARTFILE_LINUX_SPEC "\ |
3584 |
++%{!shared: %{pg|p|profile:gcrt1.o%s;pie:Scrt1.o%s;:crt1.o%s}} \ |
3585 |
++%{mnewlib:ecrti.o%s;:crti.o%s} \ |
3586 |
++%{static:%{pie:crtbeginP.o%s;:crtbeginT.o%s}} %{!static:%{shared|pie:crtbeginS.o%s;:crtbegin.o%s}}" |
3587 |
++#elif defined (HAVE_LD_PIE) && ! defined (ENABLE_CRTBEGINP) |
3588 |
+ #define STARTFILE_LINUX_SPEC "\ |
3589 |
+ %{!shared: %{pg|p|profile:gcrt1.o%s;pie:Scrt1.o%s;:crt1.o%s}} \ |
3590 |
+ %{mnewlib:ecrti.o%s;:crti.o%s} \ |
3591 |
|
3592 |
diff --git a/5.5.0/pie/24_all_gcc49_invoke.texi.patch b/5.5.0/pie/24_all_gcc49_invoke.texi.patch |
3593 |
new file mode 100644 |
3594 |
index 0000000..cdda379 |
3595 |
--- /dev/null |
3596 |
+++ b/5.5.0/pie/24_all_gcc49_invoke.texi.patch |
3597 |
@@ -0,0 +1,44 @@ |
3598 |
+2014-04-24 Magnus Granberg <zorry@g.o> |
3599 |
+ |
3600 |
+ * gcc/doc/invoke.texi Add NOTES about -fstack-protector-all, -pie and |
3601 |
+ -fPIE/-fpie when --enable-esp is enable, this options is on by default. |
3602 |
+ |
3603 |
+--- gcc/doc/invoke.texi 2009-04-01 09:18:47.000000000 +0200 |
3604 |
++++ gcc/doc/invoke.texi 2009-06-18 14:08:38.000000000 +0200 |
3605 |
+@@ -9233,6 +9245,11 @@ If a guard check fails, an error message |
3606 |
+ @opindex fstack-protector-all |
3607 |
+ Like @option{-fstack-protector} except that all functions are protected. |
3608 |
+ |
3609 |
++NOTE: When --enable-esp, this option is enabled by default |
3610 |
++for C, C++, ObjC, and ObjC++ if neither @option{-fno-stack-protector}, |
3611 |
++@option{-nostdlib}, @option{-ffreestanding}, @option{-fstack-protector}, |
3612 |
++@option{-fstack-protector-strong} or @option{-fstack-protector-all} are found. |
3613 |
++ |
3614 |
+ @item -fstack-protector-strong |
3615 |
+ @opindex fstack-protector-strong |
3616 |
+ Like @option{-fstack-protector} but includes additional functions to |
3617 |
+@@ -7960,6 +7965,12 @@ |
3618 |
+ used for compilation (@option{-fpie}, @option{-fPIE}, |
3619 |
+ or model suboptions) when you specify this linker option. |
3620 |
+ |
3621 |
++NOTE: When --enable-esp, this option is enabled by default |
3622 |
++for C, C++, ObjC, and ObjC++ if neither @option{-fno-pie} or @option{-fno-PIE} |
3623 |
++or @option{-fno-pic} or @option{-fno-PIC} or @option{-nostdlib} or |
3624 |
++@option{-nostartfiles} or @option{-shared} or @option{-pg} or @option{-p} |
3625 |
++are found. |
3626 |
++ |
3627 |
+ @item -rdynamic |
3628 |
+ @opindex rdynamic |
3629 |
+ Pass the flag @option{-export-dynamic} to the ELF linker, on targets |
3630 |
+@@ -15889,6 +15910,11 @@ |
3631 |
+ @code{__pie__} and @code{__PIE__}. The macros have the value 1 |
3632 |
+ for @option{-fpie} and 2 for @option{-fPIE}. |
3633 |
+ |
3634 |
++NOTE: When --enable-esp, this option is enabled by default |
3635 |
++for C, C++, ObjC, and ObjC++ if neither @option{-fno-pie} or @option{-fno-PIE} |
3636 |
++or @option{-fno-pic} or @option{-fno-PIC} or @option{-nostdlib} or |
3637 |
++@option{-nostartfiles} or @option{-shared} are found. |
3638 |
++ |
3639 |
+ @item -fno-jump-tables |
3640 |
+ @opindex fno-jump-tables |
3641 |
+ Do not use jump tables for switch statements even where it would be |
3642 |
|
3643 |
diff --git a/5.5.0/pie/33_all_gcc48_config_rs6000.patch b/5.5.0/pie/33_all_gcc48_config_rs6000.patch |
3644 |
new file mode 100644 |
3645 |
index 0000000..1d080cf |
3646 |
--- /dev/null |
3647 |
+++ b/5.5.0/pie/33_all_gcc48_config_rs6000.patch |
3648 |
@@ -0,0 +1,34 @@ |
3649 |
+2014-08-07 Magnus Granberg <zorry@g.o> |
3650 |
+ |
3651 |
+ * gcc/config/rs6000/sysv4.h (DRIVER_SELF_SPECS): Add ESP_DRIVER_SELF_SPEC. |
3652 |
+ (SUBTARGET_EXTRA_SPECS): Add ESP_EXTRA_SPECS. |
3653 |
+ |
3654 |
+--- a/gcc/config/rs6000/sysv4.h 2013-01-10 21:38:27.000000000 +0100 |
3655 |
++++ b/gcc/config/rs6000/sysv4.h 2013-03-26 01:30:33.257003189 +0100 |
3656 |
+@@ -627,8 +627,13 @@ extern int fixuplabelno; |
3657 |
+ |
3658 |
+ #define LINK_OS_DEFAULT_SPEC "" |
3659 |
+ |
3660 |
++#ifdef ENABLE_ESP |
3661 |
++#define DRIVER_SELF_SPECS "%{mfpu=none: %<mfpu=* \ |
3662 |
++ %<msingle-float %<mdouble-float}", ESP_DRIVER_SELF_SPEC |
3663 |
++#else |
3664 |
+ #define DRIVER_SELF_SPECS "%{mfpu=none: %<mfpu=* \ |
3665 |
+ %<msingle-float %<mdouble-float}" |
3666 |
++#endif |
3667 |
+ |
3668 |
+ /* Override rs6000.h definition. */ |
3669 |
+ #undef CPP_SPEC |
3670 |
+@@ -933,7 +938,11 @@ ncrtn.o%s" |
3671 |
+ { "cpp_os_openbsd", CPP_OS_OPENBSD_SPEC }, \ |
3672 |
+ { "cpp_os_default", CPP_OS_DEFAULT_SPEC }, \ |
3673 |
+ { "fbsd_dynamic_linker", FBSD_DYNAMIC_LINKER }, \ |
3674 |
+- SUBSUBTARGET_EXTRA_SPECS |
3675 |
++ SUBSUBTARGET_EXTRA_SPECS ESP_EXTRA_SPECS |
3676 |
++ |
3677 |
++#ifndef ENABLE_ESP |
3678 |
++#define ESP_EXTRA_SPECS |
3679 |
++#endif |
3680 |
+ |
3681 |
+ #define SUBSUBTARGET_EXTRA_SPECS |
3682 |
+ |
3683 |
|
3684 |
diff --git a/5.5.0/pie/34_all_gcc51_config_i386.patch b/5.5.0/pie/34_all_gcc51_config_i386.patch |
3685 |
new file mode 100644 |
3686 |
index 0000000..b57011d |
3687 |
--- /dev/null |
3688 |
+++ b/5.5.0/pie/34_all_gcc51_config_i386.patch |
3689 |
@@ -0,0 +1,56 @@ |
3690 |
+2015-04-23 Magnus Granberg <zorry@g.o> |
3691 |
+ |
3692 |
+ * gcc/config/i386/gnu-user-common.h (DRIVER_SELF_SPECS): Add ESP_DRIVER_SELF_SPEC. |
3693 |
+ * gcc/config/i386/gnu-user.h (SUBTARGET_EXTRA_SPECS): Add ESP_EXTRA_SPECS. |
3694 |
+ * gcc/config/i386/i386.h (SUBTARGET_EXTRA_SPECS): Add ESP_EXTRA_SPECS. |
3695 |
+ |
3696 |
+--- a/gcc/config/i386/gnu-user-common.h 2013-01-10 21:38:27.000000000 +0100 |
3697 |
++++ b/gcc/config/i386/gnu-user-common.h 2013-02-14 00:51:44.689637605 +0100 |
3698 |
+@@ -70,3 +70,7 @@ along with GCC; see the file COPYING3. |
3699 |
+ #if HAVE_GAS_CFI_PERSONALITY_DIRECTIVE |
3700 |
+ #define TARGET_CAN_SPLIT_STACK |
3701 |
+ #endif |
3702 |
++ |
3703 |
++#ifdef ENABLE_ESP |
3704 |
++#define DRIVER_SELF_SPECS ESP_DRIVER_SELF_SPEC |
3705 |
++#endif |
3706 |
+--- a/gcc/config/i386/gnu-user.h 2011-05-05 14:32:50.000000000 +0200 |
3707 |
++++ b/gcc/config/i386/gnu-user.h 2012-07-09 14:28:38.726289455 +0200 |
3708 |
+@@ -93,9 +93,16 @@ along with GCC; see the file COPYING3. |
3709 |
+ "--32 %{!mno-sse2avx:%{mavx:-msse2avx}} %{msse2avx:%{!mavx:-msse2avx}}" |
3710 |
+ |
3711 |
+ #undef SUBTARGET_EXTRA_SPECS |
3712 |
++#ifdef ENABLE_ESP |
3713 |
+ #define SUBTARGET_EXTRA_SPECS \ |
3714 |
+ { "link_emulation", GNU_USER_LINK_EMULATION },\ |
3715 |
+- { "dynamic_linker", GNU_USER_DYNAMIC_LINKER } |
3716 |
++ { "dynamic_linker", GNU_USER_DYNAMIC_LINKER }, \ |
3717 |
++ ESP_EXTRA_SPECS |
3718 |
++#else |
3719 |
++#define SUBTARGET_EXTRA_SPECS \ |
3720 |
++ { "link_emulation", GNU_USER_LINK_EMULATION },\ |
3721 |
++ { "dynamic_linker", GNU_USER_DYNAMIC_LINKER } |
3722 |
++#endif |
3723 |
+ |
3724 |
+ #undef LINK_SPEC |
3725 |
+ #define LINK_SPEC "-m %(link_emulation) %{shared:-shared} \ |
3726 |
+--- a/gcc/config/i386/i386.h 2011-11-24 23:11:12.000000000 +0100 |
3727 |
++++ b/gcc/config/i386/i386.h 2012-07-09 14:21:24.575276517 +0200 |
3728 |
+@@ -617,13 +617,16 @@ enum target_cpu_default |
3729 |
+ Do not define this macro if it does not need to do anything. */ |
3730 |
+ |
3731 |
+ #ifndef SUBTARGET_EXTRA_SPECS |
3732 |
++#ifdef ENABLE_ESP |
3733 |
++#define SUBTARGET_EXTRA_SPECS ESP_EXTRA_SPECS |
3734 |
++#else |
3735 |
+ #define SUBTARGET_EXTRA_SPECS |
3736 |
+ #endif |
3737 |
++#endif |
3738 |
+ |
3739 |
+ #define EXTRA_SPECS \ |
3740 |
+ { "cc1_cpu", CC1_CPU_SPEC }, \ |
3741 |
+ SUBTARGET_EXTRA_SPECS |
3742 |
+- |
3743 |
+ |
3744 |
+ /* Set the value of FLT_EVAL_METHOD in float.h. When using only the |
3745 |
+ FPU, assume that the fpcw is set to extended precision; when using |
3746 |
|
3747 |
diff --git a/5.5.0/pie/35_all_gcc51_config_arm.patch b/5.5.0/pie/35_all_gcc51_config_arm.patch |
3748 |
new file mode 100644 |
3749 |
index 0000000..815d74a |
3750 |
--- /dev/null |
3751 |
+++ b/5.5.0/pie/35_all_gcc51_config_arm.patch |
3752 |
@@ -0,0 +1,37 @@ |
3753 |
+2015-04-26 Magnus Granberg <zorry@g.o> |
3754 |
+ |
3755 |
+ * gcc/config/arm/arm.h (DRIVER_SELF_SPECS): Add ESP_DRIVER_SELF_SPEC. |
3756 |
+ * gcc/config/arm/elf.h (SUBSUBTARGET_EXTRA_SPECS): Add ESP_EXTRA_SPECS. |
3757 |
+ |
3758 |
+--- a/gcc/config/arm/arm.h 2013-01-15 17:17:28.000000000 +0100 |
3759 |
++++ b/gcc/config/arm/arm.h 2013-02-18 22:45:18.327284928 +0100 |
3760 |
+@@ -2326,6 +2326,14 @@ extern const char *host_detect_local_cpu |
3761 |
+ # define EXTRA_SPEC_FUNCTIONS BIG_LITTLE_CPU_SPEC_FUNCTIONS |
3762 |
+ #endif |
3763 |
+ |
3764 |
+-#define DRIVER_SELF_SPECS MCPU_MTUNE_NATIVE_SPECS |
3765 |
++#ifdef ENABLE_ESP |
3766 |
++# define DRIVER_SELF_SPECS \ |
3767 |
++ MCPU_MTUNE_NATIVE_SPECS, \ |
3768 |
++ ESP_DRIVER_SELF_SPEC |
3769 |
++/* https://bugs.gentoo.org/518598 */ |
3770 |
++# define ESP_NO_STACK_CHECK 1 |
3771 |
++#else |
3772 |
++# define DRIVER_SELF_SPECS MCPU_MTUNE_NATIVE_SPECS |
3773 |
++#endif |
3774 |
+ #define TARGET_SUPPORTS_WIDE_INT 1 |
3775 |
+ #endif /* ! GCC_ARM_H */ |
3776 |
+--- a/gcc/config/arm/elf.h 2013-01-10 21:38:27.000000000 +0100 |
3777 |
++++ b/gcc/config/arm/elf.h 2013-05-19 02:15:49.595855825 +0200 |
3778 |
+@@ -49,7 +49,11 @@ |
3779 |
+ #endif |
3780 |
+ |
3781 |
+ #undef SUBSUBTARGET_EXTRA_SPECS |
3782 |
++#ifdef ENABLE_ESP |
3783 |
++#define SUBSUBTARGET_EXTRA_SPECS ESP_EXTRA_SPECS |
3784 |
++#else |
3785 |
+ #define SUBSUBTARGET_EXTRA_SPECS |
3786 |
++#endif |
3787 |
+ |
3788 |
+ #ifndef ASM_SPEC |
3789 |
+ #define ASM_SPEC "\ |
3790 |
|
3791 |
diff --git a/5.5.0/pie/36_all_gcc51_config_mips.patch b/5.5.0/pie/36_all_gcc51_config_mips.patch |
3792 |
new file mode 100644 |
3793 |
index 0000000..5646261 |
3794 |
--- /dev/null |
3795 |
+++ b/5.5.0/pie/36_all_gcc51_config_mips.patch |
3796 |
@@ -0,0 +1,43 @@ |
3797 |
+2013-04-01 Magnus Granberg <zorry@g.o> |
3798 |
+ |
3799 |
+ * gcc/config/mips/gnu-user.h (DRIVER_SELF_SPECS): Add ESP_DRIVER_SELF_SPEC. |
3800 |
+ * gcc/config/mips/mips.h (SUBTARGET_EXTRA_SPECS): Add ESP_EXTRA_SPECS. |
3801 |
+ |
3802 |
+--- a/gcc/config/mips/gnu-user.h 2013-01-10 21:38:27.000000000 +0100 |
3803 |
++++ b/gcc/config/mips/gnu-user.h 2013-03-10 22:37:33.743176388 +0100 |
3804 |
+@@ -125,9 +125,17 @@ extern const char *host_detect_local_cpu |
3805 |
+ "%{!mabi=*: -" MULTILIB_ABI_DEFAULT "}" |
3806 |
+ |
3807 |
+ #undef DRIVER_SELF_SPECS |
3808 |
++#ifdef ENABLE_ESP |
3809 |
+ #define DRIVER_SELF_SPECS \ |
3810 |
+ MIPS_ISA_LEVEL_SPEC, \ |
3811 |
+ BASE_DRIVER_SELF_SPECS, \ |
3812 |
++ ESP_DRIVER_SELF_SPEC, \ |
3813 |
+ LINUX_DRIVER_SELF_SPECS |
3814 |
++#else |
3815 |
++#define DRIVER_SELF_SPECS \ |
3816 |
++ MIPS_ISA_LEVEL_SPEC, \ |
3817 |
++ BASE_DRIVER_SELF_SPECS, \ |
3818 |
++ LINUX_DRIVER_SELF_SPECS |
3819 |
++#endif |
3820 |
+ |
3821 |
+ /* Similar to standard Linux, but adding -ffast-math support. */ |
3822 |
+ #undef GNU_USER_TARGET_MATHFILE_SPEC |
3823 |
+--- a/gcc/config/mips/mips.h 2013-01-10 21:38:27.000000000 +0100 |
3824 |
++++ b/gcc/config/mips/mips.h 2013-03-24 16:59:01.474513910 +0100 |
3825 |
+@@ -1197,9 +1197,13 @@ struct mips_cpu_info { |
3826 |
+ SUBTARGET_EXTRA_SPECS |
3827 |
+ |
3828 |
+ #ifndef SUBTARGET_EXTRA_SPECS |
3829 |
++#ifdef ENABLE_ESP |
3830 |
++#define SUBTARGET_EXTRA_SPECS ESP_EXTRA_SPECS |
3831 |
++#else |
3832 |
+ #define SUBTARGET_EXTRA_SPECS |
3833 |
+ #endif |
3834 |
+- |
3835 |
++#endif |
3836 |
++ |
3837 |
+ #define DBX_DEBUGGING_INFO 1 /* generate stabs (OSF/rose) */ |
3838 |
+ #define DWARF2_DEBUGGING_INFO 1 /* dwarf2 debugging info */ |
3839 |
+ |
3840 |
|
3841 |
diff --git a/5.5.0/pie/37_all_gcc48_config_ia64.patch b/5.5.0/pie/37_all_gcc48_config_ia64.patch |
3842 |
new file mode 100644 |
3843 |
index 0000000..ba71922 |
3844 |
--- /dev/null |
3845 |
+++ b/5.5.0/pie/37_all_gcc48_config_ia64.patch |
3846 |
@@ -0,0 +1,30 @@ |
3847 |
+2013-06-03 Magnus Granberg <zorry@g.o> |
3848 |
+ |
3849 |
+ * gcc/config/ia64/linux.h Define DRIVER_SELF_SPECS ESP_DRIVER_SELF_SPEC. |
3850 |
+ * gcc/config/ia64/ia64.h (SUBTARGET_EXTRA_SPECS): Add ESP_EXTRA_SPECS. |
3851 |
+ |
3852 |
+--- a/gcc/config/ia64/linux.h 2013-01-10 21:38:27.000000000 +0100 |
3853 |
++++ b/gcc/config/ia64/linux.h 2013-03-16 22:50:10.363049291 +0100 |
3854 |
+@@ -88,3 +88,7 @@ do { \ |
3855 |
+ |
3856 |
+ /* Define this to be nonzero if static stack checking is supported. */ |
3857 |
+ #define STACK_CHECK_STATIC_BUILTIN 1 |
3858 |
++ |
3859 |
++#ifdef ENABLE_ESP |
3860 |
++#define DRIVER_SELF_SPECS ESP_DRIVER_SELF_SPEC |
3861 |
++#endif |
3862 |
+--- a/gcc/config/ia64/ia64.h 2013-01-10 21:38:27.000000000 +0100 |
3863 |
++++ b/gcc/config/ia64/ia64.h 2013-03-26 02:03:21.052061828 +0100 |
3864 |
+@@ -41,8 +41,12 @@ do { \ |
3865 |
+ } while (0) |
3866 |
+ |
3867 |
+ #ifndef SUBTARGET_EXTRA_SPECS |
3868 |
++#ifdef ENABLE_ESP |
3869 |
++#define SUBTARGET_EXTRA_SPECS ESP_EXTRA_SPECS |
3870 |
++#else |
3871 |
+ #define SUBTARGET_EXTRA_SPECS |
3872 |
+ #endif |
3873 |
++#endif |
3874 |
+ |
3875 |
+ #define EXTRA_SPECS \ |
3876 |
+ { "asm_extra", ASM_EXTRA_SPEC }, \ |
3877 |
|
3878 |
diff --git a/5.5.0/pie/40_all_gcc49_config_esp.patch b/5.5.0/pie/40_all_gcc49_config_esp.patch |
3879 |
new file mode 100644 |
3880 |
index 0000000..16cc2b4 |
3881 |
--- /dev/null |
3882 |
+++ b/5.5.0/pie/40_all_gcc49_config_esp.patch |
3883 |
@@ -0,0 +1,140 @@ |
3884 |
+2014-05-12 Magnus Granberg <zorry@g.o> |
3885 |
+ |
3886 |
+ * gcc/esp.h New file to support --enable-esp |
3887 |
+ Version 20140512.1 |
3888 |
+ |
3889 |
+--- gcc/config/esp.h 2010-04-09 16:14:00.000000000 +0200 |
3890 |
++++ gcc/config/esp.h 2012-06-23 01:00:31.248348491 +0200 |
3891 |
+@@ -0,0 +1,132 @@ |
3892 |
++/* License terms see GNU GENERAL PUBLIC LICENSE Version 3. |
3893 |
++ * Version 20140512.1 |
3894 |
++ * Magnus Granberg (Zorry) <zorry@g.o> */ |
3895 |
++#ifndef GCC_ESP_H |
3896 |
++#define GCC_ESP_H |
3897 |
++ |
3898 |
++/* This file will add -fstack-protector-all, -fstack-check, -fPIE, -pie and -z now |
3899 |
++ as default if the defines and the spec allow it. |
3900 |
++ Added a hack for gcc-specs-* in toolchain-funcs.eclass and _filter-hardened in flag-o-matic.eclass |
3901 |
++ to support older hardened GCC patches and we don't need to change the code on gcc-specs-* and _filter-hardened. |
3902 |
++ This will add some unsupported upstream commands options as -nopie and -nonow. |
3903 |
++ -D__KERNEL__ is added so we don't have -fPIE, -pie and -fstack-protector-all and -fstack-check when building kernels. |
3904 |
++ ESP_CC1_SPEC is added to CC1_SPEC. |
3905 |
++ ESP_CC1_STRICT_OVERFLOW_SPEC is added so we don't disable the strict-overflow check. |
3906 |
++ ESP_LINK_PIE_CHECK_SPEC check for -pie, -p, -pg, -profile and -static. |
3907 |
++ ENABLE_CRTBEGINP add support for crtbeginP.o, build -static with -fPIE or -fpie. |
3908 |
++*/ |
3909 |
++#ifdef ENABLE_ESP |
3910 |
++ |
3911 |
++ /* Hack to support gcc-specs-* in toolchain-funcs.eclass and _filter-hardened in flag-o-matic.eclass */ |
3912 |
++ #define ESP_CC1_SPEC " %(esp_cc1_ssp) %(esp_cc1_pie) %(esp_cc1_strict_overflow)" |
3913 |
++ #if defined ( EFAULT_SSP ) || defined ( EFAULT_PIE_SSP ) |
3914 |
++ #define ESP_CC1_SSP_SPEC "%{!fno-stack-protector: %{!fno-stack-protector-all: %{!fno-stack-check: }}}" |
3915 |
++ #else |
3916 |
++ #define ESP_CC1_SSP_SPEC "" |
3917 |
++ #endif |
3918 |
++ #if defined ( EFAULT_PIE ) || defined ( EFAULT_PIE_SSP ) |
3919 |
++ #define ESP_CC1_PIE_SPEC "%{!nopie: }" |
3920 |
++ #else |
3921 |
++ #define ESP_CC1_PIE_SPEC "" |
3922 |
++ #endif |
3923 |
++ #define ESP_CC1_STRICT_OVERFLOW_SPEC "%{!fstrict-overflow:%{!fno-strict-overflow: -fno-strict-overflow}}" |
3924 |
++ |
3925 |
++ /* ESP_LINK_SPEC is added to LINK_PIE_SPEC if esp is enable |
3926 |
++ -z now will be added if we don't have -vanilla spec. We do a -pie incompatible check |
3927 |
++ Don't remove the specs in the end */ |
3928 |
++ #define ESP_LINK_SPEC "%(esp_link_now) %(esp_link_pie_check) " |
3929 |
++ #define ESP_LINK_NOW_SPEC "%{!nonow:-z now}" |
3930 |
++ |
3931 |
++ /* We use ESP_DRIVER_SELF_SPEC to add pie and ssp command-line options. */ |
3932 |
++ #define ESP_DRIVER_SELF_SPEC "%{D__KERNEL__:;:%{!nopie:%(esp_options_pie) \ |
3933 |
++ %(esp_link_pie)} %(esp_options_ssp) }" |
3934 |
++ |
3935 |
++ /* This will add -fstack-protector-all if we don't have -nostdlib -nodefaultlibs -fno-stack-protector -fstack-protector |
3936 |
++ -fstack-protector-all and we have EFAULT_SSP or EFAULT_PIE_SSP defined. */ |
3937 |
++ #if defined ( EFAULT_SSP ) || defined ( EFAULT_PIE_SSP ) |
3938 |
++ #ifdef ESP_NO_STACK_CHECK |
3939 |
++ #define ESP_OPTIONS_STACK_CHECK_SPEC |
3940 |
++ #else |
3941 |
++ #define ESP_OPTIONS_STACK_CHECK_SPEC "%{fstack-check|fstack-check=*:;: -fstack-check}" |
3942 |
++ #endif |
3943 |
++ #define ESP_OPTIONS_SSP_SPEC \ |
3944 |
++ "%{nostdlib|ffreestanding|fno-stack-protector|fstack-protector| \ |
3945 |
++ fstack-protector-all|fstack-protector-strong:;:-fstack-protector-all} " \ |
3946 |
++ ESP_OPTIONS_STACK_CHECK_SPEC |
3947 |
++ #else |
3948 |
++ #define ESP_OPTIONS_SSP_SPEC "" |
3949 |
++ #endif |
3950 |
++ |
3951 |
++ /* If EFAULT_PIE or EFAULT_PIE_SSP is defined we will add -fPIE -pie */ |
3952 |
++ #if defined ( EFAULT_PIE ) || defined ( EFAULT_PIE_SSP ) |
3953 |
++ |
3954 |
++ /* This will add -fPIE if we don't have -pie -fpic -fPIC -fpie -fPIE -fno-pic -fno-PIC -fno-pie -fno-PIE -shared -static |
3955 |
++ -nostdlib -nostartfiles. */ |
3956 |
++ /* With ENABLE_CRTBEGINP we don't need to check for -static */ |
3957 |
++ #ifdef ENABLE_CRTBEGINP |
3958 |
++ #define ESP_OPTIONS_PIE_SPEC \ |
3959 |
++ "%{!pie: %{!fpic:%{!fPIC:%{!fpie:%{!fPIE: %{!fno-pic:%{!fno-PIC:%{!fno-pie:%{!fno-PIE: \ |
3960 |
++ %{!shared: %{!nostdlib: %{!nostartfiles:-fPIE}} } }}}} }}}} }" |
3961 |
++ #else |
3962 |
++ #define ESP_OPTIONS_PIE_SPEC \ |
3963 |
++ "%{!pie: %{!fpic:%{!fPIC:%{!fpie:%{!fPIE: %{!fno-pic:%{!fno-PIC:%{!fno-pie:%{!fno-PIE: \ |
3964 |
++ %{!shared: %{!static: %{!nostdlib: %{!nostartfiles:-fPIE}} } }}}} }}}} }}" |
3965 |
++ #endif |
3966 |
++ |
3967 |
++ /* This will add -pie if we don't have -pie -A -fno-pic -fno-PIC -fno-pie -fno-PIE -shared -static -r -nostdlib |
3968 |
++ -nostartfiles */ |
3969 |
++ /* With ENABLE_CRTBEGINP we don't need to check for -static |
3970 |
++ and we add -pie only to get the start and endfiles. -pie will not go to the linker. */ |
3971 |
++ #ifdef ENABLE_CRTBEGINP |
3972 |
++ #define ESP_LINK_PIE_SPEC \ |
3973 |
++ "%{!pie:%{!A:%{!fno-pie:%{!fno-PIE:%{!fno-pic:%{!fno-PIC:%{!shared:%{!r: \ |
3974 |
++ %{!nostdlib:%{!nostartfiles:-pie}}}}}}}}}}" |
3975 |
++ #else |
3976 |
++ #define ESP_LINK_PIE_SPEC \ |
3977 |
++ "%{!pie:%{!A:%{!fno-pie:%{!fno-PIE:%{!fno-pic:%{!fno-PIC:%{!shared:%{!static:%{!r: \ |
3978 |
++ %{!nostdlib:%{!nostartfiles:-pie}}}}}}}}}}}" |
3979 |
++ #endif |
3980 |
++ |
3981 |
++ /* This will check if -pie is set when (-static) -pg -p -profile. If set it will make gcc print out |
3982 |
++ "-pie and (static)|pg|p|profile are incompatible when linking" */ |
3983 |
++ /* With ENABLE_CRTBEGINP we don't need to check for -static */ |
3984 |
++ #ifdef ENABLE_CRTBEGINP |
3985 |
++ #define ESP_LINK_PIE_CHECK_SPEC \ |
3986 |
++ "%{pie:%{pg|p|profile:%e-pie and -pg|p|profile are incompatible when linking}}" |
3987 |
++ #else |
3988 |
++ #define ESP_LINK_PIE_CHECK_SPEC \ |
3989 |
++ "%{pie:%{static|pg|p|profile:%e-pie and -static|pg|p|profile are incompatible when linking}}" |
3990 |
++ #endif |
3991 |
++ |
3992 |
++ /* We don't pass -pie to the linker when -static. */ |
3993 |
++ #ifdef ENABLE_CRTBEGINP |
3994 |
++ #define LINK_PIE_SPEC "%{!static:%{pie:-pie}} %(esp_link)" |
3995 |
++ #else |
3996 |
++ #define LINK_PIE_SPEC "%{pie:-pie} %(esp_link)" |
3997 |
++ #endif |
3998 |
++ |
3999 |
++ #else |
4000 |
++ #define ESP_OPTIONS_PIE_SPEC "" |
4001 |
++ #define ESP_LINK_PIE_CHECK_SPEC "" |
4002 |
++ #define ESP_LINK_PIE_SPEC "" |
4003 |
++ #define LINK_PIE_SPEC "%{pie:-pie} %(esp_link)" |
4004 |
++ #endif |
4005 |
++ |
4006 |
++ /* We add extra spec name's to the EXTRA_SPECS list */ |
4007 |
++ #define ESP_EXTRA_SPECS \ |
4008 |
++ { "esp_cc1", ESP_CC1_SPEC }, \ |
4009 |
++ { "esp_cc1_pie", ESP_CC1_PIE_SPEC }, \ |
4010 |
++ { "esp_cc1_ssp", ESP_CC1_SSP_SPEC }, \ |
4011 |
++ { "esp_cc1_strict_overflow", ESP_CC1_STRICT_OVERFLOW_SPEC }, \ |
4012 |
++ { "esp_link", ESP_LINK_SPEC }, \ |
4013 |
++ { "esp_link_now", ESP_LINK_NOW_SPEC }, \ |
4014 |
++ { "esp_link_pie", ESP_LINK_PIE_SPEC }, \ |
4015 |
++ { "esp_link_pie_check", ESP_LINK_PIE_CHECK_SPEC }, \ |
4016 |
++ { "esp_driver_self", ESP_DRIVER_SELF_SPEC }, \ |
4017 |
++ { "esp_options_pie", ESP_OPTIONS_PIE_SPEC }, \ |
4018 |
++ { "esp_options_ssp", ESP_OPTIONS_SSP_SPEC } |
4019 |
++ |
4020 |
++ static const char *cc1_spec = CC1_SPEC ESP_CC1_SPEC; |
4021 |
++ |
4022 |
++#endif |
4023 |
++#endif /* End GCC_ESP_H */ |
4024 |
|
4025 |
diff --git a/5.5.0/pie/README b/5.5.0/pie/README |
4026 |
new file mode 100644 |
4027 |
index 0000000..ddef624 |
4028 |
--- /dev/null |
4029 |
+++ b/5.5.0/pie/README |
4030 |
@@ -0,0 +1,19 @@ |
4031 |
+This work started with bugs #94325 #100689 #106222 #149292 #149649 and the overlay on http://overlays.gentoo.org/dev/kevquinn. |
4032 |
+By Kevin K. Quinn, Peter S. Mazinger, Natanael Copa, Alexander Gabert, Solar, PaX Team, Mike Frysinger and mentor. |
4033 |
+ |
4034 |
+The work stalled. Some threads on the Gentoo forum started to do their own fixes to get it working. |
4035 |
+Xake started the thread where most of the new work was done: "How long until hardened and toolchain will produce a hardened gcc4?" |
4036 |
+http://forums.gentoo.org/viewtopic-t-668885.html. I joined the thread and started to code. |
4037 |
+ |
4038 |
+We started with the pieworld code from kevquinn's overlay. The PIE and minispecs part hit the tree later on. |
4039 |
+With GCC 4.4.0 I was willing to do some code cleanup, use built-in specs and add it as --enable-esp in the |
4040 |
+configure command line. On GCC 4.8.0 we use DRIVER_SELF_SPECS for the specs. |
4041 |
+From Gcc 4.9.0 it will have -fstack-protector-strong on as default. |
4042 |
+ |
4043 |
+Thank you all: |
4044 |
+Kevin K. Quinn, Peter S. Mazinger, Natanael Copa, Alexander Gabert, Solar, PaX Team, Mike Frysinger, Xake, Dwokfur, |
4045 |
+KernelOfTruth, SteveL, nixnut, Hopeless, forsaken1, XioXous, obrut<-, mv, qjim, Tommy[D], Genewb, radegand, |
4046 |
+unk, neuron, alexxy, hellboi64, likewhoa, g0rg0n, costel78, polsas, 7v5w7go9ub0o, uberpinguin, Naib, cilly, |
4047 |
+bonsaikitten, kerframil, agaffney, Gordon Malm, blueness, Matthias Klose, Kees Cook, mentor, Anarchy, |
4048 |
+devurandom and everyone else for helping to test, suggestions, fixes and anything else we have missed. |
4049 |
+/2014-05-12 Magnus Grenberg (Zorry) <zorry@g.o> |
4050 |
|
4051 |
diff --git a/5.5.0/pie/README.Changelog b/5.5.0/pie/README.Changelog |
4052 |
new file mode 100644 |
4053 |
index 0000000..613ecc1 |
4054 |
--- /dev/null |
4055 |
+++ b/5.5.0/pie/README.Changelog |
4056 |
@@ -0,0 +1,442 @@ |
4057 |
+0.6.5 Mike Frysinger <vapier@g.o> |
4058 |
+ |
4059 |
+ * gcc/doc/invoke.texi: Clean up typos/grammar. |
4060 |
+ |
4061 |
+0.6.4 Mike Frysinger <vapier@g.o> |
4062 |
+ |
4063 |
+ #518598 |
4064 |
+ * gcc/config/arm/elf.h (ESP_NO_STACK_CHECK): Define. |
4065 |
+ * gcc/config/esp.h (ESP_OPTIONS_SSP_SPEC): Do not add -fstack-check |
4066 |
+ when ESP_NO_STACK_CHECK is defined. |
4067 |
+ |
4068 |
+0.6.3 Magnus Granberg <zorry@g.o> |
4069 |
+ |
4070 |
+ * gcc/configure Regenerated |
4071 |
+ * gcc/config/i386/gnu-user-common.h Bumped for 5.1.0 release |
4072 |
+ * gcc/config/arm/arm.h Bumped for 5.1.0 release |
4073 |
+ * gcc/config/mips/gnu-user.h Bumped for 5.1.0 release |
4074 |
+ * gcc/config/mips/gnu-user64.h Remove |
4075 |
+ * libgcc/Makefile.in Bumped for 5.1.0 release |
4076 |
+ |
4077 |
+0.6.2 Magnus Granberg <zorry@g.o> |
4078 |
+ |
4079 |
+ #528690 |
4080 |
+ * libgcc/Makefile.in Disable -fstack-check |
4081 |
+ |
4082 |
+0.6.1 Magnus Granberg <zorry@g.o> |
4083 |
+ |
4084 |
+ #528968 |
4085 |
+ * gcc/config/rs6000/sysv4.h typo ESP_DRIVER_SELF_SPEC |
4086 |
+ |
4087 |
+0.6.0 Magnus Granberg <zorry@g.o> |
4088 |
+ |
4089 |
+ * gcc/configure Regenerated |
4090 |
+ * gcc/config/esp.h. Bumped for 4.9.0 release |
4091 |
+ * gcc/config/gnu-user.h Bumped for 4.9.0 release |
4092 |
+ * gcc/doc/invoke.texi Bumped for 4.9.0 release |
4093 |
+ * libgcc/Makefile.in Bumped for 4.9.0 release |
4094 |
+ |
4095 |
+0.5.9 Magnus Granberg <zorry@g.o> |
4096 |
+ |
4097 |
+ * configure.ac Remove |
4098 |
+ * configure Remove |
4099 |
+ * Makefile.in -fno-stack-protector moved to gentoo gcc patchset. |
4100 |
+ * gcc/gcc.c Update cc1_spec define |
4101 |
+ * gcc/doc/invoke.texi And note on ssp-all for --enable-esp and -ffreestanding |
4102 |
+ |
4103 |
+0.5.8 Magnus Granberg <zorry@g.o> |
4104 |
+ |
4105 |
+ * gcc/config/rs6000/linux64 (ASM_SPEC32): Allready applay. |
4106 |
+ |
4107 |
+0.5.7 Magnus Granberg <zorry@g.o> |
4108 |
+ |
4109 |
+ * gcc/config/esp.h Add -fstack-check as default. |
4110 |
+ |
4111 |
+0.5.6 Magnus Granberg <zorry@g.o> |
4112 |
+ |
4113 |
+ * gcc/config/ia64/linux.h Change ESP_DRIVER_SELF_SPECS To ESP_DRIVER_SELF_SPEC |
4114 |
+ * gcc/config/arm/elf.h (SUBSUBTARGET_EXTRA_SPECS): Add ESP_EXTRA_SPECS. |
4115 |
+ |
4116 |
+0.5.5 Magnus Granberg <zorry@g.o> |
4117 |
+ |
4118 |
+ * configure.ac Add mips |
4119 |
+ * configure Regenerated |
4120 |
+ * gcc/configure.ac Clean up the checksand add mips. |
4121 |
+ * gcc/configure Regenerated |
4122 |
+ * gcc/config.in Remove ENABLE_ESP_SSP |
4123 |
+ * gcc/Makefile.in Bumped for 4.8.0 release |
4124 |
+ * gcc/gcc.c Remove ESP_EXTRA_SPECS and |
4125 |
+ ESP_COMMAND_OPTIONS_SPEC |
4126 |
+ * gcc/config/rs6000/sysv4.h Add ESP_DRIVER_SELF_SPEC |
4127 |
+ and ESP_EXTRA_SPECS |
4128 |
+ * gcc/config/i386/gnu-user-common.h Add ESP_DRIVER_SELF_SPEC |
4129 |
+ * gcc/config/i386/gnu-user.h Add ESP_DRIVER_SELF_SPEC |
4130 |
+ * gcc/config/i386/i386.h Add ESP_DRIVER_SELF_SPEC |
4131 |
+ * gcc/config/arm/arm.h Add ESP_DRIVER_SELF_SPEC and |
4132 |
+ ESP_EXTRA_SPECS |
4133 |
+ * gcc/config/mips/gnu-user.h Add ESP_DRIVER_SELF_SPEC |
4134 |
+ * gcc/config/mips/gnu-user64.h Add ESP_DRIVER_SELF_SPEC |
4135 |
+ * gcc/config/mips/mips.h Add ESP_EXTRA_SPECS |
4136 |
+ * gcc/config/ia64/linux.h Add ESP_DRIVER_SELF_SPECS |
4137 |
+ * gcc/config/ia64/ia64.h Add ESP_EXTRA_SPECS |
4138 |
+ * gcc/config/esp.h Bump for ESP_DRIVER_SELF_SPEC support |
4139 |
+ |
4140 |
+0.5.4 Magnus Granberg <zorry@g.o> |
4141 |
+ |
4142 |
+ #436924 |
4143 |
+ * configure.ac Add --enable-esp. Add -fno-stack-protector |
4144 |
+ to stage1_cflags. |
4145 |
+ * gcc/configure.ac Add --enable-esp and check if SSP works. |
4146 |
+ Define ENABLE_ESP ENABLE_ESP_SSP. |
4147 |
+ Check if we support crtbeginP and define ENABLE_CRTBEGINP. |
4148 |
+ * gcc/configure Fix a typo |
4149 |
+ |
4150 |
+0.5.3 Magnus Granberg <zorry@g.o> |
4151 |
+ |
4152 |
+ * gcc/configure Clean up the checks and added |
4153 |
+ check for uclibc ssp support. |
4154 |
+ * gcc/config.in Add define for ENABLE_ESP_SSP |
4155 |
+ * gcc/esp.h Check for ENABLE_ESP_SSP |
4156 |
+ |
4157 |
+0.5.2 Magnus Granberg <zorry@g.o> |
4158 |
+ |
4159 |
+ * gcc/common.opt Add -nopie |
4160 |
+ |
4161 |
+0.5.1 Magnus Granberg <zorry@g.o> |
4162 |
+ |
4163 |
+ * configure Bumped for 4.7.0 release |
4164 |
+ * gcc/configure Bumped for 4.7.0 release and |
4165 |
+ added some checks. |
4166 |
+ * gcc/Makefile Bumped for 4.7.0 release |
4167 |
+ * gcc/gcc.c Bumped for 4.7.0 release |
4168 |
+ * libgcc/Makefile Bumped for 4.7.0 release |
4169 |
+ |
4170 |
+0.5.0 Magnus Granberg <zorry@g.o> |
4171 |
+ |
4172 |
+ #393321 |
4173 |
+ * gcc/Makefile.in Rename crtbeginTS.o to crtbeginP.o |
4174 |
+ * gcc/config/gnu-user.h Rename crtbeginTS.o to crtbeginP.o |
4175 |
+ * gcc/config/rs6000/sysv4.h Rename crtbeginTS.o to crtbeginP.o |
4176 |
+ * gcc/esp.h Rename crtbeginTS.o to crtbeginP.o |
4177 |
+ * gcc/configure Rename crtbeginTS.o to crtbeginP.o |
4178 |
+ * gcc/config.in Rename crtbeginTS.o to crtbeginP.o |
4179 |
+ * libgcc/Makefile.in Rename crtbeginTS.o to crtbeginP.o |
4180 |
+ |
4181 |
+0.4.9 Magnus Granberg <zorry@g.o> |
4182 |
+ |
4183 |
+ #380823 |
4184 |
+ * gcc/Makefile.in added ESP_NOPIE_CFLAGS to ALL_CXXFLAGS |
4185 |
+ |
4186 |
+0.4.8 Magnus Granberg <zorry@g.o> |
4187 |
+ |
4188 |
+ * gcc/objc/lang-specs.h Bumped for gcc 4.6.0 release |
4189 |
+ * gcc/objcp/lang-specs.h Bumped for gcc 4.6.0 release |
4190 |
+ * gcc/cp/lang-specs.h Bumped for gcc 4.6.0 release |
4191 |
+ |
4192 |
+0.4.7 Magnus Granberg <zorry@g.o> |
4193 |
+ |
4194 |
+ * gcc/gcc.c Add %(esp_options) and %(esp_cpp_options) |
4195 |
+ * gcc/esp.h Use the esp.h patch from gcc-4.4 patchset |
4196 |
+ * gcc/config/rs6000/linux64.h Bumed for >2011-02-26 snapshot |
4197 |
+ * gcc/objc/lang-specs.h Add %(esp_options) |
4198 |
+ * gcc/objcp/lang-specs.h Add %(esp_options) |
4199 |
+ * gcc/cp/lang-specs.h Add %(esp_options) |
4200 |
+ * gcc/config/gnu-user.h Add crtbeginTS.o support |
4201 |
+ |
4202 |
+0.4.6 Magnus Granberg <zorry@g.o> |
4203 |
+ |
4204 |
+ * Makefile.in Bumped for gcc 4.6 |
4205 |
+ * gcc/Makefile.in Bumped for gcc 4.6 |
4206 |
+ added ESP_NOPIE_CFLAGS to ALL_CFLAGS |
4207 |
+ remove any ESP_NOSSP_CFLAGS |
4208 |
+ remove any ESP_NOPIE_CFLAGS from crt* when not needed |
4209 |
+ * gcc/gcc.c Bumped for gcc 4.6 |
4210 |
+ moved espf_options_ssp to espf_command_options_spec |
4211 |
+ * gcc/esp.h Added espf_options_ssp to espf_cc1_command_spec |
4212 |
+ * gcc/config/rs6000/linux64.h Bumped for gcc 4.6 |
4213 |
+ * gcc/config/linux.h Bumped for gcc 4.6 |
4214 |
+ |
4215 |
+0.4.5 Magnus Granberg <zorry@g.o> |
4216 |
+ |
4217 |
+ * gcc/config/rs6000/sysv4.h Fix a typo in the static spec rules |
4218 |
+ |
4219 |
+0.4.4 Magnus Granberg <zorry@g.o> |
4220 |
+ |
4221 |
+ * gcc/esp.h Renamed ESP_CC1_STRICT_SPEC to ESP_CC1_STRICT_OVERFLOW_SPEC |
4222 |
+ Renamed ESP_OPTIONS_PIE_CHECK_SPEC to ESP_LINK_PIE_CHECK_SPEC |
4223 |
+ |
4224 |
+0.4.3 Magnus Granberg <zorry@g.o> |
4225 |
+ |
4226 |
+ #299061 b.g.o |
4227 |
+ * gcc/gcc.c removed the pie incompatible specs rule call |
4228 |
+ * gcc/esp.h Move the -pie incompatible check to esp_link |
4229 |
+ remove the -shared incompatible check |
4230 |
+ |
4231 |
+0.4.2 Magnus granberg <zorry@g.o> |
4232 |
+ |
4233 |
+ * configure remove the changes from 0.4.1 |
4234 |
+ * Makefile.in remove the changes from 0.4.1 remove -fstack-protector check. |
4235 |
+ * gcc/configure remove the changes from 0.4.1 |
4236 |
+ * gcc/config.in remove the changes from 0.4.1 remove HAVE_GCC_SSP |
4237 |
+ * gcc/Makefile remove the changes from 0.4.1 |
4238 |
+ * gcc/esp.h change HAVE_GCC_LD_PIE to (EFAULT_PIE || EFAULT_PIE_SSP) |
4239 |
+ change HAVE_GCC_SSP to (EFAULT_SSP || EFAULT_PIE_SSP) |
4240 |
+ * libmudflap/Makefiles.in remove the changes from 0.4.1 |
4241 |
+ |
4242 |
+0.4.1 Magnus Granberg <zorry@g.o> |
4243 |
+ |
4244 |
+ *configure removed check for --enable-esp removed enable_esp |
4245 |
+ added check for --enable-esp=(no|all|nopie|nossp). added enable_esp_set |
4246 |
+ *Makefile.in renamed enable_esp to enable_esp_set |
4247 |
+ *gcc/configure removed check for --enable-esp removed enable_esp |
4248 |
+ added check for --enable-esp=(no|all|nopie|nossp). added enable_esp_set |
4249 |
+ added a -fPIE -pie check. change AC_COMPILE_IFELSE to AC_LINK_IFELSE in the |
4250 |
+ -fstack-protector check. |
4251 |
+ * gcc/config.in Added HAVE_GCC_LD_PIE |
4252 |
+ *gcc/Makefile.in renamed enable_esp to enable_esp_set |
4253 |
+ *gcc/esp.h Renamed HAVE_LD_PIE to HAVE_GCC_LD_PIE |
4254 |
+ Added HAVE_GCC_LD_PIE to #define ESP_CC1_PIE_SPEC. Move ESP_COMMAND_OPTIONS_SPEC |
4255 |
+ * libmudflap/Makefiles.in In enable_esp change ifeq to ifdef. |
4256 |
+ |
4257 |
+ #293843 b.g.o |
4258 |
+ *gcc/esp.h Added -nonow to the -z now specs. |
4259 |
+ |
4260 |
+0.4.0 Anthony G. Basile <basile@××××××××××××××.edu> |
4261 |
+ |
4262 |
+ rename espf to esp and change espf-patchset to piepatchset |
4263 |
+ |
4264 |
+0.3.9 Magnus Granberg <zorry@g.o> |
4265 |
+ |
4266 |
+ * gcc/configure Added check for TLS on the target in the SSP check. |
4267 |
+ |
4268 |
+ #149292 b.g.o |
4269 |
+ * gcc/config/i386/linux.h Removed uclibc don't support TLS on stack-protector |
4270 |
+ * gcc/config/i386/linux64.h Removed uclibc don't support TLS on stack-protector |
4271 |
+ * gcc/config/rs6000/linux.h Removed uclibc don't support TLS on stack-protector |
4272 |
+ * gcc/config/i386/linux.h Removed uclibc don't support TLS on stack-protector |
4273 |
+ * gcc/config/sparc/linux.h Removed uclibc don't support TLS on stack-protector |
4274 |
+ * gcc/config/sparc/linux64.h Removed uclibc don't support TLS on stack-protector |
4275 |
+ |
4276 |
+0.3.8 Magnus Granberg <zorry@g.o> |
4277 |
+ |
4278 |
+ * gcc/configure Redone the -fstack-protector check. |
4279 |
+ * gcc/config.in Added HAVE_GCC_SSP |
4280 |
+ * gcc/gcc.c Removed code for espf_link_spec in X |
4281 |
+ * gcc/espf.h Added ifdef HAVE_GCC_SSP, change code for espf_link_spec and link_pie_spec |
4282 |
+ |
4283 |
+0.3.7_beta Anthony G. Basile <basile@××××××××××××××.edu> |
4284 |
+ |
4285 |
+ * gcc/configure Check if -fstack-protector is supported by gcc on ARCH |
4286 |
+ Updated AC_SUBST enable_espf |
4287 |
+ * gcc/Makefile.in Remove the fix for $(out_object_file): ix86_split_to_parts() stack smashing attack b.g.o #149292. |
4288 |
+ * gcc/gcc.c Updaded the .c .cc compiler specs. |
4289 |
+ |
4290 |
+0.3.6 Magnus Granberg <zorry@×××.nu> |
4291 |
+ |
4292 |
+ * configure Check --enable-espf change ppc* to powerpc*, powerpc64 and add ia64. |
4293 |
+ * gcc/configure Don't check for -z,relro on ia64. Disable crtbeginTS for ia64. |
4294 |
+ * gcc/espf.h ia64 don't support -fstack-protector* |
4295 |
+ |
4296 |
+0.3.5 Maguns Granberg <zorry@×××.nu> |
4297 |
+ |
4298 |
+ * gcc/espf.h Change the specs for crtbegin.TS.o. |
4299 |
+ * gcc/gcc.c Rename espf_cc1_options to espf_options_pie_check. |
4300 |
+ * gcc/config/linux.h Fix typos ENABLE_CRTBEGINS to ENABLE_CRTBEGINTS |
4301 |
+ * gcc/config/rs6000/linux64.h ASM_SPEC32: %{fpic:-K PIC} %{fPIC:-K PIC} to |
4302 |
+ %{fpic|fPIC|fpie|fPIE:-K PIC} |
4303 |
+ |
4304 |
+0.3.4 Magnus Granberg <zorry@×××.nu> |
4305 |
+ |
4306 |
+ * gcc/configure Add crtbeginTS.o support. |
4307 |
+ * gcc/Makefile.in Add crtbeginTS.o support. |
4308 |
+ * gcc/gcc.c Add espf_cc1_options. |
4309 |
+ * gcc/espf.h Added espf_cc1_options, crtbeginTS.o support, |
4310 |
+ espf_cc1_options and espf_cc1_strictoverflow. |
4311 |
+ * gcc/config.in Add crtbeginTS.o support. |
4312 |
+ * gcc/config/linux.h Add crtbeginTS.o support. |
4313 |
+ * gcc/config/rs6000/sysv4.h Add crtbeginTS.o support. |
4314 |
+ * gcc/doc/invoke.texi Add NOTES about -fstack-protector-all, |
4315 |
+ -pie and -fPIE. |
4316 |
+ * libgcc/Makefile.in Add crtbeginTS.o support. |
4317 |
+ |
4318 |
+0.3.3 Magnus Granberg <zorry@×××.nu> |
4319 |
+ |
4320 |
+ * gcc/opts.c change #ifdef ENABLE_ESPF to #ifndef ENABLE_ESPF |
4321 |
+ |
4322 |
+0.3.2 Magnus Granberg <zorry@×××.nu> |
4323 |
+ |
4324 |
+ * gcc/opts.c disable flag_delete_null_pointer_checks >= -O2 |
4325 |
+ * gcc/espf.h add ESPF_CC1_SSP_SPEC and ESPF_CC1_PIE_SPEC to fix bugs on -vanilla spec |
4326 |
+ |
4327 |
+ #149292 b.g.o |
4328 |
+ * gcc/config/i386/linux.h uclibc don't support TLS on stack-protector |
4329 |
+ * gcc/config/i386/linux64.h uclibc don't support TLS on stack-protector |
4330 |
+ * gcc/config/rs6000/linux.h uclibc don't support TLS on stack-protector |
4331 |
+ * gcc/config/i386/linux.h uclibc don't support TLS on stack-protector |
4332 |
+ * gcc/config/sparc/linux.h uclibc don't support TLS on stack-protector |
4333 |
+ * gcc/config/sparc/linux64.h uclibc don't support TLS on stack-protector |
4334 |
+ |
4335 |
+0.3.1 Magnus Granberg <zorry@×××.nu> |
4336 |
+ |
4337 |
+ * gcc/cp/Make-lang.in cc1plus: pch test fail when cc1plus is compile with -fPIE. |
4338 |
+ * gcc/configure fix --enable-espf when USE"-hardened" |
4339 |
+ |
4340 |
+4.4.1-espf-0.3.0 Magnus Granberg <zorry@×××.nu> |
4341 |
+ |
4342 |
+ * gcc/espf.h add ESPF_LINK_SPEC ESPF_LINK_NOW_SPEC |
4343 |
+ * gcc/gcc.c move do_self_spec (espf_command_options_spec) |
4344 |
+ do_spec_1() add espf_link_spec |
4345 |
+ |
4346 |
+0.3.0 Magnus Granberg <zorry@×××.nu> |
4347 |
+ |
4348 |
+ * gcc/objc/lang-specs.h Add %(espf_options) |
4349 |
+ * gcc/objcp/lang-specs.h Add %(espf_options) |
4350 |
+ * gcc/cp/lang-specs.h Add %(espf_options) |
4351 |
+ * gcc/config.in removed ENABLE_LIBSSP |
4352 |
+ * Makefile.in We add -fno-stack-protector to |
4353 |
+ BOOT_CFLAGS, LIBCFLAGS and LIBCXXFLAGS |
4354 |
+ cc1: pch.exp test fail when cc1 is compile with -fPIE |
4355 |
+ * libmudflap/Makefiles.in Add -fno-stack-protector -U_FORTIFY_SOURCE |
4356 |
+ to AM_CFLAGS |
4357 |
+ * configure add --enable-espf |
4358 |
+ add -fno-stack-protector to stage1_cflags |
4359 |
+ add targes ppc* arm sparc* |
4360 |
+ * gcc/configure change code for check --enable-espf |
4361 |
+ * libmudflap/configure add enable_espf |
4362 |
+ * gcc/espf.h ESPF_CC1_OPTIONS_SPEC renamed to ESPF_OPTIONS_SPEC |
4363 |
+ add ESPF_CPP_OPTIONS_SPEC ESPF_COMMAND_OPTIONS_SPEC |
4364 |
+ ESPF_CC1_OPTIONS_SSP_SPEC renamed to ESPF_OPTIONS_SSP_SPEC |
4365 |
+ ESPF_COMPILER_COMMAND_PIE_SPEC renamed to ESPF_OPTIONS_PIE_SPEC |
4366 |
+ ESPF_LINK_COMMAND_PIE_SPEC renamed to ESPF_LINK_PIE_SPEC |
4367 |
+ add !p !pg to ESPF_LINK_PIE_SPEC |
4368 |
+ removed ESPF_LINK_SPEC ESPF_CC1_OPTIONS_PIE_INCOMPATIBLE_SPEC |
4369 |
+ * gcc/gcc.c cpp_options add %(espf_cpp_options) |
4370 |
+ compiler spec add %(espf_options) |
4371 |
+ change code for ESPF_EXTRA_SPECS |
4372 |
+ process_command(): Check for lazy, or now |
4373 |
+ do_spec_1(): Add -z now and -z relro |
4374 |
+ main() add do_self_spec (espf_command_options_spec) |
4375 |
+ removed do_self_spec (espf_cc1_command_spec) do_self_spec (espf_link_command_spec) |
4376 |
+ |
4377 |
+0.2.9 Magnus Granberg <zorry@×××.nu> |
4378 |
+ |
4379 |
+ * gcc/espf.h add ESPF_COMPILER_COMMAND_PIE_SPEC |
4380 |
+ add ESPF_LINK_COMMAND_PIE_SPEC |
4381 |
+ change ESPF_COMPILER_COMMAND_SPEC ESPF_LINK_COMMAND_SPEC |
4382 |
+ |
4383 |
+0.2.8 Magnus Granberg <zorry@×××.nu> |
4384 |
+ |
4385 |
+ * gcc/configure removed check crtbeginTS.o |
4386 |
+ * gcc/espf.h added notes |
4387 |
+ add ESPF_CC1_SPEC |
4388 |
+ removed ESPF_CPP_UNIQUE_OPTIONS espf_override_options() |
4389 |
+ * gcc/gcc.c cc1_spec Set it to CC1_SPEC if ! ENABLE_ESPF |
4390 |
+ * gcc/toplev.c removed ESPF_OVERRIDE_OPTIONS |
4391 |
+ |
4392 |
+0.2.7 Magnus Granberg <zorry@×××.nu> |
4393 |
+ |
4394 |
+ * gcc/opts.c (decode_options): Remove flag_strict_overflow as opt2 |
4395 |
+ * gcc/config.in removed HAVE_CRTBEGINTS |
4396 |
+ * gcc/Makefile removed crtbeginTS.o |
4397 |
+ * libgcc/Makefile.in removed crtbeginTS.o |
4398 |
+ * gcc/config/i386/i386.h removed espf_override_options ESPF_EXTRA_SPECS |
4399 |
+ * gcc/config/linux.h remoevd crtbeginTS.o |
4400 |
+ * gcc/espf.h ESPF_CC1_OPTIONS_PIE_SPEC renamed to ESPF_CC1_COMMAND_SPEC |
4401 |
+ * gcc/gcc.c add ESPF_EXTRA_SPECS |
4402 |
+ main() add do_self_spec (espf_cc1_command_spec) |
4403 |
+ |
4404 |
+0.2.6 Magnus Granberg <zorry@×××.nu> |
4405 |
+ |
4406 |
+ * gcc/config/i386/i386.h add espf_override_options() to OVERRIDE_OPTIONS |
4407 |
+ * gcc/espf.h add espf_override_options() |
4408 |
+ * gcc/toplev.c add ESPF_OVERRIDE_OPTIONS |
4409 |
+ |
4410 |
+0.2.5 Magnus Granberg <zorry@×××.nu> |
4411 |
+ |
4412 |
+ * gcc/config/i386/i386.h removed espf_cc1 |
4413 |
+ * gcc/config/i386/linux.h removed espf_cc1 %(crtend_gen) |
4414 |
+ * gcc/config/i386/x86-64.h removed espf_cc1 %(crtend_gen) |
4415 |
+ * gcc/config/linux.h removed espf_cc1 %(crtfile_gen) |
4416 |
+ %(crtbegin_t_gen) %(crtend_gen) |
4417 |
+ add crtbeginTS.o |
4418 |
+ * gcc/config.in removed TARGET_LIBC_PROVIDES_PIE |
4419 |
+ add HAVE_CRTBEGINTS |
4420 |
+ * gcc/Makefile.in add ESPF_NOPIE_CFLAGS ESPF_NOSSP_CFLAGS to |
4421 |
+ CRTSTUFF_T_CFLAGS |
4422 |
+ add ESPF_NOSSP_CFLAGS to CRTSTUFF_T_CFLAGS_S |
4423 |
+ * espf.h ESPF_CC1_SPEC renamed to ESPF_CC1_OPTIONS_SPEC |
4424 |
+ add ESPF_LINK_SPEC |
4425 |
+ ESPF_CC1_SSP_SPEC renamed to ESPF_CC1_OPTIONS_SSP_SPEC |
4426 |
+ ESPF_CC1_PIE_SPEC renamed to ESPF_CC1_OPTIONS_PIE_SPEC |
4427 |
+ ESPF_CC1_OPTIONS_SPEC renamed to ESPF_CC1_OPTIONS_PIE_INCOMPATIBLE_SPEC |
4428 |
+ LINK_PIE_SPEC renamed to ESPF_LINK_COMMAND_SPEC |
4429 |
+ removed ESPF_CC1_STRICT_SPEC CRTFILE_GEN_SPEC CRTBEGIN_GEN_SPEC |
4430 |
+ CRTBEGIN_T_GEN_SPEC CRTEND_GEN_SPEC |
4431 |
+ * gcc/configure remove TARGET_LIBC_PROVIDES_PIE |
4432 |
+ define HAVE_CRTBEGINTS |
4433 |
+ * gcc/gcc.c LINK_COMMAND_SPEC add %(espf_link) |
4434 |
+ main() add do_self_spec (espf_link_command_spec) |
4435 |
+ |
4436 |
+0.2.4 Magnus Granberg <zorry@×××.nu> |
4437 |
+ |
4438 |
+ libgcc/Makefile.in clean specs |
4439 |
+ |
4440 |
+0.2.3 Magnus Granberg <zorry@×××.nu> |
4441 |
+ |
4442 |
+ *gcc/espf.h add ESPF_CC1_STRICT_SPEC |
4443 |
+ |
4444 |
+0.2.2 Magnus Granberg <zorry@×××.nu> |
4445 |
+ |
4446 |
+ * gcc/config/i386/i386.h Add espf_cc1 |
4447 |
+ Add ESPF_EXTRA_SPECS |
4448 |
+ * gcc/config/i386/linux.h Add espf_cc1 |
4449 |
+ * gcc/config/i386/x86-64.h Add espf_cc1 |
4450 |
+ * gcc/config/linux.h Add espf_cc1 |
4451 |
+ * gcc/Makefile.in add crtbeginTS.o to EXTRA_PARTS list |
4452 |
+ * libgcc/Makefile.in add crtbeginTS.o to EXTRA_PARTS list |
4453 |
+ * gcc/configure add define ENABLE_LIBSSP |
4454 |
+ * gcc/gcc.c %(fortify_default) renamed to %(espf_cpp_unique_options) |
4455 |
+ %(pie_incompatible) renamed to %(espf_cc1_options) |
4456 |
+ removed ESPF_EXTRA_SPECS |
4457 |
+ * gcc/espf.h ESPF_DEFAULT_SPEC renamed to ESPF_CC1_SPEC |
4458 |
+ SSP_DEFAULT_SPEC renamed to ESPF_CC1_SSP_SPEC |
4459 |
+ FORTIFY_DEFAULT_SPEC renamed to ESPF_CPP_UNIQUE_OPTIONS |
4460 |
+ PIE_DEFAULT_SPEC renamed to ESPF_CC1_PIE_SPEC |
4461 |
+ PIE_INCOMPATIBLE_SPEC renamed to ESPF_CC1_OPTIONS_SPEC |
4462 |
+ add new CRTFILE_GEN_SPEC CRTBEGIN_T_GEN_SPEC CRTEND_GEN_SPEC if ! |
4463 |
+ TARGET_LIBC_PROVIDES_PIE |
4464 |
+ |
4465 |
+4.4.0-espf-0.2.1 Magnus Granberg <zorry@×××.nu> |
4466 |
+ |
4467 |
+ * gcc/gcc.c include: espf.h |
4468 |
+ cc1_spec = CC1_SPEC if not ENABLE_ESPF |
4469 |
+ cpp_unique_options add %(fortify_default) |
4470 |
+ cc1_options add %(pie_incompatible) |
4471 |
+ EXTRA_SPECS add ESPF_EXTRA_SPECS |
4472 |
+ * libgcc/Makefile.in add crtbeginTs.o |
4473 |
+ gcc/Makefile.in add ESPF_NOPIE_CFLAGS and ESPF_NOSSP_CFLAGS |
4474 |
+ LIBGCC2_CFLAGS add ESPF_NOSSP_CFLAGS |
4475 |
+ CRTSTUFF_CFLAGS add ESPF_NOPIE_CFLAGS and ESPF_NOSSP_CFLAGS |
4476 |
+ crtbegin* add crtbeginTS |
4477 |
+ $(out_object_file): ix86_split_to_parts() stack smashing attack b.g.o #149292 |
4478 |
+ * libgcc/configure add enable_espf |
4479 |
+ * gcc/config/linux.h add %(crtfile_gen) %(crtbegin_t_gen) %(crtend_gen) |
4480 |
+ * gcc/config/i386/linux.h add %(crtend_gen) |
4481 |
+ * gcc/config/i386/linux64.h add %(crtend_gen) |
4482 |
+ * gcc/config.gcc extra_parts add crtbeginTS.o |
4483 |
+ * libgcc/config.host extra_parts add crtbeginTS.o |
4484 |
+ * gcc/configure check -z relro |
4485 |
+ check -z now |
4486 |
+ check FORTIFY_SOURCES level 2 |
4487 |
+ check Scrt1.o |
4488 |
+ check --enable-espf |
4489 |
+ check crtbeginTS.o |
4490 |
+ * gcc/espf.h new file |
4491 |
+ * gcc/varasm.c (decl_tls_model): Check flag_pic instead of flag_shlib |
4492 |
+ * gcc/config.in add ENABLE_LIBSSP |
4493 |
+ add ENABLE_ESPF |
4494 |
+ add TARGET_LIBC_PROVIDES_FORTIFY2 |
4495 |
+ add TARGET_LIBC_PROVIDES_PIE |
4496 |
+ * configure define ENABLE_LIBSSP |
4497 |
+ |
4498 |
+gcc-4.3.3-piepatches-v10.2.1 |
4499 |
|
4500 |
diff --git a/5.5.0/pie/README.history b/5.5.0/pie/README.history |
4501 |
new file mode 100644 |
4502 |
index 0000000..ef23f52 |
4503 |
--- /dev/null |
4504 |
+++ b/5.5.0/pie/README.history |
4505 |
@@ -0,0 +1,363 @@ |
4506 |
+0.6.5 27 Oct 2015 |
4507 |
+ U 24_all_gcc49_invoke.texi.patch |
4508 |
+0.6.4 29 Aug 2015 |
4509 |
+ U 35_all_gcc51_config_arm.patch |
4510 |
+ U 40_all_gcc49_config_esp.patch |
4511 |
+0.6.3 26 Apr 2015 |
4512 |
+ + 01_all_gcc51_configure.patch |
4513 |
+ - 01_all_gcc49_configure.patch |
4514 |
+ + 03_all_gcc51_Makefile.in.patch |
4515 |
+ - 03_all_gcc49_Makefile.in.patch |
4516 |
+ + 34_all_gcc51_config_i386.patch |
4517 |
+ - 34_all_gcc48_config_i386.patch |
4518 |
+ + 35_all_gcc51_config_arm.patch |
4519 |
+ + 35_all_gcc48_config_arm.patch |
4520 |
+ + 36_all_gcc51_config_mips.patch |
4521 |
+ + 36_all_gcc48_config_mips.patch |
4522 |
+0.6.2 5 Jan 2015 |
4523 |
+ U 03_all_gcc49_Makefile.in.patch |
4524 |
+0.6.1 07 Jun 2014 |
4525 |
+ U 33_all_gcc48_config_rs6000.patch |
4526 |
+0.6.0 12 May 2014 |
4527 |
+ + 01_all_gcc49_configure.patch |
4528 |
+ - 01_all_gcc48_configure.patch |
4529 |
+ + 03_all_gcc49_Makefile.in.patch |
4530 |
+ - 03_all_gcc48_Makefile.in.patch |
4531 |
+ + 20_all_gcc49_config_crtbeginp.patch |
4532 |
+ - 20_all_gcc46_config_crtbeginp.patch |
4533 |
+ + 24_all_gcc49_invoke.texi.patch |
4534 |
+ - 24_all_gcc48_invoke.texi.patch |
4535 |
+ +35_all_gcc49_config_esp.h.patch |
4536 |
+ - 35_all_gcc48_config_esp.h.patch |
4537 |
+ U README |
4538 |
+0.5.9 4 Jan 2014 |
4539 |
+ U 01_all_gcc48_configure.patch |
4540 |
+ U 03_all_gcc48_Makefile.in.patch |
4541 |
+ U 05_all_gcc48_gcc.c.patch |
4542 |
+ - 24_all_gcc44_invoke.texi.patch |
4543 |
+ + 24_all_gcc48_invoke.texi.patch |
4544 |
+ U README |
4545 |
+0.5.8 11 Nov 2013 |
4546 |
+ U 33_all_gcc48_config_rs6000.patch |
4547 |
+0.5.7 10 Jul 2013 |
4548 |
+ U 35_all_gcc48_config_esp.h.patch |
4549 |
+ - 15_all_gcc44_decl-tls-model.patch |
4550 |
+0.5.6 03 Jun 2013 |
4551 |
+ U 35_all_gcc48_config_arm.patch |
4552 |
+ U 37_all_gcc48_config_ia64.patch |
4553 |
+0.5.5 31 Mar 2013 |
4554 |
+ - 01_all_gcc47_configure.patch |
4555 |
+ + 01_all_gcc48_configure.patch |
4556 |
+ - 02_all_gcc47_config.in.patch |
4557 |
+ + 02_all_gcc48_config.in.patch |
4558 |
+ - 03_all_gcc47_Makefile.in.patch |
4559 |
+ + 03_all_gcc48_Makefile.in.patch |
4560 |
+ - 05_all_gcc47_gcc.c.patch |
4561 |
+ + 05_all_gcc48_gcc.c.patch |
4562 |
+ - 33_all_gcc46_config_rs6000_linux64.h.patch |
4563 |
+ + 33_all_gcc48_config_rs6000.patch |
4564 |
+ - 34_all_gcc47_config_all_gnu_user.patch |
4565 |
+ + 34_all_gcc48_config_i386.patch |
4566 |
+ + 35_all_gcc48_config_arm.patch |
4567 |
+ + 36_all_gcc48_config_mips.patch |
4568 |
+ + 37_all_gcc48_config_ia64.patch |
4569 |
+ - 35_all_gcc47_config_esp.h.patch |
4570 |
+ - 35_all_gcc48_config_esp.h.patch |
4571 |
+ U README |
4572 |
+0.5.4 02 Oct 2012 |
4573 |
+ U 01_all_gcc47_configure.patch |
4574 |
+ + 01_all_gcc47_configure.ac.patch |
4575 |
+0.5.3 06 Apr 2012 |
4576 |
+ U 01_all_gcc47_configure.patch |
4577 |
+ + 02_all_gcc47_config.in.patch |
4578 |
+ - 02_all_gcc45_config.in.patch |
4579 |
+ + 06_all_gcc46_esp.h.patch |
4580 |
+ - 06_all_gcc45_esp.h.patch |
4581 |
+0.5.2 24 Jan 2012 |
4582 |
+ + 16_all_gcc47_nopie_option.patch |
4583 |
+0.5.1 17 Jan 2012 |
4584 |
+ + 01_all_gcc47_configure.patch |
4585 |
+ - 10_all_gcc45_configure.patch |
4586 |
+ + 03_all_gcc47_Makefile.in.patch |
4587 |
+ - 12_all_gcc46_Makefile.in.patch |
4588 |
+ + 02_all_gcc45_config.in.patch |
4589 |
+ - 11_all_gcc45_config.in.patch |
4590 |
+ + 05_all_gcc46_gcc.c.patch |
4591 |
+ - 20_all_gcc46_gcc.c.patch |
4592 |
+ + 06_all_gcc45_esp.h.patch |
4593 |
+ - 30_all_gcc45_esp.h.patch |
4594 |
+ + 10_all_gcc46_default-ssp.patch |
4595 |
+ - 22_all_gcc46-default-ssp.patch |
4596 |
+ + 15_all_gcc44_decl-tls-model.patch |
4597 |
+ - 21_all_gcc44_decl-tls-model.patch |
4598 |
+ + 20_all_gcc46_config_crtbeginp.patch |
4599 |
+ - 35_all_gcc46_config_crtbegints.patch |
4600 |
+ + 24_all_gcc44_invoke.texi.patch |
4601 |
+ + 60_all_gcc44_invoke.texi.patch |
4602 |
+0.5.0 07 Dec 2011 |
4603 |
+ + 35_all_gcc46_config_crtbeginp.patch |
4604 |
+ - 35_all_gcc46_config_crtbegints.patch |
4605 |
+ U 10_all_gcc45_configure.patch |
4606 |
+ U 12_all_gcc46_Makefile.in.patch |
4607 |
+ + 11_all_gcc45_config.in.patch |
4608 |
+ - 11_all_gcc44_config.in.patch |
4609 |
+ + 30_all_gcc45_esp.h.patch |
4610 |
+ - 30_all_gcc44_esp.h.patch |
4611 |
+0.4.9 09 Nov 2011 |
4612 |
+ U 12_all_gcc46_Makefile.in.patch |
4613 |
+0.4.8 26 Mar 2011 |
4614 |
+ U 22_all_gcc46-default-ssp.patch |
4615 |
+0.4.7 05 Mar 2011 |
4616 |
+ U 20_all_gcc46_gcc.c.patch |
4617 |
+ + 22_all_gcc46-default-ssp.patch |
4618 |
+ - 30_all_gcc46_esp.h.patch |
4619 |
+ + 30_all_gcc44_esp.h.patch |
4620 |
+ U 33_all_gcc46_config_rs6000_linux64.h.patch |
4621 |
+ U 35_all_gcc46_config_crtbegints.patch |
4622 |
+0.4.6 07 Jan 2011 |
4623 |
+ + 12_all_gcc46_Makefile.in.patch |
4624 |
+ - 12_all_gcc44_Makefile.in.patch |
4625 |
+ + 20_all_gcc46_gcc.c.patch |
4626 |
+ - 20_all_gcc44_gcc.c.patch |
4627 |
+ + 30_all_gcc46_esp.h.patch |
4628 |
+ - 30_all_gcc44_esp.h.patch |
4629 |
+ + 33_all_gcc46_config_rs6000_linux64.h.patch |
4630 |
+ - 33_all_gcc45_config_rs6000_linux64.h.patch |
4631 |
+ + 35_all_gcc46_config_crtbegints.patch |
4632 |
+ - 35_all_gcc44_config_crtbegints.patch |
4633 |
+ - 40_all_gcc44_obj_lang-specs.h.patch |
4634 |
+ - 40_all_gcc44_objp_lang-specs.h.patch |
4635 |
+ - 40_all_gcc44_cp_lang-specs.h.patch |
4636 |
+0.4.5 18 Jun 2010 |
4637 |
+ U 35_all_gcc44_config_crtbegints.patch |
4638 |
+0.4.4 26 May 2010 |
4639 |
+ U 30_all_gcc44_esp.h.patch |
4640 |
+0.4.3 26 May 2010 |
4641 |
+ U 20_all_gcc44_gcc.c.patch |
4642 |
+ U 30_all_gcc44_esp.h.patch |
4643 |
+0.4.2 24 May 2010 |
4644 |
+ U 10_all_gcc44_configure.patch |
4645 |
+ U 12_all_gcc44_Makefile.in.patch |
4646 |
+ U 11_all_gcc44_config.in.patch |
4647 |
+ U 30_all_gcc44_esp.h.patch |
4648 |
+0.4.1 29 Apr 2010 |
4649 |
+ U 10_all_gcc45_configure.patch |
4650 |
+ U 12_all_gcc45_Makefile.in.patch |
4651 |
+ U 11_all_gcc44_config.in.patch |
4652 |
+ U 30_all_gcc44_esp.h.patch |
4653 |
+ |
4654 |
+0.4.0 19 Apr 2010 |
4655 |
+ U 10_all_gcc45_configure.patch |
4656 |
+ U 12_all_gcc45_Makefile.in.patch |
4657 |
+ U 11_all_gcc44_config.in.patch |
4658 |
+ U 20_all_gcc45_gcc.c.patch |
4659 |
+ - 30_all_gcc44_espf.h.patch |
4660 |
+ + 30_all_gcc44_esp.h.patch |
4661 |
+ |
4662 |
+0.3.9 14 Apr 2010 |
4663 |
+ U 10_all_gcc45_configure.patch |
4664 |
+ - 50_all_gcc44_no_ssp_tls_uclibc.patch |
4665 |
+ U 33_all_gcc45_config_rs6000_linux64.h.patch |
4666 |
+ |
4667 |
+0.3.8 10 Apr 2010 |
4668 |
+ 10_all_gcc44_configure.patch |
4669 |
+ 11_all_gcc44_config.in.patch |
4670 |
+ 20_all_gcc44_gcc.c.patch |
4671 |
+ 30_all_gcc44_espf.h.patch |
4672 |
+ |
4673 |
+0.3.7 10 Feb 2010 |
4674 |
+ 20_all_gcc44_gcc.c.patch |
4675 |
+ 30_all_gcc44_espf.h.patch |
4676 |
+ 10_all_gcc44_configure.patch |
4677 |
+ |
4678 |
+0.3.6 23 Dec 2009 |
4679 |
+ - 10_all_gcc44_configure.patch |
4680 |
+ + 10_all_gcc44_configure.patch |
4681 |
+ - 30_all_gcc44_espf.h.patch |
4682 |
+ + 30_all_gcc44_espf.h.patch |
4683 |
+ - README.Changelog |
4684 |
+ + README.Changelog |
4685 |
+ - README.history |
4686 |
+ + README.history |
4687 |
+ - README |
4688 |
+ + README |
4689 |
+ |
4690 |
+0.3.5 24 Sep 2009 |
4691 |
+ - 30_all_gcc44_espf.h.patch |
4692 |
+ + 30_all_gcc44_espf.h.patch |
4693 |
+ - 35_all_gcc44_config_crtbegints.patch |
4694 |
+ + 35_all_gcc44_config_crtbegints.patch |
4695 |
+ + 33_all_gcc44_config_rs6000_linux64.h.patch |
4696 |
+ - README.Changelog |
4697 |
+ + README.Changelog |
4698 |
+ - README.history |
4699 |
+ + README.history |
4700 |
+ + README.Gentoo.patches |
4701 |
+ |
4702 |
+0.3.4 11 Sep 2009 |
4703 |
+ - 10_all_gcc44_configure.patch |
4704 |
+ + 10_all_gcc44_configure.patch |
4705 |
+ - 11_all_gcc44_config.in.patch |
4706 |
+ + 11_all_gcc44_config.in.patch |
4707 |
+ - 12_all_gcc44_Makefile.in.patch |
4708 |
+ + 12_all_gcc44_Makefile.in.patch |
4709 |
+ - 20_all_gcc44_gcc.c.patch |
4710 |
+ + 20_all_gcc44_gcc.c.patch |
4711 |
+ - 23_all_gcc44_opts.c.patch |
4712 |
+ - 30_all_gcc44_espf.h.patch |
4713 |
+ + 30_all_gcc44_espf.h.patch |
4714 |
+ + 35_all_gcc44_config_crtbegints.patch |
4715 |
+ + 60_all_gcc44_invoke.texi.patch |
4716 |
+ - README.Changelog |
4717 |
+ + README.Changelog |
4718 |
+ - README.history |
4719 |
+ + README.history |
4720 |
+ - README |
4721 |
+ + README |
4722 |
+ |
4723 |
+0.3.3 14 Aug 2009 |
4724 |
+ - 23_all_gcc44_opts.c.patch |
4725 |
+ + 23_all_gcc44_opts.c.patch |
4726 |
+ |
4727 |
+0.3.2 09 Aug 2009 |
4728 |
+ + 50_all_gcc44_no_ssp_tls_uclibc.patch |
4729 |
+ + README.Changelog |
4730 |
+ + README.history |
4731 |
+ - 23_all_gcc44_opts.c.patch |
4732 |
+ + 23_all_gcc44_opts.c.patch |
4733 |
+ - 30_all_gcc44-espf.h.patch |
4734 |
+ + 30_all_gcc44-espf.h.patch |
4735 |
+ |
4736 |
+0.3.1 23 Jul 2009 |
4737 |
+ - 10_all_gcc44_configure.patch |
4738 |
+ + 10_all_gcc44_configure.patch |
4739 |
+ |
4740 |
+0.3.0 23 Jul 2009 |
4741 |
+ - 10_all_gcc44_configure.patch |
4742 |
+ + 10_all_gcc44_configure.patch |
4743 |
+ - 11_all_gcc44_config.in.patch |
4744 |
+ + 11_all_gcc44_config.in.patch |
4745 |
+ - 12_all_gcc44_Makefile.in.patch |
4746 |
+ + 12_all_gcc44_Makefile.in.patch |
4747 |
+ - 20_all_gcc44_gcc.c.patch |
4748 |
+ + 20_all_gcc44_gcc.c.patch |
4749 |
+ + 40_all_gcc44_obj_lang-specs.h.patch |
4750 |
+ + 40_all_gcc44_objp_lang-specs.h.patch |
4751 |
+ + 40_all_gcc44_cp_lang-specs.h.patch |
4752 |
+ - 50_all_gcc44_gentoo_v20090614.1.patch |
4753 |
+ - 30_all_gcc44-espf.h.patch |
4754 |
+ + 30_all_gcc44-espf.h.patch |
4755 |
+ |
4756 |
+0.2.9 14 Jun 2009 |
4757 |
+ - 12_all_gcc44_Makefile.in.patch |
4758 |
+ + 12_all_gcc44_Makefile.in.patch |
4759 |
+ - 30_all_gcc44-espf.h.patch |
4760 |
+ + 30_all_gcc44-espf.h.patch |
4761 |
+ - 50_all_gcc44_gentoo_v20090612.2.patch |
4762 |
+ + 50_all_gcc44_gentoo_v20090614.1.patch |
4763 |
+ |
4764 |
+0.2.8 12 Jun 2009 |
4765 |
+ - 10_all_gcc44_configure.patch |
4766 |
+ + 10_all_gcc44_configure.patch |
4767 |
+ - 11_all_gcc44_config.in.patch |
4768 |
+ + 11_all_gcc44_config.in.patch |
4769 |
+ - 12_all_gcc44_Makefile.in.patch |
4770 |
+ + 12_all_gcc44_Makefile.in.patch |
4771 |
+ - 22_all_gcc44-toplev.c.patch |
4772 |
+ - 25_all_gcc44-espf.h.patch |
4773 |
+ + 30_all_gcc44-espf.h.patch |
4774 |
+ + 50_all_gcc44_gentoo_v20090612.2.patch |
4775 |
+ |
4776 |
+0.2.7 29 May 2009 |
4777 |
+ - 11_all_gcc44_config.in.patch |
4778 |
+ + 11_all_gcc44_config.in.patch |
4779 |
+ - 12_all_gcc44_Makefile.in.patch |
4780 |
+ + 12_all_gcc44_Makefile.in.patch |
4781 |
+ - 20_all_gcc44_gcc.c.patch |
4782 |
+ + 20_all_gcc44_gcc.c.patch |
4783 |
+ + 23_all_gcc44_opts.c.patch |
4784 |
+ - 25_all_gcc44-espf.h.patch |
4785 |
+ + 25_all_gcc44-espf.h.patch |
4786 |
+ - 30_all_gcc44-config-defaul-linux.patch |
4787 |
+ |
4788 |
+0.2.6 28 May 2009 |
4789 |
+ + 22_all_gcc44-toplev.c.patch |
4790 |
+ - 25_all_gcc44-espf.h.patch |
4791 |
+ + 25_all_gcc44-espf.h.patch |
4792 |
+ - 30_all_gcc44-config-defaul-linux.patch |
4793 |
+ + 30_all_gcc44-config-defaul-linux.patch |
4794 |
+ |
4795 |
+0.2.5 27 May 2009 |
4796 |
+ - 10_all_gcc44_configure.patch |
4797 |
+ + 10_all_gcc44_configure.patch |
4798 |
+ - 12_all_gcc44_Makefile.in.patch |
4799 |
+ + 12_all_gcc44_Makefile.in.patch |
4800 |
+ - 20_all_gcc44_gcc.c.patch |
4801 |
+ + 20_all_gcc44_gcc.c.patch |
4802 |
+ - 25_all_gcc44-espf.h.patch |
4803 |
+ + 25_all_gcc44-espf.h.patch |
4804 |
+ - 30_all_gcc44-config-defaul-linux.patch |
4805 |
+ + 30_all_gcc44-config-defaul-linux.patch |
4806 |
+ - 40_all_gcc44-gentoo.patch |
4807 |
+ |
4808 |
+0.2.4 08 May 2009 |
4809 |
+ - 12_all_gcc44_Makefile.in.patch |
4810 |
+ + 12_all_gcc44_Makefile.in.patch |
4811 |
+ |
4812 |
+0.2.3 08 May 2009 |
4813 |
+ - 20_all_gcc44_gcc.c.patch |
4814 |
+ + 20_all_gcc44_gcc.c.patch |
4815 |
+ - 40_all_gcc44-gentoo.patch |
4816 |
+ + 40_all_gcc44-gentoo.patch |
4817 |
+ |
4818 |
+0.2.2 04 May 2009 |
4819 |
+ + 10_all_gcc44_configure.patch |
4820 |
+ + 11_all_gcc44_config.in.patch |
4821 |
+ + 12_all_gcc44_Makefile.in.patch |
4822 |
+ + 20_all_gcc44_gcc.c.patch |
4823 |
+ + 21_all_gcc44_decl-tls-model.patch |
4824 |
+ + 25_all_gcc44-espf.h.patch |
4825 |
+ + 30_all_gcc44-config-defaul-linux.patch |
4826 |
+ + 40_all_gcc44-gentoo.patch |
4827 |
+ - 01_all_gcc44-configure.patch |
4828 |
+ - 10_all_gcc44-gcc_configure.patch |
4829 |
+ - 11_all_gcc44-gcc_config.in.patch |
4830 |
+ - 12_all_gcc44-gcc_config.gcc.patch |
4831 |
+ - 13_all_gcc44-gcc_Makefile.in.patch |
4832 |
+ - 15_all_gcc44-libgcc_config.host.patch |
4833 |
+ - 16_all_gcc44-libgcc_configure.patch |
4834 |
+ - 17_all_gcc44-libgcc_Makefile.in.patch |
4835 |
+ - 21_all_gcc44-gcc_espf.h.patch |
4836 |
+ - 22_all_gcc44-gcc_gcc.c.patch |
4837 |
+ - 23_all_gcc44-gcc_varasm.c.patch |
4838 |
+ - 30_all_gcc44-add-crt-start-endfiles-linux.patch |
4839 |
+ |
4840 |
+0.2.1 28 Apr 2009 |
4841 |
+ + 01_all_gcc44-configure.patch |
4842 |
+ + 10_all_gcc44-gcc_configure.patch |
4843 |
+ + 11_all_gcc44-gcc_config.in.patch |
4844 |
+ + 12_all_gcc44-gcc_config.gcc.patch |
4845 |
+ + 13_all_gcc44-gcc_Makefile.in.patch |
4846 |
+ + 15_all_gcc44-libgcc_config.host.patch |
4847 |
+ + 16_all_gcc44-libgcc_configure.patch |
4848 |
+ + 17_all_gcc44-libgcc_Makefile.in.patch |
4849 |
+ + 21_all_gcc44-gcc_espf.h.patch |
4850 |
+ + 22_all_gcc44-gcc_gcc.c.patch |
4851 |
+ + 23_all_gcc44-gcc_varasm.c.patch |
4852 |
+ + 30_all_gcc44-add-crt-start-endfiles-linux.patch |
4853 |
+ - 00_all_gcc4.4-cvs-incompat.patch |
4854 |
+ - 05_all_gcc4.4-compile-no-ssp.patch |
4855 |
+ - 10_all_gcc4.4-hardened-minispecs-support.patch |
4856 |
+ - 11_all_gcc4.4-decl-tls-model.patch |
4857 |
+ - 12_all_gcc4.4-fortify-minispecs-support.patch |
4858 |
+ - 20-all_gcc4.4-default-crt-start-endfile.patch |
4859 |
+ - 30-all_gcc4.4-crtbeginTS-fno-PIE.patch |
4860 |
+ |
4861 |
+0.1.0 16 Apr 2009 |
4862 |
+ + 00_all_gcc4.4-cvs-incompat.patch |
4863 |
+ + 05_all_gcc4.4-compile-no-ssp.patch |
4864 |
+ + 10_all_gcc4.4-hardened-minispecs-support.patch |
4865 |
+ + 11_all_gcc4.4-decl-tls-model.patch |
4866 |
+ + 12_all_gcc4.4-fortify-minispecs-support.patch |
4867 |
+ + 20-all_gcc4.4-default-crt-start-endfile.patch |
4868 |
+ + 30-all_gcc4.4-crtbeginTS-fno-PIE.patch |
4869 |
|
4870 |
diff --git a/5.5.0/uclibc/90_all_100-uclibc-conf.patch b/5.5.0/uclibc/90_all_100-uclibc-conf.patch |
4871 |
new file mode 100644 |
4872 |
index 0000000..3460f9e |
4873 |
--- /dev/null |
4874 |
+++ b/5.5.0/uclibc/90_all_100-uclibc-conf.patch |
4875 |
@@ -0,0 +1,33 @@ |
4876 |
+--- gcc/contrib/regression/objs-gcc.sh |
4877 |
++++ gcc/contrib/regression/objs-gcc.sh |
4878 |
+@@ -105,6 +105,10 @@ |
4879 |
+ then |
4880 |
+ make all-gdb all-dejagnu all-ld || exit 1 |
4881 |
+ make install-gdb install-dejagnu install-ld || exit 1 |
4882 |
++elif [ $H_REAL_TARGET = $H_REAL_HOST -a $H_REAL_TARGET = i686-pc-linux-uclibc ] |
4883 |
++ then |
4884 |
++ make all-gdb all-dejagnu all-ld || exit 1 |
4885 |
++ make install-gdb install-dejagnu install-ld || exit 1 |
4886 |
+ elif [ $H_REAL_TARGET = $H_REAL_HOST ] ; then |
4887 |
+ make bootstrap || exit 1 |
4888 |
+ make install || exit 1 |
4889 |
+--- gcc/libjava/classpath/ltconfig |
4890 |
++++ gcc/libjava/classpath/ltconfig |
4891 |
+@@ -603,7 +603,7 @@ |
4892 |
+ |
4893 |
+ # Transform linux* to *-*-linux-gnu*, to support old configure scripts. |
4894 |
+ case $host_os in |
4895 |
+-linux-gnu*) ;; |
4896 |
++linux-gnu*|linux-uclibc*) ;; |
4897 |
+ linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'` |
4898 |
+ esac |
4899 |
+ |
4900 |
+@@ -1251,7 +1251,7 @@ |
4901 |
+ ;; |
4902 |
+ |
4903 |
+ # This must be Linux ELF. |
4904 |
+-linux-gnu*) |
4905 |
++linux*) |
4906 |
+ version_type=linux |
4907 |
+ need_lib_prefix=no |
4908 |
+ need_version=no |
4909 |
|
4910 |
diff --git a/5.5.0/uclibc/90_all_302-c99-snprintf.patch b/5.5.0/uclibc/90_all_302-c99-snprintf.patch |
4911 |
new file mode 100644 |
4912 |
index 0000000..f56560b |
4913 |
--- /dev/null |
4914 |
+++ b/5.5.0/uclibc/90_all_302-c99-snprintf.patch |
4915 |
@@ -0,0 +1,251 @@ |
4916 |
+https://bugs.gentoo.org/577238 |
4917 |
+ |
4918 |
+we should be able to drop this with gcc-6+ |
4919 |
+ |
4920 |
+--- a/libstdc++-v3/config/locale/generic/c_locale.h |
4921 |
++++ b/libstdc++-v3/config/locale/generic/c_locale.h |
4922 |
+@@ -70,7 +70,7 @@ |
4923 |
+ __builtin_va_list __args; |
4924 |
+ __builtin_va_start(__args, __fmt); |
4925 |
+ |
4926 |
+-#ifdef _GLIBCXX_USE_C99 |
4927 |
++#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__) |
4928 |
+ const int __ret = __builtin_vsnprintf(__out, __size, __fmt, __args); |
4929 |
+ #else |
4930 |
+ const int __ret = __builtin_vsprintf(__out, __fmt, __args); |
4931 |
+--- a/libstdc++-v3/config/locale/gnu/c_locale.h |
4932 |
++++ b/libstdc++-v3/config/locale/gnu/c_locale.h |
4933 |
+@@ -88,7 +88,7 @@ |
4934 |
+ __builtin_va_list __args; |
4935 |
+ __builtin_va_start(__args, __fmt); |
4936 |
+ |
4937 |
+-#ifdef _GLIBCXX_USE_C99 |
4938 |
++#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__) |
4939 |
+ const int __ret = __builtin_vsnprintf(__out, __size, __fmt, __args); |
4940 |
+ #else |
4941 |
+ const int __ret = __builtin_vsprintf(__out, __fmt, __args); |
4942 |
+--- a/libstdc++-v3/include/bits/basic_string.h |
4943 |
++++ b/libstdc++-v3/include/bits/basic_string.h |
4944 |
+@@ -5246,7 +5246,7 @@ |
4945 |
+ _GLIBCXX_END_NAMESPACE_VERSION |
4946 |
+ } // namespace |
4947 |
+ |
4948 |
+-#if __cplusplus >= 201103L && defined(_GLIBCXX_USE_C99) |
4949 |
++#if __cplusplus >= 201103L && (defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__)) |
4950 |
+ |
4951 |
+ #include <ext/string_conversions.h> |
4952 |
+ |
4953 |
+--- a/libstdc++-v3/include/bits/locale_facets.tcc |
4954 |
++++ b/libstdc++-v3/include/bits/locale_facets.tcc |
4955 |
+@@ -992,7 +992,7 @@ |
4956 |
+ char __fbuf[16]; |
4957 |
+ __num_base::_S_format_float(__io, __fbuf, __mod); |
4958 |
+ |
4959 |
+-#ifdef _GLIBCXX_USE_C99 |
4960 |
++#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__) |
4961 |
+ // Precision is always used except for hexfloat format. |
4962 |
+ const bool __use_prec = |
4963 |
+ (__io.flags() & ios_base::floatfield) != ios_base::floatfield; |
4964 |
+--- a/libstdc++-v3/include/bits/locale_facets_nonio.tcc |
4965 |
++++ b/libstdc++-v3/include/bits/locale_facets_nonio.tcc |
4966 |
+@@ -578,7 +578,7 @@ |
4967 |
+ { |
4968 |
+ const locale __loc = __io.getloc(); |
4969 |
+ const ctype<_CharT>& __ctype = use_facet<ctype<_CharT> >(__loc); |
4970 |
+-#ifdef _GLIBCXX_USE_C99 |
4971 |
++#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__) |
4972 |
+ // First try a buffer perhaps big enough. |
4973 |
+ int __cs_size = 64; |
4974 |
+ char* __cs = static_cast<char*>(__builtin_alloca(__cs_size)); |
4975 |
+@@ -751,7 +751,7 @@ |
4976 |
+ case 'S': |
4977 |
+ // Seconds. [tm_sec] |
4978 |
+ // [00, 60] in C99 (one leap-second), [00, 61] in C89. |
4979 |
+-#ifdef _GLIBCXX_USE_C99 |
4980 |
++#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__) |
4981 |
+ __beg = _M_extract_num(__beg, __end, __tm->tm_sec, 0, 60, 2, |
4982 |
+ #else |
4983 |
+ __beg = _M_extract_num(__beg, __end, __tm->tm_sec, 0, 61, 2, |
4984 |
+--- a/libstdc++-v3/include/c_compatibility/math.h |
4985 |
++++ b/libstdc++-v3/include/c_compatibility/math.h |
4986 |
+@@ -56,7 +56,7 @@ |
4987 |
+ using std::floor; |
4988 |
+ using std::fmod; |
4989 |
+ |
4990 |
+-#if _GLIBCXX_USE_C99 |
4991 |
++#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__) |
4992 |
+ using std::fpclassify; |
4993 |
+ using std::isfinite; |
4994 |
+ using std::isinf; |
4995 |
+--- a/libstdc++-v3/include/c_compatibility/wchar.h |
4996 |
++++ b/libstdc++-v3/include/c_compatibility/wchar.h |
4997 |
+@@ -103,7 +103,7 @@ |
4998 |
+ using std::wmemset; |
4999 |
+ using std::wcsftime; |
5000 |
+ |
5001 |
+-#if _GLIBCXX_USE_C99 |
5002 |
++#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__) |
5003 |
+ using std::wcstold; |
5004 |
+ using std::wcstoll; |
5005 |
+ using std::wcstoull; |
5006 |
+--- a/libstdc++-v3/include/c_global/cstdio |
5007 |
++++ b/libstdc++-v3/include/c_global/cstdio |
5008 |
+@@ -146,7 +146,7 @@ |
5009 |
+ using ::vsprintf; |
5010 |
+ } // namespace |
5011 |
+ |
5012 |
+-#if _GLIBCXX_USE_C99 |
5013 |
++#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__) |
5014 |
+ |
5015 |
+ #undef snprintf |
5016 |
+ #undef vfscanf |
5017 |
+--- a/libstdc++-v3/include/c_global/cstdlib |
5018 |
++++ b/libstdc++-v3/include/c_global/cstdlib |
5019 |
+@@ -195,7 +195,7 @@ |
5020 |
+ _GLIBCXX_END_NAMESPACE_VERSION |
5021 |
+ } // namespace |
5022 |
+ |
5023 |
+-#if _GLIBCXX_USE_C99 |
5024 |
++#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__) |
5025 |
+ |
5026 |
+ #undef _Exit |
5027 |
+ #undef llabs |
5028 |
+--- a/libstdc++-v3/include/c_global/cwchar |
5029 |
++++ b/libstdc++-v3/include/c_global/cwchar |
5030 |
+@@ -232,7 +232,7 @@ |
5031 |
+ _GLIBCXX_END_NAMESPACE_VERSION |
5032 |
+ } // namespace |
5033 |
+ |
5034 |
+-#if _GLIBCXX_USE_C99 |
5035 |
++#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__) |
5036 |
+ |
5037 |
+ #undef wcstold |
5038 |
+ #undef wcstoll |
5039 |
+@@ -289,7 +289,7 @@ |
5040 |
+ using std::vwscanf; |
5041 |
+ #endif |
5042 |
+ |
5043 |
+-#if _GLIBCXX_USE_C99 |
5044 |
++#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__) |
5045 |
+ using std::wcstold; |
5046 |
+ using std::wcstoll; |
5047 |
+ using std::wcstoull; |
5048 |
+--- a/libstdc++-v3/include/c_std/cstdio |
5049 |
++++ b/libstdc++-v3/include/c_std/cstdio |
5050 |
+@@ -144,7 +144,7 @@ |
5051 |
+ using ::vsprintf; |
5052 |
+ } // namespace std |
5053 |
+ |
5054 |
+-#if _GLIBCXX_USE_C99 |
5055 |
++#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__) |
5056 |
+ |
5057 |
+ #undef snprintf |
5058 |
+ #undef vfscanf |
5059 |
+--- a/libstdc++-v3/include/c_std/cstdlib |
5060 |
++++ b/libstdc++-v3/include/c_std/cstdlib |
5061 |
+@@ -192,7 +192,7 @@ |
5062 |
+ _GLIBCXX_END_NAMESPACE_VERSION |
5063 |
+ } // namespace |
5064 |
+ |
5065 |
+-#if _GLIBCXX_USE_C99 |
5066 |
++#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__) |
5067 |
+ |
5068 |
+ #undef _Exit |
5069 |
+ #undef llabs |
5070 |
+--- a/libstdc++-v3/include/c_std/cwchar |
5071 |
++++ b/libstdc++-v3/include/c_std/cwchar |
5072 |
+@@ -228,7 +228,7 @@ |
5073 |
+ _GLIBCXX_END_NAMESPACE_VERSION |
5074 |
+ } // namespace |
5075 |
+ |
5076 |
+-#if _GLIBCXX_USE_C99 |
5077 |
++#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__) |
5078 |
+ |
5079 |
+ #undef wcstold |
5080 |
+ #undef wcstoll |
5081 |
+--- a/libstdc++-v3/include/ext/vstring.h |
5082 |
++++ b/libstdc++-v3/include/ext/vstring.h |
5083 |
+@@ -2680,7 +2680,7 @@ |
5084 |
+ _GLIBCXX_END_NAMESPACE_VERSION |
5085 |
+ } // namespace |
5086 |
+ |
5087 |
+-#if ((__cplusplus >= 201103L) && defined(_GLIBCXX_USE_C99)) |
5088 |
++#if ((__cplusplus >= 201103L) && (defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__))) |
5089 |
+ |
5090 |
+ #include <ext/string_conversions.h> |
5091 |
+ |
5092 |
+--- a/libstdc++-v3/include/tr1/cstdio |
5093 |
++++ b/libstdc++-v3/include/tr1/cstdio |
5094 |
+@@ -33,7 +33,7 @@ |
5095 |
+ |
5096 |
+ #include <cstdio> |
5097 |
+ |
5098 |
+-#if _GLIBCXX_USE_C99 |
5099 |
++#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__) |
5100 |
+ |
5101 |
+ namespace std _GLIBCXX_VISIBILITY(default) |
5102 |
+ { |
5103 |
+--- a/libstdc++-v3/include/tr1/cstdlib |
5104 |
++++ b/libstdc++-v3/include/tr1/cstdlib |
5105 |
+@@ -35,7 +35,7 @@ |
5106 |
+ |
5107 |
+ #if _GLIBCXX_HOSTED |
5108 |
+ |
5109 |
+-#if _GLIBCXX_USE_C99 |
5110 |
++#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__) |
5111 |
+ |
5112 |
+ namespace std _GLIBCXX_VISIBILITY(default) |
5113 |
+ { |
5114 |
+--- a/libstdc++-v3/include/tr1/cwchar |
5115 |
++++ b/libstdc++-v3/include/tr1/cwchar |
5116 |
+@@ -52,7 +52,7 @@ |
5117 |
+ using std::vwscanf; |
5118 |
+ #endif |
5119 |
+ |
5120 |
+-#if _GLIBCXX_USE_C99 |
5121 |
++#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__) |
5122 |
+ using std::wcstold; |
5123 |
+ using std::wcstoll; |
5124 |
+ using std::wcstoull; |
5125 |
+--- a/libstdc++-v3/include/tr1/stdlib.h |
5126 |
++++ b/libstdc++-v3/include/tr1/stdlib.h |
5127 |
+@@ -33,7 +33,7 @@ |
5128 |
+ |
5129 |
+ #if _GLIBCXX_HOSTED |
5130 |
+ |
5131 |
+-#if _GLIBCXX_USE_C99 |
5132 |
++#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__) |
5133 |
+ |
5134 |
+ using std::tr1::atoll; |
5135 |
+ using std::tr1::strtoll; |
5136 |
+--- a/libstdc++-v3/src/c++11/debug.cc |
5137 |
++++ b/libstdc++-v3/src/c++11/debug.cc |
5138 |
+@@ -788,7 +788,7 @@ |
5139 |
+ int __n __attribute__ ((__unused__)), |
5140 |
+ const char* __fmt, _Tp __s) const throw () |
5141 |
+ { |
5142 |
+-#ifdef _GLIBCXX_USE_C99 |
5143 |
++#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__) |
5144 |
+ std::snprintf(__buf, __n, __fmt, __s); |
5145 |
+ #else |
5146 |
+ std::sprintf(__buf, __fmt, __s); |
5147 |
+--- a/libstdc++-v3/src/c++98/locale_facets.cc |
5148 |
++++ b/libstdc++-v3/src/c++98/locale_facets.cc |
5149 |
+@@ -72,7 +72,7 @@ |
5150 |
+ |
5151 |
+ ios_base::fmtflags __fltfield = __flags & ios_base::floatfield; |
5152 |
+ |
5153 |
+-#ifdef _GLIBCXX_USE_C99 |
5154 |
++#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__) |
5155 |
+ // Precision is always used except for hexfloat format. |
5156 |
+ if (__fltfield != (ios_base::fixed | ios_base::scientific)) |
5157 |
+ #endif |
5158 |
+@@ -89,7 +89,7 @@ |
5159 |
+ *__fptr++ = 'f'; |
5160 |
+ else if (__fltfield == ios_base::scientific) |
5161 |
+ *__fptr++ = (__flags & ios_base::uppercase) ? 'E' : 'e'; |
5162 |
+-#ifdef _GLIBCXX_USE_C99 |
5163 |
++#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__) |
5164 |
+ else if (__fltfield == (ios_base::fixed | ios_base::scientific)) |
5165 |
+ *__fptr++ = (__flags & ios_base::uppercase) ? 'A' : 'a'; |
5166 |
+ #endif |