Gentoo Archives: gentoo-commits

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