1 |
vapier 10/02/08 12:57:32 |
2 |
|
3 |
Added: 00_all_gcc-4.1-alpha-mieee-default.patch |
4 |
00_all_gcc-trampolinewarn.patch |
5 |
01_all_gcc-4.1-alpha-asm-mcpu.patch |
6 |
03_all_gcc43-java-nomulti.patch |
7 |
08_all_gcc-4.1-cross-compile.patch |
8 |
10_all_gcc-default-format-security.patch |
9 |
10_all_gcc-default-fortify-source.patch |
10 |
11_all_gcc-netbsd-symbolic.patch |
11 |
14_all_gcc-sparc64-bsd.patch |
12 |
15_all_gcc-libgomp-no-werror.patch |
13 |
18_all_904-flatten-switch-stmt-00.patch |
14 |
40_all_gcc-4.4-libiberty.h-asprintf.patch |
15 |
47_all_arm-unbreak-armv4t.patch |
16 |
51_all_gcc-3.4-libiberty-pic.patch |
17 |
53_all_gcc4-superh-default-multilib.patch |
18 |
54_all_300-libstdc++-pic.patch |
19 |
61_all_gcc4-ia64-noteGNUstack.patch |
20 |
73_all_sh-libgcc-stacks.patch |
21 |
74_all_sh-pr24836.patch 90_all_gcc-freebsd.patch |
22 |
91_all_gcc-freebsd.patch README.history |
23 |
Log: |
24 |
initial 4.4.3 patchset based on last 4.4.2 patchset |
25 |
|
26 |
Revision Changes Path |
27 |
1.1 src/patchsets/gcc/4.4.3/gentoo/00_all_gcc-4.1-alpha-mieee-default.patch |
28 |
|
29 |
file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/gcc/4.4.3/gentoo/00_all_gcc-4.1-alpha-mieee-default.patch?rev=1.1&view=markup |
30 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/gcc/4.4.3/gentoo/00_all_gcc-4.1-alpha-mieee-default.patch?rev=1.1&content-type=text/plain |
31 |
|
32 |
Index: 00_all_gcc-4.1-alpha-mieee-default.patch |
33 |
=================================================================== |
34 |
Set the default behavior on alpha to use -mieee since the large majority of |
35 |
time we want this (bad/weird things can happen with packages built without |
36 |
-mieee). |
37 |
|
38 |
To satisfy those people who may not want -mieee forced on them all the time, |
39 |
we also provide -mno-ieee. |
40 |
|
41 |
Patch by Mike Frysinger <vapier@g.o> |
42 |
|
43 |
--- gcc-4.3.0/gcc/config/alpha/alpha.h |
44 |
+++ gcc-4.3.0/gcc/config/alpha/alpha.h |
45 |
@@ -95,6 +95,8 @@ |
46 |
while (0) |
47 |
#endif |
48 |
|
49 |
+#define CPP_SPEC "%{!no-ieee:-mieee}" |
50 |
+ |
51 |
#define WORD_SWITCH_TAKES_ARG(STR) \ |
52 |
(!strcmp (STR, "rpath") || DEFAULT_WORD_SWITCH_TAKES_ARG(STR)) |
53 |
|
54 |
--- gcc-4.3.0/gcc/config/alpha/alpha.opt |
55 |
+++ gcc-4.3.0/gcc/config/alpha/alpha.opt |
56 |
@@ -39,7 +39,7 @@ |
57 |
Request IEEE-conformant math library routines (OSF/1) |
58 |
|
59 |
mieee |
60 |
-Target Report RejectNegative Mask(IEEE) |
61 |
+Target Report Mask(IEEE) |
62 |
Emit IEEE-conformant code, without inexact exceptions |
63 |
|
64 |
mieee-with-inexact |
65 |
|
66 |
|
67 |
|
68 |
1.1 src/patchsets/gcc/4.4.3/gentoo/00_all_gcc-trampolinewarn.patch |
69 |
|
70 |
file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/gcc/4.4.3/gentoo/00_all_gcc-trampolinewarn.patch?rev=1.1&view=markup |
71 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/gcc/4.4.3/gentoo/00_all_gcc-trampolinewarn.patch?rev=1.1&content-type=text/plain |
72 |
|
73 |
Index: 00_all_gcc-trampolinewarn.patch |
74 |
=================================================================== |
75 |
This trivial patch causes gcc to emit a warning whenever |
76 |
it generates a trampoline. These are otherwise hard to |
77 |
locate. It is rigged to default ON - to have it default |
78 |
to OFF remove the text 'Init(1)' from the common.opt |
79 |
patch, leaving just 'Common Var(warn_trampolines)'. |
80 |
Kevin F. Quinn <kevquinn@g.o> 17 Jan 2006 |
81 |
|
82 |
--- gcc/gcc/common.opt |
83 |
+++ gcc/gcc/common.opt |
84 |
@@ -141,6 +141,10 @@ |
85 |
Common Var(warn_system_headers) |
86 |
Do not suppress warnings from system headers |
87 |
|
88 |
+Wtrampolines |
89 |
+Common Var(warn_trampolines) Init(1) |
90 |
+Warn whenever a trampoline is generated |
91 |
+ |
92 |
Wuninitialized |
93 |
Common Var(warn_uninitialized) |
94 |
Warn about uninitialized automatic variables |
95 |
--- gcc/gcc/builtins.c |
96 |
+++ gcc/gcc/builtins.c |
97 |
@@ -5224,6 +5224,9 @@ |
98 |
#endif |
99 |
trampolines_created = 1; |
100 |
INITIALIZE_TRAMPOLINE (r_tramp, r_func, r_chain); |
101 |
+ |
102 |
+ if (warn_trampolines) |
103 |
+ warning (OPT_Wtrampolines, "generating trampoline in object (requires executable stack)"); |
104 |
|
105 |
return const0_rtx; |
106 |
} |
107 |
|
108 |
|
109 |
|
110 |
1.1 src/patchsets/gcc/4.4.3/gentoo/01_all_gcc-4.1-alpha-asm-mcpu.patch |
111 |
|
112 |
file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/gcc/4.4.3/gentoo/01_all_gcc-4.1-alpha-asm-mcpu.patch?rev=1.1&view=markup |
113 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/gcc/4.4.3/gentoo/01_all_gcc-4.1-alpha-asm-mcpu.patch?rev=1.1&content-type=text/plain |
114 |
|
115 |
Index: 01_all_gcc-4.1-alpha-asm-mcpu.patch |
116 |
=================================================================== |
117 |
http://bugs.gentoo.org/170146 |
118 |
http://gcc.gnu.org/ml/gcc-patches/2009-11/msg00403.html |
119 |
|
120 |
alpha: turn -mcpu=<cpu> into -m<cpu> for assembler all the time |
121 |
|
122 |
--- gcc-x/gcc/config/alpha/elf.h |
123 |
+++ gcc-x/gcc/config/alpha/elf.h |
124 |
@@ -46,7 +46,7 @@ |
125 |
#define CC1_SPEC "%{G*}" |
126 |
|
127 |
#undef ASM_SPEC |
128 |
-#define ASM_SPEC "%{G*} %{relax:-relax} %{!gstabs*:-no-mdebug}%{gstabs*:-mdebug}" |
129 |
+#define ASM_SPEC "%{G*} %{relax:-relax} %{!gstabs*:-no-mdebug}%{gstabs*:-mdebug} %{mcpu=*:-m%*}" |
130 |
|
131 |
#undef IDENT_ASM_OP |
132 |
#define IDENT_ASM_OP "\t.ident\t" |
133 |
|
134 |
|
135 |
|
136 |
1.1 src/patchsets/gcc/4.4.3/gentoo/03_all_gcc43-java-nomulti.patch |
137 |
|
138 |
file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/gcc/4.4.3/gentoo/03_all_gcc43-java-nomulti.patch?rev=1.1&view=markup |
139 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/gcc/4.4.3/gentoo/03_all_gcc43-java-nomulti.patch?rev=1.1&content-type=text/plain |
140 |
|
141 |
Index: 03_all_gcc43-java-nomulti.patch |
142 |
=================================================================== |
143 |
--- libjava/configure.ac.jj 2007-12-07 17:55:50.000000000 +0100 |
144 |
+++ libjava/configure.ac 2007-12-07 18:36:56.000000000 +0100 |
145 |
@@ -82,6 +82,13 @@ AC_ARG_ENABLE(java-maintainer-mode, |
146 |
[allow rebuilding of .class and .h files])) |
147 |
AM_CONDITIONAL(JAVA_MAINTAINER_MODE, test "$enable_java_maintainer_mode" = yes) |
148 |
|
149 |
+AC_ARG_ENABLE(libjava-multilib, |
150 |
+ AS_HELP_STRING([--enable-libjava-multilib], [build libjava as multilib])) |
151 |
+if test "$enable_libjava_multilib" = no; then |
152 |
+ multilib=no |
153 |
+ ac_configure_args="$ac_configure_args --disable-multilib" |
154 |
+fi |
155 |
+ |
156 |
# It may not be safe to run linking tests in AC_PROG_CC/AC_PROG_CXX. |
157 |
GCC_NO_EXECUTABLES |
158 |
|
159 |
--- libjava/configure.jj 2007-12-07 17:55:50.000000000 +0100 |
160 |
+++ libjava/configure 2007-12-07 18:39:58.000000000 +0100 |
161 |
@@ -1018,6 +1018,8 @@ Optional Features: |
162 |
--enable-gconf-peer compile GConf native peers for util.preferences |
163 |
--enable-java-maintainer-mode |
164 |
allow rebuilding of .class and .h files |
165 |
+ --enable-libjava-multilib |
166 |
+ build libjava as multilib |
167 |
--disable-dependency-tracking speeds up one-time build |
168 |
--enable-dependency-tracking do not reject slow dependency extractors |
169 |
--enable-maintainer-mode enable make rules and dependencies not useful |
170 |
@@ -1848,6 +1850,16 @@ else |
171 |
fi |
172 |
|
173 |
|
174 |
+# Check whether --enable-libjava-multilib was given. |
175 |
+if test "${enable_libjava_multilib+set}" = set; then |
176 |
+ enableval=$enable_libjava_multilib; |
177 |
+fi |
178 |
+ |
179 |
+if test "$enable_libjava_multilib" = no; then |
180 |
+ multilib=no |
181 |
+ ac_configure_args="$ac_configure_args --disable-multilib" |
182 |
+fi |
183 |
+ |
184 |
# It may not be safe to run linking tests in AC_PROG_CC/AC_PROG_CXX. |
185 |
|
186 |
|
187 |
|
188 |
|
189 |
|
190 |
1.1 src/patchsets/gcc/4.4.3/gentoo/08_all_gcc-4.1-cross-compile.patch |
191 |
|
192 |
file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/gcc/4.4.3/gentoo/08_all_gcc-4.1-cross-compile.patch?rev=1.1&view=markup |
193 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/gcc/4.4.3/gentoo/08_all_gcc-4.1-cross-compile.patch?rev=1.1&content-type=text/plain |
194 |
|
195 |
Index: 08_all_gcc-4.1-cross-compile.patch |
196 |
=================================================================== |
197 |
Some notes on the 'bootstrap with or without libc headers' debate: |
198 |
http://linuxfromscratch.org/pipermail/lfs-dev/2005-July/052409.html |
199 |
http://gcc.gnu.org/ml/gcc/2005-07/msg01195.html |
200 |
|
201 |
--- gcc/unwind-dw2.c |
202 |
+++ gcc/unwind-dw2.c |
203 |
@@ -253,9 +253,11 @@ |
204 |
} |
205 |
#endif |
206 |
|
207 |
+#ifndef inhibit_libc |
208 |
#ifdef MD_UNWIND_SUPPORT |
209 |
#include MD_UNWIND_SUPPORT |
210 |
#endif |
211 |
+#endif |
212 |
|
213 |
/* Extract any interesting information from the CIE for the translation |
214 |
unit F belongs to. Return a pointer to the byte after the augmentation, |
215 |
--- gcc/configure |
216 |
+++ gcc/configure |
217 |
@@ -12857,7 +12857,7 @@ then |
218 |
| powerpc*-*-*,powerpc64*-*-*) |
219 |
CROSS="$CROSS -DNATIVE_CROSS" ;; |
220 |
esac |
221 |
-elif test "x$TARGET_SYSTEM_ROOT" != x; then |
222 |
+elif test "x$TARGET_SYSTEM_ROOT" != x -o $build != $host; then |
223 |
SYSTEM_HEADER_DIR=$build_system_header_dir |
224 |
fi |
225 |
|
226 |
--- gcc/configure.ac |
227 |
+++ gcc/configure.ac |
228 |
@@ -1717,7 +1717,7 @@ then |
229 |
| powerpc*-*-*,powerpc64*-*-*) |
230 |
CROSS="$CROSS -DNATIVE_CROSS" ;; |
231 |
esac |
232 |
-elif test "x$TARGET_SYSTEM_ROOT" != x; then |
233 |
+elif test "x$TARGET_SYSTEM_ROOT" != x -o $build != $host; then |
234 |
SYSTEM_HEADER_DIR=$build_system_header_dir |
235 |
fi |
236 |
|
237 |
|
238 |
|
239 |
|
240 |
1.1 src/patchsets/gcc/4.4.3/gentoo/10_all_gcc-default-format-security.patch |
241 |
|
242 |
file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/gcc/4.4.3/gentoo/10_all_gcc-default-format-security.patch?rev=1.1&view=markup |
243 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/gcc/4.4.3/gentoo/10_all_gcc-default-format-security.patch?rev=1.1&content-type=text/plain |
244 |
|
245 |
Index: 10_all_gcc-default-format-security.patch |
246 |
=================================================================== |
247 |
ripped from Debian |
248 |
|
249 |
# DP: Turn on -Wformat -Wformat-security by default for C, C++, ObjC, ObjC++. |
250 |
|
251 |
--- gcc/c-common.c |
252 |
+++ gcc/c-common.c |
253 |
@@ -277,7 +277,7 @@ |
254 |
/* Warn about format/argument anomalies in calls to formatted I/O functions |
255 |
(*printf, *scanf, strftime, strfmon, etc.). */ |
256 |
|
257 |
-int warn_format; |
258 |
+int warn_format = 1; |
259 |
|
260 |
/* Warn about using __null (as NULL in C++) as sentinel. For code compiled |
261 |
with GCC this doesn't matter as __null is guaranteed to have the right |
262 |
--- gcc/c.opt |
263 |
+++ gcc/c.opt |
264 |
@@ -228,7 +228,7 @@ |
265 |
Warn about format strings that contain NUL bytes |
266 |
|
267 |
Wformat-security |
268 |
-C ObjC C++ ObjC++ Var(warn_format_security) Warning |
269 |
+C ObjC C++ ObjC++ Var(warn_format_security) Init(1) Warning |
270 |
Warn about possible security problems with format functions |
271 |
|
272 |
Wformat-y2k |
273 |
--- gcc/doc/invoke.texi |
274 |
+++ gcc/doc/invoke.texi |
275 |
@@ -2802,6 +2802,9 @@ |
276 |
@option{-Wformat-nonliteral}, @option{-Wformat-security}, and |
277 |
@option{-Wformat=2} are available, but are not included in @option{-Wall}. |
278 |
|
279 |
+NOTE: In Gentoo, this option is enabled by default for C, C++, ObjC, ObjC++. |
280 |
+To disable, use @option{-Wformat=0}. |
281 |
+ |
282 |
@item -Wformat-y2k |
283 |
@opindex Wformat-y2k |
284 |
@opindex Wno-format-y2k |
285 |
@@ -2849,6 +2852,11 @@ |
286 |
in future warnings may be added to @option{-Wformat-security} that are not |
287 |
included in @option{-Wformat-nonliteral}.) |
288 |
|
289 |
+NOTE: In Gentoo, this option is enabled by default for C, C++, ObjC, ObjC++. |
290 |
+To disable, use @option{-Wno-format-security}, or disable all format warnings |
291 |
+with @option{-Wformat=0}. To make format security warnings fatal, specify |
292 |
+@option{-Werror=format-security}. |
293 |
+ |
294 |
@item -Wformat=2 |
295 |
@opindex Wformat=2 |
296 |
@opindex Wno-format=2 |
297 |
|
298 |
|
299 |
|
300 |
1.1 src/patchsets/gcc/4.4.3/gentoo/10_all_gcc-default-fortify-source.patch |
301 |
|
302 |
file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/gcc/4.4.3/gentoo/10_all_gcc-default-fortify-source.patch?rev=1.1&view=markup |
303 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/gcc/4.4.3/gentoo/10_all_gcc-default-fortify-source.patch?rev=1.1&content-type=text/plain |
304 |
|
305 |
Index: 10_all_gcc-default-fortify-source.patch |
306 |
=================================================================== |
307 |
ripped from Debian |
308 |
|
309 |
# DP: Turn on -D_FORTIFY_SOURCE=2 by default for C, C++, ObjC, ObjC++. |
310 |
|
311 |
--- gcc/doc/invoke.texi |
312 |
+++ gcc/doc/invoke.texi |
313 |
@@ -5204,6 +5204,11 @@ |
314 |
Please note the warning under @option{-fgcse} about |
315 |
invoking @option{-O2} on programs that use computed gotos. |
316 |
|
317 |
+NOTE: In Gentoo, @option{-D_FORTIFY_SOURCE=2} is set by default, and is |
318 |
+activated when @option{-O} is set to 2 or higher. This enables additional |
319 |
+compile-time and run-time checks for several libc functions. To disable, |
320 |
+specify either @option{-U_FORTIFY_SOURCE} or @option{-D_FORTIFY_SOURCE=0}. |
321 |
+ |
322 |
@item -O3 |
323 |
@opindex O3 |
324 |
Optimize yet more. @option{-O3} turns on all optimizations specified by |
325 |
--- gcc/gcc.c |
326 |
+++ gcc/gcc.c |
327 |
@@ -802,6 +802,7 @@ |
328 |
%{H} %C %{D*&U*&A*} %{i*} %Z %i\ |
329 |
%{fmudflap:-D_MUDFLAP -include mf-runtime.h}\ |
330 |
%{fmudflapth:-D_MUDFLAP -D_MUDFLAPTH -include mf-runtime.h}\ |
331 |
+ %{!D_FORTIFY_SOURCE:%{!D_FORTIFY_SOURCE=*:%{!U_FORTIFY_SOURCE:-D_FORTIFY_SOURCE=2}}}\ |
332 |
%{E|M|MM:%W{o*}}"; |
333 |
|
334 |
/* This contains cpp options which are common with cc1_options and are passed |
335 |
|
336 |
|
337 |
|
338 |
1.1 src/patchsets/gcc/4.4.3/gentoo/11_all_gcc-netbsd-symbolic.patch |
339 |
|
340 |
file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/gcc/4.4.3/gentoo/11_all_gcc-netbsd-symbolic.patch?rev=1.1&view=markup |
341 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/gcc/4.4.3/gentoo/11_all_gcc-netbsd-symbolic.patch?rev=1.1&content-type=text/plain |
342 |
|
343 |
Index: 11_all_gcc-netbsd-symbolic.patch |
344 |
=================================================================== |
345 |
http://bugs.gentoo.org/122698 |
346 |
|
347 |
--- gcc/config/netbsd-elf.h |
348 |
+++ gcc/config/netbsd-elf.h |
349 |
@@ -83,6 +83,7 @@ |
350 |
#define NETBSD_LINK_SPEC_ELF \ |
351 |
"%{assert*} %{R*} %{rpath*} \ |
352 |
%{shared:-shared} \ |
353 |
+ %{symbolic:-Bsymbolic} \ |
354 |
%{!shared: \ |
355 |
-dc -dp \ |
356 |
%{!nostdlib: \ |
357 |
|
358 |
|
359 |
|
360 |
1.1 src/patchsets/gcc/4.4.3/gentoo/14_all_gcc-sparc64-bsd.patch |
361 |
|
362 |
file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/gcc/4.4.3/gentoo/14_all_gcc-sparc64-bsd.patch?rev=1.1&view=markup |
363 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/gcc/4.4.3/gentoo/14_all_gcc-sparc64-bsd.patch?rev=1.1&content-type=text/plain |
364 |
|
365 |
Index: 14_all_gcc-sparc64-bsd.patch |
366 |
=================================================================== |
367 |
--- a/gcc/config/sparc/freebsd.h 2006-02-02 19:55:09 +0000 |
368 |
+++ b/gcc/config/sparc/freebsd.h 2007-09-06 23:55:21 +0100 |
369 |
@@ -26,9 +26,22 @@ |
370 |
/* FreeBSD needs the platform name (sparc64) defined. |
371 |
Emacs needs to know if the arch is 64 or 32-bits. */ |
372 |
|
373 |
-#undef CPP_CPU64_DEFAULT_SPEC |
374 |
-#define CPP_CPU64_DEFAULT_SPEC \ |
375 |
- "-D__sparc64__ -D__sparc_v9__ -D__sparcv9 -D__arch64__" |
376 |
+#undef FBSD_TARGET_CPU_CPP_BUILTINS |
377 |
+#define FBSD_TARGET_CPU_CPP_BUILTINS() \ |
378 |
+ do \ |
379 |
+ { \ |
380 |
+ if (TARGET_ARCH64) \ |
381 |
+ { \ |
382 |
+ builtin_define ("__sparc64__"); \ |
383 |
+ builtin_define ("__sparc_v9__"); \ |
384 |
+ builtin_define ("__sparcv9"); \ |
385 |
+ } \ |
386 |
+ else \ |
387 |
+ builtin_define ("__sparc"); \ |
388 |
+ builtin_define ("__sparc__"); \ |
389 |
+ } \ |
390 |
+ while (0) |
391 |
+ |
392 |
|
393 |
#define LINK_SPEC "%(link_arch) \ |
394 |
%{!mno-relax:%{!r:-relax}} \ |
395 |
|
396 |
|
397 |
|
398 |
1.1 src/patchsets/gcc/4.4.3/gentoo/15_all_gcc-libgomp-no-werror.patch |
399 |
|
400 |
file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/gcc/4.4.3/gentoo/15_all_gcc-libgomp-no-werror.patch?rev=1.1&view=markup |
401 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/gcc/4.4.3/gentoo/15_all_gcc-libgomp-no-werror.patch?rev=1.1&content-type=text/plain |
402 |
|
403 |
Index: 15_all_gcc-libgomp-no-werror.patch |
404 |
=================================================================== |
405 |
libgomp does not respect --disable-werror |
406 |
|
407 |
http://bugs.gentoo.org/229059 |
408 |
http://gcc.gnu.org/PR38436 |
409 |
|
410 |
--- gcc-4.3.2/libgomp/configure |
411 |
+++ gcc-4.3.2/libgomp/configure |
412 |
@@ -3297,7 +3297,7 @@ |
413 |
|
414 |
# Add -Wall -Werror if we are using GCC. |
415 |
if test "x$GCC" = "xyes"; then |
416 |
- XCFLAGS="$XCFLAGS -Wall -Werror" |
417 |
+ XCFLAGS="$XCFLAGS -Wall" |
418 |
fi |
419 |
|
420 |
# Find other programs we need. |
421 |
|
422 |
|
423 |
|
424 |
1.1 src/patchsets/gcc/4.4.3/gentoo/18_all_904-flatten-switch-stmt-00.patch |
425 |
|
426 |
file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/gcc/4.4.3/gentoo/18_all_904-flatten-switch-stmt-00.patch?rev=1.1&view=markup |
427 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/gcc/4.4.3/gentoo/18_all_904-flatten-switch-stmt-00.patch?rev=1.1&content-type=text/plain |
428 |
|
429 |
Index: 18_all_904-flatten-switch-stmt-00.patch |
430 |
=================================================================== |
431 |
http://gcc.gnu.org/ml/gcc-patches/2007-04/msg00927.html |
432 |
|
433 |
Hi, |
434 |
|
435 |
The attached patch makes sure that we create smaller object code for |
436 |
simple switch statements. We just make sure to flatten the switch |
437 |
statement into an if-else chain, basically. |
438 |
|
439 |
This fixes a size-regression as compared to gcc-3.4, as can be seen |
440 |
below. |
441 |
|
442 |
2007-04-15 Bernhard Fischer <..> |
443 |
|
444 |
* stmt.c (expand_case): Do not create a complex binary tree when |
445 |
optimizing for size but rather use the simple ordered list. |
446 |
(emit_case_nodes): do not emit jumps to the default_label when |
447 |
optimizing for size. |
448 |
|
449 |
Not regtested so far. |
450 |
Comments? |
451 |
|
452 |
Attached is the test switch.c mentioned below. |
453 |
|
454 |
$ for i in 2.95 3.3 3.4 4.0 4.1 4.2.orig-HEAD 4.3.orig-HEAD 4.3-HEAD;do |
455 |
gcc-$i -DCHAIN -Os -o switch-CHAIN-$i.o -c switch.c ;done |
456 |
$ for i in 2.95 3.3 3.4 4.0 4.1 4.2.orig-HEAD 4.3.orig-HEAD 4.3-HEAD;do |
457 |
gcc-$i -UCHAIN -Os -o switch-$i.o -c switch.c ;done |
458 |
|
459 |
$ size switch-*.o |
460 |
text data bss dec hex filename |
461 |
169 0 0 169 a9 switch-2.95.o |
462 |
115 0 0 115 73 switch-3.3.o |
463 |
103 0 0 103 67 switch-3.4.o |
464 |
124 0 0 124 7c switch-4.0.o |
465 |
124 0 0 124 7c switch-4.1.o |
466 |
124 0 0 124 7c switch-4.2.orig-HEAD.o |
467 |
95 0 0 95 5f switch-4.3-HEAD.o |
468 |
124 0 0 124 7c switch-4.3.orig-HEAD.o |
469 |
166 0 0 166 a6 switch-CHAIN-2.95.o |
470 |
111 0 0 111 6f switch-CHAIN-3.3.o |
471 |
95 0 0 95 5f switch-CHAIN-3.4.o |
472 |
95 0 0 95 5f switch-CHAIN-4.0.o |
473 |
95 0 0 95 5f switch-CHAIN-4.1.o |
474 |
95 0 0 95 5f switch-CHAIN-4.2.orig-HEAD.o |
475 |
95 0 0 95 5f switch-CHAIN-4.3-HEAD.o |
476 |
95 0 0 95 5f switch-CHAIN-4.3.orig-HEAD.o |
477 |
|
478 |
|
479 |
Content-Type: text/x-diff; charset=us-ascii |
480 |
Content-Disposition: attachment; filename="gcc-4.3.gcc-flatten-switch-stmt.00.diff" |
481 |
|
482 |
Index: gcc-4.2.0/gcc/stmt.c |
483 |
=================================================================== |
484 |
--- gcc-4.2.0.orig/gcc/stmt.c (revision 123843) |
485 |
+++ gcc-4.2.0/gcc/stmt.c (working copy) |
486 |
@@ -2517,7 +2517,11 @@ expand_case (tree exp) |
487 |
use_cost_table |
488 |
= (TREE_CODE (orig_type) != ENUMERAL_TYPE |
489 |
&& estimate_case_costs (case_list)); |
490 |
- balance_case_nodes (&case_list, NULL); |
491 |
+ /* When optimizing for size, we want a straight list to avoid |
492 |
+ jumps as much as possible. This basically creates an if-else |
493 |
+ chain. */ |
494 |
+ if (!optimize_size) |
495 |
+ balance_case_nodes (&case_list, NULL); |
496 |
emit_case_nodes (index, case_list, default_label, index_type); |
497 |
emit_jump (default_label); |
498 |
} |
499 |
@@ -3075,6 +3079,7 @@ emit_case_nodes (rtx index, case_node_pt |
500 |
{ |
501 |
if (!node_has_low_bound (node, index_type)) |
502 |
{ |
503 |
+ if (!optimize_size) /* don't jl to the .default_label. */ |
504 |
emit_cmp_and_jump_insns (index, |
505 |
convert_modes |
506 |
(mode, imode, |
507 |
|
508 |
|
509 |
Content-Type: text/x-csrc; charset=us-ascii |
510 |
Content-Disposition: attachment; filename="switch.c" |
511 |
|
512 |
int |
513 |
commutative_tree_code (int code) |
514 |
{ |
515 |
#define CASE(val, ret) case val:/* __asm__("# val="#val ",ret="#ret);*/ return ret; |
516 |
#ifndef CHAIN |
517 |
switch (code) |
518 |
{ |
519 |
# if 1 |
520 |
CASE(1,3) |
521 |
CASE(3,2) |
522 |
CASE(5,8) |
523 |
CASE(7,1) |
524 |
CASE(33,4) |
525 |
CASE(44,9) |
526 |
CASE(55,10) |
527 |
CASE(66,-1) |
528 |
CASE(77,99) |
529 |
CASE(666,0) |
530 |
# else |
531 |
case 1: |
532 |
return 3; |
533 |
case 3: |
534 |
return 2; |
535 |
case 5: |
536 |
return 8; |
537 |
case 7: |
538 |
return 1; |
539 |
case 33: |
540 |
return 4; |
541 |
case 44: |
542 |
return 9; |
543 |
case 55: |
544 |
return 10; |
545 |
case 66: |
546 |
return -1; |
547 |
case 77: |
548 |
return 99; |
549 |
case 666: |
550 |
return 0; |
551 |
# endif |
552 |
default: |
553 |
break; |
554 |
} |
555 |
return 4711; |
556 |
|
557 |
#else |
558 |
if (code == 1) |
559 |
return 3; |
560 |
else if (code == 3) |
561 |
return 2; |
562 |
else if (code == 5) |
563 |
return 8; |
564 |
else if (code == 7) |
565 |
return 1; |
566 |
else if (code == 33) |
567 |
return 4; |
568 |
else if (code == 44) |
569 |
return 9; |
570 |
else if (code == 55) |
571 |
return 10; |
572 |
else if (code == 66) |
573 |
return -1; |
574 |
else if (code == 77) |
575 |
return 99; |
576 |
else if (code == 666) |
577 |
return 0; |
578 |
else |
579 |
return 4711; |
580 |
#endif |
581 |
} |
582 |
|
583 |
|
584 |
--AhhlLboLdkugWU4S-- |
585 |
|
586 |
|
587 |
|
588 |
|
589 |
1.1 src/patchsets/gcc/4.4.3/gentoo/40_all_gcc-4.4-libiberty.h-asprintf.patch |
590 |
|
591 |
file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/gcc/4.4.3/gentoo/40_all_gcc-4.4-libiberty.h-asprintf.patch?rev=1.1&view=markup |
592 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/gcc/4.4.3/gentoo/40_all_gcc-4.4-libiberty.h-asprintf.patch?rev=1.1&content-type=text/plain |
593 |
|
594 |
Index: 40_all_gcc-4.4-libiberty.h-asprintf.patch |
595 |
=================================================================== |
596 |
2008-07-25 Magnus Granberg <zorry@×××.nu> |
597 |
|
598 |
* include/libiberty.h (asprintf): Don't declare if defined as a macro |
599 |
|
600 |
--- include/libiberty.h.zorry |
601 |
+++ include/libiberty.h |
602 |
@@ -554,8 +554,11 @@ |
603 |
/* Like sprintf but provides a pointer to malloc'd storage, which must |
604 |
be freed by the caller. */ |
605 |
|
606 |
+/* asprintf may be declared as a macro by glibc with __USE_FORTIFY_LEVEL. */ |
607 |
+#ifndef asprintf |
608 |
extern int asprintf (char **, const char *, ...) ATTRIBUTE_PRINTF_2; |
609 |
#endif |
610 |
+#endif |
611 |
|
612 |
#if !HAVE_DECL_VASPRINTF |
613 |
/* Like vsprintf but provides a pointer to malloc'd storage, which |
614 |
|
615 |
|
616 |
|
617 |
1.1 src/patchsets/gcc/4.4.3/gentoo/47_all_arm-unbreak-armv4t.patch |
618 |
|
619 |
file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/gcc/4.4.3/gentoo/47_all_arm-unbreak-armv4t.patch?rev=1.1&view=markup |
620 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/gcc/4.4.3/gentoo/47_all_arm-unbreak-armv4t.patch?rev=1.1&content-type=text/plain |
621 |
|
622 |
Index: 47_all_arm-unbreak-armv4t.patch |
623 |
=================================================================== |
624 |
http://sourceware.org/ml/crossgcc/2008-05/msg00009.html |
625 |
|
626 |
gcc defaults to armv5t for all targets even armv4t |
627 |
|
628 |
--- gcc/config/arm/linux-eabi.h |
629 |
+++ gcc/config/arm/linux-eabi.h |
630 |
@@ -45,7 +45,7 @@ |
631 |
The ARM10TDMI core is the default for armv5t, so set |
632 |
SUBTARGET_CPU_DEFAULT to achieve this. */ |
633 |
#undef SUBTARGET_CPU_DEFAULT |
634 |
-#define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm10tdmi |
635 |
+#define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm9tdmi |
636 |
|
637 |
/* TARGET_BIG_ENDIAN_DEFAULT is set in |
638 |
config.gcc for big endian configurations. */ |
639 |
|
640 |
|
641 |
|
642 |
1.1 src/patchsets/gcc/4.4.3/gentoo/51_all_gcc-3.4-libiberty-pic.patch |
643 |
|
644 |
file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/gcc/4.4.3/gentoo/51_all_gcc-3.4-libiberty-pic.patch?rev=1.1&view=markup |
645 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/gcc/4.4.3/gentoo/51_all_gcc-3.4-libiberty-pic.patch?rev=1.1&content-type=text/plain |
646 |
|
647 |
Index: 51_all_gcc-3.4-libiberty-pic.patch |
648 |
=================================================================== |
649 |
--- gcc-4.1.0-orig/libiberty/Makefile.in 2006-03-01 15:49:14.000000000 -0500 |
650 |
+++ gcc-4.1.0/libiberty/Makefile.in 2006-03-01 18:10:46.000000000 -0500 |
651 |
@@ -232,6 +232,7 @@ |
652 |
$(AR) $(AR_FLAGS) $(TARGETLIB) \ |
653 |
$(REQUIRED_OFILES) $(EXTRA_OFILES) $(LIBOBJS); \ |
654 |
$(RANLIB) $(TARGETLIB); \ |
655 |
+ cp $(TARGETLIB) ../ ; \ |
656 |
cd ..; \ |
657 |
else true; fi |
658 |
|
659 |
|
660 |
|
661 |
|
662 |
1.1 src/patchsets/gcc/4.4.3/gentoo/53_all_gcc4-superh-default-multilib.patch |
663 |
|
664 |
file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/gcc/4.4.3/gentoo/53_all_gcc4-superh-default-multilib.patch?rev=1.1&view=markup |
665 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/gcc/4.4.3/gentoo/53_all_gcc4-superh-default-multilib.patch?rev=1.1&content-type=text/plain |
666 |
|
667 |
Index: 53_all_gcc4-superh-default-multilib.patch |
668 |
=================================================================== |
669 |
The gcc-3.x toolchains would contain all the targets by default. With gcc-4, |
670 |
you have to actually list out the multilibs you want or you will end up with |
671 |
just one when using targets like 'sh4-linux-gnu'. |
672 |
|
673 |
The resulting toolchain can't even build a kernel as the kernel needs to build |
674 |
with the nofpu flag to be sure that no fpu ops are generated. |
675 |
|
676 |
Here we restore the gcc-3.x behavior; the additional overhead of building all |
677 |
of these multilibs by default is negligible. |
678 |
|
679 |
http://bugs.gentoo.org/140205 |
680 |
|
681 |
--- gcc-4.2.0/gcc/config.gcc |
682 |
+++ gcc-4.2.0/gcc/config.gcc |
683 |
@@ -2092,7 +2092,7 @@ |
684 |
if test x${sh_multilibs} = x ; then |
685 |
case ${target} in |
686 |
sh64-superh-linux* | \ |
687 |
- sh[1234]*) sh_multilibs=${sh_cpu_target} ;; |
688 |
+ sh[1234]*) sh_multilibs=`cd ${srcdir}/config/sh ; echo t-mlib-sh[1-4]* | sed 's:t-mlib-sh:,m:g;s: ::g'` ;; |
689 |
sh64* | sh5*) sh_multilibs=m5-32media,m5-32media-nofpu,m5-compact,m5-compact-nofpu,m5-64media,m5-64media-nofpu ;; |
690 |
sh-superh-*) sh_multilibs=m4,m4-single,m4-single-only,m4-nofpu ;; |
691 |
sh*-*-linux*) sh_multilibs=m1,m3e,m4 ;; |
692 |
|
693 |
|
694 |
|
695 |
1.1 src/patchsets/gcc/4.4.3/gentoo/54_all_300-libstdc++-pic.patch |
696 |
|
697 |
file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/gcc/4.4.3/gentoo/54_all_300-libstdc++-pic.patch?rev=1.1&view=markup |
698 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/gcc/4.4.3/gentoo/54_all_300-libstdc++-pic.patch?rev=1.1&content-type=text/plain |
699 |
|
700 |
Index: 54_all_300-libstdc++-pic.patch |
701 |
=================================================================== |
702 |
install libstdc++_pic.a if we have pic objs |
703 |
|
704 |
--- gcc/libstdc++-v3/src/Makefile.am |
705 |
+++ gcc/libstdc++-v3/src/Makefile.am |
706 |
@@ -214,6 +214,13 @@ |
707 |
$(OPT_LDFLAGS) $(SECTION_LDFLAGS) $(AM_CXXFLAGS) $(LDFLAGS) -o $@ |
708 |
|
709 |
|
710 |
+install-exec-local: |
711 |
+ pic_objs=`sed -n "s:'::g;s:^pic_object=::p" *.lo | grep -v '^none$$'`; \ |
712 |
+ if [ x"$$pic_objs" != x ]; then \ |
713 |
+ $(AR) cru libstdc++_pic.a $$pic_objs $(top_builddir)/libsupc++/*.o || exit 1; \ |
714 |
+ $(INSTALL_DATA) libstdc++_pic.a $(DESTDIR)$(toolexeclibdir) || exit 1; \ |
715 |
+ fi |
716 |
+ |
717 |
# Added bits to build debug library. |
718 |
if GLIBCXX_BUILD_DEBUG |
719 |
all-local: build_debug |
720 |
--- gcc/libstdc++-v3/src/Makefile.in |
721 |
+++ gcc/libstdc++-v3/src/Makefile.in |
722 |
@@ -625,7 +625,7 @@ |
723 |
|
724 |
install-data-am: install-data-local |
725 |
|
726 |
-install-exec-am: install-toolexeclibLTLIBRARIES |
727 |
+install-exec-am: install-toolexeclibLTLIBRARIES install-exec-local |
728 |
|
729 |
install-info: install-info-am |
730 |
|
731 |
@@ -664,7 +664,7 @@ |
732 |
maintainer-clean-generic mostlyclean mostlyclean-compile \ |
733 |
mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ |
734 |
tags uninstall uninstall-am uninstall-info-am \ |
735 |
- uninstall-toolexeclibLTLIBRARIES |
736 |
+ uninstall-toolexeclibLTLIBRARIES install-exec-local |
737 |
|
738 |
@GLIBCXX_BUILD_VERSIONED_SHLIB_TRUE@libstdc++-symbol.ver: ${glibcxx_srcdir}/$(SYMVER_MAP) |
739 |
@GLIBCXX_BUILD_VERSIONED_SHLIB_TRUE@ cp ${glibcxx_srcdir}/$(SYMVER_MAP) ./libstdc++-symbol.ver |
740 |
@@ -743,6 +743,14 @@ |
741 |
install_debug: |
742 |
(cd ${debugdir} && $(MAKE) \ |
743 |
toolexeclibdir=$(glibcxx_toolexeclibdir)/debug install) |
744 |
+ |
745 |
+install-exec-local: |
746 |
+ pic_objs=`sed -n "s:'::g;s:^pic_object=::p" *.lo | grep -v '^none$$'`; \ |
747 |
+ if [ x"$$pic_objs" != x ]; then \ |
748 |
+ $(AR) cru libstdc++_pic.a $$pic_objs $(top_builddir)/libsupc++/*.o || exit 1; \ |
749 |
+ $(INSTALL_DATA) libstdc++_pic.a $(DESTDIR)$(toolexeclibdir) || exit 1; \ |
750 |
+ fi |
751 |
+ |
752 |
# Tell versions [3.59,3.63) of GNU make to not export all variables. |
753 |
# Otherwise a system limit (for SysV at least) may be exceeded. |
754 |
.NOEXPORT: |
755 |
|
756 |
|
757 |
|
758 |
1.1 src/patchsets/gcc/4.4.3/gentoo/61_all_gcc4-ia64-noteGNUstack.patch |
759 |
|
760 |
file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/gcc/4.4.3/gentoo/61_all_gcc4-ia64-noteGNUstack.patch?rev=1.1&view=markup |
761 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/gcc/4.4.3/gentoo/61_all_gcc4-ia64-noteGNUstack.patch?rev=1.1&content-type=text/plain |
762 |
|
763 |
Index: 61_all_gcc4-ia64-noteGNUstack.patch |
764 |
=================================================================== |
765 |
2004-09-20 Jakub Jelinek <jakub@××××××.com> |
766 |
|
767 |
* config/rs6000/ppc-asm.h: Add .note.GNU-stack section also |
768 |
on ppc64-linux. |
769 |
|
770 |
* config/ia64/lib1funcs.asm: Add .note.GNU-stack section on |
771 |
ia64-linux. |
772 |
* config/ia64/crtbegin.asm: Likewise. |
773 |
* config/ia64/crtend.asm: Likewise. |
774 |
* config/ia64/crti.asm: Likewise. |
775 |
* config/ia64/crtn.asm: Likewise. |
776 |
|
777 |
2004-05-14 Jakub Jelinek <jakub@××××××.com> |
778 |
|
779 |
* config/ia64/linux.h (TARGET_ASM_FILE_END): Define. |
780 |
|
781 |
--- gcc/config/ia64/linux.h.jj 2004-05-14 07:21:27.000000000 -0400 |
782 |
+++ gcc/config/ia64/linux.h 2004-05-14 09:21:09.000000000 -0400 |
783 |
@@ -5,6 +5,8 @@ |
784 |
|
785 |
#define TARGET_VERSION fprintf (stderr, " (IA-64) Linux"); |
786 |
|
787 |
+#define TARGET_ASM_FILE_END file_end_indicate_exec_stack |
788 |
+ |
789 |
/* This is for -profile to use -lc_p instead of -lc. */ |
790 |
#undef CC1_SPEC |
791 |
#define CC1_SPEC "%{profile:-p} %{G*}" |
792 |
--- gcc/config/rs6000/ppc-asm.h.jj 2003-06-04 18:40:59.000000000 +0200 |
793 |
+++ gcc/config/rs6000/ppc-asm.h 2004-09-20 14:17:47.259396058 +0200 |
794 |
@@ -158,7 +158,7 @@ GLUE(.L,name): \ |
795 |
.size FUNC_NAME(name),GLUE(.L,name)-FUNC_NAME(name) |
796 |
#endif |
797 |
|
798 |
-#if defined __linux__ && !defined __powerpc64__ |
799 |
+#if defined __linux__ |
800 |
.section .note.GNU-stack |
801 |
.previous |
802 |
#endif |
803 |
--- gcc/config/ia64/lib1funcs.asm.jj 2003-10-27 11:45:17.000000000 +0100 |
804 |
+++ gcc/config/ia64/lib1funcs.asm 2004-09-20 14:26:28.094132706 +0200 |
805 |
@@ -741,3 +741,7 @@ __floattitf: |
806 |
.endp __floattitf |
807 |
|
808 |
#endif |
809 |
+ |
810 |
+#ifdef __linux__ |
811 |
+.section .note.GNU-stack; .previous |
812 |
+#endif |
813 |
--- gcc/config/ia64/crtend.asm.jj 2004-05-20 14:36:14.000000000 +0200 |
814 |
+++ gcc/config/ia64/crtend.asm 2004-09-20 14:25:57.329580329 +0200 |
815 |
@@ -113,3 +113,7 @@ __do_global_ctors_aux: |
816 |
|
817 |
br.ret.sptk.many rp |
818 |
.endp __do_global_ctors_aux |
819 |
+ |
820 |
+#ifdef __linux__ |
821 |
+.section .note.GNU-stack; .previous |
822 |
+#endif |
823 |
--- gcc/config/ia64/crti.asm.jj 2003-04-02 17:14:15.000000000 +0200 |
824 |
+++ gcc/config/ia64/crti.asm 2004-09-20 14:26:06.852894092 +0200 |
825 |
@@ -64,3 +64,7 @@ _fini: |
826 |
.body |
827 |
|
828 |
# end of crti.asm |
829 |
+ |
830 |
+#ifdef __linux__ |
831 |
+.section .note.GNU-stack; .previous |
832 |
+#endif |
833 |
--- gcc/config/ia64/crtbegin.asm.jj 2004-05-20 14:36:14.000000000 +0200 |
834 |
+++ gcc/config/ia64/crtbegin.asm 2004-09-20 14:25:47.105390566 +0200 |
835 |
@@ -246,3 +246,7 @@ __do_jv_register_classes: |
836 |
.weak __cxa_finalize |
837 |
#endif |
838 |
.weak _Jv_RegisterClasses |
839 |
+ |
840 |
+#ifdef __linux__ |
841 |
+.section .note.GNU-stack; .previous |
842 |
+#endif |
843 |
--- gcc/config/ia64/crtn.asm.jj 2003-04-02 17:14:15.000000000 +0200 |
844 |
+++ gcc/config/ia64/crtn.asm 2004-09-20 14:26:16.381206878 +0200 |
845 |
@@ -54,3 +54,7 @@ |
846 |
br.ret.sptk.many b0 |
847 |
|
848 |
# end of crtn.asm |
849 |
+ |
850 |
+#ifdef __linux__ |
851 |
+.section .note.GNU-stack; .previous |
852 |
+#endif |
853 |
|
854 |
|
855 |
|
856 |
1.1 src/patchsets/gcc/4.4.3/gentoo/73_all_sh-libgcc-stacks.patch |
857 |
|
858 |
file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/gcc/4.4.3/gentoo/73_all_sh-libgcc-stacks.patch?rev=1.1&view=markup |
859 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/gcc/4.4.3/gentoo/73_all_sh-libgcc-stacks.patch?rev=1.1&content-type=text/plain |
860 |
|
861 |
Index: 73_all_sh-libgcc-stacks.patch |
862 |
=================================================================== |
863 |
http://gcc.gnu.org/PR38627 |
864 |
|
865 |
make sure objects in libgcc.a have GNU-stack markings: |
866 |
!WX --- --- 4.3.2/_ashiftrt.o |
867 |
!WX --- --- 4.3.2/_ashiftrt_n.o |
868 |
!WX --- --- 4.3.2/_ashiftlt.o |
869 |
!WX --- --- 4.3.2/_lshiftrt.o |
870 |
!WX --- --- 4.3.2/_movmem.o |
871 |
!WX --- --- 4.3.2/_movmem_i4.o |
872 |
!WX --- --- 4.3.2/_mulsi3.o |
873 |
!WX --- --- 4.3.2/_sdivsi3.o |
874 |
!WX --- --- 4.3.2/_sdivsi3_i4.o |
875 |
!WX --- --- 4.3.2/_udivsi3.o |
876 |
!WX --- --- 4.3.2/_udivsi3_i4.o |
877 |
!WX --- --- 4.3.2/_set_fpscr.o |
878 |
!WX --- --- 4.3.2/_div_table.o |
879 |
!WX --- --- 4.3.2/_udiv_qrnnd_16.o |
880 |
!WX --- --- 4.3.2/_ic_invalidate.o |
881 |
!WX --- --- 4.3.2/_ic_invalidate_array.o |
882 |
!WX --- --- 4.3.2/linux-atomic.o |
883 |
|
884 |
--- gcc/config/sh/lib1funcs.asm |
885 |
+++ gcc/config/sh/lib1funcs.asm |
886 |
@@ -34,6 +34,11 @@ |
887 |
!! recoded in assembly by Toshiyasu Morita |
888 |
!! tm@××××××.com |
889 |
|
890 |
+#if defined(__ELF__) && defined(__linux__) |
891 |
+.section .note.GNU-stack,"",%progbits |
892 |
+.previous |
893 |
+#endif |
894 |
+ |
895 |
/* SH2 optimizations for ___ashrsi3, ___ashlsi3, ___lshrsi3 and |
896 |
ELF local label prefixes by J"orn Rennecke |
897 |
amylaar@××××××.com */ |
898 |
--- gcc/config/sh/linux-atomic.asm |
899 |
+++ gcc/config/sh/linux-atomic.asm |
900 |
@@ -138,3 +138,6 @@ |
901 |
ATOMIC_FETCH_AND_COMBOP(nand,and,not,4,l,mov) |
902 |
|
903 |
#endif /* ! __SH5__ */ |
904 |
+ |
905 |
+.section .note.GNU-stack,"",%progbits |
906 |
+.previous |
907 |
|
908 |
|
909 |
|
910 |
1.1 src/patchsets/gcc/4.4.3/gentoo/74_all_sh-pr24836.patch |
911 |
|
912 |
file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/gcc/4.4.3/gentoo/74_all_sh-pr24836.patch?rev=1.1&view=markup |
913 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/gcc/4.4.3/gentoo/74_all_sh-pr24836.patch?rev=1.1&content-type=text/plain |
914 |
|
915 |
Index: 74_all_sh-pr24836.patch |
916 |
=================================================================== |
917 |
http://sourceforge.net/mailarchive/forum.php?thread_id=8959304&forum_id=5348 |
918 |
http://gcc.gnu.org/PR24836 |
919 |
|
920 |
--- gcc/gcc/configure.ac |
921 |
+++ gcc/gcc/configure.ac |
922 |
@@ -2446,7 +2446,7 @@ |
923 |
tls_first_minor=14 |
924 |
tls_as_opt="-m64 -Aesame --fatal-warnings" |
925 |
;; |
926 |
- sh-*-* | sh[34]-*-*) |
927 |
+ sh-*-* | sh[34]*-*-*) |
928 |
conftest_s=' |
929 |
.section ".tdata","awT",@progbits |
930 |
foo: .long 25 |
931 |
--- gcc/gcc/configure |
932 |
+++ gcc/gcc/configure |
933 |
@@ -14846,7 +14846,7 @@ |
934 |
tls_first_minor=14 |
935 |
tls_as_opt="-m64 -Aesame --fatal-warnings" |
936 |
;; |
937 |
- sh-*-* | sh[34]-*-*) |
938 |
+ sh-*-* | sh[34]*-*-*) |
939 |
conftest_s=' |
940 |
.section ".tdata","awT",@progbits |
941 |
foo: .long 25 |
942 |
|
943 |
|
944 |
|
945 |
1.1 src/patchsets/gcc/4.4.3/gentoo/90_all_gcc-freebsd.patch |
946 |
|
947 |
file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/gcc/4.4.3/gentoo/90_all_gcc-freebsd.patch?rev=1.1&view=markup |
948 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/gcc/4.4.3/gentoo/90_all_gcc-freebsd.patch?rev=1.1&content-type=text/plain |
949 |
|
950 |
Index: 90_all_gcc-freebsd.patch |
951 |
=================================================================== |
952 |
http://bugs.gentoo.org/192403 |
953 |
http://gcc.gnu.org/PR33417 |
954 |
|
955 |
--- gcc-4.3.1/gcc/config/freebsd-spec.h |
956 |
+++ gcc-4.3.1/gcc/config/freebsd-spec.h |
957 |
@@ -56,6 +56,8 @@ |
958 |
builtin_assert ("system=unix"); \ |
959 |
builtin_assert ("system=bsd"); \ |
960 |
builtin_assert ("system=FreeBSD"); \ |
961 |
+ if(!(flag_iso && (c_dialect_cxx () ? cxx_dialect == cxx98 : !flag_isoc99))) \ |
962 |
+ builtin_define("_LONGLONG"); \ |
963 |
FBSD_TARGET_CPU_CPP_BUILTINS(); \ |
964 |
} \ |
965 |
while (0) |
966 |
--- gcc-4.3.1/gcc/config/t-freebsd-eh |
967 |
+++ gcc-4.3.1/gcc/config/t-freebsd-eh |
968 |
@@ -0,0 +1,4 @@ |
969 |
+# Use unwind-dw2-fde-glibc |
970 |
+LIB2ADDEH = $(srcdir)/unwind-dw2.c $(srcdir)/unwind-dw2-fde-glibc.c \ |
971 |
+ $(srcdir)/unwind-sjlj.c $(srcdir)/gthr-gnat.c $(srcdir)/unwind-c.c |
972 |
+LIB2ADDEHDEP = unwind.inc unwind-dw2-fde.h unwind-dw2-fde.c |
973 |
--- gcc-4.3.1/gcc/config.gcc |
974 |
+++ gcc-4.3.1/gcc/config.gcc |
975 |
@@ -462,7 +462,7 @@ |
976 |
# pleases around the provided core setting. |
977 |
gas=yes |
978 |
gnu_ld=yes |
979 |
- extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o" |
980 |
+ extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o crtbeginT.o" |
981 |
fbsd_major=`echo ${target} | sed -e 's/.*freebsd//g' | sed -e 's/\..*//g'` |
982 |
tm_defines="${tm_defines} FBSD_MAJOR=${fbsd_major}" |
983 |
tmake_file="t-slibgcc-elf-ver t-freebsd" |
984 |
@@ -1116,6 +1116,10 @@ |
985 |
;; |
986 |
i[34567]86-*-freebsd*) |
987 |
tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h ${fbsd_tm_file} i386/freebsd.h" |
988 |
+ fbsd_major=`echo ${target} | sed -e 's/.*freebsd//g' | sed -e 's/\..*//g'` |
989 |
+ if test ${fbsd_major} -ge 7; then |
990 |
+ tmake_file="${tmake_file} t-freebsd-eh" |
991 |
+ fi |
992 |
;; |
993 |
x86_64-*-freebsd*) |
994 |
tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h ${fbsd_tm_file} i386/x86-64.h i386/freebsd.h i386/freebsd64.h" |
995 |
--- gcc-4.3.1/gcc/crtstuff.c |
996 |
+++ gcc-4.3.1/gcc/crtstuff.c |
997 |
@@ -90,13 +90,15 @@ |
998 |
&& !defined(OBJECT_FORMAT_FLAT) \ |
999 |
&& defined(HAVE_LD_EH_FRAME_HDR) \ |
1000 |
&& !defined(inhibit_libc) && !defined(CRTSTUFFT_O) \ |
1001 |
- && defined(__GLIBC__) && __GLIBC__ >= 2 |
1002 |
+ && ((defined(__GLIBC__) && __GLIBC__ >= 2) \ |
1003 |
+ || (defined(__FreeBSD_version) && __FreeBSD_version >= 700022)) |
1004 |
#include <link.h> |
1005 |
/* uClibc pretends to be glibc 2.2 and DT_CONFIG is defined in its link.h. |
1006 |
But it doesn't use PT_GNU_EH_FRAME ELF segment currently. */ |
1007 |
# if !defined(__UCLIBC__) \ |
1008 |
- && (__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 2) \ |
1009 |
- || (__GLIBC__ == 2 && __GLIBC_MINOR__ == 2 && defined(DT_CONFIG))) |
1010 |
+ || (__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 2) \ |
1011 |
+ || (__GLIBC__ == 2 && __GLIBC_MINOR__ == 2 && defined(DT_CONFIG))) \ |
1012 |
+ || (__FreeBSD_version >= 700022) |
1013 |
# define USE_PT_GNU_EH_FRAME |
1014 |
# endif |
1015 |
#endif |
1016 |
--- gcc-4.3.1/gcc/unwind-dw2-fde-glibc.c |
1017 |
+++ gcc-4.3.1/gcc/unwind-dw2-fde-glibc.c |
1018 |
@@ -49,8 +49,9 @@ |
1019 |
#include "gthr.h" |
1020 |
|
1021 |
#if !defined(inhibit_libc) && defined(HAVE_LD_EH_FRAME_HDR) \ |
1022 |
- && (__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 2) \ |
1023 |
- || (__GLIBC__ == 2 && __GLIBC_MINOR__ == 2 && defined(DT_CONFIG))) |
1024 |
+ && ((__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 2) \ |
1025 |
+ || (__GLIBC__ == 2 && __GLIBC_MINOR__ == 2 && defined(DT_CONFIG))) \ |
1026 |
+ || (__FreeBSD_version >= 700022 )) |
1027 |
|
1028 |
#ifndef __RELOC_POINTER |
1029 |
# define __RELOC_POINTER(ptr, base) ((ptr) + (base)) |
1030 |
@@ -66,6 +67,13 @@ |
1031 |
#define PT_GNU_EH_FRAME (PT_LOOS + 0x474e550) |
1032 |
#endif |
1033 |
|
1034 |
+/* Support FreeBSD */ |
1035 |
+#ifndef ElfW |
1036 |
+# ifdef __ElfN |
1037 |
+# define ElfW __ElfN |
1038 |
+# endif |
1039 |
+#endif |
1040 |
+ |
1041 |
struct unw_eh_callback_data |
1042 |
{ |
1043 |
_Unwind_Ptr pc; |
1044 |
|
1045 |
|
1046 |
|
1047 |
1.1 src/patchsets/gcc/4.4.3/gentoo/91_all_gcc-freebsd.patch |
1048 |
|
1049 |
file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/gcc/4.4.3/gentoo/91_all_gcc-freebsd.patch?rev=1.1&view=markup |
1050 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/gcc/4.4.3/gentoo/91_all_gcc-freebsd.patch?rev=1.1&content-type=text/plain |
1051 |
|
1052 |
Index: 91_all_gcc-freebsd.patch |
1053 |
=================================================================== |
1054 |
http://bugs.gentoo.org/192403 |
1055 |
http://gcc.gnu.org/PR33417 |
1056 |
|
1057 |
--- gcc-4.3.1/gcc/config/freebsd-spec.h |
1058 |
+++ gcc-4.3.1/gcc/config/freebsd-spec.h |
1059 |
@@ -79,9 +81,10 @@ |
1060 |
#define FBSD_STARTFILE_SPEC \ |
1061 |
"%{!shared: \ |
1062 |
%{pg:gcrt1.o%s} %{!pg:%{p:gcrt1.o%s} \ |
1063 |
- %{!p:%{profile:gcrt1.o%s} \ |
1064 |
- %{!profile:crt1.o%s}}}} \ |
1065 |
- crti.o%s %{!shared:crtbegin.o%s} %{shared:crtbeginS.o%s}" |
1066 |
+ %{!p:%{profile:gcrt1.o%s} \ |
1067 |
+ %{!profile:crt1.o%s}}}} \ |
1068 |
+ crti.o%s \ |
1069 |
+ %{static:crtbeginT.o%s;shared:crtbeginS.o%s;:crtbegin.o%s}" |
1070 |
|
1071 |
/* Provide a ENDFILE_SPEC appropriate for FreeBSD. Here we tack on |
1072 |
the magical crtend.o file (see crtstuff.c) which provides part of |
1073 |
@@ -119,7 +122,8 @@ |
1074 |
%{pg: -lc_p} \ |
1075 |
}" |
1076 |
#else |
1077 |
-#if FBSD_MAJOR < 5 |
1078 |
+#include <sys/param.h> |
1079 |
+#if __FreeBSD_version < 500016 |
1080 |
#define FBSD_LIB_SPEC " \ |
1081 |
%{!shared: \ |
1082 |
%{!pg: \ |
1083 |
@@ -129,17 +133,34 @@ |
1084 |
%{!pthread:-lc_p} \ |
1085 |
%{pthread:-lc_r_p}} \ |
1086 |
}" |
1087 |
-#else |
1088 |
+#elif __FreeBSD_version < 700022 |
1089 |
#define FBSD_LIB_SPEC " \ |
1090 |
%{!shared: \ |
1091 |
%{!pg: %{pthread:-lpthread} -lc} \ |
1092 |
%{pg: %{pthread:-lpthread_p} -lc_p} \ |
1093 |
}" |
1094 |
+#else |
1095 |
+#define FBSD_LIB_SPEC " \ |
1096 |
+ %{!shared: \ |
1097 |
+ %{!pg: %{pthread:-lpthread} -lc} \ |
1098 |
+ %{pg: %{pthread:-lpthread_p} -lc_p}} \ |
1099 |
+ %{shared: \ |
1100 |
+ %{pthread:-lpthread} -lc} \ |
1101 |
+ " |
1102 |
#endif |
1103 |
#endif |
1104 |
|
1105 |
-#if FBSD_MAJOR < 6 |
1106 |
+#if FBSD_MAJOR < 5 |
1107 |
#define FBSD_DYNAMIC_LINKER "/usr/libexec/ld-elf.so.1" |
1108 |
#else |
1109 |
#define FBSD_DYNAMIC_LINKER "/libexec/ld-elf.so.1" |
1110 |
#endif |
1111 |
+ |
1112 |
+#if defined(HAVE_LD_EH_FRAME_HDR) |
1113 |
+#define LINK_EH_SPEC "%{!static:--eh-frame-hdr} " |
1114 |
+#endif |
1115 |
+ |
1116 |
+/* Use --as-needed -lgcc_s for eh support. */ |
1117 |
+#ifdef HAVE_LD_AS_NEEDED |
1118 |
+#define USE_LD_AS_NEEDED 1 |
1119 |
+#endif |
1120 |
|
1121 |
|
1122 |
|
1123 |
1.1 src/patchsets/gcc/4.4.3/gentoo/README.history |
1124 |
|
1125 |
file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/gcc/4.4.3/gentoo/README.history?rev=1.1&view=markup |
1126 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/gcc/4.4.3/gentoo/README.history?rev=1.1&content-type=text/plain |
1127 |
|
1128 |
Index: README.history |
1129 |
=================================================================== |
1130 |
1.0 07.02.2009 |
1131 |
+ 00_all_gcc-4.1-alpha-mieee-default.patch |
1132 |
+ 00_all_gcc-trampolinewarn.patch |
1133 |
+ 01_all_gcc-4.1-alpha-asm-mcpu.patch |
1134 |
+ 03_all_gcc43-java-nomulti.patch |
1135 |
+ 08_all_gcc-4.1-cross-compile.patch |
1136 |
+ 10_all_gcc-default-format-security.patch |
1137 |
+ 10_all_gcc-default-fortify-source.patch |
1138 |
+ 11_all_gcc-netbsd-symbolic.patch |
1139 |
+ 14_all_gcc-sparc64-bsd.patch |
1140 |
+ 15_all_gcc-libgomp-no-werror.patch |
1141 |
+ 18_all_904-flatten-switch-stmt-00.patch |
1142 |
+ 40_all_gcc-4.4-libiberty.h-asprintf.patch |
1143 |
+ 47_all_arm-unbreak-armv4t.patch |
1144 |
+ 51_all_gcc-3.4-libiberty-pic.patch |
1145 |
+ 53_all_gcc4-superh-default-multilib.patch |
1146 |
+ 54_all_300-libstdc++-pic.patch |
1147 |
+ 61_all_gcc4-ia64-noteGNUstack.patch |
1148 |
+ 73_all_sh-libgcc-stacks.patch |
1149 |
+ 74_all_sh-pr24836.patch |
1150 |
+ 90_all_gcc-freebsd.patch |
1151 |
+ 91_all_gcc-freebsd.patch |