1 |
dirtyepic 13/03/31 05:36:53 |
2 |
|
3 |
Added: 10_all_default-fortify-source.patch |
4 |
11_all_default-warn-format-security.patch |
5 |
12_all_default-warn-trampolines.patch |
6 |
15_all_libgfortran-Werror.patch |
7 |
16_all_libgomp-Werror.patch |
8 |
25_all_alpha-mieee-default.patch |
9 |
26_all_alpha-asm-mcpu.patch |
10 |
29_all_arm_armv4t-default.patch |
11 |
34_all_ia64_note.GNU-stack.patch |
12 |
38_all_sh_pr24836_all-archs.patch |
13 |
42_all_superh_default-multilib.patch |
14 |
48_all_x86_pr53113_libitm-avx.patch |
15 |
50_all_libiberty-asprintf.patch |
16 |
51_all_libiberty-pic.patch |
17 |
52_all_netbsd-Bsymbolic.patch |
18 |
67_all_gcc-poison-system-directories.patch |
19 |
74_all_gcc48_cloog-dl.patch |
20 |
92_all_freebsd-pie.patch README.history |
21 |
Log: |
22 |
Initial 4.8.0 patchset based off of latest 4.7.2 patchset. |
23 |
|
24 |
Revision Changes Path |
25 |
1.1 src/patchsets/gcc/4.8.0/gentoo/10_all_default-fortify-source.patch |
26 |
|
27 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gcc/4.8.0/gentoo/10_all_default-fortify-source.patch?rev=1.1&view=markup |
28 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gcc/4.8.0/gentoo/10_all_default-fortify-source.patch?rev=1.1&content-type=text/plain |
29 |
|
30 |
Index: 10_all_default-fortify-source.patch |
31 |
=================================================================== |
32 |
Enable -D_FORTIFY_SOURCE=2 by default. |
33 |
|
34 |
--- a/gcc/c-family/c-cppbuiltin.c |
35 |
+++ b/gcc/c-family/c-cppbuiltin.c |
36 |
@@ -853,6 +853,9 @@ c_cpp_builtins (cpp_reader *pfile) |
37 |
builtin_define_with_value ("__REGISTER_PREFIX__", REGISTER_PREFIX, 0); |
38 |
builtin_define_with_value ("__USER_LABEL_PREFIX__", user_label_prefix, 0); |
39 |
|
40 |
+ /* Fortify Source enabled by default w/optimization. */ |
41 |
+ cpp_define (pfile, "_FORTIFY_SOURCE=((defined __OPTIMIZE__ && __OPTIMIZE__ > 0) ? 2 : 0)"); |
42 |
+ |
43 |
/* Misc. */ |
44 |
if (flag_gnu89_inline) |
45 |
cpp_define (pfile, "__GNUC_GNU_INLINE__"); |
46 |
--- a/gcc/doc/invoke.texi |
47 |
+++ b/gcc/doc/invoke.texi |
48 |
@@ -6568,6 +6568,11 @@ also turns on the following optimization flags: |
49 |
Please note the warning under @option{-fgcse} about |
50 |
invoking @option{-O2} on programs that use computed gotos. |
51 |
|
52 |
+NOTE: In Gentoo, @option{-D_FORTIFY_SOURCE=2} is set by default, and is |
53 |
+activated when @option{-O} is set to 2 or higher. This enables additional |
54 |
+compile-time and run-time checks for several libc functions. To disable, |
55 |
+specify either @option{-U_FORTIFY_SOURCE} or @option{-D_FORTIFY_SOURCE=0}. |
56 |
+ |
57 |
@item -O3 |
58 |
@opindex O3 |
59 |
Optimize yet more. @option{-O3} turns on all optimizations specified |
60 |
|
61 |
|
62 |
|
63 |
1.1 src/patchsets/gcc/4.8.0/gentoo/11_all_default-warn-format-security.patch |
64 |
|
65 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gcc/4.8.0/gentoo/11_all_default-warn-format-security.patch?rev=1.1&view=markup |
66 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gcc/4.8.0/gentoo/11_all_default-warn-format-security.patch?rev=1.1&content-type=text/plain |
67 |
|
68 |
Index: 11_all_default-warn-format-security.patch |
69 |
=================================================================== |
70 |
Enable -Wformat-security by default. |
71 |
|
72 |
--- a/gcc/c-family/c.opt |
73 |
+++ b/gcc/c-family/c.opt |
74 |
@@ -400,7 +400,7 @@ C ObjC C++ ObjC++ Var(warn_format_nonliteral) Warning LangEnabledBy(C ObjC C++ O |
75 |
Warn about format strings that are not literals |
76 |
|
77 |
Wformat-security |
78 |
-C ObjC C++ ObjC++ Var(warn_format_security) Warning LangEnabledBy(C ObjC C++ ObjC++,Wformat=, warn_format >= 2, 0) |
79 |
+C ObjC C++ ObjC++ Var(warn_format_security) Init(1) Warning LangEnabledBy(C ObjC C++ ObjC++,Wformat=, warn_format >= 2, 0) |
80 |
Warn about possible security problems with format functions |
81 |
|
82 |
Wformat-y2k |
83 |
--- a/gcc/doc/invoke.texi |
84 |
+++ b/gcc/doc/invoke.texi |
85 |
@@ -3362,6 +3362,11 @@ currently a subset of what @option{-Wformat-nonliteral} warns about, but |
86 |
in future warnings may be added to @option{-Wformat-security} that are not |
87 |
included in @option{-Wformat-nonliteral}.) |
88 |
|
89 |
+In Gentoo this option is enabled by default for C, C++, ObjC, ObjC++. |
90 |
+To disable, use @option{-Wno-format-security}, or disable all format |
91 |
+warnings with @option{-Wformat=0}. To make format security warnings |
92 |
+fatal, specify @option{-Werror=format-security}. |
93 |
+ |
94 |
@item -Wformat-y2k |
95 |
@opindex Wformat-y2k |
96 |
@opindex Wno-format-y2k |
97 |
|
98 |
|
99 |
|
100 |
1.1 src/patchsets/gcc/4.8.0/gentoo/12_all_default-warn-trampolines.patch |
101 |
|
102 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gcc/4.8.0/gentoo/12_all_default-warn-trampolines.patch?rev=1.1&view=markup |
103 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gcc/4.8.0/gentoo/12_all_default-warn-trampolines.patch?rev=1.1&content-type=text/plain |
104 |
|
105 |
Index: 12_all_default-warn-trampolines.patch |
106 |
=================================================================== |
107 |
Enable -Wtrampolines by default. |
108 |
|
109 |
--- a/gcc/common.opt |
110 |
+++ b/gcc/common.opt |
111 |
@@ -640,7 +640,7 @@ Common Var(warn_system_headers) Warning |
112 |
Do not suppress warnings from system headers |
113 |
|
114 |
Wtrampolines |
115 |
-Common Var(warn_trampolines) Warning |
116 |
+Common Var(warn_trampolines) Init(1) Warning |
117 |
Warn whenever a trampoline is generated |
118 |
|
119 |
Wtype-limits |
120 |
--- a/gcc/doc/invoke.texi |
121 |
+++ b/gcc/doc/invoke.texi |
122 |
@@ -4007,6 +4007,8 @@ headers---for that, @option{-Wunknown-pragmas} must also be used. |
123 |
for most targets, it is made up of code and thus requires the stack |
124 |
to be made executable in order for the program to work properly. |
125 |
|
126 |
+ This warning is enabled by default in Gentoo. |
127 |
+ |
128 |
@item -Wfloat-equal |
129 |
@opindex Wfloat-equal |
130 |
@opindex Wno-float-equal |
131 |
|
132 |
|
133 |
|
134 |
1.1 src/patchsets/gcc/4.8.0/gentoo/15_all_libgfortran-Werror.patch |
135 |
|
136 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gcc/4.8.0/gentoo/15_all_libgfortran-Werror.patch?rev=1.1&view=markup |
137 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gcc/4.8.0/gentoo/15_all_libgfortran-Werror.patch?rev=1.1&content-type=text/plain |
138 |
|
139 |
Index: 15_all_libgfortran-Werror.patch |
140 |
=================================================================== |
141 |
libgfortran does not respect --disable-werror |
142 |
|
143 |
https://bugs.gentoo.org/433435 |
144 |
http://gcc.gnu.org/PR54724 |
145 |
|
146 |
|
147 |
--- a/libgfortran/configure |
148 |
+++ b/libgfortran/configure |
149 |
@@ -5764,7 +5764,7 @@ fi |
150 |
|
151 |
# Add -Wall -fno-repack-arrays -fno-underscoring if we are using GCC. |
152 |
if test "x$GCC" = "xyes"; then |
153 |
- AM_FCFLAGS="-I . -Wall -Werror -fimplicit-none -fno-repack-arrays -fno-underscoring" |
154 |
+ AM_FCFLAGS="-I . -Wall -fimplicit-none -fno-repack-arrays -fno-underscoring" |
155 |
## We like to use C99 routines when available. This makes sure that |
156 |
## __STDC_VERSION__ is set such that libc includes make them available. |
157 |
AM_CFLAGS="-std=gnu99 -Wall -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -Wextra -Wwrite-strings" |
158 |
|
159 |
|
160 |
|
161 |
1.1 src/patchsets/gcc/4.8.0/gentoo/16_all_libgomp-Werror.patch |
162 |
|
163 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gcc/4.8.0/gentoo/16_all_libgomp-Werror.patch?rev=1.1&view=markup |
164 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gcc/4.8.0/gentoo/16_all_libgomp-Werror.patch?rev=1.1&content-type=text/plain |
165 |
|
166 |
Index: 16_all_libgomp-Werror.patch |
167 |
=================================================================== |
168 |
libgomp does not respect --disable-werror |
169 |
|
170 |
https://bugs.gentoo.org/229059 |
171 |
http://gcc.gnu.org/PR38436 |
172 |
|
173 |
|
174 |
--- a/libgomp/configure |
175 |
+++ b/libgomp/configure |
176 |
@@ -4282,7 +4282,7 @@ save_CFLAGS="$CFLAGS" |
177 |
|
178 |
# Add -Wall -Werror if we are using GCC. |
179 |
if test "x$GCC" = "xyes"; then |
180 |
- XCFLAGS="$XCFLAGS -Wall -Werror" |
181 |
+ XCFLAGS="$XCFLAGS -Wall" |
182 |
fi |
183 |
|
184 |
# Find other programs we need. |
185 |
|
186 |
|
187 |
|
188 |
1.1 src/patchsets/gcc/4.8.0/gentoo/25_all_alpha-mieee-default.patch |
189 |
|
190 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gcc/4.8.0/gentoo/25_all_alpha-mieee-default.patch?rev=1.1&view=markup |
191 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gcc/4.8.0/gentoo/25_all_alpha-mieee-default.patch?rev=1.1&content-type=text/plain |
192 |
|
193 |
Index: 25_all_alpha-mieee-default.patch |
194 |
=================================================================== |
195 |
Set the default behavior on alpha to use -mieee since the large majority of |
196 |
time we want this (bad/weird things can happen with packages built without |
197 |
it). |
198 |
|
199 |
To satisfy those people who may not want -mieee forced on them all the time, |
200 |
we also provide -mno-ieee. |
201 |
|
202 |
Patch by Mike Frysinger <vapier@g.o> |
203 |
|
204 |
--- a/gcc/config/alpha/alpha.h |
205 |
+++ b/gcc/config/alpha/alpha.h |
206 |
@@ -96,6 +96,8 @@ along with GCC; see the file COPYING3. If not see |
207 |
while (0) |
208 |
#endif |
209 |
|
210 |
+#define CPP_SPEC "%{!no-ieee:-mieee}" |
211 |
+ |
212 |
/* Run-time compilation parameters selecting different hardware subsets. */ |
213 |
|
214 |
/* Which processor to schedule for. The cpu attribute defines a list that |
215 |
--- a/gcc/config/alpha/alpha.opt |
216 |
+++ b/gcc/config/alpha/alpha.opt |
217 |
@@ -39,7 +39,7 @@ Target RejectNegative Mask(IEEE_CONFORMANT) |
218 |
Request IEEE-conformant math library routines (OSF/1) |
219 |
|
220 |
mieee |
221 |
-Target Report RejectNegative Mask(IEEE) |
222 |
+Target Report Mask(IEEE) |
223 |
Emit IEEE-conformant code, without inexact exceptions |
224 |
|
225 |
mieee-with-inexact |
226 |
|
227 |
|
228 |
|
229 |
1.1 src/patchsets/gcc/4.8.0/gentoo/26_all_alpha-asm-mcpu.patch |
230 |
|
231 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gcc/4.8.0/gentoo/26_all_alpha-asm-mcpu.patch?rev=1.1&view=markup |
232 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gcc/4.8.0/gentoo/26_all_alpha-asm-mcpu.patch?rev=1.1&content-type=text/plain |
233 |
|
234 |
Index: 26_all_alpha-asm-mcpu.patch |
235 |
=================================================================== |
236 |
https://bugs.gentoo.org/170146 |
237 |
http://gcc.gnu.org/ml/gcc-patches/2009-11/msg00403.html |
238 |
|
239 |
alpha: turn -mcpu=<cpu> into -m<cpu> for assembler all the time |
240 |
|
241 |
--- a/gcc/config/alpha/elf.h |
242 |
+++ b/gcc/config/alpha/elf.h |
243 |
@@ -46,7 +46,7 @@ along with GCC; see the file COPYING3. If not see |
244 |
#define CC1_SPEC "%{G*}" |
245 |
|
246 |
#undef ASM_SPEC |
247 |
-#define ASM_SPEC "%{G*} %{relax:-relax} %{!gstabs*:-no-mdebug}%{gstabs*:-mdebug}" |
248 |
+#define ASM_SPEC "%{G*} %{relax:-relax} %{!gstabs*:-no-mdebug}%{gstabs*:-mdebug} %{mcpu=*:-m%*}" |
249 |
|
250 |
#undef IDENT_ASM_OP |
251 |
#define IDENT_ASM_OP "\t.ident\t" |
252 |
|
253 |
|
254 |
|
255 |
1.1 src/patchsets/gcc/4.8.0/gentoo/29_all_arm_armv4t-default.patch |
256 |
|
257 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gcc/4.8.0/gentoo/29_all_arm_armv4t-default.patch?rev=1.1&view=markup |
258 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gcc/4.8.0/gentoo/29_all_arm_armv4t-default.patch?rev=1.1&content-type=text/plain |
259 |
|
260 |
Index: 29_all_arm_armv4t-default.patch |
261 |
=================================================================== |
262 |
gcc defaults to armv5t for all targets even armv4t |
263 |
|
264 |
http://sourceware.org/ml/crossgcc/2008-05/msg00009.html |
265 |
|
266 |
|
267 |
--- a/gcc/config/arm/linux-eabi.h |
268 |
+++ b/gcc/config/arm/linux-eabi.h |
269 |
@@ -45,7 +45,7 @@ |
270 |
The ARM10TDMI core is the default for armv5t, so set |
271 |
SUBTARGET_CPU_DEFAULT to achieve this. */ |
272 |
#undef SUBTARGET_CPU_DEFAULT |
273 |
-#define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm10tdmi |
274 |
+#define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm9tdmi |
275 |
|
276 |
/* TARGET_BIG_ENDIAN_DEFAULT is set in |
277 |
config.gcc for big endian configurations. */ |
278 |
|
279 |
|
280 |
|
281 |
1.1 src/patchsets/gcc/4.8.0/gentoo/34_all_ia64_note.GNU-stack.patch |
282 |
|
283 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gcc/4.8.0/gentoo/34_all_ia64_note.GNU-stack.patch?rev=1.1&view=markup |
284 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gcc/4.8.0/gentoo/34_all_ia64_note.GNU-stack.patch?rev=1.1&content-type=text/plain |
285 |
|
286 |
Index: 34_all_ia64_note.GNU-stack.patch |
287 |
=================================================================== |
288 |
http://gcc.gnu.org/PR21098 |
289 |
|
290 |
|
291 |
2004-09-20 Jakub Jelinek <jakub@××××××.com> |
292 |
|
293 |
* config/rs6000/ppc-asm.h: Add .note.GNU-stack section also |
294 |
on ppc64-linux. |
295 |
|
296 |
* config/ia64/lib1funcs.asm: Add .note.GNU-stack section on |
297 |
ia64-linux. |
298 |
* config/ia64/crtbegin.asm: Likewise. |
299 |
* config/ia64/crtend.asm: Likewise. |
300 |
* config/ia64/crti.asm: Likewise. |
301 |
* config/ia64/crtn.asm: Likewise. |
302 |
|
303 |
2004-05-14 Jakub Jelinek <jakub@××××××.com> |
304 |
|
305 |
* config/ia64/linux.h (TARGET_ASM_FILE_END): Define. |
306 |
|
307 |
|
308 |
--- a/gcc/config/ia64/linux.h |
309 |
+++ b/gcc/config/ia64/linux.h |
310 |
@@ -24,6 +24,8 @@ a copy of the GCC Runtime Library Exception along with this program; |
311 |
see the files COPYING3 and COPYING.RUNTIME respectively. If not, see |
312 |
<http://www.gnu.org/licenses/>. */ |
313 |
|
314 |
+#define TARGET_ASM_FILE_END file_end_indicate_exec_stack |
315 |
+ |
316 |
/* This is for -profile to use -lc_p instead of -lc. */ |
317 |
#undef CC1_SPEC |
318 |
#define CC1_SPEC "%{profile:-p} %{G*}" |
319 |
--- a/gcc/config/rs6000/ppc-asm.h |
320 |
+++ b/gcc/config/rs6000/ppc-asm.h |
321 |
@@ -352,7 +352,7 @@ GLUE(.L,name): \ |
322 |
#endif |
323 |
#endif |
324 |
|
325 |
-#if defined __linux__ && !defined __powerpc64__ |
326 |
+#if defined __linux__ |
327 |
.section .note.GNU-stack |
328 |
.previous |
329 |
#endif |
330 |
--- a/libgcc/config/ia64/crtbegin.S |
331 |
+++ b/libgcc/config/ia64/crtbegin.S |
332 |
@@ -252,3 +252,7 @@ __do_jv_register_classes: |
333 |
.weak __cxa_finalize |
334 |
#endif |
335 |
.weak _Jv_RegisterClasses |
336 |
+ |
337 |
+#ifdef __linux__ |
338 |
+.section .note.GNU-stack; .previous |
339 |
+#endif |
340 |
--- a/libgcc/config/ia64/crtend.S |
341 |
+++ b/libgcc/config/ia64/crtend.S |
342 |
@@ -119,3 +119,6 @@ __do_global_ctors_aux: |
343 |
|
344 |
br.ret.sptk.many rp |
345 |
.endp __do_global_ctors_aux |
346 |
+#ifdef __linux__ |
347 |
+.section .note.GNU-stack; .previous |
348 |
+#endif |
349 |
--- a/libgcc/config/ia64/crti.S |
350 |
+++ b/libgcc/config/ia64/crti.S |
351 |
@@ -49,5 +49,8 @@ _fini: |
352 |
.save rp, r33 |
353 |
mov r33 = b0 |
354 |
.body |
355 |
+#ifdef __linux__ |
356 |
+.section .note.GNU-stack; .previous |
357 |
+#endif |
358 |
|
359 |
# end of crti.S |
360 |
--- a/libgcc/config/ia64/crtn.S |
361 |
+++ b/libgcc/config/ia64/crtn.S |
362 |
@@ -39,5 +39,8 @@ |
363 |
.restore sp |
364 |
mov r12 = r35 |
365 |
br.ret.sptk.many b0 |
366 |
+#ifdef __linux__ |
367 |
+.section .note.GNU-stack; .previous |
368 |
+#endif |
369 |
|
370 |
# end of crtn.S |
371 |
--- a/libgcc/config/ia64/lib1funcs.S |
372 |
+++ b/libgcc/config/ia64/lib1funcs.S |
373 |
@@ -793,3 +793,6 @@ __floattitf: |
374 |
.endp __floattitf |
375 |
#endif |
376 |
#endif |
377 |
+#ifdef __linux__ |
378 |
+.section .note.GNU-stack; .previous |
379 |
+#endif |
380 |
|
381 |
|
382 |
|
383 |
1.1 src/patchsets/gcc/4.8.0/gentoo/38_all_sh_pr24836_all-archs.patch |
384 |
|
385 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gcc/4.8.0/gentoo/38_all_sh_pr24836_all-archs.patch?rev=1.1&view=markup |
386 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gcc/4.8.0/gentoo/38_all_sh_pr24836_all-archs.patch?rev=1.1&content-type=text/plain |
387 |
|
388 |
Index: 38_all_sh_pr24836_all-archs.patch |
389 |
=================================================================== |
390 |
gcc/configure doesn't handle all possible SH architectures |
391 |
|
392 |
http://gcc.gnu.org/PR24836 |
393 |
|
394 |
|
395 |
--- a/gcc/configure |
396 |
+++ b/gcc/configure |
397 |
@@ -22753,7 +22753,7 @@ foo: .long 25 |
398 |
tls_first_minor=14 |
399 |
tls_as_opt="-m64 -Aesame --fatal-warnings" |
400 |
;; |
401 |
- sh-*-* | sh[34]-*-*) |
402 |
+ sh-*-* | sh[34]*-*-*) |
403 |
conftest_s=' |
404 |
.section ".tdata","awT",@progbits |
405 |
foo: .long 25 |
406 |
--- a/gcc/configure.ac |
407 |
+++ b/gcc/configure.ac |
408 |
@@ -2924,7 +2924,7 @@ foo: .long 25 |
409 |
tls_first_minor=14 |
410 |
tls_as_opt="-m64 -Aesame --fatal-warnings" |
411 |
;; |
412 |
- sh-*-* | sh[34]-*-*) |
413 |
+ sh-*-* | sh[34]*-*-*) |
414 |
conftest_s=' |
415 |
.section ".tdata","awT",@progbits |
416 |
foo: .long 25 |
417 |
|
418 |
|
419 |
|
420 |
1.1 src/patchsets/gcc/4.8.0/gentoo/42_all_superh_default-multilib.patch |
421 |
|
422 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gcc/4.8.0/gentoo/42_all_superh_default-multilib.patch?rev=1.1&view=markup |
423 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gcc/4.8.0/gentoo/42_all_superh_default-multilib.patch?rev=1.1&content-type=text/plain |
424 |
|
425 |
Index: 42_all_superh_default-multilib.patch |
426 |
=================================================================== |
427 |
The gcc-3.x toolchains would contain all the targets by default. With gcc-4, |
428 |
you have to actually list out the multilibs you want or you will end up with |
429 |
just one when using targets like 'sh4-linux-gnu'. |
430 |
|
431 |
The resulting toolchain can't even build a kernel as the kernel needs to build |
432 |
with the nofpu flag to be sure that no fpu ops are generated. |
433 |
|
434 |
Here we restore the gcc-3.x behavior; the additional overhead of building all |
435 |
of these multilibs by default is negligible. |
436 |
|
437 |
https://bugs.gentoo.org/140205 |
438 |
https://bugs.gentoo.org/320251 |
439 |
|
440 |
--- a/gcc/config.gcc |
441 |
+++ b/gcc/config.gcc |
442 |
@@ -2455,7 +2455,7 @@ sh-*-symbianelf* | sh[12346l]*-*-symbianelf* | \ |
443 |
if test "$sh_multilibs" = "default" ; then |
444 |
case ${target} in |
445 |
sh64-superh-linux* | \ |
446 |
- sh[1234]*) sh_multilibs=${sh_cpu_target} ;; |
447 |
+ 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') ;; |
448 |
sh64* | sh5*) sh_multilibs=m5-32media,m5-32media-nofpu,m5-compact,m5-compact-nofpu,m5-64media,m5-64media-nofpu ;; |
449 |
sh-superh-*) sh_multilibs=m4,m4-single,m4-single-only,m4-nofpu ;; |
450 |
sh*-*-linux*) sh_multilibs=m1,m3e,m4 ;; |
451 |
|
452 |
|
453 |
|
454 |
1.1 src/patchsets/gcc/4.8.0/gentoo/48_all_x86_pr53113_libitm-avx.patch |
455 |
|
456 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gcc/4.8.0/gentoo/48_all_x86_pr53113_libitm-avx.patch?rev=1.1&view=markup |
457 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gcc/4.8.0/gentoo/48_all_x86_pr53113_libitm-avx.patch?rev=1.1&content-type=text/plain |
458 |
|
459 |
Index: 48_all_x86_pr53113_libitm-avx.patch |
460 |
=================================================================== |
461 |
libitm checks for AVX support in the assembler and adds -mavx to x86_avx.cc |
462 |
which defines the needed typedefs. User CFLAGS can override -mavx however, |
463 |
so also use the fallback typedef if __AVX__ isn't defined. |
464 |
|
465 |
https://bugs.gentoo.org/417271 |
466 |
http://gcc.gnu.org/PR53113 |
467 |
|
468 |
|
469 |
--- a/libitm/config/x86/x86_avx.cc |
470 |
+++ b/libitm/config/x86/x86_avx.cc |
471 |
@@ -29,7 +29,7 @@ |
472 |
|
473 |
extern "C" { |
474 |
|
475 |
-#ifndef HAVE_AS_AVX |
476 |
+#if !defined (HAVE_AS_AVX) || !defined(__AVX__) |
477 |
// If we don't have an AVX capable assembler, we didn't set -mavx on the |
478 |
// command-line either, which means that libitm.h defined neither this type |
479 |
// nor the functions in this file. Define the type and unconditionally |
480 |
@@ -40,7 +40,7 @@ typedef float _ITM_TYPE_M256 __attribute__((vector_size(32), may_alias)); |
481 |
// Re-define the memcpy implementations so that we can frob the |
482 |
// interface to deal with possibly missing AVX instruction set support. |
483 |
|
484 |
-#ifdef HAVE_AS_AVX |
485 |
+#if defined(HAVE_AS_AVX) && defined(__AVX__) |
486 |
#define RETURN(X) return X |
487 |
#define STORE(X,Y) X = Y |
488 |
#define OUTPUT(T) _ITM_TYPE_##T |
489 |
|
490 |
|
491 |
|
492 |
1.1 src/patchsets/gcc/4.8.0/gentoo/50_all_libiberty-asprintf.patch |
493 |
|
494 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gcc/4.8.0/gentoo/50_all_libiberty-asprintf.patch?rev=1.1&view=markup |
495 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gcc/4.8.0/gentoo/50_all_libiberty-asprintf.patch?rev=1.1&content-type=text/plain |
496 |
|
497 |
Index: 50_all_libiberty-asprintf.patch |
498 |
=================================================================== |
499 |
2008-07-25 Magnus Granberg <zorry@×××.nu> |
500 |
|
501 |
* include/libiberty.h (asprintf): Don't declare if defined as a macro |
502 |
|
503 |
--- a/include/libiberty.h |
504 |
+++ b/include/libiberty.h |
505 |
@@ -609,8 +609,11 @@ extern int pwait (int, int *, int); |
506 |
/* Like sprintf but provides a pointer to malloc'd storage, which must |
507 |
be freed by the caller. */ |
508 |
|
509 |
+/* asprintf may be declared as a macro by glibc with __USE_FORTIFY_LEVEL. */ |
510 |
+#ifndef asprintf |
511 |
extern int asprintf (char **, const char *, ...) ATTRIBUTE_PRINTF_2; |
512 |
#endif |
513 |
+#endif |
514 |
|
515 |
#if !HAVE_DECL_VASPRINTF |
516 |
/* Like vsprintf but provides a pointer to malloc'd storage, which |
517 |
|
518 |
|
519 |
|
520 |
1.1 src/patchsets/gcc/4.8.0/gentoo/51_all_libiberty-pic.patch |
521 |
|
522 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gcc/4.8.0/gentoo/51_all_libiberty-pic.patch?rev=1.1&view=markup |
523 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gcc/4.8.0/gentoo/51_all_libiberty-pic.patch?rev=1.1&content-type=text/plain |
524 |
|
525 |
Index: 51_all_libiberty-pic.patch |
526 |
=================================================================== |
527 |
--- a/libiberty/Makefile.in |
528 |
+++ b/libiberty/Makefile.in |
529 |
@@ -246,6 +246,7 @@ $(TARGETLIB): $(REQUIRED_OFILES) $(EXTRA_OFILES) $(LIBOBJS) |
530 |
$(AR) $(AR_FLAGS) $(TARGETLIB) \ |
531 |
$(REQUIRED_OFILES) $(EXTRA_OFILES) $(LIBOBJS); \ |
532 |
$(RANLIB) $(TARGETLIB); \ |
533 |
+ cp $(TARGETLIB) ../ ; \ |
534 |
cd ..; \ |
535 |
else true; fi |
536 |
|
537 |
|
538 |
|
539 |
|
540 |
1.1 src/patchsets/gcc/4.8.0/gentoo/52_all_netbsd-Bsymbolic.patch |
541 |
|
542 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gcc/4.8.0/gentoo/52_all_netbsd-Bsymbolic.patch?rev=1.1&view=markup |
543 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gcc/4.8.0/gentoo/52_all_netbsd-Bsymbolic.patch?rev=1.1&content-type=text/plain |
544 |
|
545 |
Index: 52_all_netbsd-Bsymbolic.patch |
546 |
=================================================================== |
547 |
https://bugs.gentoo.org/122698 |
548 |
|
549 |
--- a/gcc/config/netbsd-elf.h |
550 |
+++ b/gcc/config/netbsd-elf.h |
551 |
@@ -70,6 +70,7 @@ along with GCC; see the file COPYING3. If not see |
552 |
#define NETBSD_LINK_SPEC_ELF \ |
553 |
"%{assert*} %{R*} %{rpath*} \ |
554 |
%{shared:-shared} \ |
555 |
+ %{symbolic:-Bsymbolic} \ |
556 |
%{!shared: \ |
557 |
-dc -dp \ |
558 |
%{!nostdlib: \ |
559 |
|
560 |
|
561 |
|
562 |
1.1 src/patchsets/gcc/4.8.0/gentoo/67_all_gcc-poison-system-directories.patch |
563 |
|
564 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gcc/4.8.0/gentoo/67_all_gcc-poison-system-directories.patch?rev=1.1&view=markup |
565 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gcc/4.8.0/gentoo/67_all_gcc-poison-system-directories.patch?rev=1.1&content-type=text/plain |
566 |
|
567 |
Index: 67_all_gcc-poison-system-directories.patch |
568 |
=================================================================== |
569 |
grabbed from openembedded |
570 |
|
571 |
Upstream-Status: Inappropriate [distribution: codesourcery] |
572 |
|
573 |
gcc/ |
574 |
2008-07-02 Joseph Myers <joseph@××××××××××××.com> |
575 |
* c-incpath.c: Include toplev.h. |
576 |
(merge_include_chains): Use warning instead of cpp_error for |
577 |
system directory poisoning diagnostic. |
578 |
* Makefile.in (c-incpath.o): Depend on toplev.h. |
579 |
* gcc.c (LINK_COMMAND_SPEC): Pass |
580 |
--error-poison-system-directories if |
581 |
-Werror=poison-system-directories. |
582 |
|
583 |
2007-06-13 Joseph Myers <joseph@××××××××××××.com> |
584 |
* common.opt (--Wno-poison-system-directories): New. |
585 |
* doc/invoke.texi (-Wno-poison-system-directories): Document. |
586 |
* c-incpath.c: Include flags.h. |
587 |
(merge_include_chains): Check flag_poison_system_directories. |
588 |
* gcc.c (LINK_COMMAND_SPEC): Pass --no-poison-system-directories |
589 |
to linker if -Wno-poison-system-directories. |
590 |
* Makefile.in (c-incpath.o): Depend on $(FLAGS_H). |
591 |
|
592 |
2007-03-20 Daniel Jacobowitz <dan@××××××××××××.com> |
593 |
Joseph Myers <joseph@××××××××××××.com> |
594 |
* configure.ac (--enable-poison-system-directories): New option. |
595 |
* configure, config.in: Regenerate. |
596 |
* c-incpath.c (merge_include_chains): If |
597 |
ENABLE_POISON_SYSTEM_DIRECTORIES defined, warn for use of |
598 |
/usr/include, /usr/local/include or /usr/X11R6/include. |
599 |
|
600 |
|
601 |
--- a/gcc/Makefile.in |
602 |
+++ b/gcc/Makefile.in |
603 |
@@ -2018,7 +2018,7 @@ attribs.o : attribs.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TREE_H) \ |
604 |
|
605 |
incpath.o: incpath.c incpath.h $(CONFIG_H) $(SYSTEM_H) $(CPPLIB_H) \ |
606 |
intl.h prefix.h coretypes.h $(TM_H) cppdefault.h $(TARGET_H) \ |
607 |
- $(MACHMODE_H) |
608 |
+ $(MACHMODE_H) $(FLAGS_H) toplev.h |
609 |
|
610 |
CFLAGS-prefix.o += -DPREFIX=\"$(prefix)\" -DBASEVER=$(BASEVER_s) |
611 |
prefix.o: prefix.c $(CONFIG_H) $(SYSTEM_H) coretypes.h prefix.h \ |
612 |
--- a/gcc/common.opt |
613 |
+++ b/gcc/common.opt |
614 |
@@ -595,6 +595,10 @@ Wpedantic |
615 |
Common Var(pedantic) Warning |
616 |
Issue warnings needed for strict compliance to the standard |
617 |
|
618 |
+Wpoison-system-directories |
619 |
+Common Var(flag_poison_system_directories) Init(1) Warning |
620 |
+Warn for -I and -L options using system directories if cross compiling |
621 |
+ |
622 |
Wshadow |
623 |
Common Var(warn_shadow) Warning |
624 |
Warn when one local variable shadows another |
625 |
--- a/gcc/config.in |
626 |
+++ b/gcc/config.in |
627 |
@@ -138,6 +138,12 @@ |
628 |
#endif |
629 |
|
630 |
|
631 |
+/* Define to warn for use of native system header directories */ |
632 |
+#ifndef USED_FOR_TARGET |
633 |
+#undef ENABLE_POISON_SYSTEM_DIRECTORIES |
634 |
+#endif |
635 |
+ |
636 |
+ |
637 |
/* Define if you want all operations on RTL (the basic data structure of the |
638 |
optimizer and back end) to be checked for dynamic type safety at runtime. |
639 |
This is quite expensive. */ |
640 |
--- a/gcc/configure |
641 |
+++ b/gcc/configure |
642 |
@@ -917,6 +917,7 @@ with_gc |
643 |
with_system_zlib |
644 |
enable_maintainer_mode |
645 |
enable_version_specific_runtime_libs |
646 |
+enable_poison_system_directories |
647 |
enable_plugin |
648 |
enable_libquadmath_support |
649 |
with_linker_hash_style |
650 |
@@ -1630,6 +1631,8 @@ Optional Features: |
651 |
--enable-version-specific-runtime-libs |
652 |
specify that runtime libraries should be installed |
653 |
in a compiler-specific directory |
654 |
+ --enable-poison-system-directories |
655 |
+ warn for use of native system header directories |
656 |
--enable-plugin enable plugin support |
657 |
--disable-libquadmath-support |
658 |
disable libquadmath support for Fortran |
659 |
@@ -27103,6 +27106,19 @@ if test "${enable_version_specific_runtime_libs+set}" = set; then : |
660 |
fi |
661 |
|
662 |
|
663 |
+# Check whether --enable-poison-system-directories was given. |
664 |
+if test "${enable_poison_system_directories+set}" = set; then : |
665 |
+ enableval=$enable_poison_system_directories; |
666 |
+else |
667 |
+ enable_poison_system_directories=no |
668 |
+fi |
669 |
+ |
670 |
+if test "x${enable_poison_system_directories}" = "xyes"; then |
671 |
+ |
672 |
+$as_echo "#define ENABLE_POISON_SYSTEM_DIRECTORIES 1" >>confdefs.h |
673 |
+ |
674 |
+fi |
675 |
+ |
676 |
# Substitute configuration variables |
677 |
|
678 |
|
679 |
--- a/gcc/configure.ac |
680 |
+++ b/gcc/configure.ac |
681 |
@@ -5063,6 +5063,16 @@ AC_ARG_ENABLE(version-specific-runtime-libs, |
682 |
[specify that runtime libraries should be |
683 |
installed in a compiler-specific directory])]) |
684 |
|
685 |
+AC_ARG_ENABLE([poison-system-directories], |
686 |
+ AS_HELP_STRING([--enable-poison-system-directories], |
687 |
+ [warn for use of native system header directories]),, |
688 |
+ [enable_poison_system_directories=no]) |
689 |
+if test "x${enable_poison_system_directories}" = "xyes"; then |
690 |
+ AC_DEFINE([ENABLE_POISON_SYSTEM_DIRECTORIES], |
691 |
+ [1], |
692 |
+ [Define to warn for use of native system header directories]) |
693 |
+fi |
694 |
+ |
695 |
# Substitute configuration variables |
696 |
AC_SUBST(subdirs) |
697 |
AC_SUBST(srcdir) |
698 |
--- a/gcc/doc/invoke.texi |
699 |
+++ b/gcc/doc/invoke.texi |
700 |
@@ -258,6 +258,7 @@ Objective-C and Objective-C++ Dialects}. |
701 |
-Woverlength-strings -Wpacked -Wpacked-bitfield-compat -Wpadded @gol |
702 |
-Wparentheses -Wpedantic-ms-format -Wno-pedantic-ms-format @gol |
703 |
-Wpointer-arith -Wno-pointer-to-int-cast @gol |
704 |
+-Wno-poison-system-directories @gol |
705 |
-Wredundant-decls -Wno-return-local-addr @gol |
706 |
-Wreturn-type -Wsequence-point -Wshadow @gol |
707 |
-Wsign-compare -Wsign-conversion -Wsizeof-pointer-memaccess @gol |
708 |
@@ -4023,6 +4024,14 @@ should check to see whether the two values have ranges that overlap; and |
709 |
this is done with the relational operators, so equality comparisons are |
710 |
probably mistaken. |
711 |
|
712 |
+@item -Wno-poison-system-directories |
713 |
+@opindex Wno-poison-system-directories |
714 |
+Do not warn for @option{-I} or @option{-L} options using system |
715 |
+directories such as @file{/usr/include} when cross compiling. This |
716 |
+option is intended for use in chroot environments when such |
717 |
+directories contain the correct headers and libraries for the target |
718 |
+system rather than the host. |
719 |
+ |
720 |
@item -Wtraditional @r{(C and Objective-C only)} |
721 |
@opindex Wtraditional |
722 |
@opindex Wno-traditional |
723 |
--- a/gcc/gcc.c |
724 |
+++ b/gcc/gcc.c |
725 |
@@ -740,6 +740,8 @@ proper position among the other output files. */ |
726 |
"%{fuse-ld=*:-fuse-ld=%*}\ |
727 |
%X %{o*} %{e*} %{N} %{n} %{r}\ |
728 |
%{s} %{t} %{u*} %{z} %{Z} %{!nostdlib:%{!nostartfiles:%S}}\ |
729 |
+ %{Wno-poison-system-directories:--no-poison-system-directories}\ |
730 |
+ %{Werror=poison-system-directories:--error-poison-system-directories}\ |
731 |
%{static:} %{L*} %(mfwrap) %(link_libgcc) " SANITIZER_EARLY_SPEC " %o\ |
732 |
%{fopenmp|ftree-parallelize-loops=*:%:include(libgomp.spec)%(link_gomp)}\ |
733 |
%{fgnu-tm:%:include(libitm.spec)%(link_itm)}\ |
734 |
--- a/gcc/incpath.c |
735 |
+++ b/gcc/incpath.c |
736 |
@@ -382,6 +382,25 @@ merge_include_chains (const char *sysroot, cpp_reader *pfile, int verbose) |
737 |
} |
738 |
fprintf (stderr, _("End of search list.\n")); |
739 |
} |
740 |
+#ifdef ENABLE_POISON_SYSTEM_DIRECTORIES |
741 |
+ if (flag_poison_system_directories) |
742 |
+ { |
743 |
+ struct cpp_dir *p; |
744 |
+ |
745 |
+ for (p = heads[QUOTE]; p; p = p->next) |
746 |
+ { |
747 |
+ if ((!strncmp (p->name, "/usr/include", 12)) |
748 |
+ || (!strncmp (p->name, "/usr/local/include", 18)) |
749 |
+ || (!strncmp (p->name, "/usr/X11R6/include", 18)) |
750 |
+ || (!strncmp (p->name, "/sw/include", 11)) |
751 |
+ || (!strncmp (p->name, "/opt/include", 12))) |
752 |
+ warning (OPT_Wpoison_system_directories, |
753 |
+ "include location \"%s\" is unsafe for " |
754 |
+ "cross-compilation", |
755 |
+ p->name); |
756 |
+ } |
757 |
+ } |
758 |
+#endif |
759 |
} |
760 |
|
761 |
/* Use given -I paths for #include "..." but not #include <...>, and |
762 |
|
763 |
|
764 |
|
765 |
1.1 src/patchsets/gcc/4.8.0/gentoo/74_all_gcc48_cloog-dl.patch |
766 |
|
767 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gcc/4.8.0/gentoo/74_all_gcc48_cloog-dl.patch?rev=1.1&view=markup |
768 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gcc/4.8.0/gentoo/74_all_gcc48_cloog-dl.patch?rev=1.1&content-type=text/plain |
769 |
|
770 |
Index: 74_all_gcc48_cloog-dl.patch |
771 |
=================================================================== |
772 |
dlopen cloog-isl library rather than link to it directly. This prevents |
773 |
cloog upgrades that change the soname from breaking the compiler. |
774 |
|
775 |
http://pkgs.fedoraproject.org/cgit/gcc.git/tree/gcc48-cloog-dl.patch |
776 |
|
777 |
|
778 |
In FreeBSD dlopen is part of libc so we can't just hardcode -ldl. |
779 |
|
780 |
2013-03-30 Ryan Hill <dirtyepic@g.o> |
781 |
|
782 |
* configure.ac (DL_LIB): Check how to dlopen. |
783 |
* configure: Regenerate. |
784 |
* Makefile.in (BACKENDLIBS): Use DL_LIB. |
785 |
|
786 |
|
787 |
--- a/gcc/Makefile.in |
788 |
+++ b/gcc/Makefile.in |
789 |
@@ -1020,7 +1020,7 @@ BUILD_LIBDEPS= $(BUILD_LIBIBERTY) |
790 |
# and the system's installed libraries. |
791 |
LIBS = @LIBS@ libcommon.a $(CPPLIB) $(LIBINTL) $(LIBICONV) $(LIBBACKTRACE) \ |
792 |
$(LIBIBERTY) $(LIBDECNUMBER) $(HOST_LIBS) |
793 |
-BACKENDLIBS = $(CLOOGLIBS) $(GMPLIBS) $(PLUGINLIBS) $(HOST_LIBS) \ |
794 |
+BACKENDLIBS = $(if $(CLOOGLIBS),@DL_LIB@) $(GMPLIBS) $(PLUGINLIBS) $(HOST_LIBS) \ |
795 |
$(ZLIB) |
796 |
# Any system libraries needed just for GNAT. |
797 |
SYSLIBS = @GNAT_LIBEXC@ |
798 |
@@ -3443,6 +3443,15 @@ $(common_out_object_file): $(common_out_file) $(CONFIG_H) $(SYSTEM_H) \ |
799 |
$(DIAGNOSTIC_CORE_H) $(FLAGS_H) $(OPTS_H) $(TM_H) $(TM_P_H) $(MACHMODE_H) |
800 |
$(COMPILER) -c $(ALL_COMPILERFLAGS) $(ALL_CPPFLAGS) \ |
801 |
$< $(OUTPUT_OPTION) |
802 |
+ |
803 |
+graphite%.o : \ |
804 |
+ ALL_CFLAGS := -O $(filter-out -fkeep-inline-functions, $(ALL_CFLAGS)) |
805 |
+graphite.o : \ |
806 |
+ ALL_CFLAGS := -O $(filter-out -fkeep-inline-functions, $(ALL_CFLAGS)) |
807 |
+graphite%.o : \ |
808 |
+ ALL_CXXFLAGS := -O $(filter-out -fkeep-inline-functions, $(ALL_CXXFLAGS)) |
809 |
+graphite.o : \ |
810 |
+ ALL_CXXFLAGS := -O $(filter-out -fkeep-inline-functions, $(ALL_CXXFLAGS)) |
811 |
# |
812 |
# Generate header and source files from the machine description, |
813 |
# and compile them. |
814 |
--- a/gcc/configure |
815 |
+++ b/gcc/configure |
816 |
@@ -602,6 +602,7 @@ ac_subst_vars='LTLIBOBJS |
817 |
LIBOBJS |
818 |
enable_plugin |
819 |
pluginlibs |
820 |
+DL_LIB |
821 |
CLOOGINC |
822 |
CLOOGLIBS |
823 |
ISLINC |
824 |
@@ -27263,6 +27264,7 @@ $as_echo "unable to check" >&6; } |
825 |
fi |
826 |
|
827 |
# Check -ldl |
828 |
+ DL_LIB= |
829 |
saved_LIBS="$LIBS" |
830 |
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5 |
831 |
$as_echo_n "checking for library containing dlopen... " >&6; } |
832 |
@@ -27322,9 +27324,11 @@ fi |
833 |
|
834 |
if test x"$ac_cv_search_dlopen" = x"-ldl"; then |
835 |
pluginlibs="$pluginlibs -ldl" |
836 |
+ DL_LIB=$ac_cv_search_dlopen |
837 |
fi |
838 |
LIBS="$saved_LIBS" |
839 |
|
840 |
+ |
841 |
# Check that we can build shared objects with -fPIC -shared |
842 |
saved_LDFLAGS="$LDFLAGS" |
843 |
saved_CFLAGS="$CFLAGS" |
844 |
--- a/gcc/configure.ac |
845 |
+++ b/gcc/configure.ac |
846 |
@@ -5212,12 +5212,15 @@ if test x"$enable_plugin" = x"yes"; then |
847 |
fi |
848 |
|
849 |
# Check -ldl |
850 |
+ DL_LIB= |
851 |
saved_LIBS="$LIBS" |
852 |
AC_SEARCH_LIBS([dlopen], [dl]) |
853 |
if test x"$ac_cv_search_dlopen" = x"-ldl"; then |
854 |
pluginlibs="$pluginlibs -ldl" |
855 |
+ DL_LIB=$ac_cv_search_dlopen |
856 |
fi |
857 |
LIBS="$saved_LIBS" |
858 |
+ AC_SUBST(DL_LIB) |
859 |
|
860 |
# Check that we can build shared objects with -fPIC -shared |
861 |
saved_LDFLAGS="$LDFLAGS" |
862 |
--- a/gcc/graphite-clast-to-gimple.c |
863 |
+++ b/gcc/graphite-clast-to-gimple.c |
864 |
@@ -910,7 +910,7 @@ compute_bounds_for_loop (struct clast_for *loop, mpz_t low, mpz_t up) |
865 |
from STMT_FOR. */ |
866 |
|
867 |
static tree |
868 |
-type_for_clast_for (struct clast_for *stmt_for, ivs_params_p ip) |
869 |
+type_for_clast_for (struct clast_for *stmt_fora, ivs_params_p ip) |
870 |
{ |
871 |
mpz_t bound_one, bound_two; |
872 |
tree lb_type, ub_type; |
873 |
@@ -918,8 +918,8 @@ type_for_clast_for (struct clast_for *stmt_for, ivs_params_p ip) |
874 |
mpz_init (bound_one); |
875 |
mpz_init (bound_two); |
876 |
|
877 |
- lb_type = type_for_clast_expr (stmt_for->LB, ip, bound_one, bound_two); |
878 |
- ub_type = type_for_clast_expr (stmt_for->UB, ip, bound_one, bound_two); |
879 |
+ lb_type = type_for_clast_expr (stmt_fora->LB, ip, bound_one, bound_two); |
880 |
+ ub_type = type_for_clast_expr (stmt_fora->UB, ip, bound_one, bound_two); |
881 |
|
882 |
mpz_clear (bound_one); |
883 |
mpz_clear (bound_two); |
884 |
--- a/gcc/graphite-poly.h |
885 |
+++ b/gcc/graphite-poly.h |
886 |
@@ -22,6 +22,369 @@ along with GCC; see the file COPYING3. If not see |
887 |
#ifndef GCC_GRAPHITE_POLY_H |
888 |
#define GCC_GRAPHITE_POLY_H |
889 |
|
890 |
+#include <isl/aff.h> |
891 |
+#include <isl/schedule.h> |
892 |
+#include <isl/ilp.h> |
893 |
+#include <isl/flow.h> |
894 |
+#include <isl/options.h> |
895 |
+#include <cloog/isl/cloog.h> |
896 |
+#include <dlfcn.h> |
897 |
+#define DYNSYMS \ |
898 |
+ DYNSYM (clast_pprint); \ |
899 |
+ DYNSYM (cloog_clast_create_from_input); \ |
900 |
+ DYNSYM (cloog_clast_free); \ |
901 |
+ DYNSYM (cloog_domain_from_isl_set); \ |
902 |
+ DYNSYM (cloog_input_alloc); \ |
903 |
+ DYNSYM (cloog_isl_state_malloc); \ |
904 |
+ DYNSYM (cloog_options_free); \ |
905 |
+ DYNSYM (cloog_options_malloc); \ |
906 |
+ DYNSYM (cloog_scattering_from_isl_map); \ |
907 |
+ DYNSYM (cloog_state_free); \ |
908 |
+ DYNSYM (cloog_union_domain_add_domain); \ |
909 |
+ DYNSYM (cloog_union_domain_alloc); \ |
910 |
+ DYNSYM (cloog_union_domain_set_name); \ |
911 |
+ DYNSYM (isl_aff_add_coefficient_si); \ |
912 |
+ DYNSYM (isl_aff_add_constant); \ |
913 |
+ DYNSYM (isl_aff_free); \ |
914 |
+ DYNSYM (isl_aff_get_coefficient); \ |
915 |
+ DYNSYM (isl_aff_get_space); \ |
916 |
+ DYNSYM (isl_aff_mod); \ |
917 |
+ DYNSYM (isl_aff_set_coefficient_si); \ |
918 |
+ DYNSYM (isl_aff_set_constant_si); \ |
919 |
+ DYNSYM (isl_aff_zero_on_domain); \ |
920 |
+ DYNSYM (isl_band_free); \ |
921 |
+ DYNSYM (isl_band_get_children); \ |
922 |
+ DYNSYM (isl_band_get_partial_schedule); \ |
923 |
+ DYNSYM (isl_band_has_children); \ |
924 |
+ DYNSYM (isl_band_list_free); \ |
925 |
+ DYNSYM (isl_band_list_get_band); \ |
926 |
+ DYNSYM (isl_band_list_get_ctx); \ |
927 |
+ DYNSYM (isl_band_list_n_band); \ |
928 |
+ DYNSYM (isl_band_member_is_zero_distance); \ |
929 |
+ DYNSYM (isl_band_n_member); \ |
930 |
+ DYNSYM (isl_basic_map_add_constraint); \ |
931 |
+ DYNSYM (isl_basic_map_project_out); \ |
932 |
+ DYNSYM (isl_basic_map_universe); \ |
933 |
+ DYNSYM (isl_constraint_set_coefficient); \ |
934 |
+ DYNSYM (isl_constraint_set_coefficient_si); \ |
935 |
+ DYNSYM (isl_constraint_set_constant); \ |
936 |
+ DYNSYM (isl_constraint_set_constant_si); \ |
937 |
+ DYNSYM (isl_ctx_alloc); \ |
938 |
+ DYNSYM (isl_ctx_free); \ |
939 |
+ DYNSYM (isl_equality_alloc); \ |
940 |
+ DYNSYM (isl_id_alloc); \ |
941 |
+ DYNSYM (isl_id_copy); \ |
942 |
+ DYNSYM (isl_id_free); \ |
943 |
+ DYNSYM (isl_inequality_alloc); \ |
944 |
+ DYNSYM (isl_local_space_copy); \ |
945 |
+ DYNSYM (isl_local_space_free); \ |
946 |
+ DYNSYM (isl_local_space_from_space); \ |
947 |
+ DYNSYM (isl_local_space_range); \ |
948 |
+ DYNSYM (isl_map_add_constraint); \ |
949 |
+ DYNSYM (isl_map_add_dims); \ |
950 |
+ DYNSYM (isl_map_align_params); \ |
951 |
+ DYNSYM (isl_map_apply_range); \ |
952 |
+ DYNSYM (isl_map_copy); \ |
953 |
+ DYNSYM (isl_map_dim); \ |
954 |
+ DYNSYM (isl_map_dump); \ |
955 |
+ DYNSYM (isl_map_equate); \ |
956 |
+ DYNSYM (isl_map_fix_si); \ |
957 |
+ DYNSYM (isl_map_flat_product); \ |
958 |
+ DYNSYM (isl_map_flat_range_product); \ |
959 |
+ DYNSYM (isl_map_free); \ |
960 |
+ DYNSYM (isl_map_from_basic_map); \ |
961 |
+ DYNSYM (isl_map_from_pw_aff); \ |
962 |
+ DYNSYM (isl_map_from_union_map); \ |
963 |
+ DYNSYM (isl_map_get_ctx); \ |
964 |
+ DYNSYM (isl_map_get_space); \ |
965 |
+ DYNSYM (isl_map_get_tuple_id); \ |
966 |
+ DYNSYM (isl_map_insert_dims); \ |
967 |
+ DYNSYM (isl_map_intersect); \ |
968 |
+ DYNSYM (isl_map_intersect_domain); \ |
969 |
+ DYNSYM (isl_map_intersect_range); \ |
970 |
+ DYNSYM (isl_map_is_empty); \ |
971 |
+ DYNSYM (isl_map_lex_ge); \ |
972 |
+ DYNSYM (isl_map_lex_le); \ |
973 |
+ DYNSYM (isl_map_n_out); \ |
974 |
+ DYNSYM (isl_map_range); \ |
975 |
+ DYNSYM (isl_map_set_tuple_id); \ |
976 |
+ DYNSYM (isl_map_universe); \ |
977 |
+ DYNSYM (isl_options_set_on_error); \ |
978 |
+ DYNSYM (isl_options_set_schedule_fuse); \ |
979 |
+ DYNSYM (isl_options_set_schedule_max_constant_term); \ |
980 |
+ DYNSYM (isl_options_set_schedule_maximize_band_depth); \ |
981 |
+ DYNSYM (isl_printer_free); \ |
982 |
+ DYNSYM (isl_printer_print_aff); \ |
983 |
+ DYNSYM (isl_printer_print_constraint); \ |
984 |
+ DYNSYM (isl_printer_print_map); \ |
985 |
+ DYNSYM (isl_printer_print_set); \ |
986 |
+ DYNSYM (isl_printer_to_file); \ |
987 |
+ DYNSYM (isl_pw_aff_add); \ |
988 |
+ DYNSYM (isl_pw_aff_alloc); \ |
989 |
+ DYNSYM (isl_pw_aff_copy); \ |
990 |
+ DYNSYM (isl_pw_aff_eq_set); \ |
991 |
+ DYNSYM (isl_pw_aff_free); \ |
992 |
+ DYNSYM (isl_pw_aff_from_aff); \ |
993 |
+ DYNSYM (isl_pw_aff_ge_set); \ |
994 |
+ DYNSYM (isl_pw_aff_gt_set); \ |
995 |
+ DYNSYM (isl_pw_aff_is_cst); \ |
996 |
+ DYNSYM (isl_pw_aff_le_set); \ |
997 |
+ DYNSYM (isl_pw_aff_lt_set); \ |
998 |
+ DYNSYM (isl_pw_aff_mod); \ |
999 |
+ DYNSYM (isl_pw_aff_mul); \ |
1000 |
+ DYNSYM (isl_pw_aff_ne_set); \ |
1001 |
+ DYNSYM (isl_pw_aff_nonneg_set); \ |
1002 |
+ DYNSYM (isl_pw_aff_set_tuple_id); \ |
1003 |
+ DYNSYM (isl_pw_aff_sub); \ |
1004 |
+ DYNSYM (isl_pw_aff_zero_set); \ |
1005 |
+ DYNSYM (isl_schedule_free); \ |
1006 |
+ DYNSYM (isl_schedule_get_band_forest); \ |
1007 |
+ DYNSYM (isl_set_add_constraint); \ |
1008 |
+ DYNSYM (isl_set_add_dims); \ |
1009 |
+ DYNSYM (isl_set_apply); \ |
1010 |
+ DYNSYM (isl_set_coalesce); \ |
1011 |
+ DYNSYM (isl_set_copy); \ |
1012 |
+ DYNSYM (isl_set_dim); \ |
1013 |
+ DYNSYM (isl_set_fix_si); \ |
1014 |
+ DYNSYM (isl_set_free); \ |
1015 |
+ DYNSYM (isl_set_from_cloog_domain); \ |
1016 |
+ DYNSYM (isl_set_get_space); \ |
1017 |
+ DYNSYM (isl_set_get_tuple_id); \ |
1018 |
+ DYNSYM (isl_set_intersect); \ |
1019 |
+ DYNSYM (isl_set_is_empty); \ |
1020 |
+ DYNSYM (isl_set_max); \ |
1021 |
+ DYNSYM (isl_set_min); \ |
1022 |
+ DYNSYM (isl_set_nat_universe); \ |
1023 |
+ DYNSYM (isl_set_project_out); \ |
1024 |
+ DYNSYM (isl_set_set_tuple_id); \ |
1025 |
+ DYNSYM (isl_set_universe); \ |
1026 |
+ DYNSYM (isl_space_add_dims); \ |
1027 |
+ DYNSYM (isl_space_alloc); \ |
1028 |
+ DYNSYM (isl_space_copy); \ |
1029 |
+ DYNSYM (isl_space_dim); \ |
1030 |
+ DYNSYM (isl_space_domain); \ |
1031 |
+ DYNSYM (isl_space_find_dim_by_id); \ |
1032 |
+ DYNSYM (isl_space_free); \ |
1033 |
+ DYNSYM (isl_space_from_domain); \ |
1034 |
+ DYNSYM (isl_space_get_tuple_id); \ |
1035 |
+ DYNSYM (isl_space_params_alloc); \ |
1036 |
+ DYNSYM (isl_space_range); \ |
1037 |
+ DYNSYM (isl_space_set_alloc); \ |
1038 |
+ DYNSYM (isl_space_set_dim_id); \ |
1039 |
+ DYNSYM (isl_space_set_tuple_id); \ |
1040 |
+ DYNSYM (isl_union_map_add_map); \ |
1041 |
+ DYNSYM (isl_union_map_align_params); \ |
1042 |
+ DYNSYM (isl_union_map_apply_domain); \ |
1043 |
+ DYNSYM (isl_union_map_apply_range); \ |
1044 |
+ DYNSYM (isl_union_map_compute_flow); \ |
1045 |
+ DYNSYM (isl_union_map_copy); \ |
1046 |
+ DYNSYM (isl_union_map_empty); \ |
1047 |
+ DYNSYM (isl_union_map_flat_range_product); \ |
1048 |
+ DYNSYM (isl_union_map_foreach_map); \ |
1049 |
+ DYNSYM (isl_union_map_free); \ |
1050 |
+ DYNSYM (isl_union_map_from_map); \ |
1051 |
+ DYNSYM (isl_union_map_get_ctx); \ |
1052 |
+ DYNSYM (isl_union_map_get_space); \ |
1053 |
+ DYNSYM (isl_union_map_gist_domain); \ |
1054 |
+ DYNSYM (isl_union_map_gist_range); \ |
1055 |
+ DYNSYM (isl_union_map_intersect_domain); \ |
1056 |
+ DYNSYM (isl_union_map_is_empty); \ |
1057 |
+ DYNSYM (isl_union_map_subtract); \ |
1058 |
+ DYNSYM (isl_union_map_union); \ |
1059 |
+ DYNSYM (isl_union_set_add_set); \ |
1060 |
+ DYNSYM (isl_union_set_compute_schedule); \ |
1061 |
+ DYNSYM (isl_union_set_copy); \ |
1062 |
+ DYNSYM (isl_union_set_empty); \ |
1063 |
+ DYNSYM (isl_union_set_from_set); \ |
1064 |
+ DYNSYM (stmt_ass); \ |
1065 |
+ DYNSYM (stmt_block); \ |
1066 |
+ DYNSYM (stmt_for); \ |
1067 |
+ DYNSYM (stmt_guard); \ |
1068 |
+ DYNSYM (stmt_root); \ |
1069 |
+ DYNSYM (stmt_user); |
1070 |
+extern struct cloog_pointers_s__ |
1071 |
+{ |
1072 |
+ bool inited; |
1073 |
+ void *h; |
1074 |
+#define DYNSYM(x) __typeof (x) *p_##x |
1075 |
+ DYNSYMS |
1076 |
+#undef DYNSYM |
1077 |
+} cloog_pointers__; |
1078 |
+ |
1079 |
+#define cloog_block_alloc (*cloog_pointers__.p_cloog_block_alloc) |
1080 |
+#define clast_pprint (*cloog_pointers__.p_clast_pprint) |
1081 |
+#define cloog_clast_create_from_input (*cloog_pointers__.p_cloog_clast_create_from_input) |
1082 |
+#define cloog_clast_free (*cloog_pointers__.p_cloog_clast_free) |
1083 |
+#define cloog_domain_from_isl_set (*cloog_pointers__.p_cloog_domain_from_isl_set) |
1084 |
+#define cloog_input_alloc (*cloog_pointers__.p_cloog_input_alloc) |
1085 |
+#define cloog_isl_state_malloc (*cloog_pointers__.p_cloog_isl_state_malloc) |
1086 |
+#define cloog_options_free (*cloog_pointers__.p_cloog_options_free) |
1087 |
+#define cloog_options_malloc (*cloog_pointers__.p_cloog_options_malloc) |
1088 |
+#define cloog_scattering_from_isl_map (*cloog_pointers__.p_cloog_scattering_from_isl_map) |
1089 |
+#define cloog_state_free (*cloog_pointers__.p_cloog_state_free) |
1090 |
+#define cloog_union_domain_add_domain (*cloog_pointers__.p_cloog_union_domain_add_domain) |
1091 |
+#define cloog_union_domain_alloc (*cloog_pointers__.p_cloog_union_domain_alloc) |
1092 |
+#define cloog_union_domain_set_name (*cloog_pointers__.p_cloog_union_domain_set_name) |
1093 |
+#define isl_aff_add_coefficient_si (*cloog_pointers__.p_isl_aff_add_coefficient_si) |
1094 |
+#define isl_aff_add_constant (*cloog_pointers__.p_isl_aff_add_constant) |
1095 |
+#define isl_aff_free (*cloog_pointers__.p_isl_aff_free) |
1096 |
+#define isl_aff_get_coefficient (*cloog_pointers__.p_isl_aff_get_coefficient) |
1097 |
+#define isl_aff_get_space (*cloog_pointers__.p_isl_aff_get_space) |
1098 |
+#define isl_aff_mod (*cloog_pointers__.p_isl_aff_mod) |
1099 |
+#define isl_aff_set_coefficient_si (*cloog_pointers__.p_isl_aff_set_coefficient_si) |
1100 |
+#define isl_aff_set_constant_si (*cloog_pointers__.p_isl_aff_set_constant_si) |
1101 |
+#define isl_aff_zero_on_domain (*cloog_pointers__.p_isl_aff_zero_on_domain) |
1102 |
+#define isl_band_free (*cloog_pointers__.p_isl_band_free) |
1103 |
+#define isl_band_get_children (*cloog_pointers__.p_isl_band_get_children) |
1104 |
+#define isl_band_get_partial_schedule (*cloog_pointers__.p_isl_band_get_partial_schedule) |
1105 |
+#define isl_band_has_children (*cloog_pointers__.p_isl_band_has_children) |
1106 |
+#define isl_band_list_free (*cloog_pointers__.p_isl_band_list_free) |
1107 |
+#define isl_band_list_get_band (*cloog_pointers__.p_isl_band_list_get_band) |
1108 |
+#define isl_band_list_get_ctx (*cloog_pointers__.p_isl_band_list_get_ctx) |
1109 |
+#define isl_band_list_n_band (*cloog_pointers__.p_isl_band_list_n_band) |
1110 |
+#define isl_band_member_is_zero_distance (*cloog_pointers__.p_isl_band_member_is_zero_distance) |
1111 |
+#define isl_band_n_member (*cloog_pointers__.p_isl_band_n_member) |
1112 |
+#define isl_basic_map_add_constraint (*cloog_pointers__.p_isl_basic_map_add_constraint) |
1113 |
+#define isl_basic_map_project_out (*cloog_pointers__.p_isl_basic_map_project_out) |
1114 |
+#define isl_basic_map_universe (*cloog_pointers__.p_isl_basic_map_universe) |
1115 |
+#define isl_constraint_set_coefficient (*cloog_pointers__.p_isl_constraint_set_coefficient) |
1116 |
+#define isl_constraint_set_coefficient_si (*cloog_pointers__.p_isl_constraint_set_coefficient_si) |
1117 |
+#define isl_constraint_set_constant (*cloog_pointers__.p_isl_constraint_set_constant) |
1118 |
+#define isl_constraint_set_constant_si (*cloog_pointers__.p_isl_constraint_set_constant_si) |
1119 |
+#define isl_ctx_alloc (*cloog_pointers__.p_isl_ctx_alloc) |
1120 |
+#define isl_ctx_free (*cloog_pointers__.p_isl_ctx_free) |
1121 |
+#define isl_equality_alloc (*cloog_pointers__.p_isl_equality_alloc) |
1122 |
+#define isl_id_alloc (*cloog_pointers__.p_isl_id_alloc) |
1123 |
+#define isl_id_copy (*cloog_pointers__.p_isl_id_copy) |
1124 |
+#define isl_id_free (*cloog_pointers__.p_isl_id_free) |
1125 |
+#define isl_inequality_alloc (*cloog_pointers__.p_isl_inequality_alloc) |
1126 |
+#define isl_local_space_copy (*cloog_pointers__.p_isl_local_space_copy) |
1127 |
+#define isl_local_space_free (*cloog_pointers__.p_isl_local_space_free) |
1128 |
+#define isl_local_space_from_space (*cloog_pointers__.p_isl_local_space_from_space) |
1129 |
+#define isl_local_space_range (*cloog_pointers__.p_isl_local_space_range) |
1130 |
+#define isl_map_add_constraint (*cloog_pointers__.p_isl_map_add_constraint) |
1131 |
+#define isl_map_add_dims (*cloog_pointers__.p_isl_map_add_dims) |
1132 |
+#define isl_map_align_params (*cloog_pointers__.p_isl_map_align_params) |
1133 |
+#define isl_map_apply_range (*cloog_pointers__.p_isl_map_apply_range) |
1134 |
+#define isl_map_copy (*cloog_pointers__.p_isl_map_copy) |
1135 |
+#define isl_map_dim (*cloog_pointers__.p_isl_map_dim) |
1136 |
+#define isl_map_dump (*cloog_pointers__.p_isl_map_dump) |
1137 |
+#define isl_map_equate (*cloog_pointers__.p_isl_map_equate) |
1138 |
+#define isl_map_fix_si (*cloog_pointers__.p_isl_map_fix_si) |
1139 |
+#define isl_map_flat_product (*cloog_pointers__.p_isl_map_flat_product) |
1140 |
+#define isl_map_flat_range_product (*cloog_pointers__.p_isl_map_flat_range_product) |
1141 |
+#define isl_map_free (*cloog_pointers__.p_isl_map_free) |
1142 |
+#define isl_map_from_basic_map (*cloog_pointers__.p_isl_map_from_basic_map) |
1143 |
+#define isl_map_from_pw_aff (*cloog_pointers__.p_isl_map_from_pw_aff) |
1144 |
+#define isl_map_from_union_map (*cloog_pointers__.p_isl_map_from_union_map) |
1145 |
+#define isl_map_get_ctx (*cloog_pointers__.p_isl_map_get_ctx) |
1146 |
+#define isl_map_get_space (*cloog_pointers__.p_isl_map_get_space) |
1147 |
+#define isl_map_get_tuple_id (*cloog_pointers__.p_isl_map_get_tuple_id) |
1148 |
+#define isl_map_insert_dims (*cloog_pointers__.p_isl_map_insert_dims) |
1149 |
+#define isl_map_intersect (*cloog_pointers__.p_isl_map_intersect) |
1150 |
+#define isl_map_intersect_domain (*cloog_pointers__.p_isl_map_intersect_domain) |
1151 |
+#define isl_map_intersect_range (*cloog_pointers__.p_isl_map_intersect_range) |
1152 |
+#define isl_map_is_empty (*cloog_pointers__.p_isl_map_is_empty) |
1153 |
+#define isl_map_lex_ge (*cloog_pointers__.p_isl_map_lex_ge) |
1154 |
+#define isl_map_lex_le (*cloog_pointers__.p_isl_map_lex_le) |
1155 |
+#define isl_map_n_out (*cloog_pointers__.p_isl_map_n_out) |
1156 |
+#define isl_map_range (*cloog_pointers__.p_isl_map_range) |
1157 |
+#define isl_map_set_tuple_id (*cloog_pointers__.p_isl_map_set_tuple_id) |
1158 |
+#define isl_map_universe (*cloog_pointers__.p_isl_map_universe) |
1159 |
+#define isl_options_set_on_error (*cloog_pointers__.p_isl_options_set_on_error) |
1160 |
+#define isl_options_set_schedule_fuse (*cloog_pointers__.p_isl_options_set_schedule_fuse) |
1161 |
+#define isl_options_set_schedule_max_constant_term (*cloog_pointers__.p_isl_options_set_schedule_max_constant_term) |
1162 |
+#define isl_options_set_schedule_maximize_band_depth (*cloog_pointers__.p_isl_options_set_schedule_maximize_band_depth) |
1163 |
+#define isl_printer_free (*cloog_pointers__.p_isl_printer_free) |
1164 |
+#define isl_printer_print_aff (*cloog_pointers__.p_isl_printer_print_aff) |
1165 |
+#define isl_printer_print_constraint (*cloog_pointers__.p_isl_printer_print_constraint) |
1166 |
+#define isl_printer_print_map (*cloog_pointers__.p_isl_printer_print_map) |
1167 |
+#define isl_printer_print_set (*cloog_pointers__.p_isl_printer_print_set) |
1168 |
+#define isl_printer_to_file (*cloog_pointers__.p_isl_printer_to_file) |
1169 |
+#define isl_pw_aff_add (*cloog_pointers__.p_isl_pw_aff_add) |
1170 |
+#define isl_pw_aff_alloc (*cloog_pointers__.p_isl_pw_aff_alloc) |
1171 |
+#define isl_pw_aff_copy (*cloog_pointers__.p_isl_pw_aff_copy) |
1172 |
+#define isl_pw_aff_eq_set (*cloog_pointers__.p_isl_pw_aff_eq_set) |
1173 |
+#define isl_pw_aff_free (*cloog_pointers__.p_isl_pw_aff_free) |
1174 |
+#define isl_pw_aff_from_aff (*cloog_pointers__.p_isl_pw_aff_from_aff) |
1175 |
+#define isl_pw_aff_ge_set (*cloog_pointers__.p_isl_pw_aff_ge_set) |
1176 |
+#define isl_pw_aff_gt_set (*cloog_pointers__.p_isl_pw_aff_gt_set) |
1177 |
+#define isl_pw_aff_is_cst (*cloog_pointers__.p_isl_pw_aff_is_cst) |
1178 |
+#define isl_pw_aff_le_set (*cloog_pointers__.p_isl_pw_aff_le_set) |
1179 |
+#define isl_pw_aff_lt_set (*cloog_pointers__.p_isl_pw_aff_lt_set) |
1180 |
+#define isl_pw_aff_mod (*cloog_pointers__.p_isl_pw_aff_mod) |
1181 |
+#define isl_pw_aff_mul (*cloog_pointers__.p_isl_pw_aff_mul) |
1182 |
+#define isl_pw_aff_ne_set (*cloog_pointers__.p_isl_pw_aff_ne_set) |
1183 |
+#define isl_pw_aff_nonneg_set (*cloog_pointers__.p_isl_pw_aff_nonneg_set) |
1184 |
+#define isl_pw_aff_set_tuple_id (*cloog_pointers__.p_isl_pw_aff_set_tuple_id) |
1185 |
+#define isl_pw_aff_sub (*cloog_pointers__.p_isl_pw_aff_sub) |
1186 |
+#define isl_pw_aff_zero_set (*cloog_pointers__.p_isl_pw_aff_zero_set) |
1187 |
+#define isl_schedule_free (*cloog_pointers__.p_isl_schedule_free) |
1188 |
+#define isl_schedule_get_band_forest (*cloog_pointers__.p_isl_schedule_get_band_forest) |
1189 |
+#define isl_set_add_constraint (*cloog_pointers__.p_isl_set_add_constraint) |
1190 |
+#define isl_set_add_dims (*cloog_pointers__.p_isl_set_add_dims) |
1191 |
+#define isl_set_apply (*cloog_pointers__.p_isl_set_apply) |
1192 |
+#define isl_set_coalesce (*cloog_pointers__.p_isl_set_coalesce) |
1193 |
+#define isl_set_copy (*cloog_pointers__.p_isl_set_copy) |
1194 |
+#define isl_set_dim (*cloog_pointers__.p_isl_set_dim) |
1195 |
+#define isl_set_fix_si (*cloog_pointers__.p_isl_set_fix_si) |
1196 |
+#define isl_set_free (*cloog_pointers__.p_isl_set_free) |
1197 |
+#define isl_set_from_cloog_domain (*cloog_pointers__.p_isl_set_from_cloog_domain) |
1198 |
+#define isl_set_get_space (*cloog_pointers__.p_isl_set_get_space) |
1199 |
+#define isl_set_get_tuple_id (*cloog_pointers__.p_isl_set_get_tuple_id) |
1200 |
+#define isl_set_intersect (*cloog_pointers__.p_isl_set_intersect) |
1201 |
+#define isl_set_is_empty (*cloog_pointers__.p_isl_set_is_empty) |
1202 |
+#define isl_set_max (*cloog_pointers__.p_isl_set_max) |
1203 |
+#define isl_set_min (*cloog_pointers__.p_isl_set_min) |
1204 |
+#define isl_set_nat_universe (*cloog_pointers__.p_isl_set_nat_universe) |
1205 |
+#define isl_set_project_out (*cloog_pointers__.p_isl_set_project_out) |
1206 |
+#define isl_set_set_tuple_id (*cloog_pointers__.p_isl_set_set_tuple_id) |
1207 |
+#define isl_set_universe (*cloog_pointers__.p_isl_set_universe) |
1208 |
+#define isl_space_add_dims (*cloog_pointers__.p_isl_space_add_dims) |
1209 |
+#define isl_space_alloc (*cloog_pointers__.p_isl_space_alloc) |
1210 |
+#define isl_space_copy (*cloog_pointers__.p_isl_space_copy) |
1211 |
+#define isl_space_dim (*cloog_pointers__.p_isl_space_dim) |
1212 |
+#define isl_space_domain (*cloog_pointers__.p_isl_space_domain) |
1213 |
+#define isl_space_find_dim_by_id (*cloog_pointers__.p_isl_space_find_dim_by_id) |
1214 |
+#define isl_space_free (*cloog_pointers__.p_isl_space_free) |
1215 |
+#define isl_space_from_domain (*cloog_pointers__.p_isl_space_from_domain) |
1216 |
+#define isl_space_get_tuple_id (*cloog_pointers__.p_isl_space_get_tuple_id) |
1217 |
+#define isl_space_params_alloc (*cloog_pointers__.p_isl_space_params_alloc) |
1218 |
+#define isl_space_range (*cloog_pointers__.p_isl_space_range) |
1219 |
+#define isl_space_set_alloc (*cloog_pointers__.p_isl_space_set_alloc) |
1220 |
+#define isl_space_set_dim_id (*cloog_pointers__.p_isl_space_set_dim_id) |
1221 |
+#define isl_space_set_tuple_id (*cloog_pointers__.p_isl_space_set_tuple_id) |
1222 |
+#define isl_union_map_add_map (*cloog_pointers__.p_isl_union_map_add_map) |
1223 |
+#define isl_union_map_align_params (*cloog_pointers__.p_isl_union_map_align_params) |
1224 |
+#define isl_union_map_apply_domain (*cloog_pointers__.p_isl_union_map_apply_domain) |
1225 |
+#define isl_union_map_apply_range (*cloog_pointers__.p_isl_union_map_apply_range) |
1226 |
+#define isl_union_map_compute_flow (*cloog_pointers__.p_isl_union_map_compute_flow) |
1227 |
+#define isl_union_map_copy (*cloog_pointers__.p_isl_union_map_copy) |
1228 |
+#define isl_union_map_empty (*cloog_pointers__.p_isl_union_map_empty) |
1229 |
+#define isl_union_map_flat_range_product (*cloog_pointers__.p_isl_union_map_flat_range_product) |
1230 |
+#define isl_union_map_foreach_map (*cloog_pointers__.p_isl_union_map_foreach_map) |
1231 |
+#define isl_union_map_free (*cloog_pointers__.p_isl_union_map_free) |
1232 |
+#define isl_union_map_from_map (*cloog_pointers__.p_isl_union_map_from_map) |
1233 |
+#define isl_union_map_get_ctx (*cloog_pointers__.p_isl_union_map_get_ctx) |
1234 |
+#define isl_union_map_get_space (*cloog_pointers__.p_isl_union_map_get_space) |
1235 |
+#define isl_union_map_gist_domain (*cloog_pointers__.p_isl_union_map_gist_domain) |
1236 |
+#define isl_union_map_gist_range (*cloog_pointers__.p_isl_union_map_gist_range) |
1237 |
+#define isl_union_map_intersect_domain (*cloog_pointers__.p_isl_union_map_intersect_domain) |
1238 |
+#define isl_union_map_is_empty (*cloog_pointers__.p_isl_union_map_is_empty) |
1239 |
+#define isl_union_map_subtract (*cloog_pointers__.p_isl_union_map_subtract) |
1240 |
+#define isl_union_map_union (*cloog_pointers__.p_isl_union_map_union) |
1241 |
+#define isl_union_set_add_set (*cloog_pointers__.p_isl_union_set_add_set) |
1242 |
+#define isl_union_set_compute_schedule (*cloog_pointers__.p_isl_union_set_compute_schedule) |
1243 |
+#define isl_union_set_copy (*cloog_pointers__.p_isl_union_set_copy) |
1244 |
+#define isl_union_set_empty (*cloog_pointers__.p_isl_union_set_empty) |
1245 |
+#define isl_union_set_from_set (*cloog_pointers__.p_isl_union_set_from_set) |
1246 |
+#define stmt_ass (*cloog_pointers__.p_stmt_ass) |
1247 |
+#define stmt_block (*cloog_pointers__.p_stmt_block) |
1248 |
+#define stmt_for (*cloog_pointers__.p_stmt_for) |
1249 |
+#define stmt_guard (*cloog_pointers__.p_stmt_guard) |
1250 |
+#define stmt_root (*cloog_pointers__.p_stmt_root) |
1251 |
+#define stmt_user (*cloog_pointers__.p_stmt_user) |
1252 |
+ |
1253 |
typedef struct poly_dr *poly_dr_p; |
1254 |
|
1255 |
typedef struct poly_bb *poly_bb_p; |
1256 |
--- a/gcc/graphite.c |
1257 |
+++ b/gcc/graphite.c |
1258 |
@@ -65,6 +65,34 @@ along with GCC; see the file COPYING3. If not see |
1259 |
|
1260 |
CloogState *cloog_state; |
1261 |
|
1262 |
+__typeof (cloog_pointers__) cloog_pointers__; |
1263 |
+ |
1264 |
+static bool |
1265 |
+init_cloog_pointers (void) |
1266 |
+{ |
1267 |
+ void *h; |
1268 |
+ |
1269 |
+ if (cloog_pointers__.inited) |
1270 |
+ return cloog_pointers__.h != NULL; |
1271 |
+ h = dlopen ("libcloog-isl.so.4", RTLD_LAZY); |
1272 |
+ cloog_pointers__.h = h; |
1273 |
+ if (h == NULL) |
1274 |
+ return false; |
1275 |
+#define DYNSYM(x) \ |
1276 |
+ do \ |
1277 |
+ { \ |
1278 |
+ union { __typeof (cloog_pointers__.p_##x) p; void *q; } u; \ |
1279 |
+ u.q = dlsym (h, #x); \ |
1280 |
+ if (u.q == NULL) \ |
1281 |
+ return false; \ |
1282 |
+ cloog_pointers__.p_##x = u.p; \ |
1283 |
+ } \ |
1284 |
+ while (0) |
1285 |
+ DYNSYMS |
1286 |
+#undef DYNSYM |
1287 |
+ return true; |
1288 |
+} |
1289 |
+ |
1290 |
/* Print global statistics to FILE. */ |
1291 |
|
1292 |
static void |
1293 |
@@ -263,6 +291,15 @@ graphite_transform_loops (void) |
1294 |
if (parallelized_function_p (cfun->decl)) |
1295 |
return; |
1296 |
|
1297 |
+ if (number_of_loops () <= 1) |
1298 |
+ return; |
1299 |
+ |
1300 |
+ if (!init_cloog_pointers ()) |
1301 |
+ { |
1302 |
+ sorry ("Graphite loop optimizations cannot be used"); |
1303 |
+ return; |
1304 |
+ } |
1305 |
+ |
1306 |
ctx = isl_ctx_alloc (); |
1307 |
isl_options_set_on_error(ctx, ISL_ON_ERROR_ABORT); |
1308 |
if (!graphite_initialize (ctx)) |
1309 |
|
1310 |
|
1311 |
|
1312 |
1.1 src/patchsets/gcc/4.8.0/gentoo/92_all_freebsd-pie.patch |
1313 |
|
1314 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gcc/4.8.0/gentoo/92_all_freebsd-pie.patch?rev=1.1&view=markup |
1315 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gcc/4.8.0/gentoo/92_all_freebsd-pie.patch?rev=1.1&content-type=text/plain |
1316 |
|
1317 |
Index: 92_all_freebsd-pie.patch |
1318 |
=================================================================== |
1319 |
https://bugs.gentoo.org/415185 |
1320 |
http://gcc.gnu.org/ml/gcc-patches/2012-05/msg00555.html |
1321 |
|
1322 |
From: Alexis Ballier <aballier@g.o> |
1323 |
To: gcc-patches@×××××××.org |
1324 |
Cc: Alexis Ballier <aballier@g.o> |
1325 |
Date: Tue, 8 May 2012 09:53:43 -0400 |
1326 |
Subject: [PATCH] gcc/config/freebsd-spec.h: Fix building PIE executables. Link them with crt{begin,end}S.o and Scrt1.o which are PIC instead of crt{begin,end}.o and crt1.o which are not. Spec synced from gnu-user.h. |
1327 |
|
1328 |
gcc/config/i386/freebsd.h: Likewise. |
1329 |
--- |
1330 |
gcc/config/freebsd-spec.h | 9 +++------ |
1331 |
gcc/config/i386/freebsd.h | 9 +++------ |
1332 |
2 files changed, 6 insertions(+), 12 deletions(-) |
1333 |
|
1334 |
diff --git a/gcc/config/freebsd-spec.h b/gcc/config/freebsd-spec.h |
1335 |
index 770a3d1..2808582 100644 |
1336 |
--- a/gcc/config/freebsd-spec.h |
1337 |
+++ b/gcc/config/freebsd-spec.h |
1338 |
@@ -64,11 +64,8 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see |
1339 |
before entering `main'. */ |
1340 |
|
1341 |
#define FBSD_STARTFILE_SPEC \ |
1342 |
- "%{!shared: \ |
1343 |
- %{pg:gcrt1.o%s} %{!pg:%{p:gcrt1.o%s} \ |
1344 |
- %{!p:%{profile:gcrt1.o%s} \ |
1345 |
- %{!profile:crt1.o%s}}}} \ |
1346 |
- crti.o%s %{!shared:crtbegin.o%s} %{shared:crtbeginS.o%s}" |
1347 |
+ "%{!shared: %{pg|p|profile:gcrt1.o%s;pie:Scrt1.o%s;:crt1.o%s}} \ |
1348 |
+ crti.o%s %{shared|pie:crtbeginS.o%s;:crtbegin.o%s}" |
1349 |
|
1350 |
/* Provide a ENDFILE_SPEC appropriate for FreeBSD. Here we tack on |
1351 |
the magical crtend.o file (see crtstuff.c) which provides part of |
1352 |
@@ -77,7 +74,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see |
1353 |
`crtn.o'. */ |
1354 |
|
1355 |
#define FBSD_ENDFILE_SPEC \ |
1356 |
- "%{!shared:crtend.o%s} %{shared:crtendS.o%s} crtn.o%s" |
1357 |
+ "%{shared|pie:crtendS.o%s;:crtend.o%s} crtn.o%s" |
1358 |
|
1359 |
/* Provide a LIB_SPEC appropriate for FreeBSD as configured and as |
1360 |
required by the user-land thread model. Before __FreeBSD_version |
1361 |
diff --git a/gcc/config/i386/freebsd.h b/gcc/config/i386/freebsd.h |
1362 |
index 649274d..dd69e43 100644 |
1363 |
--- a/gcc/config/i386/freebsd.h |
1364 |
+++ b/gcc/config/i386/freebsd.h |
1365 |
@@ -67,11 +67,8 @@ along with GCC; see the file COPYING3. If not see |
1366 |
|
1367 |
#undef STARTFILE_SPEC |
1368 |
#define STARTFILE_SPEC \ |
1369 |
- "%{!shared: \ |
1370 |
- %{pg:gcrt1.o%s} %{!pg:%{p:gcrt1.o%s} \ |
1371 |
- %{!p:%{profile:gcrt1.o%s} \ |
1372 |
- %{!profile:crt1.o%s}}}} \ |
1373 |
- crti.o%s %{!shared:crtbegin.o%s} %{shared:crtbeginS.o%s}" |
1374 |
+ "%{!shared: %{pg|p|profile:gcrt1.o%s;pie:Scrt1.o%s;:crt1.o%s}} \ |
1375 |
+ crti.o%s %{shared|pie:crtbeginS.o%s;:crtbegin.o%s}" |
1376 |
|
1377 |
/* Provide a ENDFILE_SPEC appropriate for FreeBSD. Here we tack on |
1378 |
the magical crtend.o file (see crtstuff.c) which provides part of |
1379 |
@@ -81,7 +78,7 @@ along with GCC; see the file COPYING3. If not see |
1380 |
|
1381 |
#undef ENDFILE_SPEC |
1382 |
#define ENDFILE_SPEC \ |
1383 |
- "%{!shared:crtend.o%s} %{shared:crtendS.o%s} crtn.o%s" |
1384 |
+ "%{shared|pie:crtendS.o%s;:crtend.o%s} crtn.o%s" |
1385 |
|
1386 |
/* Provide a LINK_SPEC appropriate for FreeBSD. Here we provide support |
1387 |
for the special GCC options -static and -shared, which allow us to |
1388 |
-- |
1389 |
1.7.8.6 |
1390 |
|
1391 |
|
1392 |
|
1393 |
1.1 src/patchsets/gcc/4.8.0/gentoo/README.history |
1394 |
|
1395 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gcc/4.8.0/gentoo/README.history?rev=1.1&view=markup |
1396 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gcc/4.8.0/gentoo/README.history?rev=1.1&content-type=text/plain |
1397 |
|
1398 |
Index: README.history |
1399 |
=================================================================== |
1400 |
1.0 (pending) |
1401 |
+ 10_all_default-fortify-source.patch |
1402 |
+ 11_all_default-warn-format-security.patch |
1403 |
+ 12_all_default-warn-trampolines.patch |
1404 |
+ 15_all_libgfortran-Werror.patch |
1405 |
+ 16_all_libgomp-Werror.patch |
1406 |
+ 25_all_alpha-mieee-default.patch |
1407 |
+ 26_all_alpha-asm-mcpu.patch |
1408 |
+ 29_all_arm_armv4t-default.patch |
1409 |
+ 34_all_ia64_note.GNU-stack.patch |
1410 |
+ 38_all_sh_pr24836_all-archs.patch |
1411 |
+ 42_all_superh_default-multilib.patch |
1412 |
+ 48_all_x86_pr53113_libitm-avx.patch |
1413 |
+ 50_all_libiberty-asprintf.patch |
1414 |
+ 51_all_libiberty-pic.patch |
1415 |
+ 52_all_netbsd-Bsymbolic.patch |
1416 |
+ 67_all_gcc-poison-system-directories.patch |
1417 |
+ 74_all_gcc48_cloog-dl.patch |
1418 |
+ 92_all_freebsd-pie.patch |