1 |
rhill 14/05/22 21:06:27 |
2 |
|
3 |
Added: 09_all_default-ssp.patch |
4 |
10_all_default-fortify-source.patch |
5 |
11_all_default-warn-format-security.patch |
6 |
12_all_default-warn-trampolines.patch |
7 |
15_all_libgfortran-Werror.patch |
8 |
16_all_libgomp-Werror.patch |
9 |
17_all_libitm-Werror.patch |
10 |
18_all_libatomic-Werror.patch |
11 |
19_all_libbacktrace-Werror.patch |
12 |
25_all_alpha-mieee-default.patch |
13 |
26_all_alpha-asm-mcpu.patch |
14 |
29_all_arm_armv4t-default.patch |
15 |
30_all_arm_armv4-no-thumb-fix-link.patch |
16 |
34_all_ia64_note.GNU-stack.patch |
17 |
38_all_sh_pr24836_all-archs.patch |
18 |
42_all_superh_default-multilib.patch |
19 |
48_all_x86_pr53113_libitm-avx.patch |
20 |
50_all_libiberty-asprintf.patch |
21 |
51_all_libiberty-pic.patch |
22 |
52_all_netbsd-Bsymbolic.patch |
23 |
67_all_gcc-poison-system-directories.patch |
24 |
74_all_gcc48_cloog-dl.patch |
25 |
90_all_pr55930-dependency-tracking.patch |
26 |
92_all_freebsd-pie.patch README.history |
27 |
Log: |
28 |
Initial 4.8.3 patchset based off latest 4.8.2 patchset. |
29 |
|
30 |
Revision Changes Path |
31 |
1.1 src/patchsets/gcc/4.8.3/gentoo/09_all_default-ssp.patch |
32 |
|
33 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gcc/4.8.3/gentoo/09_all_default-ssp.patch?rev=1.1&view=markup |
34 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gcc/4.8.3/gentoo/09_all_default-ssp.patch?rev=1.1&content-type=text/plain |
35 |
|
36 |
Index: 09_all_default-ssp.patch |
37 |
=================================================================== |
38 |
2013-12-31 Magnus Granberg <zorry@g.o> |
39 |
|
40 |
Patch orig: Debian/Ubuntu |
41 |
# 484714 |
42 |
We Add -fstack-protector as default |
43 |
|
44 |
--- a/configure.ac 2013-02-05 23:36:20.000000000 +0100 |
45 |
+++ b/configure.ac 2013-12-30 22:22:47.241772166 +0100 |
46 |
@@ -3238,6 +3238,9 @@ case $build in |
47 |
esac ;; |
48 |
esac |
49 |
|
50 |
+# Needed when we build with -fstack-protector as default. |
51 |
+stage1_cflags="$stage1_cflags -fno-stack-protector" |
52 |
+ |
53 |
AC_SUBST(stage1_cflags) |
54 |
|
55 |
# Enable --enable-checking in stage1 of the compiler. |
56 |
--- a/configure 2013-02-05 23:36:20.000000000 +0100 |
57 |
+++ b/configure 2013-12-30 22:57:04.301738428 +0100 |
58 |
@@ -14453,7 +14453,8 @@ case $build in |
59 |
esac ;; |
60 |
esac |
61 |
|
62 |
- |
63 |
+# Needed when we build with -fstack-protector as default. |
64 |
+stage1_cflags="$stage1_cflags -fno-stack-protector" |
65 |
|
66 |
# Enable --enable-checking in stage1 of the compiler. |
67 |
# Check whether --enable-stage1-checking was given. |
68 |
--- a/Makefile.in 2013-01-14 17:15:21.000000000 +0100 |
69 |
+++ b/Makefile.in 2013-12-30 22:26:24.381768605 +0100 |
70 |
@@ -362,7 +362,7 @@ BUILD_PREFIX_1 = @BUILD_PREFIX_1@ |
71 |
|
72 |
# Flags to pass to stage2 and later makes. They are defined |
73 |
# here so that they can be overridden by Makefile fragments. |
74 |
-BOOT_CFLAGS= -g -O2 |
75 |
+BOOT_CFLAGS= -g -O2 -fno-stack-protector |
76 |
BOOT_LDFLAGS= |
77 |
BOOT_ADAFLAGS= -gnatpg |
78 |
|
79 |
@@ -408,9 +408,9 @@ GNATMAKE = @GNATMAKE@ |
80 |
|
81 |
CFLAGS = @CFLAGS@ |
82 |
LDFLAGS = @LDFLAGS@ |
83 |
-LIBCFLAGS = $(CFLAGS) |
84 |
+LIBCFLAGS = $(CFLAGS) -fno-stack-protector |
85 |
CXXFLAGS = @CXXFLAGS@ |
86 |
-LIBCXXFLAGS = $(CXXFLAGS) -fno-implicit-templates |
87 |
+LIBCXXFLAGS = $(CXXFLAGS) -fno-implicit-templates -fno-stack-protector |
88 |
GOCFLAGS = $(CFLAGS) |
89 |
|
90 |
TFLAGS = |
91 |
--- a/gcc/doc/invoke.texi 2009-12-21 |
92 |
+++ b/gcc/doc/invoke.texi 2009-12-21 |
93 |
@@ -8111,6 +8111,10 @@ |
94 |
when a function is entered and then checked when the function exits. |
95 |
If a guard check fails, an error message is printed and the program exits. |
96 |
|
97 |
+NOTE: In Gentoo Gcc 4.8.2 and later versions this option is enabled by default |
98 |
+for C, C++, ObjC, ObjC++, if none of @option{-fno-stack-protector}, |
99 |
+@option{-nostdlib}, nor @option{-ffreestanding} are found. |
100 |
+ |
101 |
@item -fstack-protector-all |
102 |
@opindex fstack-protector-all |
103 |
Like @option{-fstack-protector} except that all functions are protected. |
104 |
--- a/gcc/cp/lang-specs.h |
105 |
+++ b/gcc/cp/lang-specs.h |
106 |
@@ -46,7 +46,7 @@ along with GCC; see the file COPYING3. If not see |
107 |
%(cpp_options) %2 -o %{save-temps*:%b.ii} %{!save-temps*:%g.ii} \n}\ |
108 |
cc1plus %{save-temps*|no-integrated-cpp:-fpreprocessed %{save-temps*:%b.ii} %{!save-temps*:%g.ii}}\ |
109 |
%{!save-temps*:%{!no-integrated-cpp:%(cpp_unique_options)}}\ |
110 |
- %(cc1_options) %2\ |
111 |
+ %(cc1_options) %(ssp_default) %2\ |
112 |
%{!fsyntax-only:%{!fdump-ada-spec*:-o %g.s %{!o*:--output-pch=%i.gch}\ |
113 |
%W{o*:--output-pch=%*}}%V}}}}", |
114 |
CPLUSPLUS_CPP_SPEC, 0, 0}, |
115 |
@@ -57,11 +57,11 @@ along with GCC; see the file COPYING3. If not see |
116 |
%(cpp_options) %2 -o %{save-temps*:%b.ii} %{!save-temps*:%g.ii} \n}\ |
117 |
cc1plus %{save-temps*|no-integrated-cpp:-fpreprocessed %{save-temps*:%b.ii} %{!save-temps*:%g.ii}}\ |
118 |
%{!save-temps*:%{!no-integrated-cpp:%(cpp_unique_options)}}\ |
119 |
- %(cc1_options) %2\ |
120 |
+ %(cc1_options) %(ssp_default) %2\ |
121 |
%{!fsyntax-only:%(invoke_as)}}}}", |
122 |
CPLUSPLUS_CPP_SPEC, 0, 0}, |
123 |
{".ii", "@c++-cpp-output", 0, 0, 0}, |
124 |
{"@c++-cpp-output", |
125 |
"%{!M:%{!MM:%{!E:\ |
126 |
- cc1plus -fpreprocessed %i %(cc1_options) %2\ |
127 |
+ cc1plus -fpreprocessed %i %(cc1_options) %(ssp_default) %2\ |
128 |
%{!fsyntax-only:%(invoke_as)}}}}", 0, 0, 0}, |
129 |
--- a/gcc/gcc.c |
130 |
+++ b/gcc/gcc.c |
131 |
@@ -651,6 +651,17 @@ proper position among the other output files. */ |
132 |
#define LINK_GCC_C_SEQUENCE_SPEC "%G %L %G" |
133 |
#endif |
134 |
|
135 |
+#ifndef SSP_DEFAULT_SPEC |
136 |
+#if defined ( TARGET_LIBC_PROVIDES_SSP ) && defined ( EFAULT_SSP ) |
137 |
+#define SSP_DEFAULT_SPEC "%{fno-stack-protector|fstack-protector-all|ffreestanding|nostdlib:;:-fstack-protector}" |
138 |
+/* Add -fno-stack-protector for the use of gcc-specs-ssp. */ |
139 |
+#define CC1_SSP_DEFAULT_SPEC "%{!fno-stack-protector:}" |
140 |
+#else |
141 |
+#define SSP_DEFAULT_SPEC "" |
142 |
+#define CC1_SSP_DEFAULT_SPEC "" |
143 |
+#endif |
144 |
+#endif |
145 |
+ |
146 |
#ifndef LINK_SSP_SPEC |
147 |
#ifdef TARGET_LIBC_PROVIDES_SSP |
148 |
#define LINK_SSP_SPEC "%{fstack-protector:}" |
149 |
@@ -771,7 +781,7 @@ proper position among the other output f |
150 |
|
151 |
static const char *asm_debug = ASM_DEBUG_SPEC; |
152 |
static const char *cpp_spec = CPP_SPEC; |
153 |
-static const char *cc1_spec = CC1_SPEC; |
154 |
+static const char *cc1_spec = CC1_SPEC CC1_SSP_DEFAULT_SPEC; |
155 |
static const char *cc1plus_spec = CC1PLUS_SPEC; |
156 |
static const char *link_gcc_c_sequence_spec = LINK_GCC_C_SEQUENCE_SPEC; |
157 |
static const char *link_ssp_spec = LINK_SSP_SPEC; |
158 |
@@ -777,6 +785,8 @@ static const char *cc1_spec = CC1_SPEC; |
159 |
static const char *cc1plus_spec = CC1PLUS_SPEC; |
160 |
static const char *link_gcc_c_sequence_spec = LINK_GCC_C_SEQUENCE_SPEC; |
161 |
static const char *link_ssp_spec = LINK_SSP_SPEC; |
162 |
+static const char *ssp_default_spec = SSP_DEFAULT_SPEC; |
163 |
+static const char *cc1_ssp_default_spec = CC1_SSP_DEFAULT_SPEC; |
164 |
static const char *asm_spec = ASM_SPEC; |
165 |
static const char *asm_final_spec = ASM_FINAL_SPEC; |
166 |
static const char *link_spec = LINK_SPEC; |
167 |
@@ -835,7 +844,7 @@ static const char *cpp_unique_options = |
168 |
static const char *cpp_options = |
169 |
"%(cpp_unique_options) %1 %{m*} %{std*&ansi&trigraphs} %{W*&pedantic*} %{w}\ |
170 |
%{f*} %{g*:%{!g0:%{g*} %{!fno-working-directory:-fworking-directory}}} %{O*}\ |
171 |
- %{undef} %{save-temps*:-fpch-preprocess}"; |
172 |
+ %{undef} %{save-temps*:-fpch-preprocess} %(ssp_default)"; |
173 |
|
174 |
/* This contains cpp options which are not passed when the preprocessor |
175 |
output will be used by another program. */ |
176 |
@@ -1015,9 +1024,9 @@ static const struct compiler default_compilers[] = |
177 |
%{save-temps*|traditional-cpp|no-integrated-cpp:%(trad_capable_cpp) \ |
178 |
%(cpp_options) -o %{save-temps*:%b.i} %{!save-temps*:%g.i} \n\ |
179 |
cc1 -fpreprocessed %{save-temps*:%b.i} %{!save-temps*:%g.i} \ |
180 |
- %(cc1_options)}\ |
181 |
+ %(cc1_options) %(ssp_default)}\ |
182 |
%{!save-temps*:%{!traditional-cpp:%{!no-integrated-cpp:\ |
183 |
- cc1 %(cpp_unique_options) %(cc1_options)}}}\ |
184 |
+ cc1 %(cpp_unique_options) %(cc1_options) %(ssp_default)}}}\ |
185 |
%{!fsyntax-only:%(invoke_as)}}}}", 0, 0, 1}, |
186 |
{"-", |
187 |
"%{!E:%e-E or -x required when input is from standard input}\ |
188 |
@@ -1040,7 +1049,7 @@ static const struct compiler default_compilers[] = |
189 |
%W{o*:--output-pch=%*}}%V}}}}}}", 0, 0, 0}, |
190 |
{".i", "@cpp-output", 0, 0, 0}, |
191 |
{"@cpp-output", |
192 |
- "%{!M:%{!MM:%{!E:cc1 -fpreprocessed %i %(cc1_options) %{!fsyntax-only:%(invoke_as)}}}}", 0, 0, 0}, |
193 |
+ "%{!M:%{!MM:%{!E:cc1 -fpreprocessed %i %(cc1_options) %(ssp_default) %{!fsyntax-only:%(invoke_as)}}}}", 0, 0, 0}, |
194 |
{".s", "@assembler", 0, 0, 0}, |
195 |
{"@assembler", |
196 |
"%{!M:%{!MM:%{!E:%{!S:as %(asm_debug) %(asm_options) %i %A }}}}", 0, 0, 0}, |
197 |
@@ -1267,6 +1276,8 @@ static struct spec_list static_specs[] = |
198 |
INIT_STATIC_SPEC ("cc1plus", &cc1plus_spec), |
199 |
INIT_STATIC_SPEC ("link_gcc_c_sequence", &link_gcc_c_sequence_spec), |
200 |
INIT_STATIC_SPEC ("link_ssp", &link_ssp_spec), |
201 |
+ INIT_STATIC_SPEC ("ssp_default", &ssp_default_spec), |
202 |
+ INIT_STATIC_SPEC ("cc1_ssp_default", &cc1_ssp_default_spec), |
203 |
INIT_STATIC_SPEC ("endfile", &endfile_spec), |
204 |
INIT_STATIC_SPEC ("link", &link_spec), |
205 |
INIT_STATIC_SPEC ("lib", &lib_spec), |
206 |
--- a/gcc/objc/lang-specs.h |
207 |
+++ b/gcc/objc/lang-specs.h |
208 |
@@ -29,9 +29,9 @@ along with GCC; see the file COPYING3. If not see |
209 |
%{traditional|traditional-cpp:\ |
210 |
%eGNU Objective C no longer supports traditional compilation}\ |
211 |
%{save-temps*|no-integrated-cpp:cc1obj -E %(cpp_options) -o %{save-temps*:%b.mi} %{!save-temps*:%g.mi} \n\ |
212 |
- cc1obj -fpreprocessed %{save-temps*:%b.mi} %{!save-temps*:%g.mi} %(cc1_options) %{print-objc-runtime-info} %{gen-decls}}\ |
213 |
+ cc1obj -fpreprocessed %{save-temps*:%b.mi} %{!save-temps*:%g.mi} %(cc1_options) %(ssp_default) %{print-objc-runtime-info} %{gen-decls}}\ |
214 |
%{!save-temps*:%{!no-integrated-cpp:\ |
215 |
- cc1obj %(cpp_unique_options) %(cc1_options) %{print-objc-runtime-info} %{gen-decls}}}\ |
216 |
+ cc1obj %(cpp_unique_options) %(cc1_options) %(ssp_default) %{print-objc-runtime-info} %{gen-decls}}}\ |
217 |
%{!fsyntax-only:%(invoke_as)}}}}", 0, 0, 0}, |
218 |
{"@objective-c-header", |
219 |
"%{E|M|MM:cc1obj -E %{traditional|traditional-cpp:-traditional-cpp}\ |
220 |
@@ -40,18 +40,18 @@ along with GCC; see the file COPYING3. If not see |
221 |
%{traditional|traditional-cpp:\ |
222 |
%eGNU Objective C no longer supports traditional compilation}\ |
223 |
%{save-temps*|no-integrated-cpp:cc1obj -E %(cpp_options) -o %{save-temps*:%b.mi} %{!save-temps*:%g.mi} \n\ |
224 |
- cc1obj -fpreprocessed %b.mi %(cc1_options) %{print-objc-runtime-info} %{gen-decls}\ |
225 |
+ cc1obj -fpreprocessed %b.mi %(cc1_options) %(ssp_default) %{print-objc-runtime-info} %{gen-decls}\ |
226 |
-o %g.s %{!o*:--output-pch=%i.gch}\ |
227 |
%W{o*:--output-pch=%*}%V}\ |
228 |
%{!save-temps*:%{!no-integrated-cpp:\ |
229 |
- cc1obj %(cpp_unique_options) %(cc1_options) %{print-objc-runtime-info} %{gen-decls}\ |
230 |
+ cc1obj %(cpp_unique_options) %(cc1_options) %(ssp_default) %{print-objc-runtime-info} %{gen-decls}\ |
231 |
-o %g.s %{!o*:--output-pch=%i.gch}\ |
232 |
%W{o*:--output-pch=%*}%V}}}}}", 0, 0, 0}, |
233 |
{".mi", "@objective-c-cpp-output", 0, 0, 0}, |
234 |
{"@objective-c-cpp-output", |
235 |
- "%{!M:%{!MM:%{!E:cc1obj -fpreprocessed %i %(cc1_options) %{print-objc-runtime-info} %{gen-decls}\ |
236 |
+ "%{!M:%{!MM:%{!E:cc1obj -fpreprocessed %i %(cc1_options) %(ssp_default) %{print-objc-runtime-info} %{gen-decls}\ |
237 |
%{!fsyntax-only:%(invoke_as)}}}}", 0, 0, 0}, |
238 |
{"@objc-cpp-output", |
239 |
"%nobjc-cpp-output is deprecated; please use objective-c-cpp-output instead\n\ |
240 |
- %{!M:%{!MM:%{!E:cc1obj -fpreprocessed %i %(cc1_options) %{print-objc-runtime-info} %{gen-decls}\ |
241 |
+ %{!M:%{!MM:%{!E:cc1obj -fpreprocessed %i %(cc1_options) %(ssp_default) %{print-objc-runtime-info} %{gen-decls}\ |
242 |
%{!fsyntax-only:%(invoke_as)}}}}", 0, 0, 0}, |
243 |
--- a/gcc/objcp/lang-specs.h |
244 |
+++ b/gcc/objcp/lang-specs.h |
245 |
@@ -36,7 +36,7 @@ along with GCC; see the file COPYING3. If not see |
246 |
%(cpp_options) %2 -o %{save-temps*:%b.mii} %{!save-temps*:%g.mii} \n}\ |
247 |
cc1objplus %{save-temps*|no-integrated-cpp:-fpreprocessed %{save-temps*:%b.mii} %{!save-temps*:%g.mii}}\ |
248 |
%{!save-temps*:%{!no-integrated-cpp:%(cpp_unique_options)}}\ |
249 |
- %(cc1_options) %2\ |
250 |
+ %(cc1_options) %(ssp_default) %2\ |
251 |
-o %g.s %{!o*:--output-pch=%i.gch} %W{o*:--output-pch=%*}%V}}}", |
252 |
CPLUSPLUS_CPP_SPEC, 0, 0}, |
253 |
{"@objective-c++", |
254 |
@@ -46,16 +46,16 @@ along with GCC; see the file COPYING3. If not see |
255 |
%(cpp_options) %2 -o %{save-temps*:%b.mii} %{!save-temps*:%g.mii} \n}\ |
256 |
cc1objplus %{save-temps*|no-integrated-cpp:-fpreprocessed %{save-temps*:%b.mii} %{!save-temps*:%g.mii}}\ |
257 |
%{!save-temps*:%{!no-integrated-cpp:%(cpp_unique_options)}}\ |
258 |
- %(cc1_options) %2\ |
259 |
+ %(cc1_options) %(ssp_default) %2\ |
260 |
%{!fsyntax-only:%(invoke_as)}}}}", |
261 |
CPLUSPLUS_CPP_SPEC, 0, 0}, |
262 |
{".mii", "@objective-c++-cpp-output", 0, 0, 0}, |
263 |
{"@objective-c++-cpp-output", |
264 |
"%{!M:%{!MM:%{!E:\ |
265 |
- cc1objplus -fpreprocessed %i %(cc1_options) %2\ |
266 |
+ cc1objplus -fpreprocessed %i %(cc1_options) %(ssp_default) %2\ |
267 |
%{!fsyntax-only:%(invoke_as)}}}}", 0, 0, 0}, |
268 |
{"@objc++-cpp-output", |
269 |
"%nobjc++-cpp-output is deprecated; please use objective-c++-cpp-output instead\n\ |
270 |
%{!M:%{!MM:%{!E:\ |
271 |
- cc1objplus -fpreprocessed %i %(cc1_options) %2\ |
272 |
+ cc1objplus -fpreprocessed %i %(cc1_options) %(ssp_default) %2\ |
273 |
%{!fsyntax-only:%(invoke_as)}}}}", 0, 0, 0}, |
274 |
--- a/gcc/params.def |
275 |
+++ b/gcc/params.def |
276 |
@@ -662,7 +662,7 @@ DEFPARAM (PARAM_INTEGER_SHARE_LIMIT, |
277 |
DEFPARAM (PARAM_SSP_BUFFER_SIZE, |
278 |
"ssp-buffer-size", |
279 |
"The lower bound for a buffer to be considered for stack smashing protection", |
280 |
- 8, 1, 0) |
281 |
+ 4, 1, 0) |
282 |
|
283 |
/* When we thread through a block we have to make copies of the |
284 |
statements within the block. Clearly for large blocks the code |
285 |
|
286 |
|
287 |
|
288 |
1.1 src/patchsets/gcc/4.8.3/gentoo/10_all_default-fortify-source.patch |
289 |
|
290 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gcc/4.8.3/gentoo/10_all_default-fortify-source.patch?rev=1.1&view=markup |
291 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gcc/4.8.3/gentoo/10_all_default-fortify-source.patch?rev=1.1&content-type=text/plain |
292 |
|
293 |
Index: 10_all_default-fortify-source.patch |
294 |
=================================================================== |
295 |
Enable -D_FORTIFY_SOURCE=2 by default. |
296 |
|
297 |
--- a/gcc/c-family/c-cppbuiltin.c |
298 |
+++ b/gcc/c-family/c-cppbuiltin.c |
299 |
@@ -853,6 +853,9 @@ c_cpp_builtins (cpp_reader *pfile) |
300 |
builtin_define_with_value ("__REGISTER_PREFIX__", REGISTER_PREFIX, 0); |
301 |
builtin_define_with_value ("__USER_LABEL_PREFIX__", user_label_prefix, 0); |
302 |
|
303 |
+ /* Fortify Source enabled by default w/optimization. */ |
304 |
+ cpp_define (pfile, "_FORTIFY_SOURCE=((defined __OPTIMIZE__ && __OPTIMIZE__ > 0) ? 2 : 0)"); |
305 |
+ |
306 |
/* Misc. */ |
307 |
if (flag_gnu89_inline) |
308 |
cpp_define (pfile, "__GNUC_GNU_INLINE__"); |
309 |
--- a/gcc/doc/invoke.texi |
310 |
+++ b/gcc/doc/invoke.texi |
311 |
@@ -6568,6 +6568,11 @@ also turns on the following optimization flags: |
312 |
Please note the warning under @option{-fgcse} about |
313 |
invoking @option{-O2} on programs that use computed gotos. |
314 |
|
315 |
+NOTE: In Gentoo, @option{-D_FORTIFY_SOURCE=2} is set by default, and is |
316 |
+activated when @option{-O} is set to 2 or higher. This enables additional |
317 |
+compile-time and run-time checks for several libc functions. To disable, |
318 |
+specify either @option{-U_FORTIFY_SOURCE} or @option{-D_FORTIFY_SOURCE=0}. |
319 |
+ |
320 |
@item -O3 |
321 |
@opindex O3 |
322 |
Optimize yet more. @option{-O3} turns on all optimizations specified |
323 |
|
324 |
|
325 |
|
326 |
1.1 src/patchsets/gcc/4.8.3/gentoo/11_all_default-warn-format-security.patch |
327 |
|
328 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gcc/4.8.3/gentoo/11_all_default-warn-format-security.patch?rev=1.1&view=markup |
329 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gcc/4.8.3/gentoo/11_all_default-warn-format-security.patch?rev=1.1&content-type=text/plain |
330 |
|
331 |
Index: 11_all_default-warn-format-security.patch |
332 |
=================================================================== |
333 |
Enable -Wformat and -Wformat-security by default. |
334 |
|
335 |
--- a/gcc/c-family/c.opt |
336 |
+++ b/gcc/c-family/c.opt |
337 |
@@ -400,7 +400,7 @@ C ObjC C++ ObjC++ Var(warn_format_nonliteral) Warning LangEnabledBy(C ObjC C++ O |
338 |
Warn about format strings that are not literals |
339 |
|
340 |
Wformat-security |
341 |
-C ObjC C++ ObjC++ Var(warn_format_security) Warning LangEnabledBy(C ObjC C++ ObjC++,Wformat=, warn_format >= 2, 0) |
342 |
+C ObjC C++ ObjC++ Var(warn_format_security) Init(1) Warning LangEnabledBy(C ObjC C++ ObjC++,Wformat=, warn_format >= 2, 0) |
343 |
Warn about possible security problems with format functions |
344 |
|
345 |
Wformat-y2k |
346 |
@@ -412,7 +412,7 @@ C ObjC C++ ObjC++ Var(warn_format_zero_length) Warning LangEnabledBy(C ObjC C++ |
347 |
Warn about zero-length formats |
348 |
|
349 |
Wformat= |
350 |
-C ObjC C++ ObjC++ Joined RejectNegative UInteger Var(warn_format) Warning LangEnabledBy(C ObjC C++ ObjC++,Wall, 1, 0) |
351 |
+C ObjC C++ ObjC++ Joined RejectNegative UInteger Var(warn_format) Init(1) Warning LangEnabledBy(C ObjC C++ ObjC++,Wall, 1, 0) |
352 |
Warn about printf/scanf/strftime/strfmon format string anomalies |
353 |
|
354 |
Wignored-qualifiers |
355 |
--- a/gcc/doc/invoke.texi |
356 |
+++ b/gcc/doc/invoke.texi |
357 |
@@ -3362,6 +3362,11 @@ currently a subset of what @option{-Wformat-nonliteral} warns about, but |
358 |
in future warnings may be added to @option{-Wformat-security} that are not |
359 |
included in @option{-Wformat-nonliteral}.) |
360 |
|
361 |
+In Gentoo this option is enabled by default for C, C++, ObjC, ObjC++. |
362 |
+To disable, use @option{-Wno-format-security}, or disable all format |
363 |
+warnings with @option{-Wformat=0}. To make format security warnings |
364 |
+fatal, specify @option{-Werror=format-security}. |
365 |
+ |
366 |
@item -Wformat-y2k |
367 |
@opindex Wformat-y2k |
368 |
@opindex Wno-format-y2k |
369 |
|
370 |
|
371 |
|
372 |
1.1 src/patchsets/gcc/4.8.3/gentoo/12_all_default-warn-trampolines.patch |
373 |
|
374 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gcc/4.8.3/gentoo/12_all_default-warn-trampolines.patch?rev=1.1&view=markup |
375 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gcc/4.8.3/gentoo/12_all_default-warn-trampolines.patch?rev=1.1&content-type=text/plain |
376 |
|
377 |
Index: 12_all_default-warn-trampolines.patch |
378 |
=================================================================== |
379 |
Enable -Wtrampolines by default. |
380 |
|
381 |
--- a/gcc/common.opt |
382 |
+++ b/gcc/common.opt |
383 |
@@ -640,7 +640,7 @@ Common Var(warn_system_headers) Warning |
384 |
Do not suppress warnings from system headers |
385 |
|
386 |
Wtrampolines |
387 |
-Common Var(warn_trampolines) Warning |
388 |
+Common Var(warn_trampolines) Init(1) Warning |
389 |
Warn whenever a trampoline is generated |
390 |
|
391 |
Wtype-limits |
392 |
--- a/gcc/doc/invoke.texi |
393 |
+++ b/gcc/doc/invoke.texi |
394 |
@@ -4007,6 +4007,8 @@ headers---for that, @option{-Wunknown-pragmas} must also be used. |
395 |
for most targets, it is made up of code and thus requires the stack |
396 |
to be made executable in order for the program to work properly. |
397 |
|
398 |
+ This warning is enabled by default in Gentoo. |
399 |
+ |
400 |
@item -Wfloat-equal |
401 |
@opindex Wfloat-equal |
402 |
@opindex Wno-float-equal |
403 |
|
404 |
|
405 |
|
406 |
1.1 src/patchsets/gcc/4.8.3/gentoo/15_all_libgfortran-Werror.patch |
407 |
|
408 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gcc/4.8.3/gentoo/15_all_libgfortran-Werror.patch?rev=1.1&view=markup |
409 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gcc/4.8.3/gentoo/15_all_libgfortran-Werror.patch?rev=1.1&content-type=text/plain |
410 |
|
411 |
Index: 15_all_libgfortran-Werror.patch |
412 |
=================================================================== |
413 |
libgfortran does not respect --disable-werror |
414 |
|
415 |
https://bugs.gentoo.org/433435 |
416 |
http://gcc.gnu.org/PR54724 |
417 |
|
418 |
|
419 |
--- a/libgfortran/configure |
420 |
+++ b/libgfortran/configure |
421 |
@@ -5764,7 +5764,7 @@ fi |
422 |
|
423 |
# Add -Wall -fno-repack-arrays -fno-underscoring if we are using GCC. |
424 |
if test "x$GCC" = "xyes"; then |
425 |
- AM_FCFLAGS="-I . -Wall -Werror -fimplicit-none -fno-repack-arrays -fno-underscoring" |
426 |
+ AM_FCFLAGS="-I . -Wall -fimplicit-none -fno-repack-arrays -fno-underscoring" |
427 |
## We like to use C99 routines when available. This makes sure that |
428 |
## __STDC_VERSION__ is set such that libc includes make them available. |
429 |
AM_CFLAGS="-std=gnu99 -Wall -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -Wextra -Wwrite-strings" |
430 |
|
431 |
|
432 |
|
433 |
1.1 src/patchsets/gcc/4.8.3/gentoo/16_all_libgomp-Werror.patch |
434 |
|
435 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gcc/4.8.3/gentoo/16_all_libgomp-Werror.patch?rev=1.1&view=markup |
436 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gcc/4.8.3/gentoo/16_all_libgomp-Werror.patch?rev=1.1&content-type=text/plain |
437 |
|
438 |
Index: 16_all_libgomp-Werror.patch |
439 |
=================================================================== |
440 |
libgomp does not respect --disable-werror |
441 |
|
442 |
https://bugs.gentoo.org/229059 |
443 |
http://gcc.gnu.org/PR38436 |
444 |
|
445 |
|
446 |
--- a/libgomp/configure |
447 |
+++ b/libgomp/configure |
448 |
@@ -4282,7 +4282,7 @@ save_CFLAGS="$CFLAGS" |
449 |
|
450 |
# Add -Wall -Werror if we are using GCC. |
451 |
if test "x$GCC" = "xyes"; then |
452 |
- XCFLAGS="$XCFLAGS -Wall -Werror" |
453 |
+ XCFLAGS="$XCFLAGS -Wall" |
454 |
fi |
455 |
|
456 |
# Find other programs we need. |
457 |
|
458 |
|
459 |
|
460 |
1.1 src/patchsets/gcc/4.8.3/gentoo/17_all_libitm-Werror.patch |
461 |
|
462 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gcc/4.8.3/gentoo/17_all_libitm-Werror.patch?rev=1.1&view=markup |
463 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gcc/4.8.3/gentoo/17_all_libitm-Werror.patch?rev=1.1&content-type=text/plain |
464 |
|
465 |
Index: 17_all_libitm-Werror.patch |
466 |
=================================================================== |
467 |
Add --enable-werror. |
468 |
|
469 |
https://bugs.gentoo.org/475350 |
470 |
|
471 |
|
472 |
2013-06-30 Ryan Hill <dirtyepic@g.o> |
473 |
|
474 |
* configure.ac: Add --enable-werror. |
475 |
(XCFLAGS): Use it. |
476 |
* configure: Regenerate. |
477 |
|
478 |
--- a/libitm/configure.ac |
479 |
+++ b/libitm/configure.ac |
480 |
@@ -252,9 +252,15 @@ GCC_CHECK_ELF_STYLE_WEAKREF |
481 |
CFLAGS="$save_CFLAGS" |
482 |
AC_CACHE_SAVE |
483 |
|
484 |
-# Add -Wall -Werror if we are using GCC. |
485 |
+AC_ARG_ENABLE(werror, [AS_HELP_STRING([--enable-werror], |
486 |
+ [turns on -Werror @<:@default=yes@:>@])]) |
487 |
+# Add -Wall if we are using GCC. |
488 |
if test "x$GCC" = "xyes"; then |
489 |
- XCFLAGS="$XCFLAGS -Wall -Werror" |
490 |
+ XCFLAGS="$XCFLAGS -Wall" |
491 |
+ # Add -Werror if requested. |
492 |
+ if test "x$enable_werror" != "xno"; then |
493 |
+ XCFLAGS="$XCFLAGS -Werror" |
494 |
+ fi |
495 |
fi |
496 |
|
497 |
XCFLAGS="$XCFLAGS $XPCFLAGS" |
498 |
--- a/libitm/configure |
499 |
+++ b/libitm/configure |
500 |
@@ -775,6 +775,7 @@ enable_maintainer_mode |
501 |
enable_linux_futex |
502 |
enable_tls |
503 |
enable_symvers |
504 |
+enable_werror |
505 |
' |
506 |
ac_precious_vars='build_alias |
507 |
host_alias |
508 |
@@ -1423,6 +1424,7 @@ Optional Features: |
509 |
--enable-tls Use thread-local storage [default=yes] |
510 |
--enable-symvers=STYLE enables symbol versioning of the shared library |
511 |
[default=yes] |
512 |
+ --enable-werror turns on -Werror [default=yes] |
513 |
|
514 |
Optional Packages: |
515 |
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes] |
516 |
@@ -17491,9 +17493,18 @@ $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} |
517 |
fi |
518 |
rm -f confcache |
519 |
|
520 |
-# Add -Wall -Werror if we are using GCC. |
521 |
+# Check whether --enable-werror was given. |
522 |
+if test "${enable_werror+set}" = set; then : |
523 |
+ enableval=$enable_werror; |
524 |
+fi |
525 |
+ |
526 |
+# Add -Wall if we are using GCC. |
527 |
if test "x$GCC" = "xyes"; then |
528 |
- XCFLAGS="$XCFLAGS -Wall -Werror" |
529 |
+ XCFLAGS="$XCFLAGS -Wall" |
530 |
+ # Add -Werror if requested. |
531 |
+ if test "x$enable_werror" != "xno"; then |
532 |
+ XCFLAGS="$XCFLAGS -Werror" |
533 |
+ fi |
534 |
fi |
535 |
|
536 |
XCFLAGS="$XCFLAGS $XPCFLAGS" |
537 |
|
538 |
|
539 |
|
540 |
1.1 src/patchsets/gcc/4.8.3/gentoo/18_all_libatomic-Werror.patch |
541 |
|
542 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gcc/4.8.3/gentoo/18_all_libatomic-Werror.patch?rev=1.1&view=markup |
543 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gcc/4.8.3/gentoo/18_all_libatomic-Werror.patch?rev=1.1&content-type=text/plain |
544 |
|
545 |
Index: 18_all_libatomic-Werror.patch |
546 |
=================================================================== |
547 |
Add --enable-werror. |
548 |
|
549 |
https://bugs.gentoo.org/475350 |
550 |
|
551 |
|
552 |
2013-06-30 Ryan Hill <dirtyepic@g.o> |
553 |
|
554 |
* configure.ac: Add --enable-werror. |
555 |
(XCFLAGS): Use it. |
556 |
* configure: Regenerate. |
557 |
|
558 |
--- a/libatomic/configure.ac |
559 |
+++ b/libatomic/configure.ac |
560 |
@@ -226,9 +226,15 @@ LIBAT_ENABLE_SYMVERS |
561 |
CFLAGS="$save_CFLAGS" |
562 |
AC_CACHE_SAVE |
563 |
|
564 |
-# Add -Wall -Werror if we are using GCC. |
565 |
+AC_ARG_ENABLE(werror, [AS_HELP_STRING([--enable-werror], |
566 |
+ [turns on -Werror @<:@default=yes@:>@])]) |
567 |
+# Add -Wall if we are using GCC. |
568 |
if test "x$GCC" = "xyes"; then |
569 |
- XCFLAGS="$XCFLAGS -Wall -Werror" |
570 |
+ XCFLAGS="$XCFLAGS -Wall" |
571 |
+ # Add -Werror if requested. |
572 |
+ if test "x$enable_werror" != "xno"; then |
573 |
+ XCFLAGS="$XCFLAGS -Werror" |
574 |
+ fi |
575 |
fi |
576 |
|
577 |
XCFLAGS="$XCFLAGS $XPCFLAGS" |
578 |
--- a/libatomic/configure |
579 |
+++ b/libatomic/configure |
580 |
@@ -761,6 +761,7 @@ with_gnu_ld |
581 |
enable_libtool_lock |
582 |
enable_maintainer_mode |
583 |
enable_symvers |
584 |
+enable_werror |
585 |
' |
586 |
ac_precious_vars='build_alias |
587 |
host_alias |
588 |
@@ -1406,6 +1407,7 @@ Optional Features: |
589 |
(and sometimes confusing) to the casual installer |
590 |
--enable-symvers=STYLE enables symbol versioning of the shared library |
591 |
[default=yes] |
592 |
+ --enable-werror turns on -Werror [default=yes] |
593 |
|
594 |
Optional Packages: |
595 |
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes] |
596 |
@@ -15071,9 +15073,18 @@ $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} |
597 |
fi |
598 |
rm -f confcache |
599 |
|
600 |
-# Add -Wall -Werror if we are using GCC. |
601 |
+# Check whether --enable-werror was given. |
602 |
+if test "${enable_werror+set}" = set; then : |
603 |
+ enableval=$enable_werror; |
604 |
+fi |
605 |
+ |
606 |
+# Add -Wall if we are using GCC. |
607 |
if test "x$GCC" = "xyes"; then |
608 |
- XCFLAGS="$XCFLAGS -Wall -Werror" |
609 |
+ XCFLAGS="$XCFLAGS -Wall" |
610 |
+ # Add -Werror if requested. |
611 |
+ if test "x$enable_werror" != "xno"; then |
612 |
+ XCFLAGS="$XCFLAGS -Werror" |
613 |
+ fi |
614 |
fi |
615 |
|
616 |
XCFLAGS="$XCFLAGS $XPCFLAGS" |
617 |
|
618 |
|
619 |
|
620 |
1.1 src/patchsets/gcc/4.8.3/gentoo/19_all_libbacktrace-Werror.patch |
621 |
|
622 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gcc/4.8.3/gentoo/19_all_libbacktrace-Werror.patch?rev=1.1&view=markup |
623 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gcc/4.8.3/gentoo/19_all_libbacktrace-Werror.patch?rev=1.1&content-type=text/plain |
624 |
|
625 |
Index: 19_all_libbacktrace-Werror.patch |
626 |
=================================================================== |
627 |
add a --enable-werror flag |
628 |
|
629 |
2014-01-03 Mike Frysinger <dirtyepic@g.o> |
630 |
|
631 |
* configure.ac: Add --enable-werror. |
632 |
(WARN_FLAGS): Use it. |
633 |
* configure: Regenerate. |
634 |
|
635 |
--- a/libbacktrace/configure.ac |
636 |
+++ a/libbacktrace/configure.ac |
637 |
@@ -132,8 +132,13 @@ ACX_PROG_CC_WARNING_OPTS([-W -Wall -Wwri |
638 |
-Wmissing-format-attribute -Wcast-qual], |
639 |
[WARN_FLAGS]) |
640 |
|
641 |
+AC_ARG_ENABLE(werror, [AS_HELP_STRING([--enable-werror], |
642 |
+ [turns on -Werror @<:@default=yes@:>@])]) |
643 |
+ |
644 |
if test -n "${with_target_subdir}"; then |
645 |
- WARN_FLAGS="$WARN_FLAGS -Werror" |
646 |
+ if test "x$enable_werror" != "xno"; then |
647 |
+ WARN_FLAGS="$WARN_FLAGS -Werror" |
648 |
+ fi |
649 |
fi |
650 |
|
651 |
AC_SUBST(WARN_FLAGS) |
652 |
--- a/libbacktrace/configure |
653 |
+++ a/libbacktrace/configure |
654 |
@@ -730,6 +730,7 @@ enable_fast_install |
655 |
with_gnu_ld |
656 |
enable_libtool_lock |
657 |
enable_multilib |
658 |
+enable_werror |
659 |
with_system_libunwind |
660 |
' |
661 |
ac_precious_vars='build_alias |
662 |
@@ -1370,6 +1371,7 @@ Optional Features: |
663 |
optimize for fast installation [default=yes] |
664 |
--disable-libtool-lock avoid locking (might break parallel builds) |
665 |
--enable-multilib build many library versions (default) |
666 |
+ --enable-werror turns on -Werror [default=yes] |
667 |
|
668 |
Optional Packages: |
669 |
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes] |
670 |
@@ -11614,8 +11616,16 @@ fi |
671 |
CFLAGS="$save_CFLAGS" |
672 |
|
673 |
|
674 |
+# Check whether --enable-werror was given. |
675 |
+if test "${enable_werror+set}" = set; then : |
676 |
+ enableval=$enable_werror; |
677 |
+fi |
678 |
+ |
679 |
+ |
680 |
if test -n "${with_target_subdir}"; then |
681 |
- WARN_FLAGS="$WARN_FLAGS -Werror" |
682 |
+ if test "x$enable_werror" != "xno"; then |
683 |
+ WARN_FLAGS="$WARN_FLAGS -Werror" |
684 |
+ fi |
685 |
fi |
686 |
|
687 |
|
688 |
|
689 |
|
690 |
|
691 |
1.1 src/patchsets/gcc/4.8.3/gentoo/25_all_alpha-mieee-default.patch |
692 |
|
693 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gcc/4.8.3/gentoo/25_all_alpha-mieee-default.patch?rev=1.1&view=markup |
694 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gcc/4.8.3/gentoo/25_all_alpha-mieee-default.patch?rev=1.1&content-type=text/plain |
695 |
|
696 |
Index: 25_all_alpha-mieee-default.patch |
697 |
=================================================================== |
698 |
Set the default behavior on alpha to use -mieee since the large majority of |
699 |
time we want this (bad/weird things can happen with packages built without |
700 |
it). |
701 |
|
702 |
To satisfy those people who may not want -mieee forced on them all the time, |
703 |
we also provide -mno-ieee. |
704 |
|
705 |
Patch by Mike Frysinger <vapier@g.o> |
706 |
|
707 |
--- a/gcc/config/alpha/alpha.h |
708 |
+++ b/gcc/config/alpha/alpha.h |
709 |
@@ -96,6 +96,8 @@ along with GCC; see the file COPYING3. If not see |
710 |
while (0) |
711 |
#endif |
712 |
|
713 |
+#define CPP_SPEC "%{!no-ieee:-mieee}" |
714 |
+ |
715 |
/* Run-time compilation parameters selecting different hardware subsets. */ |
716 |
|
717 |
/* Which processor to schedule for. The cpu attribute defines a list that |
718 |
--- a/gcc/config/alpha/alpha.opt |
719 |
+++ b/gcc/config/alpha/alpha.opt |
720 |
@@ -39,7 +39,7 @@ Target RejectNegative Mask(IEEE_CONFORMANT) |
721 |
Request IEEE-conformant math library routines (OSF/1) |
722 |
|
723 |
mieee |
724 |
-Target Report RejectNegative Mask(IEEE) |
725 |
+Target Report Mask(IEEE) |
726 |
Emit IEEE-conformant code, without inexact exceptions |
727 |
|
728 |
mieee-with-inexact |
729 |
|
730 |
|
731 |
|
732 |
1.1 src/patchsets/gcc/4.8.3/gentoo/26_all_alpha-asm-mcpu.patch |
733 |
|
734 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gcc/4.8.3/gentoo/26_all_alpha-asm-mcpu.patch?rev=1.1&view=markup |
735 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gcc/4.8.3/gentoo/26_all_alpha-asm-mcpu.patch?rev=1.1&content-type=text/plain |
736 |
|
737 |
Index: 26_all_alpha-asm-mcpu.patch |
738 |
=================================================================== |
739 |
https://bugs.gentoo.org/170146 |
740 |
http://gcc.gnu.org/ml/gcc-patches/2009-11/msg00403.html |
741 |
|
742 |
alpha: turn -mcpu=<cpu> into -m<cpu> for assembler all the time |
743 |
|
744 |
--- a/gcc/config/alpha/elf.h |
745 |
+++ b/gcc/config/alpha/elf.h |
746 |
@@ -46,7 +46,7 @@ along with GCC; see the file COPYING3. If not see |
747 |
#define CC1_SPEC "%{G*}" |
748 |
|
749 |
#undef ASM_SPEC |
750 |
-#define ASM_SPEC "%{G*} %{relax:-relax} %{!gstabs*:-no-mdebug}%{gstabs*:-mdebug}" |
751 |
+#define ASM_SPEC "%{G*} %{relax:-relax} %{!gstabs*:-no-mdebug}%{gstabs*:-mdebug} %{mcpu=*:-m%*}" |
752 |
|
753 |
#undef IDENT_ASM_OP |
754 |
#define IDENT_ASM_OP "\t.ident\t" |
755 |
|
756 |
|
757 |
|
758 |
1.1 src/patchsets/gcc/4.8.3/gentoo/29_all_arm_armv4t-default.patch |
759 |
|
760 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gcc/4.8.3/gentoo/29_all_arm_armv4t-default.patch?rev=1.1&view=markup |
761 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gcc/4.8.3/gentoo/29_all_arm_armv4t-default.patch?rev=1.1&content-type=text/plain |
762 |
|
763 |
Index: 29_all_arm_armv4t-default.patch |
764 |
=================================================================== |
765 |
gcc defaults to armv5t for all targets even armv4t |
766 |
|
767 |
http://sourceware.org/ml/crossgcc/2008-05/msg00009.html |
768 |
|
769 |
|
770 |
--- a/gcc/config/arm/linux-eabi.h |
771 |
+++ b/gcc/config/arm/linux-eabi.h |
772 |
@@ -45,7 +45,7 @@ |
773 |
The ARM10TDMI core is the default for armv5t, so set |
774 |
SUBTARGET_CPU_DEFAULT to achieve this. */ |
775 |
#undef SUBTARGET_CPU_DEFAULT |
776 |
-#define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm10tdmi |
777 |
+#define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm9tdmi |
778 |
|
779 |
/* TARGET_BIG_ENDIAN_DEFAULT is set in |
780 |
config.gcc for big endian configurations. */ |
781 |
|
782 |
|
783 |
|
784 |
1.1 src/patchsets/gcc/4.8.3/gentoo/30_all_arm_armv4-no-thumb-fix-link.patch |
785 |
|
786 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gcc/4.8.3/gentoo/30_all_arm_armv4-no-thumb-fix-link.patch?rev=1.1&view=markup |
787 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gcc/4.8.3/gentoo/30_all_arm_armv4-no-thumb-fix-link.patch?rev=1.1&content-type=text/plain |
788 |
|
789 |
Index: 30_all_arm_armv4-no-thumb-fix-link.patch |
790 |
=================================================================== |
791 |
From 73aa8c34427a4282930ca8667165d844ee698859 Mon Sep 17 00:00:00 2001 |
792 |
From: Mike Frysinger <vapier@g.o> |
793 |
Date: Fri, 19 Apr 2013 16:32:28 -0400 |
794 |
Subject: [PATCH] gcc: arm: linux-eabi: fix handling of armv4 bx fixups when |
795 |
linking |
796 |
|
797 |
The bpabi.h header already sets up defines to automatically use the |
798 |
--fix-v4bx flag with the assembler & linker as needed, and creates a |
799 |
default assembly & linker spec which uses those. Unfortunately, the |
800 |
linux-eabi.h header clobbers the LINK_SPEC define and doesn't include |
801 |
the v4bx define when setting up its own. So while the assembler spec |
802 |
is retained and works fine to generate the right relocs, building for |
803 |
armv4 targets doesn't invoke the linker correctly so all the relocs |
804 |
get processed as if we had an armv4t target. |
805 |
|
806 |
You can see this with -dumpspecs when configuring gcc for an armv4 |
807 |
target and using --with-arch=armv4: |
808 |
$ armv4l-unknown-linux-gnueabi-gcc -dumpspecs |& grep -B 1 fix-v4bx |
809 |
*subtarget_extra_asm_spec: |
810 |
.... %{mcpu=arm8|mcpu=arm810|mcpu=strongarm*|march=armv4|mcpu=fa526|mcpu=fa626:--fix-v4bx} ... |
811 |
|
812 |
With this fix in place, we also get the link spec: |
813 |
$ armv4l-unknown-linux-gnueabi-gcc -dumpspecs |& grep -B 1 fix-v4bx |
814 |
*link: |
815 |
... %{mcpu=arm8|mcpu=arm810|mcpu=strongarm*|march=armv4|mcpu=fa526|mcpu=fa626:--fix-v4bx} ... |
816 |
|
817 |
And all my hello world tests / glibc builds automatically turn the |
818 |
bx insn into the 'mov pc, lr' insn and all is right in the world. |
819 |
|
820 |
Signed-off-by: Mike Frysinger <vapier@g.o> |
821 |
|
822 |
2013-04-19 Mike Frysinger <vapier@g.o> |
823 |
|
824 |
* config/arm/linux-eabi.h (LINK_SPEC): Add TARGET_FIX_V4BX_SPEC. |
825 |
--- |
826 |
gcc/config/arm/linux-eabi.h | 2 +- |
827 |
1 file changed, 1 insertion(+), 1 deletion(-) |
828 |
|
829 |
diff --git a/gcc/config/arm/linux-eabi.h b/gcc/config/arm/linux-eabi.h |
830 |
index 4a425c8..8b7ebb2 100644 |
831 |
--- a/gcc/config/arm/linux-eabi.h |
832 |
+++ b/gcc/config/arm/linux-eabi.h |
833 |
@@ -80,7 +80,7 @@ |
834 |
/* At this point, bpabi.h will have clobbered LINK_SPEC. We want to |
835 |
use the GNU/Linux version, not the generic BPABI version. */ |
836 |
#undef LINK_SPEC |
837 |
-#define LINK_SPEC BE8_LINK_SPEC \ |
838 |
+#define LINK_SPEC TARGET_FIX_V4BX_SPEC BE8_LINK_SPEC \ |
839 |
LINUX_OR_ANDROID_LD (LINUX_TARGET_LINK_SPEC, \ |
840 |
LINUX_TARGET_LINK_SPEC " " ANDROID_LINK_SPEC) |
841 |
|
842 |
-- |
843 |
1.8.2.1 |
844 |
|
845 |
|
846 |
|
847 |
|
848 |
1.1 src/patchsets/gcc/4.8.3/gentoo/34_all_ia64_note.GNU-stack.patch |
849 |
|
850 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gcc/4.8.3/gentoo/34_all_ia64_note.GNU-stack.patch?rev=1.1&view=markup |
851 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gcc/4.8.3/gentoo/34_all_ia64_note.GNU-stack.patch?rev=1.1&content-type=text/plain |
852 |
|
853 |
Index: 34_all_ia64_note.GNU-stack.patch |
854 |
=================================================================== |
855 |
http://gcc.gnu.org/PR21098 |
856 |
|
857 |
|
858 |
2004-09-20 Jakub Jelinek <jakub@××××××.com> |
859 |
|
860 |
* config/rs6000/ppc-asm.h: Add .note.GNU-stack section also |
861 |
on ppc64-linux. |
862 |
|
863 |
* config/ia64/lib1funcs.asm: Add .note.GNU-stack section on |
864 |
ia64-linux. |
865 |
* config/ia64/crtbegin.asm: Likewise. |
866 |
* config/ia64/crtend.asm: Likewise. |
867 |
* config/ia64/crti.asm: Likewise. |
868 |
* config/ia64/crtn.asm: Likewise. |
869 |
|
870 |
2004-05-14 Jakub Jelinek <jakub@××××××.com> |
871 |
|
872 |
* config/ia64/linux.h (TARGET_ASM_FILE_END): Define. |
873 |
|
874 |
|
875 |
--- a/gcc/config/ia64/linux.h |
876 |
+++ b/gcc/config/ia64/linux.h |
877 |
@@ -24,6 +24,8 @@ a copy of the GCC Runtime Library Exception along with this program; |
878 |
see the files COPYING3 and COPYING.RUNTIME respectively. If not, see |
879 |
<http://www.gnu.org/licenses/>. */ |
880 |
|
881 |
+#define TARGET_ASM_FILE_END file_end_indicate_exec_stack |
882 |
+ |
883 |
/* This is for -profile to use -lc_p instead of -lc. */ |
884 |
#undef CC1_SPEC |
885 |
#define CC1_SPEC "%{profile:-p} %{G*}" |
886 |
--- a/gcc/config/rs6000/ppc-asm.h |
887 |
+++ b/gcc/config/rs6000/ppc-asm.h |
888 |
@@ -352,7 +352,7 @@ GLUE(.L,name): \ |
889 |
#endif |
890 |
#endif |
891 |
|
892 |
-#if defined __linux__ && !defined __powerpc64__ |
893 |
+#if defined __linux__ |
894 |
.section .note.GNU-stack |
895 |
.previous |
896 |
#endif |
897 |
--- a/libgcc/config/ia64/crtbegin.S |
898 |
+++ b/libgcc/config/ia64/crtbegin.S |
899 |
@@ -252,3 +252,7 @@ __do_jv_register_classes: |
900 |
.weak __cxa_finalize |
901 |
#endif |
902 |
.weak _Jv_RegisterClasses |
903 |
+ |
904 |
+#ifdef __linux__ |
905 |
+.section .note.GNU-stack; .previous |
906 |
+#endif |
907 |
--- a/libgcc/config/ia64/crtend.S |
908 |
+++ b/libgcc/config/ia64/crtend.S |
909 |
@@ -119,3 +119,6 @@ __do_global_ctors_aux: |
910 |
|
911 |
br.ret.sptk.many rp |
912 |
.endp __do_global_ctors_aux |
913 |
+#ifdef __linux__ |
914 |
+.section .note.GNU-stack; .previous |
915 |
+#endif |
916 |
--- a/libgcc/config/ia64/crti.S |
917 |
+++ b/libgcc/config/ia64/crti.S |
918 |
@@ -49,5 +49,8 @@ _fini: |
919 |
.save rp, r33 |
920 |
mov r33 = b0 |
921 |
.body |
922 |
+#ifdef __linux__ |
923 |
+.section .note.GNU-stack; .previous |
924 |
+#endif |
925 |
|
926 |
# end of crti.S |
927 |
--- a/libgcc/config/ia64/crtn.S |
928 |
+++ b/libgcc/config/ia64/crtn.S |
929 |
@@ -39,5 +39,8 @@ |
930 |
.restore sp |
931 |
mov r12 = r35 |
932 |
br.ret.sptk.many b0 |
933 |
+#ifdef __linux__ |
934 |
+.section .note.GNU-stack; .previous |
935 |
+#endif |
936 |
|
937 |
# end of crtn.S |
938 |
--- a/libgcc/config/ia64/lib1funcs.S |
939 |
+++ b/libgcc/config/ia64/lib1funcs.S |
940 |
@@ -793,3 +793,6 @@ __floattitf: |
941 |
.endp __floattitf |
942 |
#endif |
943 |
#endif |
944 |
+#ifdef __linux__ |
945 |
+.section .note.GNU-stack; .previous |
946 |
+#endif |
947 |
|
948 |
|
949 |
|
950 |
1.1 src/patchsets/gcc/4.8.3/gentoo/38_all_sh_pr24836_all-archs.patch |
951 |
|
952 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gcc/4.8.3/gentoo/38_all_sh_pr24836_all-archs.patch?rev=1.1&view=markup |
953 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gcc/4.8.3/gentoo/38_all_sh_pr24836_all-archs.patch?rev=1.1&content-type=text/plain |
954 |
|
955 |
Index: 38_all_sh_pr24836_all-archs.patch |
956 |
=================================================================== |
957 |
gcc/configure doesn't handle all possible SH architectures |
958 |
|
959 |
http://gcc.gnu.org/PR24836 |
960 |
|
961 |
|
962 |
--- a/gcc/configure |
963 |
+++ b/gcc/configure |
964 |
@@ -22753,7 +22753,7 @@ foo: .long 25 |
965 |
tls_first_minor=14 |
966 |
tls_as_opt="-m64 -Aesame --fatal-warnings" |
967 |
;; |
968 |
- sh-*-* | sh[34]-*-*) |
969 |
+ sh-*-* | sh[34]*-*-*) |
970 |
conftest_s=' |
971 |
.section ".tdata","awT",@progbits |
972 |
foo: .long 25 |
973 |
--- a/gcc/configure.ac |
974 |
+++ b/gcc/configure.ac |
975 |
@@ -2924,7 +2924,7 @@ foo: .long 25 |
976 |
tls_first_minor=14 |
977 |
tls_as_opt="-m64 -Aesame --fatal-warnings" |
978 |
;; |
979 |
- sh-*-* | sh[34]-*-*) |
980 |
+ sh-*-* | sh[34]*-*-*) |
981 |
conftest_s=' |
982 |
.section ".tdata","awT",@progbits |
983 |
foo: .long 25 |
984 |
|
985 |
|
986 |
|
987 |
1.1 src/patchsets/gcc/4.8.3/gentoo/42_all_superh_default-multilib.patch |
988 |
|
989 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gcc/4.8.3/gentoo/42_all_superh_default-multilib.patch?rev=1.1&view=markup |
990 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gcc/4.8.3/gentoo/42_all_superh_default-multilib.patch?rev=1.1&content-type=text/plain |
991 |
|
992 |
Index: 42_all_superh_default-multilib.patch |
993 |
=================================================================== |
994 |
The gcc-3.x toolchains would contain all the targets by default. With gcc-4, |
995 |
you have to actually list out the multilibs you want or you will end up with |
996 |
just one when using targets like 'sh4-linux-gnu'. |
997 |
|
998 |
The resulting toolchain can't even build a kernel as the kernel needs to build |
999 |
with the nofpu flag to be sure that no fpu ops are generated. |
1000 |
|
1001 |
Here we restore the gcc-3.x behavior; the additional overhead of building all |
1002 |
of these multilibs by default is negligible. |
1003 |
|
1004 |
https://bugs.gentoo.org/140205 |
1005 |
https://bugs.gentoo.org/320251 |
1006 |
|
1007 |
--- a/gcc/config.gcc |
1008 |
+++ b/gcc/config.gcc |
1009 |
@@ -2455,7 +2455,7 @@ sh-*-symbianelf* | sh[12346l]*-*-symbianelf* | \ |
1010 |
if test "$sh_multilibs" = "default" ; then |
1011 |
case ${target} in |
1012 |
sh64-superh-linux* | \ |
1013 |
- sh[1234]*) sh_multilibs=${sh_cpu_target} ;; |
1014 |
+ 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') ;; |
1015 |
sh64* | sh5*) sh_multilibs=m5-32media,m5-32media-nofpu,m5-compact,m5-compact-nofpu,m5-64media,m5-64media-nofpu ;; |
1016 |
sh-superh-*) sh_multilibs=m4,m4-single,m4-single-only,m4-nofpu ;; |
1017 |
sh*-*-linux*) sh_multilibs=m1,m3e,m4 ;; |
1018 |
|
1019 |
|
1020 |
|
1021 |
1.1 src/patchsets/gcc/4.8.3/gentoo/48_all_x86_pr53113_libitm-avx.patch |
1022 |
|
1023 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gcc/4.8.3/gentoo/48_all_x86_pr53113_libitm-avx.patch?rev=1.1&view=markup |
1024 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gcc/4.8.3/gentoo/48_all_x86_pr53113_libitm-avx.patch?rev=1.1&content-type=text/plain |
1025 |
|
1026 |
Index: 48_all_x86_pr53113_libitm-avx.patch |
1027 |
=================================================================== |
1028 |
Force -mavx and -msse when needed. |
1029 |
|
1030 |
https://bugs.gentoo.org/417271 |
1031 |
https://gcc.gnu.org/PR53113 |
1032 |
https://gcc.gnu.org/viewcvs/gcc?view=revision&revision=206587 |
1033 |
|
1034 |
commit 7986635822d172ab35a858b02fcd822afa41f628 |
1035 |
Author: hjl <hjl@138bc75d-0d04-0410-961f-82ee72b054a4> |
1036 |
Date: Mon Jan 13 19:36:17 2014 +0000 |
1037 |
|
1038 |
Make sure that -msse/-mavx are appended at the end |
1039 |
|
1040 |
PR libitm/53113 |
1041 |
* Makefile.am (x86_sse.lo): Append -msse to CXXFLAGS. |
1042 |
(x86_avx.lo): Append -mavx to CXXFLAGS. |
1043 |
* Makefile.in: Regenerate. |
1044 |
|
1045 |
|
1046 |
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@206587 138bc75d-0d04-0410-961f-82ee72b054a4 |
1047 |
--- |
1048 |
libitm/ChangeLog | 7 +++++++ |
1049 |
libitm/Makefile.am | 6 ++++-- |
1050 |
libitm/Makefile.in | 6 ++++-- |
1051 |
3 files changed, 15 insertions(+), 4 deletions(-) |
1052 |
|
1053 |
|
1054 |
--- a/libitm/Makefile.am |
1055 |
+++ b/libitm/Makefile.am |
1056 |
@@ -67,10 +67,12 @@ libitm_la_SOURCES += hwcap.cc |
1057 |
endif |
1058 |
if ARCH_X86 |
1059 |
libitm_la_SOURCES += x86_sse.cc x86_avx.cc |
1060 |
-x86_sse.lo : XCFLAGS += -msse |
1061 |
+# Make sure -msse is appended at the end. |
1062 |
+x86_sse.lo : override CXXFLAGS += -msse |
1063 |
endif |
1064 |
if ARCH_X86_AVX |
1065 |
-x86_avx.lo : XCFLAGS += -mavx |
1066 |
+# Make sure -mavx is appended at the end. |
1067 |
+x86_avx.lo : override CXXFLAGS += -mavx |
1068 |
endif |
1069 |
|
1070 |
if ARCH_FUTEX |
1071 |
--- a/libitm/Makefile.in |
1072 |
+++ b/libitm/Makefile.in |
1073 |
@@ -1050,8 +1050,10 @@ vpath % $(strip $(search_path)) |
1074 |
@LIBITM_BUILD_VERSIONED_SHLIB_SUN_TRUE@@LIBITM_BUILD_VERSIONED_SHLIB_TRUE@ `echo $(libitm_la_LIBADD) | \ |
1075 |
@LIBITM_BUILD_VERSIONED_SHLIB_SUN_TRUE@@LIBITM_BUILD_VERSIONED_SHLIB_TRUE@ sed 's,/\([^/.]*\)\.la,/.libs/\1.a,g'` \ |
1076 |
@LIBITM_BUILD_VERSIONED_SHLIB_SUN_TRUE@@LIBITM_BUILD_VERSIONED_SHLIB_TRUE@ > $@ || (rm -f $@ ; exit 1) |
1077 |
-@ARCH_X86_TRUE@x86_sse.lo : XCFLAGS += -msse |
1078 |
-@ARCH_X86_AVX_TRUE@x86_avx.lo : XCFLAGS += -mavx |
1079 |
+# Make sure -msse is appended at the end. |
1080 |
+@ARCH_X86_TRUE@x86_sse.lo : override CXXFLAGS += -msse |
1081 |
+# Make sure -mavx is appended at the end. |
1082 |
+@ARCH_X86_AVX_TRUE@x86_avx.lo : override CXXFLAGS += -mavx |
1083 |
|
1084 |
all-local: $(STAMP_GENINSRC) |
1085 |
|
1086 |
|
1087 |
|
1088 |
|
1089 |
1.1 src/patchsets/gcc/4.8.3/gentoo/50_all_libiberty-asprintf.patch |
1090 |
|
1091 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gcc/4.8.3/gentoo/50_all_libiberty-asprintf.patch?rev=1.1&view=markup |
1092 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gcc/4.8.3/gentoo/50_all_libiberty-asprintf.patch?rev=1.1&content-type=text/plain |
1093 |
|
1094 |
Index: 50_all_libiberty-asprintf.patch |
1095 |
=================================================================== |
1096 |
2008-07-25 Magnus Granberg <zorry@×××.nu> |
1097 |
|
1098 |
* include/libiberty.h (asprintf): Don't declare if defined as a macro |
1099 |
|
1100 |
--- a/include/libiberty.h |
1101 |
+++ b/include/libiberty.h |
1102 |
@@ -609,8 +609,11 @@ extern int pwait (int, int *, int); |
1103 |
/* Like sprintf but provides a pointer to malloc'd storage, which must |
1104 |
be freed by the caller. */ |
1105 |
|
1106 |
+/* asprintf may be declared as a macro by glibc with __USE_FORTIFY_LEVEL. */ |
1107 |
+#ifndef asprintf |
1108 |
extern int asprintf (char **, const char *, ...) ATTRIBUTE_PRINTF_2; |
1109 |
#endif |
1110 |
+#endif |
1111 |
|
1112 |
#if !HAVE_DECL_VASPRINTF |
1113 |
/* Like vsprintf but provides a pointer to malloc'd storage, which |
1114 |
|
1115 |
|
1116 |
|
1117 |
1.1 src/patchsets/gcc/4.8.3/gentoo/51_all_libiberty-pic.patch |
1118 |
|
1119 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gcc/4.8.3/gentoo/51_all_libiberty-pic.patch?rev=1.1&view=markup |
1120 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gcc/4.8.3/gentoo/51_all_libiberty-pic.patch?rev=1.1&content-type=text/plain |
1121 |
|
1122 |
Index: 51_all_libiberty-pic.patch |
1123 |
=================================================================== |
1124 |
--- a/libiberty/Makefile.in |
1125 |
+++ b/libiberty/Makefile.in |
1126 |
@@ -246,6 +246,7 @@ $(TARGETLIB): $(REQUIRED_OFILES) $(EXTRA_OFILES) $(LIBOBJS) |
1127 |
$(AR) $(AR_FLAGS) $(TARGETLIB) \ |
1128 |
$(REQUIRED_OFILES) $(EXTRA_OFILES) $(LIBOBJS); \ |
1129 |
$(RANLIB) $(TARGETLIB); \ |
1130 |
+ cp $(TARGETLIB) ../ ; \ |
1131 |
cd ..; \ |
1132 |
else true; fi |
1133 |
|
1134 |
|
1135 |
|
1136 |
|
1137 |
1.1 src/patchsets/gcc/4.8.3/gentoo/52_all_netbsd-Bsymbolic.patch |
1138 |
|
1139 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gcc/4.8.3/gentoo/52_all_netbsd-Bsymbolic.patch?rev=1.1&view=markup |
1140 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gcc/4.8.3/gentoo/52_all_netbsd-Bsymbolic.patch?rev=1.1&content-type=text/plain |
1141 |
|
1142 |
Index: 52_all_netbsd-Bsymbolic.patch |
1143 |
=================================================================== |
1144 |
https://bugs.gentoo.org/122698 |
1145 |
|
1146 |
--- a/gcc/config/netbsd-elf.h |
1147 |
+++ b/gcc/config/netbsd-elf.h |
1148 |
@@ -70,6 +70,7 @@ along with GCC; see the file COPYING3. If not see |
1149 |
#define NETBSD_LINK_SPEC_ELF \ |
1150 |
"%{assert*} %{R*} %{rpath*} \ |
1151 |
%{shared:-shared} \ |
1152 |
+ %{symbolic:-Bsymbolic} \ |
1153 |
%{!shared: \ |
1154 |
-dc -dp \ |
1155 |
%{!nostdlib: \ |
1156 |
|
1157 |
|
1158 |
|
1159 |
1.1 src/patchsets/gcc/4.8.3/gentoo/67_all_gcc-poison-system-directories.patch |
1160 |
|
1161 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gcc/4.8.3/gentoo/67_all_gcc-poison-system-directories.patch?rev=1.1&view=markup |
1162 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gcc/4.8.3/gentoo/67_all_gcc-poison-system-directories.patch?rev=1.1&content-type=text/plain |
1163 |
|
1164 |
Index: 67_all_gcc-poison-system-directories.patch |
1165 |
=================================================================== |
1166 |
grabbed from openembedded |
1167 |
|
1168 |
From 160397ef3c3331099af028f1b8d3e085b07d88ad Mon Sep 17 00:00:00 2001 |
1169 |
From: Khem Raj <raj.khem@×××××.com> |
1170 |
Date: Fri, 29 Mar 2013 08:59:00 +0400 |
1171 |
Subject: [PATCH 16/35] gcc: poison-system-directories |
1172 |
|
1173 |
Signed-off-by: Khem Raj <raj.khem@×××××.com> |
1174 |
|
1175 |
Upstream-Status: Inappropriate [distribution: codesourcery] |
1176 |
--- |
1177 |
gcc/Makefile.in | 2 +- |
1178 |
gcc/common.opt | 4 ++++ |
1179 |
gcc/config.in | 6 ++++++ |
1180 |
gcc/configure | 20 ++++++++++++++++++-- |
1181 |
gcc/configure.ac | 10 ++++++++++ |
1182 |
gcc/doc/invoke.texi | 9 +++++++++ |
1183 |
gcc/gcc.c | 2 ++ |
1184 |
gcc/incpath.c | 19 +++++++++++++++++++ |
1185 |
8 files changed, 69 insertions(+), 3 deletions(-) |
1186 |
|
1187 |
diff --git a/gcc/Makefile.in b/gcc/Makefile.in |
1188 |
index 54ea04f..90a2bba 100644 |
1189 |
--- a/gcc/Makefile.in |
1190 |
+++ b/gcc/Makefile.in |
1191 |
@@ -2018,7 +2018,7 @@ attribs.o : attribs.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TREE_H) \ |
1192 |
|
1193 |
incpath.o: incpath.c incpath.h $(CONFIG_H) $(SYSTEM_H) $(CPPLIB_H) \ |
1194 |
intl.h prefix.h coretypes.h $(TM_H) cppdefault.h $(TARGET_H) \ |
1195 |
- $(MACHMODE_H) |
1196 |
+ $(MACHMODE_H) $(FLAGS_H) toplev.h |
1197 |
|
1198 |
CFLAGS-prefix.o += -DPREFIX=\"$(prefix)\" -DBASEVER=$(BASEVER_s) |
1199 |
prefix.o: prefix.c $(CONFIG_H) $(SYSTEM_H) coretypes.h prefix.h \ |
1200 |
diff --git a/gcc/common.opt b/gcc/common.opt |
1201 |
index bdbd3b6..ab86b00 100644 |
1202 |
--- a/gcc/common.opt |
1203 |
+++ b/gcc/common.opt |
1204 |
@@ -595,6 +595,10 @@ Wpedantic |
1205 |
Common Var(pedantic) Warning |
1206 |
Issue warnings needed for strict compliance to the standard |
1207 |
|
1208 |
+Wpoison-system-directories |
1209 |
+Common Var(flag_poison_system_directories) Init(1) Warning |
1210 |
+Warn for -I and -L options using system directories if cross compiling |
1211 |
+ |
1212 |
Wshadow |
1213 |
Common Var(warn_shadow) Warning |
1214 |
Warn when one local variable shadows another |
1215 |
diff --git a/gcc/config.in b/gcc/config.in |
1216 |
index d80fb9f..0524af7 100644 |
1217 |
--- a/gcc/config.in |
1218 |
+++ b/gcc/config.in |
1219 |
@@ -138,6 +138,12 @@ |
1220 |
#endif |
1221 |
|
1222 |
|
1223 |
+/* Define to warn for use of native system header directories */ |
1224 |
+#ifndef USED_FOR_TARGET |
1225 |
+#undef ENABLE_POISON_SYSTEM_DIRECTORIES |
1226 |
+#endif |
1227 |
+ |
1228 |
+ |
1229 |
/* Define if you want all operations on RTL (the basic data structure of the |
1230 |
optimizer and back end) to be checked for dynamic type safety at runtime. |
1231 |
This is quite expensive. */ |
1232 |
diff --git a/gcc/configure b/gcc/configure |
1233 |
index 135bbf5..b65d21d 100755 |
1234 |
--- a/gcc/configure |
1235 |
+++ b/gcc/configure |
1236 |
@@ -917,6 +917,7 @@ with_gc |
1237 |
with_system_zlib |
1238 |
enable_maintainer_mode |
1239 |
enable_version_specific_runtime_libs |
1240 |
+enable_poison_system_directories |
1241 |
enable_plugin |
1242 |
enable_libquadmath_support |
1243 |
with_linker_hash_style |
1244 |
@@ -1630,6 +1631,8 @@ Optional Features: |
1245 |
--enable-version-specific-runtime-libs |
1246 |
specify that runtime libraries should be installed |
1247 |
in a compiler-specific directory |
1248 |
+ --enable-poison-system-directories |
1249 |
+ warn for use of native system header directories |
1250 |
--enable-plugin enable plugin support |
1251 |
--disable-libquadmath-support |
1252 |
disable libquadmath support for Fortran |
1253 |
@@ -27103,6 +27106,19 @@ if test "${enable_version_specific_runtime_libs+set}" = set; then : |
1254 |
fi |
1255 |
|
1256 |
|
1257 |
+# Check whether --enable-poison-system-directories was given. |
1258 |
+if test "${enable_poison_system_directories+set}" = set; then : |
1259 |
+ enableval=$enable_poison_system_directories; |
1260 |
+else |
1261 |
+ enable_poison_system_directories=no |
1262 |
+fi |
1263 |
+ |
1264 |
+if test "x${enable_poison_system_directories}" = "xyes"; then |
1265 |
+ |
1266 |
+$as_echo "#define ENABLE_POISON_SYSTEM_DIRECTORIES 1" >>confdefs.h |
1267 |
+ |
1268 |
+fi |
1269 |
+ |
1270 |
# Substitute configuration variables |
1271 |
|
1272 |
|
1273 |
diff --git a/gcc/configure.ac b/gcc/configure.ac |
1274 |
index 6363a21..e226b85 100644 |
1275 |
--- a/gcc/configure.ac |
1276 |
+++ b/gcc/configure.ac |
1277 |
@@ -5063,6 +5063,16 @@ AC_ARG_ENABLE(version-specific-runtime-libs, |
1278 |
[specify that runtime libraries should be |
1279 |
installed in a compiler-specific directory])]) |
1280 |
|
1281 |
+AC_ARG_ENABLE([poison-system-directories], |
1282 |
+ AS_HELP_STRING([--enable-poison-system-directories], |
1283 |
+ [warn for use of native system header directories]),, |
1284 |
+ [enable_poison_system_directories=no]) |
1285 |
+if test "x${enable_poison_system_directories}" = "xyes"; then |
1286 |
+ AC_DEFINE([ENABLE_POISON_SYSTEM_DIRECTORIES], |
1287 |
+ [1], |
1288 |
+ [Define to warn for use of native system header directories]) |
1289 |
+fi |
1290 |
+ |
1291 |
# Substitute configuration variables |
1292 |
AC_SUBST(subdirs) |
1293 |
AC_SUBST(srcdir) |
1294 |
diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi |
1295 |
index 9273d7d..a022622 100644 |
1296 |
--- a/gcc/doc/invoke.texi |
1297 |
+++ b/gcc/doc/invoke.texi |
1298 |
@@ -258,6 +258,7 @@ Objective-C and Objective-C++ Dialects}. |
1299 |
-Woverlength-strings -Wpacked -Wpacked-bitfield-compat -Wpadded @gol |
1300 |
-Wparentheses -Wpedantic-ms-format -Wno-pedantic-ms-format @gol |
1301 |
-Wpointer-arith -Wno-pointer-to-int-cast @gol |
1302 |
+-Wno-poison-system-directories @gol |
1303 |
-Wredundant-decls -Wno-return-local-addr @gol |
1304 |
-Wreturn-type -Wsequence-point -Wshadow @gol |
1305 |
-Wsign-compare -Wsign-conversion -Wsizeof-pointer-memaccess @gol |
1306 |
@@ -4007,6 +4008,14 @@ headers---for that, @option{-Wunknown-pragmas} must also be used. |
1307 |
for most targets, it is made up of code and thus requires the stack |
1308 |
to be made executable in order for the program to work properly. |
1309 |
|
1310 |
+@item -Wno-poison-system-directories |
1311 |
+@opindex Wno-poison-system-directories |
1312 |
+Do not warn for @option{-I} or @option{-L} options using system |
1313 |
+directories such as @file{/usr/include} when cross compiling. This |
1314 |
+option is intended for use in chroot environments when such |
1315 |
+directories contain the correct headers and libraries for the target |
1316 |
+system rather than the host. |
1317 |
+ |
1318 |
@item -Wfloat-equal |
1319 |
@opindex Wfloat-equal |
1320 |
@opindex Wno-float-equal |
1321 |
diff --git a/gcc/gcc.c b/gcc/gcc.c |
1322 |
index 86077f8..efdb625 100644 |
1323 |
--- a/gcc/gcc.c |
1324 |
+++ b/gcc/gcc.c |
1325 |
@@ -740,6 +740,8 @@ proper position among the other output files. */ |
1326 |
"%{fuse-ld=*:-fuse-ld=%*}\ |
1327 |
%X %{o*} %{e*} %{N} %{n} %{r}\ |
1328 |
%{s} %{t} %{u*} %{z} %{Z} %{!nostdlib:%{!nostartfiles:%S}}\ |
1329 |
+ %{Wno-poison-system-directories:--no-poison-system-directories}\ |
1330 |
+ %{Werror=poison-system-directories:--error-poison-system-directories}\ |
1331 |
%{static:} %{L*} %(mfwrap) %(link_libgcc) " SANITIZER_EARLY_SPEC " %o\ |
1332 |
%{fopenmp|ftree-parallelize-loops=*:%:include(libgomp.spec)%(link_gomp)}\ |
1333 |
%{fgnu-tm:%:include(libitm.spec)%(link_itm)}\ |
1334 |
diff --git a/gcc/incpath.c b/gcc/incpath.c |
1335 |
index 018da98..cd41c78 100644 |
1336 |
--- a/gcc/incpath.c |
1337 |
+++ b/gcc/incpath.c |
1338 |
@@ -28,6 +28,7 @@ |
1339 |
#include "intl.h" |
1340 |
#include "incpath.h" |
1341 |
#include "cppdefault.h" |
1342 |
+#include "diagnostic-core.h" |
1343 |
|
1344 |
/* Microsoft Windows does not natively support inodes. |
1345 |
VMS has non-numeric inodes. */ |
1346 |
@@ -382,6 +382,26 @@ merge_include_chains (const char *sysroot, cpp_reader *pfile, int verbose) |
1347 |
} |
1348 |
fprintf (stderr, _("End of search list.\n")); |
1349 |
} |
1350 |
+ |
1351 |
+#ifdef ENABLE_POISON_SYSTEM_DIRECTORIES |
1352 |
+ if (flag_poison_system_directories) |
1353 |
+ { |
1354 |
+ struct cpp_dir *p; |
1355 |
+ |
1356 |
+ for (p = heads[QUOTE]; p; p = p->next) |
1357 |
+ { |
1358 |
+ if ((!strncmp (p->name, "/usr/include", 12)) |
1359 |
+ || (!strncmp (p->name, "/usr/local/include", 18)) |
1360 |
+ || (!strncmp (p->name, "/usr/X11R6/include", 18)) |
1361 |
+ || (!strncmp (p->name, "/sw/include", 11)) |
1362 |
+ || (!strncmp (p->name, "/opt/include", 12))) |
1363 |
+ warning (OPT_Wpoison_system_directories, |
1364 |
+ "include location \"%s\" is unsafe for " |
1365 |
+ "cross-compilation", |
1366 |
+ p->name); |
1367 |
+ } |
1368 |
+ } |
1369 |
+#endif |
1370 |
} |
1371 |
|
1372 |
/* Use given -I paths for #include "..." but not #include <...>, and |
1373 |
|
1374 |
|
1375 |
|
1376 |
1.1 src/patchsets/gcc/4.8.3/gentoo/74_all_gcc48_cloog-dl.patch |
1377 |
|
1378 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gcc/4.8.3/gentoo/74_all_gcc48_cloog-dl.patch?rev=1.1&view=markup |
1379 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gcc/4.8.3/gentoo/74_all_gcc48_cloog-dl.patch?rev=1.1&content-type=text/plain |
1380 |
|
1381 |
Index: 74_all_gcc48_cloog-dl.patch |
1382 |
=================================================================== |
1383 |
dlopen cloog-isl library rather than link to it directly. This prevents |
1384 |
cloog upgrades that change the soname from breaking the compiler. |
1385 |
|
1386 |
http://pkgs.fedoraproject.org/cgit/gcc.git/tree/gcc48-cloog-dl.patch |
1387 |
|
1388 |
|
1389 |
In FreeBSD dlopen is part of libc so we can't just hardcode -ldl. |
1390 |
|
1391 |
2013-03-30 Ryan Hill <dirtyepic@g.o> |
1392 |
|
1393 |
* configure.ac (DL_LIB): Check how to dlopen. |
1394 |
* configure: Regenerate. |
1395 |
* Makefile.in (BACKENDLIBS): Use DL_LIB. |
1396 |
|
1397 |
|
1398 |
--- a/gcc/Makefile.in |
1399 |
+++ b/gcc/Makefile.in |
1400 |
@@ -1020,7 +1020,7 @@ BUILD_LIBDEPS= $(BUILD_LIBIBERTY) |
1401 |
# and the system's installed libraries. |
1402 |
LIBS = @LIBS@ libcommon.a $(CPPLIB) $(LIBINTL) $(LIBICONV) $(LIBBACKTRACE) \ |
1403 |
$(LIBIBERTY) $(LIBDECNUMBER) $(HOST_LIBS) |
1404 |
-BACKENDLIBS = $(CLOOGLIBS) $(GMPLIBS) $(PLUGINLIBS) $(HOST_LIBS) \ |
1405 |
+BACKENDLIBS = $(if $(CLOOGLIBS),@DL_LIB@) $(GMPLIBS) $(PLUGINLIBS) $(HOST_LIBS) \ |
1406 |
$(ZLIB) |
1407 |
# Any system libraries needed just for GNAT. |
1408 |
SYSLIBS = @GNAT_LIBEXC@ |
1409 |
@@ -3443,6 +3443,15 @@ $(common_out_object_file): $(common_out_file) $(CONFIG_H) $(SYSTEM_H) \ |
1410 |
$(DIAGNOSTIC_CORE_H) $(FLAGS_H) $(OPTS_H) $(TM_H) $(TM_P_H) $(MACHMODE_H) |
1411 |
$(COMPILER) -c $(ALL_COMPILERFLAGS) $(ALL_CPPFLAGS) \ |
1412 |
$< $(OUTPUT_OPTION) |
1413 |
+ |
1414 |
+graphite%.o : \ |
1415 |
+ ALL_CFLAGS := -O $(filter-out -fkeep-inline-functions, $(ALL_CFLAGS)) |
1416 |
+graphite.o : \ |
1417 |
+ ALL_CFLAGS := -O $(filter-out -fkeep-inline-functions, $(ALL_CFLAGS)) |
1418 |
+graphite%.o : \ |
1419 |
+ ALL_CXXFLAGS := -O $(filter-out -fkeep-inline-functions, $(ALL_CXXFLAGS)) |
1420 |
+graphite.o : \ |
1421 |
+ ALL_CXXFLAGS := -O $(filter-out -fkeep-inline-functions, $(ALL_CXXFLAGS)) |
1422 |
# |
1423 |
# Generate header and source files from the machine description, |
1424 |
# and compile them. |
1425 |
--- a/gcc/configure |
1426 |
+++ b/gcc/configure |
1427 |
@@ -602,6 +602,7 @@ ac_subst_vars='LTLIBOBJS |
1428 |
LIBOBJS |
1429 |
enable_plugin |
1430 |
pluginlibs |
1431 |
+DL_LIB |
1432 |
CLOOGINC |
1433 |
CLOOGLIBS |
1434 |
ISLINC |
1435 |
@@ -27263,6 +27264,7 @@ $as_echo "unable to check" >&6; } |
1436 |
fi |
1437 |
|
1438 |
# Check -ldl |
1439 |
+ DL_LIB= |
1440 |
saved_LIBS="$LIBS" |
1441 |
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5 |
1442 |
$as_echo_n "checking for library containing dlopen... " >&6; } |
1443 |
@@ -27322,9 +27324,11 @@ fi |
1444 |
|
1445 |
if test x"$ac_cv_search_dlopen" = x"-ldl"; then |
1446 |
pluginlibs="$pluginlibs -ldl" |
1447 |
+ DL_LIB=$ac_cv_search_dlopen |
1448 |
fi |
1449 |
LIBS="$saved_LIBS" |
1450 |
|
1451 |
+ |
1452 |
# Check that we can build shared objects with -fPIC -shared |
1453 |
saved_LDFLAGS="$LDFLAGS" |
1454 |
saved_CFLAGS="$CFLAGS" |
1455 |
--- a/gcc/configure.ac |
1456 |
+++ b/gcc/configure.ac |
1457 |
@@ -5212,12 +5212,15 @@ if test x"$enable_plugin" = x"yes"; then |
1458 |
fi |
1459 |
|
1460 |
# Check -ldl |
1461 |
+ DL_LIB= |
1462 |
saved_LIBS="$LIBS" |
1463 |
AC_SEARCH_LIBS([dlopen], [dl]) |
1464 |
if test x"$ac_cv_search_dlopen" = x"-ldl"; then |
1465 |
pluginlibs="$pluginlibs -ldl" |
1466 |
+ DL_LIB=$ac_cv_search_dlopen |
1467 |
fi |
1468 |
LIBS="$saved_LIBS" |
1469 |
+ AC_SUBST(DL_LIB) |
1470 |
|
1471 |
# Check that we can build shared objects with -fPIC -shared |
1472 |
saved_LDFLAGS="$LDFLAGS" |
1473 |
--- a/gcc/graphite-clast-to-gimple.c |
1474 |
+++ b/gcc/graphite-clast-to-gimple.c |
1475 |
@@ -910,7 +910,7 @@ compute_bounds_for_loop (struct clast_for *loop, mpz_t low, mpz_t up) |
1476 |
from STMT_FOR. */ |
1477 |
|
1478 |
static tree |
1479 |
-type_for_clast_for (struct clast_for *stmt_for, ivs_params_p ip) |
1480 |
+type_for_clast_for (struct clast_for *stmt_fora, ivs_params_p ip) |
1481 |
{ |
1482 |
mpz_t bound_one, bound_two; |
1483 |
tree lb_type, ub_type; |
1484 |
@@ -918,8 +918,8 @@ type_for_clast_for (struct clast_for *stmt_for, ivs_params_p ip) |
1485 |
mpz_init (bound_one); |
1486 |
mpz_init (bound_two); |
1487 |
|
1488 |
- lb_type = type_for_clast_expr (stmt_for->LB, ip, bound_one, bound_two); |
1489 |
- ub_type = type_for_clast_expr (stmt_for->UB, ip, bound_one, bound_two); |
1490 |
+ lb_type = type_for_clast_expr (stmt_fora->LB, ip, bound_one, bound_two); |
1491 |
+ ub_type = type_for_clast_expr (stmt_fora->UB, ip, bound_one, bound_two); |
1492 |
|
1493 |
mpz_clear (bound_one); |
1494 |
mpz_clear (bound_two); |
1495 |
--- a/gcc/graphite-poly.h |
1496 |
+++ b/gcc/graphite-poly.h |
1497 |
@@ -22,6 +22,369 @@ along with GCC; see the file COPYING3. If not see |
1498 |
#ifndef GCC_GRAPHITE_POLY_H |
1499 |
#define GCC_GRAPHITE_POLY_H |
1500 |
|
1501 |
+#include <isl/aff.h> |
1502 |
+#include <isl/schedule.h> |
1503 |
+#include <isl/ilp.h> |
1504 |
+#include <isl/flow.h> |
1505 |
+#include <isl/options.h> |
1506 |
+#include <cloog/isl/cloog.h> |
1507 |
+#include <dlfcn.h> |
1508 |
+#define DYNSYMS \ |
1509 |
+ DYNSYM (clast_pprint); \ |
1510 |
+ DYNSYM (cloog_clast_create_from_input); \ |
1511 |
+ DYNSYM (cloog_clast_free); \ |
1512 |
+ DYNSYM (cloog_domain_from_isl_set); \ |
1513 |
+ DYNSYM (cloog_input_alloc); \ |
1514 |
+ DYNSYM (cloog_isl_state_malloc); \ |
1515 |
+ DYNSYM (cloog_options_free); \ |
1516 |
+ DYNSYM (cloog_options_malloc); \ |
1517 |
+ DYNSYM (cloog_scattering_from_isl_map); \ |
1518 |
+ DYNSYM (cloog_state_free); \ |
1519 |
+ DYNSYM (cloog_union_domain_add_domain); \ |
1520 |
+ DYNSYM (cloog_union_domain_alloc); \ |
1521 |
+ DYNSYM (cloog_union_domain_set_name); \ |
1522 |
+ DYNSYM (isl_aff_add_coefficient_si); \ |
1523 |
+ DYNSYM (isl_aff_add_constant); \ |
1524 |
+ DYNSYM (isl_aff_free); \ |
1525 |
+ DYNSYM (isl_aff_get_coefficient); \ |
1526 |
+ DYNSYM (isl_aff_get_space); \ |
1527 |
+ DYNSYM (isl_aff_mod); \ |
1528 |
+ DYNSYM (isl_aff_set_coefficient_si); \ |
1529 |
+ DYNSYM (isl_aff_set_constant_si); \ |
1530 |
+ DYNSYM (isl_aff_zero_on_domain); \ |
1531 |
+ DYNSYM (isl_band_free); \ |
1532 |
+ DYNSYM (isl_band_get_children); \ |
1533 |
+ DYNSYM (isl_band_get_partial_schedule); \ |
1534 |
+ DYNSYM (isl_band_has_children); \ |
1535 |
+ DYNSYM (isl_band_list_free); \ |
1536 |
+ DYNSYM (isl_band_list_get_band); \ |
1537 |
+ DYNSYM (isl_band_list_get_ctx); \ |
1538 |
+ DYNSYM (isl_band_list_n_band); \ |
1539 |
+ DYNSYM (isl_band_member_is_zero_distance); \ |
1540 |
+ DYNSYM (isl_band_n_member); \ |
1541 |
+ DYNSYM (isl_basic_map_add_constraint); \ |
1542 |
+ DYNSYM (isl_basic_map_project_out); \ |
1543 |
+ DYNSYM (isl_basic_map_universe); \ |
1544 |
+ DYNSYM (isl_constraint_set_coefficient); \ |
1545 |
+ DYNSYM (isl_constraint_set_coefficient_si); \ |
1546 |
+ DYNSYM (isl_constraint_set_constant); \ |
1547 |
+ DYNSYM (isl_constraint_set_constant_si); \ |
1548 |
+ DYNSYM (isl_ctx_alloc); \ |
1549 |
+ DYNSYM (isl_ctx_free); \ |
1550 |
+ DYNSYM (isl_equality_alloc); \ |
1551 |
+ DYNSYM (isl_id_alloc); \ |
1552 |
+ DYNSYM (isl_id_copy); \ |
1553 |
+ DYNSYM (isl_id_free); \ |
1554 |
+ DYNSYM (isl_inequality_alloc); \ |
1555 |
+ DYNSYM (isl_local_space_copy); \ |
1556 |
+ DYNSYM (isl_local_space_free); \ |
1557 |
+ DYNSYM (isl_local_space_from_space); \ |
1558 |
+ DYNSYM (isl_local_space_range); \ |
1559 |
+ DYNSYM (isl_map_add_constraint); \ |
1560 |
+ DYNSYM (isl_map_add_dims); \ |
1561 |
+ DYNSYM (isl_map_align_params); \ |
1562 |
+ DYNSYM (isl_map_apply_range); \ |
1563 |
+ DYNSYM (isl_map_copy); \ |
1564 |
+ DYNSYM (isl_map_dim); \ |
1565 |
+ DYNSYM (isl_map_dump); \ |
1566 |
+ DYNSYM (isl_map_equate); \ |
1567 |
+ DYNSYM (isl_map_fix_si); \ |
1568 |
+ DYNSYM (isl_map_flat_product); \ |
1569 |
+ DYNSYM (isl_map_flat_range_product); \ |
1570 |
+ DYNSYM (isl_map_free); \ |
1571 |
+ DYNSYM (isl_map_from_basic_map); \ |
1572 |
+ DYNSYM (isl_map_from_pw_aff); \ |
1573 |
+ DYNSYM (isl_map_from_union_map); \ |
1574 |
+ DYNSYM (isl_map_get_ctx); \ |
1575 |
+ DYNSYM (isl_map_get_space); \ |
1576 |
+ DYNSYM (isl_map_get_tuple_id); \ |
1577 |
+ DYNSYM (isl_map_insert_dims); \ |
1578 |
+ DYNSYM (isl_map_intersect); \ |
1579 |
+ DYNSYM (isl_map_intersect_domain); \ |
1580 |
+ DYNSYM (isl_map_intersect_range); \ |
1581 |
+ DYNSYM (isl_map_is_empty); \ |
1582 |
+ DYNSYM (isl_map_lex_ge); \ |
1583 |
+ DYNSYM (isl_map_lex_le); \ |
1584 |
+ DYNSYM (isl_map_n_out); \ |
1585 |
+ DYNSYM (isl_map_range); \ |
1586 |
+ DYNSYM (isl_map_set_tuple_id); \ |
1587 |
+ DYNSYM (isl_map_universe); \ |
1588 |
+ DYNSYM (isl_options_set_on_error); \ |
1589 |
+ DYNSYM (isl_options_set_schedule_fuse); \ |
1590 |
+ DYNSYM (isl_options_set_schedule_max_constant_term); \ |
1591 |
+ DYNSYM (isl_options_set_schedule_maximize_band_depth); \ |
1592 |
+ DYNSYM (isl_printer_free); \ |
1593 |
+ DYNSYM (isl_printer_print_aff); \ |
1594 |
+ DYNSYM (isl_printer_print_constraint); \ |
1595 |
+ DYNSYM (isl_printer_print_map); \ |
1596 |
+ DYNSYM (isl_printer_print_set); \ |
1597 |
+ DYNSYM (isl_printer_to_file); \ |
1598 |
+ DYNSYM (isl_pw_aff_add); \ |
1599 |
+ DYNSYM (isl_pw_aff_alloc); \ |
1600 |
+ DYNSYM (isl_pw_aff_copy); \ |
1601 |
+ DYNSYM (isl_pw_aff_eq_set); \ |
1602 |
+ DYNSYM (isl_pw_aff_free); \ |
1603 |
+ DYNSYM (isl_pw_aff_from_aff); \ |
1604 |
+ DYNSYM (isl_pw_aff_ge_set); \ |
1605 |
+ DYNSYM (isl_pw_aff_gt_set); \ |
1606 |
+ DYNSYM (isl_pw_aff_is_cst); \ |
1607 |
+ DYNSYM (isl_pw_aff_le_set); \ |
1608 |
+ DYNSYM (isl_pw_aff_lt_set); \ |
1609 |
+ DYNSYM (isl_pw_aff_mod); \ |
1610 |
+ DYNSYM (isl_pw_aff_mul); \ |
1611 |
+ DYNSYM (isl_pw_aff_ne_set); \ |
1612 |
+ DYNSYM (isl_pw_aff_nonneg_set); \ |
1613 |
+ DYNSYM (isl_pw_aff_set_tuple_id); \ |
1614 |
+ DYNSYM (isl_pw_aff_sub); \ |
1615 |
+ DYNSYM (isl_pw_aff_zero_set); \ |
1616 |
+ DYNSYM (isl_schedule_free); \ |
1617 |
+ DYNSYM (isl_schedule_get_band_forest); \ |
1618 |
+ DYNSYM (isl_set_add_constraint); \ |
1619 |
+ DYNSYM (isl_set_add_dims); \ |
1620 |
+ DYNSYM (isl_set_apply); \ |
1621 |
+ DYNSYM (isl_set_coalesce); \ |
1622 |
+ DYNSYM (isl_set_copy); \ |
1623 |
+ DYNSYM (isl_set_dim); \ |
1624 |
+ DYNSYM (isl_set_fix_si); \ |
1625 |
+ DYNSYM (isl_set_free); \ |
1626 |
+ DYNSYM (isl_set_from_cloog_domain); \ |
1627 |
+ DYNSYM (isl_set_get_space); \ |
1628 |
+ DYNSYM (isl_set_get_tuple_id); \ |
1629 |
+ DYNSYM (isl_set_intersect); \ |
1630 |
+ DYNSYM (isl_set_is_empty); \ |
1631 |
+ DYNSYM (isl_set_max); \ |
1632 |
+ DYNSYM (isl_set_min); \ |
1633 |
+ DYNSYM (isl_set_nat_universe); \ |
1634 |
+ DYNSYM (isl_set_project_out); \ |
1635 |
+ DYNSYM (isl_set_set_tuple_id); \ |
1636 |
+ DYNSYM (isl_set_universe); \ |
1637 |
+ DYNSYM (isl_space_add_dims); \ |
1638 |
+ DYNSYM (isl_space_alloc); \ |
1639 |
+ DYNSYM (isl_space_copy); \ |
1640 |
+ DYNSYM (isl_space_dim); \ |
1641 |
+ DYNSYM (isl_space_domain); \ |
1642 |
+ DYNSYM (isl_space_find_dim_by_id); \ |
1643 |
+ DYNSYM (isl_space_free); \ |
1644 |
+ DYNSYM (isl_space_from_domain); \ |
1645 |
+ DYNSYM (isl_space_get_tuple_id); \ |
1646 |
+ DYNSYM (isl_space_params_alloc); \ |
1647 |
+ DYNSYM (isl_space_range); \ |
1648 |
+ DYNSYM (isl_space_set_alloc); \ |
1649 |
+ DYNSYM (isl_space_set_dim_id); \ |
1650 |
+ DYNSYM (isl_space_set_tuple_id); \ |
1651 |
+ DYNSYM (isl_union_map_add_map); \ |
1652 |
+ DYNSYM (isl_union_map_align_params); \ |
1653 |
+ DYNSYM (isl_union_map_apply_domain); \ |
1654 |
+ DYNSYM (isl_union_map_apply_range); \ |
1655 |
+ DYNSYM (isl_union_map_compute_flow); \ |
1656 |
+ DYNSYM (isl_union_map_copy); \ |
1657 |
+ DYNSYM (isl_union_map_empty); \ |
1658 |
+ DYNSYM (isl_union_map_flat_range_product); \ |
1659 |
+ DYNSYM (isl_union_map_foreach_map); \ |
1660 |
+ DYNSYM (isl_union_map_free); \ |
1661 |
+ DYNSYM (isl_union_map_from_map); \ |
1662 |
+ DYNSYM (isl_union_map_get_ctx); \ |
1663 |
+ DYNSYM (isl_union_map_get_space); \ |
1664 |
+ DYNSYM (isl_union_map_gist_domain); \ |
1665 |
+ DYNSYM (isl_union_map_gist_range); \ |
1666 |
+ DYNSYM (isl_union_map_intersect_domain); \ |
1667 |
+ DYNSYM (isl_union_map_is_empty); \ |
1668 |
+ DYNSYM (isl_union_map_subtract); \ |
1669 |
+ DYNSYM (isl_union_map_union); \ |
1670 |
+ DYNSYM (isl_union_set_add_set); \ |
1671 |
+ DYNSYM (isl_union_set_compute_schedule); \ |
1672 |
+ DYNSYM (isl_union_set_copy); \ |
1673 |
+ DYNSYM (isl_union_set_empty); \ |
1674 |
+ DYNSYM (isl_union_set_from_set); \ |
1675 |
+ DYNSYM (stmt_ass); \ |
1676 |
+ DYNSYM (stmt_block); \ |
1677 |
+ DYNSYM (stmt_for); \ |
1678 |
+ DYNSYM (stmt_guard); \ |
1679 |
+ DYNSYM (stmt_root); \ |
1680 |
+ DYNSYM (stmt_user); |
1681 |
+extern struct cloog_pointers_s__ |
1682 |
+{ |
1683 |
+ bool inited; |
1684 |
+ void *h; |
1685 |
+#define DYNSYM(x) __typeof (x) *p_##x |
1686 |
+ DYNSYMS |
1687 |
+#undef DYNSYM |
1688 |
+} cloog_pointers__; |
1689 |
+ |
1690 |
+#define cloog_block_alloc (*cloog_pointers__.p_cloog_block_alloc) |
1691 |
+#define clast_pprint (*cloog_pointers__.p_clast_pprint) |
1692 |
+#define cloog_clast_create_from_input (*cloog_pointers__.p_cloog_clast_create_from_input) |
1693 |
+#define cloog_clast_free (*cloog_pointers__.p_cloog_clast_free) |
1694 |
+#define cloog_domain_from_isl_set (*cloog_pointers__.p_cloog_domain_from_isl_set) |
1695 |
+#define cloog_input_alloc (*cloog_pointers__.p_cloog_input_alloc) |
1696 |
+#define cloog_isl_state_malloc (*cloog_pointers__.p_cloog_isl_state_malloc) |
1697 |
+#define cloog_options_free (*cloog_pointers__.p_cloog_options_free) |
1698 |
+#define cloog_options_malloc (*cloog_pointers__.p_cloog_options_malloc) |
1699 |
+#define cloog_scattering_from_isl_map (*cloog_pointers__.p_cloog_scattering_from_isl_map) |
1700 |
+#define cloog_state_free (*cloog_pointers__.p_cloog_state_free) |
1701 |
+#define cloog_union_domain_add_domain (*cloog_pointers__.p_cloog_union_domain_add_domain) |
1702 |
+#define cloog_union_domain_alloc (*cloog_pointers__.p_cloog_union_domain_alloc) |
1703 |
+#define cloog_union_domain_set_name (*cloog_pointers__.p_cloog_union_domain_set_name) |
1704 |
+#define isl_aff_add_coefficient_si (*cloog_pointers__.p_isl_aff_add_coefficient_si) |
1705 |
+#define isl_aff_add_constant (*cloog_pointers__.p_isl_aff_add_constant) |
1706 |
+#define isl_aff_free (*cloog_pointers__.p_isl_aff_free) |
1707 |
+#define isl_aff_get_coefficient (*cloog_pointers__.p_isl_aff_get_coefficient) |
1708 |
+#define isl_aff_get_space (*cloog_pointers__.p_isl_aff_get_space) |
1709 |
+#define isl_aff_mod (*cloog_pointers__.p_isl_aff_mod) |
1710 |
+#define isl_aff_set_coefficient_si (*cloog_pointers__.p_isl_aff_set_coefficient_si) |
1711 |
+#define isl_aff_set_constant_si (*cloog_pointers__.p_isl_aff_set_constant_si) |
1712 |
+#define isl_aff_zero_on_domain (*cloog_pointers__.p_isl_aff_zero_on_domain) |
1713 |
+#define isl_band_free (*cloog_pointers__.p_isl_band_free) |
1714 |
+#define isl_band_get_children (*cloog_pointers__.p_isl_band_get_children) |
1715 |
+#define isl_band_get_partial_schedule (*cloog_pointers__.p_isl_band_get_partial_schedule) |
1716 |
+#define isl_band_has_children (*cloog_pointers__.p_isl_band_has_children) |
1717 |
+#define isl_band_list_free (*cloog_pointers__.p_isl_band_list_free) |
1718 |
+#define isl_band_list_get_band (*cloog_pointers__.p_isl_band_list_get_band) |
1719 |
+#define isl_band_list_get_ctx (*cloog_pointers__.p_isl_band_list_get_ctx) |
1720 |
+#define isl_band_list_n_band (*cloog_pointers__.p_isl_band_list_n_band) |
1721 |
+#define isl_band_member_is_zero_distance (*cloog_pointers__.p_isl_band_member_is_zero_distance) |
1722 |
+#define isl_band_n_member (*cloog_pointers__.p_isl_band_n_member) |
1723 |
+#define isl_basic_map_add_constraint (*cloog_pointers__.p_isl_basic_map_add_constraint) |
1724 |
+#define isl_basic_map_project_out (*cloog_pointers__.p_isl_basic_map_project_out) |
1725 |
+#define isl_basic_map_universe (*cloog_pointers__.p_isl_basic_map_universe) |
1726 |
+#define isl_constraint_set_coefficient (*cloog_pointers__.p_isl_constraint_set_coefficient) |
1727 |
+#define isl_constraint_set_coefficient_si (*cloog_pointers__.p_isl_constraint_set_coefficient_si) |
1728 |
+#define isl_constraint_set_constant (*cloog_pointers__.p_isl_constraint_set_constant) |
1729 |
+#define isl_constraint_set_constant_si (*cloog_pointers__.p_isl_constraint_set_constant_si) |
1730 |
+#define isl_ctx_alloc (*cloog_pointers__.p_isl_ctx_alloc) |
1731 |
+#define isl_ctx_free (*cloog_pointers__.p_isl_ctx_free) |
1732 |
+#define isl_equality_alloc (*cloog_pointers__.p_isl_equality_alloc) |
1733 |
+#define isl_id_alloc (*cloog_pointers__.p_isl_id_alloc) |
1734 |
+#define isl_id_copy (*cloog_pointers__.p_isl_id_copy) |
1735 |
+#define isl_id_free (*cloog_pointers__.p_isl_id_free) |
1736 |
+#define isl_inequality_alloc (*cloog_pointers__.p_isl_inequality_alloc) |
1737 |
+#define isl_local_space_copy (*cloog_pointers__.p_isl_local_space_copy) |
1738 |
+#define isl_local_space_free (*cloog_pointers__.p_isl_local_space_free) |
1739 |
+#define isl_local_space_from_space (*cloog_pointers__.p_isl_local_space_from_space) |
1740 |
+#define isl_local_space_range (*cloog_pointers__.p_isl_local_space_range) |
1741 |
+#define isl_map_add_constraint (*cloog_pointers__.p_isl_map_add_constraint) |
1742 |
+#define isl_map_add_dims (*cloog_pointers__.p_isl_map_add_dims) |
1743 |
+#define isl_map_align_params (*cloog_pointers__.p_isl_map_align_params) |
1744 |
+#define isl_map_apply_range (*cloog_pointers__.p_isl_map_apply_range) |
1745 |
+#define isl_map_copy (*cloog_pointers__.p_isl_map_copy) |
1746 |
+#define isl_map_dim (*cloog_pointers__.p_isl_map_dim) |
1747 |
+#define isl_map_dump (*cloog_pointers__.p_isl_map_dump) |
1748 |
+#define isl_map_equate (*cloog_pointers__.p_isl_map_equate) |
1749 |
+#define isl_map_fix_si (*cloog_pointers__.p_isl_map_fix_si) |
1750 |
+#define isl_map_flat_product (*cloog_pointers__.p_isl_map_flat_product) |
1751 |
+#define isl_map_flat_range_product (*cloog_pointers__.p_isl_map_flat_range_product) |
1752 |
+#define isl_map_free (*cloog_pointers__.p_isl_map_free) |
1753 |
+#define isl_map_from_basic_map (*cloog_pointers__.p_isl_map_from_basic_map) |
1754 |
+#define isl_map_from_pw_aff (*cloog_pointers__.p_isl_map_from_pw_aff) |
1755 |
+#define isl_map_from_union_map (*cloog_pointers__.p_isl_map_from_union_map) |
1756 |
+#define isl_map_get_ctx (*cloog_pointers__.p_isl_map_get_ctx) |
1757 |
+#define isl_map_get_space (*cloog_pointers__.p_isl_map_get_space) |
1758 |
+#define isl_map_get_tuple_id (*cloog_pointers__.p_isl_map_get_tuple_id) |
1759 |
+#define isl_map_insert_dims (*cloog_pointers__.p_isl_map_insert_dims) |
1760 |
+#define isl_map_intersect (*cloog_pointers__.p_isl_map_intersect) |
1761 |
+#define isl_map_intersect_domain (*cloog_pointers__.p_isl_map_intersect_domain) |
1762 |
+#define isl_map_intersect_range (*cloog_pointers__.p_isl_map_intersect_range) |
1763 |
+#define isl_map_is_empty (*cloog_pointers__.p_isl_map_is_empty) |
1764 |
+#define isl_map_lex_ge (*cloog_pointers__.p_isl_map_lex_ge) |
1765 |
+#define isl_map_lex_le (*cloog_pointers__.p_isl_map_lex_le) |
1766 |
+#define isl_map_n_out (*cloog_pointers__.p_isl_map_n_out) |
1767 |
+#define isl_map_range (*cloog_pointers__.p_isl_map_range) |
1768 |
+#define isl_map_set_tuple_id (*cloog_pointers__.p_isl_map_set_tuple_id) |
1769 |
+#define isl_map_universe (*cloog_pointers__.p_isl_map_universe) |
1770 |
+#define isl_options_set_on_error (*cloog_pointers__.p_isl_options_set_on_error) |
1771 |
+#define isl_options_set_schedule_fuse (*cloog_pointers__.p_isl_options_set_schedule_fuse) |
1772 |
+#define isl_options_set_schedule_max_constant_term (*cloog_pointers__.p_isl_options_set_schedule_max_constant_term) |
1773 |
+#define isl_options_set_schedule_maximize_band_depth (*cloog_pointers__.p_isl_options_set_schedule_maximize_band_depth) |
1774 |
+#define isl_printer_free (*cloog_pointers__.p_isl_printer_free) |
1775 |
+#define isl_printer_print_aff (*cloog_pointers__.p_isl_printer_print_aff) |
1776 |
+#define isl_printer_print_constraint (*cloog_pointers__.p_isl_printer_print_constraint) |
1777 |
+#define isl_printer_print_map (*cloog_pointers__.p_isl_printer_print_map) |
1778 |
+#define isl_printer_print_set (*cloog_pointers__.p_isl_printer_print_set) |
1779 |
+#define isl_printer_to_file (*cloog_pointers__.p_isl_printer_to_file) |
1780 |
+#define isl_pw_aff_add (*cloog_pointers__.p_isl_pw_aff_add) |
1781 |
+#define isl_pw_aff_alloc (*cloog_pointers__.p_isl_pw_aff_alloc) |
1782 |
+#define isl_pw_aff_copy (*cloog_pointers__.p_isl_pw_aff_copy) |
1783 |
+#define isl_pw_aff_eq_set (*cloog_pointers__.p_isl_pw_aff_eq_set) |
1784 |
+#define isl_pw_aff_free (*cloog_pointers__.p_isl_pw_aff_free) |
1785 |
+#define isl_pw_aff_from_aff (*cloog_pointers__.p_isl_pw_aff_from_aff) |
1786 |
+#define isl_pw_aff_ge_set (*cloog_pointers__.p_isl_pw_aff_ge_set) |
1787 |
+#define isl_pw_aff_gt_set (*cloog_pointers__.p_isl_pw_aff_gt_set) |
1788 |
+#define isl_pw_aff_is_cst (*cloog_pointers__.p_isl_pw_aff_is_cst) |
1789 |
+#define isl_pw_aff_le_set (*cloog_pointers__.p_isl_pw_aff_le_set) |
1790 |
+#define isl_pw_aff_lt_set (*cloog_pointers__.p_isl_pw_aff_lt_set) |
1791 |
+#define isl_pw_aff_mod (*cloog_pointers__.p_isl_pw_aff_mod) |
1792 |
+#define isl_pw_aff_mul (*cloog_pointers__.p_isl_pw_aff_mul) |
1793 |
+#define isl_pw_aff_ne_set (*cloog_pointers__.p_isl_pw_aff_ne_set) |
1794 |
+#define isl_pw_aff_nonneg_set (*cloog_pointers__.p_isl_pw_aff_nonneg_set) |
1795 |
+#define isl_pw_aff_set_tuple_id (*cloog_pointers__.p_isl_pw_aff_set_tuple_id) |
1796 |
+#define isl_pw_aff_sub (*cloog_pointers__.p_isl_pw_aff_sub) |
1797 |
+#define isl_pw_aff_zero_set (*cloog_pointers__.p_isl_pw_aff_zero_set) |
1798 |
+#define isl_schedule_free (*cloog_pointers__.p_isl_schedule_free) |
1799 |
+#define isl_schedule_get_band_forest (*cloog_pointers__.p_isl_schedule_get_band_forest) |
1800 |
+#define isl_set_add_constraint (*cloog_pointers__.p_isl_set_add_constraint) |
1801 |
+#define isl_set_add_dims (*cloog_pointers__.p_isl_set_add_dims) |
1802 |
+#define isl_set_apply (*cloog_pointers__.p_isl_set_apply) |
1803 |
+#define isl_set_coalesce (*cloog_pointers__.p_isl_set_coalesce) |
1804 |
+#define isl_set_copy (*cloog_pointers__.p_isl_set_copy) |
1805 |
+#define isl_set_dim (*cloog_pointers__.p_isl_set_dim) |
1806 |
+#define isl_set_fix_si (*cloog_pointers__.p_isl_set_fix_si) |
1807 |
+#define isl_set_free (*cloog_pointers__.p_isl_set_free) |
1808 |
+#define isl_set_from_cloog_domain (*cloog_pointers__.p_isl_set_from_cloog_domain) |
1809 |
+#define isl_set_get_space (*cloog_pointers__.p_isl_set_get_space) |
1810 |
+#define isl_set_get_tuple_id (*cloog_pointers__.p_isl_set_get_tuple_id) |
1811 |
+#define isl_set_intersect (*cloog_pointers__.p_isl_set_intersect) |
1812 |
+#define isl_set_is_empty (*cloog_pointers__.p_isl_set_is_empty) |
1813 |
+#define isl_set_max (*cloog_pointers__.p_isl_set_max) |
1814 |
+#define isl_set_min (*cloog_pointers__.p_isl_set_min) |
1815 |
+#define isl_set_nat_universe (*cloog_pointers__.p_isl_set_nat_universe) |
1816 |
+#define isl_set_project_out (*cloog_pointers__.p_isl_set_project_out) |
1817 |
+#define isl_set_set_tuple_id (*cloog_pointers__.p_isl_set_set_tuple_id) |
1818 |
+#define isl_set_universe (*cloog_pointers__.p_isl_set_universe) |
1819 |
+#define isl_space_add_dims (*cloog_pointers__.p_isl_space_add_dims) |
1820 |
+#define isl_space_alloc (*cloog_pointers__.p_isl_space_alloc) |
1821 |
+#define isl_space_copy (*cloog_pointers__.p_isl_space_copy) |
1822 |
+#define isl_space_dim (*cloog_pointers__.p_isl_space_dim) |
1823 |
+#define isl_space_domain (*cloog_pointers__.p_isl_space_domain) |
1824 |
+#define isl_space_find_dim_by_id (*cloog_pointers__.p_isl_space_find_dim_by_id) |
1825 |
+#define isl_space_free (*cloog_pointers__.p_isl_space_free) |
1826 |
+#define isl_space_from_domain (*cloog_pointers__.p_isl_space_from_domain) |
1827 |
+#define isl_space_get_tuple_id (*cloog_pointers__.p_isl_space_get_tuple_id) |
1828 |
+#define isl_space_params_alloc (*cloog_pointers__.p_isl_space_params_alloc) |
1829 |
+#define isl_space_range (*cloog_pointers__.p_isl_space_range) |
1830 |
+#define isl_space_set_alloc (*cloog_pointers__.p_isl_space_set_alloc) |
1831 |
+#define isl_space_set_dim_id (*cloog_pointers__.p_isl_space_set_dim_id) |
1832 |
+#define isl_space_set_tuple_id (*cloog_pointers__.p_isl_space_set_tuple_id) |
1833 |
+#define isl_union_map_add_map (*cloog_pointers__.p_isl_union_map_add_map) |
1834 |
+#define isl_union_map_align_params (*cloog_pointers__.p_isl_union_map_align_params) |
1835 |
+#define isl_union_map_apply_domain (*cloog_pointers__.p_isl_union_map_apply_domain) |
1836 |
+#define isl_union_map_apply_range (*cloog_pointers__.p_isl_union_map_apply_range) |
1837 |
+#define isl_union_map_compute_flow (*cloog_pointers__.p_isl_union_map_compute_flow) |
1838 |
+#define isl_union_map_copy (*cloog_pointers__.p_isl_union_map_copy) |
1839 |
+#define isl_union_map_empty (*cloog_pointers__.p_isl_union_map_empty) |
1840 |
+#define isl_union_map_flat_range_product (*cloog_pointers__.p_isl_union_map_flat_range_product) |
1841 |
+#define isl_union_map_foreach_map (*cloog_pointers__.p_isl_union_map_foreach_map) |
1842 |
+#define isl_union_map_free (*cloog_pointers__.p_isl_union_map_free) |
1843 |
+#define isl_union_map_from_map (*cloog_pointers__.p_isl_union_map_from_map) |
1844 |
+#define isl_union_map_get_ctx (*cloog_pointers__.p_isl_union_map_get_ctx) |
1845 |
+#define isl_union_map_get_space (*cloog_pointers__.p_isl_union_map_get_space) |
1846 |
+#define isl_union_map_gist_domain (*cloog_pointers__.p_isl_union_map_gist_domain) |
1847 |
+#define isl_union_map_gist_range (*cloog_pointers__.p_isl_union_map_gist_range) |
1848 |
+#define isl_union_map_intersect_domain (*cloog_pointers__.p_isl_union_map_intersect_domain) |
1849 |
+#define isl_union_map_is_empty (*cloog_pointers__.p_isl_union_map_is_empty) |
1850 |
+#define isl_union_map_subtract (*cloog_pointers__.p_isl_union_map_subtract) |
1851 |
+#define isl_union_map_union (*cloog_pointers__.p_isl_union_map_union) |
1852 |
+#define isl_union_set_add_set (*cloog_pointers__.p_isl_union_set_add_set) |
1853 |
+#define isl_union_set_compute_schedule (*cloog_pointers__.p_isl_union_set_compute_schedule) |
1854 |
+#define isl_union_set_copy (*cloog_pointers__.p_isl_union_set_copy) |
1855 |
+#define isl_union_set_empty (*cloog_pointers__.p_isl_union_set_empty) |
1856 |
+#define isl_union_set_from_set (*cloog_pointers__.p_isl_union_set_from_set) |
1857 |
+#define stmt_ass (*cloog_pointers__.p_stmt_ass) |
1858 |
+#define stmt_block (*cloog_pointers__.p_stmt_block) |
1859 |
+#define stmt_for (*cloog_pointers__.p_stmt_for) |
1860 |
+#define stmt_guard (*cloog_pointers__.p_stmt_guard) |
1861 |
+#define stmt_root (*cloog_pointers__.p_stmt_root) |
1862 |
+#define stmt_user (*cloog_pointers__.p_stmt_user) |
1863 |
+ |
1864 |
typedef struct poly_dr *poly_dr_p; |
1865 |
|
1866 |
typedef struct poly_bb *poly_bb_p; |
1867 |
--- a/gcc/graphite.c |
1868 |
+++ b/gcc/graphite.c |
1869 |
@@ -65,6 +65,34 @@ along with GCC; see the file COPYING3. If not see |
1870 |
|
1871 |
CloogState *cloog_state; |
1872 |
|
1873 |
+__typeof (cloog_pointers__) cloog_pointers__; |
1874 |
+ |
1875 |
+static bool |
1876 |
+init_cloog_pointers (void) |
1877 |
+{ |
1878 |
+ void *h; |
1879 |
+ |
1880 |
+ if (cloog_pointers__.inited) |
1881 |
+ return cloog_pointers__.h != NULL; |
1882 |
+ h = dlopen ("libcloog-isl.so.4", RTLD_LAZY); |
1883 |
+ cloog_pointers__.h = h; |
1884 |
+ if (h == NULL) |
1885 |
+ return false; |
1886 |
+#define DYNSYM(x) \ |
1887 |
+ do \ |
1888 |
+ { \ |
1889 |
+ union { __typeof (cloog_pointers__.p_##x) p; void *q; } u; \ |
1890 |
+ u.q = dlsym (h, #x); \ |
1891 |
+ if (u.q == NULL) \ |
1892 |
+ return false; \ |
1893 |
+ cloog_pointers__.p_##x = u.p; \ |
1894 |
+ } \ |
1895 |
+ while (0) |
1896 |
+ DYNSYMS |
1897 |
+#undef DYNSYM |
1898 |
+ return true; |
1899 |
+} |
1900 |
+ |
1901 |
/* Print global statistics to FILE. */ |
1902 |
|
1903 |
static void |
1904 |
@@ -263,6 +291,15 @@ graphite_transform_loops (void) |
1905 |
if (parallelized_function_p (cfun->decl)) |
1906 |
return; |
1907 |
|
1908 |
+ if (number_of_loops () <= 1) |
1909 |
+ return; |
1910 |
+ |
1911 |
+ if (!init_cloog_pointers ()) |
1912 |
+ { |
1913 |
+ sorry ("Graphite loop optimizations cannot be used"); |
1914 |
+ return; |
1915 |
+ } |
1916 |
+ |
1917 |
ctx = isl_ctx_alloc (); |
1918 |
isl_options_set_on_error(ctx, ISL_ON_ERROR_ABORT); |
1919 |
if (!graphite_initialize (ctx)) |
1920 |
|
1921 |
|
1922 |
|
1923 |
1.1 src/patchsets/gcc/4.8.3/gentoo/90_all_pr55930-dependency-tracking.patch |
1924 |
|
1925 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gcc/4.8.3/gentoo/90_all_pr55930-dependency-tracking.patch?rev=1.1&view=markup |
1926 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gcc/4.8.3/gentoo/90_all_pr55930-dependency-tracking.patch?rev=1.1&content-type=text/plain |
1927 |
|
1928 |
Index: 90_all_pr55930-dependency-tracking.patch |
1929 |
=================================================================== |
1930 |
libatomic build failure if configured with --disable-dependency-tracking |
1931 |
load_n.c:115:1: fatal error: opening dependency file .deps/load_1_.lo.Ppo: No such file or directory |
1932 |
|
1933 |
https://bugs.gentoo.org/463463 |
1934 |
http://gcc.gnu.org/PR55930 |
1935 |
|
1936 |
--- a/libatomic/Makefile.in |
1937 |
+++ b/libatomic/Makefile.in |
1938 |
@@ -298,7 +298,8 @@ PAT_N = $(word 2,$(PAT_SPLIT)) |
1939 |
PAT_S = $(word 3,$(PAT_SPLIT)) |
1940 |
IFUNC_DEF = -DIFUNC_ALT=$(PAT_S) |
1941 |
IFUNC_OPT = $(word $(PAT_S),$(IFUNC_OPTIONS)) |
1942 |
-M_DEPS = -MT $@ -MD -MP -MF $(DEPDIR)/$(@F).Ppo |
1943 |
+@AMDEP_TRUE@M_DEPS = -MT $@ -MD -MP -MF $(DEPDIR)/$(@F).Ppo |
1944 |
+@AMDEP_FALSE@M_DEPS = |
1945 |
M_SIZE = -DN=$(PAT_N) |
1946 |
M_IFUNC = $(if $(PAT_S),$(IFUNC_DEF) $(IFUNC_OPT)) |
1947 |
M_FILE = $(PAT_BASE)_n.c |
1948 |
|
1949 |
|
1950 |
|
1951 |
1.1 src/patchsets/gcc/4.8.3/gentoo/92_all_freebsd-pie.patch |
1952 |
|
1953 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gcc/4.8.3/gentoo/92_all_freebsd-pie.patch?rev=1.1&view=markup |
1954 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gcc/4.8.3/gentoo/92_all_freebsd-pie.patch?rev=1.1&content-type=text/plain |
1955 |
|
1956 |
Index: 92_all_freebsd-pie.patch |
1957 |
=================================================================== |
1958 |
https://bugs.gentoo.org/415185 |
1959 |
http://gcc.gnu.org/ml/gcc-patches/2012-05/msg00555.html |
1960 |
|
1961 |
From: Alexis Ballier <aballier@g.o> |
1962 |
To: gcc-patches@×××××××.org |
1963 |
Cc: Alexis Ballier <aballier@g.o> |
1964 |
Date: Tue, 8 May 2012 09:53:43 -0400 |
1965 |
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. |
1966 |
|
1967 |
gcc/config/i386/freebsd.h: Likewise. |
1968 |
--- |
1969 |
gcc/config/freebsd-spec.h | 9 +++------ |
1970 |
gcc/config/i386/freebsd.h | 9 +++------ |
1971 |
2 files changed, 6 insertions(+), 12 deletions(-) |
1972 |
|
1973 |
diff --git a/gcc/config/freebsd-spec.h b/gcc/config/freebsd-spec.h |
1974 |
index 770a3d1..2808582 100644 |
1975 |
--- a/gcc/config/freebsd-spec.h |
1976 |
+++ b/gcc/config/freebsd-spec.h |
1977 |
@@ -64,11 +64,8 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see |
1978 |
before entering `main'. */ |
1979 |
|
1980 |
#define FBSD_STARTFILE_SPEC \ |
1981 |
- "%{!shared: \ |
1982 |
- %{pg:gcrt1.o%s} %{!pg:%{p:gcrt1.o%s} \ |
1983 |
- %{!p:%{profile:gcrt1.o%s} \ |
1984 |
- %{!profile:crt1.o%s}}}} \ |
1985 |
- crti.o%s %{!shared:crtbegin.o%s} %{shared:crtbeginS.o%s}" |
1986 |
+ "%{!shared: %{pg|p|profile:gcrt1.o%s;pie:Scrt1.o%s;:crt1.o%s}} \ |
1987 |
+ crti.o%s %{shared|pie:crtbeginS.o%s;:crtbegin.o%s}" |
1988 |
|
1989 |
/* Provide a ENDFILE_SPEC appropriate for FreeBSD. Here we tack on |
1990 |
the magical crtend.o file (see crtstuff.c) which provides part of |
1991 |
@@ -77,7 +74,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see |
1992 |
`crtn.o'. */ |
1993 |
|
1994 |
#define FBSD_ENDFILE_SPEC \ |
1995 |
- "%{!shared:crtend.o%s} %{shared:crtendS.o%s} crtn.o%s" |
1996 |
+ "%{shared|pie:crtendS.o%s;:crtend.o%s} crtn.o%s" |
1997 |
|
1998 |
/* Provide a LIB_SPEC appropriate for FreeBSD as configured and as |
1999 |
required by the user-land thread model. Before __FreeBSD_version |
2000 |
diff --git a/gcc/config/i386/freebsd.h b/gcc/config/i386/freebsd.h |
2001 |
index 649274d..dd69e43 100644 |
2002 |
--- a/gcc/config/i386/freebsd.h |
2003 |
+++ b/gcc/config/i386/freebsd.h |
2004 |
@@ -67,11 +67,8 @@ along with GCC; see the file COPYING3. If not see |
2005 |
|
2006 |
#undef STARTFILE_SPEC |
2007 |
#define STARTFILE_SPEC \ |
2008 |
- "%{!shared: \ |
2009 |
- %{pg:gcrt1.o%s} %{!pg:%{p:gcrt1.o%s} \ |
2010 |
- %{!p:%{profile:gcrt1.o%s} \ |
2011 |
- %{!profile:crt1.o%s}}}} \ |
2012 |
- crti.o%s %{!shared:crtbegin.o%s} %{shared:crtbeginS.o%s}" |
2013 |
+ "%{!shared: %{pg|p|profile:gcrt1.o%s;pie:Scrt1.o%s;:crt1.o%s}} \ |
2014 |
+ crti.o%s %{shared|pie:crtbeginS.o%s;:crtbegin.o%s}" |
2015 |
|
2016 |
/* Provide a ENDFILE_SPEC appropriate for FreeBSD. Here we tack on |
2017 |
the magical crtend.o file (see crtstuff.c) which provides part of |
2018 |
@@ -81,7 +78,7 @@ along with GCC; see the file COPYING3. If not see |
2019 |
|
2020 |
#undef ENDFILE_SPEC |
2021 |
#define ENDFILE_SPEC \ |
2022 |
- "%{!shared:crtend.o%s} %{shared:crtendS.o%s} crtn.o%s" |
2023 |
+ "%{shared|pie:crtendS.o%s;:crtend.o%s} crtn.o%s" |
2024 |
|
2025 |
/* Provide a LINK_SPEC appropriate for FreeBSD. Here we provide support |
2026 |
for the special GCC options -static and -shared, which allow us to |
2027 |
-- |
2028 |
1.7.8.6 |
2029 |
|
2030 |
|
2031 |
|
2032 |
1.1 src/patchsets/gcc/4.8.3/gentoo/README.history |
2033 |
|
2034 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gcc/4.8.3/gentoo/README.history?rev=1.1&view=markup |
2035 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gcc/4.8.3/gentoo/README.history?rev=1.1&content-type=text/plain |
2036 |
|
2037 |
Index: README.history |
2038 |
=================================================================== |
2039 |
1.0 (pending) |
2040 |
+ 09_all_default-ssp.patch |
2041 |
+ 10_all_default-fortify-source.patch |
2042 |
+ 11_all_default-warn-format-security.patch |
2043 |
+ 12_all_default-warn-trampolines.patch |
2044 |
+ 15_all_libgfortran-Werror.patch |
2045 |
+ 16_all_libgomp-Werror.patch |
2046 |
+ 17_all_libitm-Werror.patch |
2047 |
+ 18_all_libatomic-Werror.patch |
2048 |
+ 19_all_libbacktrace-Werror.patch |
2049 |
+ 25_all_alpha-mieee-default.patch |
2050 |
+ 26_all_alpha-asm-mcpu.patch |
2051 |
+ 29_all_arm_armv4t-default.patch |
2052 |
+ 30_all_arm_armv4-no-thumb-fix-link.patch |
2053 |
+ 34_all_ia64_note.GNU-stack.patch |
2054 |
+ 38_all_sh_pr24836_all-archs.patch |
2055 |
+ 42_all_superh_default-multilib.patch |
2056 |
+ 48_all_x86_pr53113_libitm-avx.patch |
2057 |
+ 50_all_libiberty-asprintf.patch |
2058 |
+ 51_all_libiberty-pic.patch |
2059 |
+ 52_all_netbsd-Bsymbolic.patch |
2060 |
+ 67_all_gcc-poison-system-directories.patch |
2061 |
+ 74_all_gcc48_cloog-dl.patch |
2062 |
+ 90_all_pr55930-dependency-tracking.patch |
2063 |
+ 92_all_freebsd-pie.patch |