Gentoo Archives: gentoo-commits

From: Magnus Granberg <zorry@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/hardened-gccpatchset:master commit in: gcc-4.8.0/piepatch/
Date: Mon, 01 Apr 2013 00:06:37
Message-Id: 1364774718.6f5e4b98cc380044417dec3a4c5aa461e92d2a47.zorry@gentoo
1 commit: 6f5e4b98cc380044417dec3a4c5aa461e92d2a47
2 Author: Magnus Granberg <zorry <AT> gentoo <DOT> org>
3 AuthorDate: Mon Apr 1 00:05:18 2013 +0000
4 Commit: Magnus Granberg <zorry <AT> gentoo <DOT> org>
5 CommitDate: Mon Apr 1 00:05:18 2013 +0000
6 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/hardened-gccpatchset.git;a=commit;h=6f5e4b98
7
8 commit what gose in to gcc 4.8 piepatchset 0.5.5 in tree
9
10 ---
11 gcc-4.8.0/piepatch/01_all_gcc48_configure.patch | 124 ++++++++++++++++++--
12 gcc-4.8.0/piepatch/05_all_gcc48_gcc.c.patch | 25 ++++
13 .../piepatch/33_all_gcc48_config_rs6000.patch | 47 ++++++++
14 gcc-4.8.0/piepatch/34_all_gcc48_config_i386.patch | 56 +++++++++
15 gcc-4.8.0/piepatch/35_all_gcc48_config_arm.patch | 34 ++++++
16 gcc-4.8.0/piepatch/36_all_gcc48_config_mips.patch | 23 ++++
17 gcc-4.8.0/piepatch/37_all_gcc48_config_ia64.patch | 30 +++++
18 gcc-4.8.0/piepatch/40_all_gcc48_config_esp.patch | 2 +-
19 gcc-4.8.0/piepatch/README | 4 +-
20 gcc-4.8.0/piepatch/README.Changelog | 24 ++++
21 gcc-4.8.0/piepatch/README.history | 19 +++
22 11 files changed, 377 insertions(+), 11 deletions(-)
23
24 diff --git a/gcc-4.8.0/piepatch/01_all_gcc48_configure.patch b/gcc-4.8.0/piepatch/01_all_gcc48_configure.patch
25 index 47a1a05..1d3b429 100644
26 --- a/gcc-4.8.0/piepatch/01_all_gcc48_configure.patch
27 +++ b/gcc-4.8.0/piepatch/01_all_gcc48_configure.patch
28 @@ -1,3 +1,111 @@
29 +2013-04-01 Magnus Granberg <zorry@g.o>
30 +
31 + * configure.ac Add --enable-esp. Add -fno-stack-protector
32 + to stage1_cflags.
33 + * configure Regenerated
34 + * gcc/configure.ac Add --enable-esp and define ENABLE_ESP.
35 + Check if we support crtbeginP and define ENABLE_CRTBEGINP.
36 + * gcc/configure Regenerated
37 +
38 +--- a/configure.ac 2011-11-29 22:36:43.000000000 +0100
39 ++++ b/configure.ac 2011-12-07 23:29:26.125712475 +0100
40 +@@ -419,6 +419,26 @@ if test "${ENABLE_LIBADA}" != "yes" ; th
41 + noconfigdirs="$noconfigdirs gnattools"
42 + fi
43 +
44 ++# Check whether --enable-esp was given and target have the support.
45 ++AC_ARG_ENABLE([esp],
46 ++[AS_HELP_STRING([--enable-esp],
47 ++ [Enable Stack protector and Position independent executable as
48 ++ default if we have suppot for it when compiling
49 ++ and link with -z relro and -z now as default.
50 ++ Linux targets supported i*86, x86_64, x32,
51 ++ powerpc, powerpc64, ia64, arm and mips.])],
52 ++[
53 ++ case $target in
54 ++ i?86*-*-linux* | x86_64-*-linux* | powerpc*-*-linux* | mips-*-linux* | arm*-*-linux* | ia64-*-linux*)
55 ++ enable_esp=yes
56 ++ ;;
57 ++ *)
58 ++ AC_MSG_WARN([*** --enable-esp is not supported on this $target target.])
59 ++ ;;
60 ++ esac
61 ++])
62 ++AC_SUBST([enable_esp])
63 ++
64 + AC_ARG_ENABLE(libssp,
65 + [AS_HELP_STRING([--enable-libssp], [build libssp directory])],
66 + ENABLE_LIBSSP=$enableval,
67 +@@ -3211,6 +3230,11 @@ if test "$GCC" = yes -a "$ENABLE_BUILD_W
68 + CFLAGS="$saved_CFLAGS"
69 + fi
70 +
71 ++# Disable -fstack-protector on stage1
72 ++if test x$enable_esp = xyes; then
73 ++ stage1_cflags="$stage1_cflags -fno-stack-protector"
74 ++fi
75 ++
76 + AC_SUBST(stage1_cflags)
77 +
78 + # Enable --enable-checking in stage1 of the compiler.
79 +--- a/gcc/configure.ac 2011-11-18 11:52:32.000000000 +0100
80 ++++ b/gcc/configure.ac 2012-10-02 17:39:15.649526241 +0200
81 +@@ -5130,6 +5237,55 @@ if test x"${LINKER_HASH_STYLE}" != x; th
82 + [The linker hash style])
83 + fi
84 +
85 ++# --------------
86 ++# Esp checks
87 ++# --------------
88 ++
89 ++# Check whether --enable-esp was given and target have the support.
90 ++AC_ARG_ENABLE([esp],
91 ++[AS_HELP_STRING([--enable-esp],
92 ++ [Enable Stack protector and Position independent executable as
93 ++ default if we have suppot for it when compiling
94 ++ and link with -z now as default.
95 ++ Linux targets supported i*86, x86_64, x32,
96 ++ powerpc, powerpc64, ia64, arm and mips.])],
97 ++ enable_esp=$enableval,
98 ++ enable_esp=no)
99 ++if test $enable_esp = yes ; then
100 ++ AC_MSG_CHECKING(if $target support esp)
101 ++ case "$target" in
102 ++ i?86*-*-linux* | x86_64-*-linux* | powerpc*-*-linux* | mips-*-linux* | arm*-*-linux* | ia64-*-linux*)
103 ++ enable_esp=yes
104 ++ AC_DEFINE(ENABLE_ESP, 1,
105 ++ [Define if your target support esp and you have enable it.])
106 ++ ;;
107 ++ *)
108 ++ enable_esp=no
109 ++ ;;
110 ++ esac
111 ++AC_MSG_RESULT($enable_esp)
112 ++fi
113 ++AC_SUBST([enable_esp])
114 ++if test $enable_esp = yes ; then
115 ++ AC_MSG_CHECKING(checking for crtbeginP.o support)
116 ++ if test x$enable_esp = xyes ; then
117 ++ case "$target" in
118 ++ ia64*-*-linux*)
119 ++ enable_crtbeginP=no ;;
120 ++ *-*-linux*)
121 ++ if test x$gcc_cv_ld_pie = xyes && test x$lt_cv_prog_compiler_static_works = xyes; then
122 ++ enable_crtbeginP=yes
123 ++ AC_DEFINE(ENABLE_CRTBEGINP, 1,
124 ++ [Define if your compiler will support crtbeginP.])
125 ++ fi
126 ++ ;;
127 ++ *) enable_crtbeginP=no ;;
128 ++ esac
129 ++ fi
130 ++ AC_MSG_RESULT($enable_crtbeginP)
131 ++fi
132 ++AC_SUBST([enable_crtbeginP])
133 ++
134 + # Configure the subdirectories
135 + # AC_CONFIG_SUBDIRS($subdirs)
136 +
137 --- a/configure 2013-02-05 23:36:20.000000000 +0100
138 +++ b/configure 2013-02-12 01:59:04.000000000 +0100
139 @@ -670,6 +670,7 @@
140 @@ -22,9 +130,9 @@
141 --enable-libada build libada directory
142 + --enable-esp Enable Stack protector and Position independent
143 + executable as default if we have suppot for it when
144 -+ compiling and link with -z relro and -z now as
145 -+ default. Linux targets supported i*86, x86_64, x32,
146 -+ powerpc, powerpc64, ia64 and arm.
147 ++ compiling and link with and -z now as default.
148 ++ Linux targets supported i*86, x86_64, x32,
149 ++ powerpc, powerpc64, ia64, arm and mips.
150 --enable-libssp build libssp directory
151 --disable-libstdcxx do not build libstdc++-v3 directory
152 --enable-static-libjava[=ARG]
153 @@ -37,7 +145,7 @@
154 +if test "${enable_esp+set}" = set; then :
155 + enableval=$enable_esp;
156 + case $target in
157 -+ i?86*-*-linux* | x86_64-*-linux* | powerpc-*-linux* | powerpc64-*-linux* | arm*-*-linux* | ia64-*-linux*)
158 ++ i?86*-*-linux* | x86_64-*-linux* | powerpc*-*-linux* | mips*-*-linux* | arm*-*-linux* | ia64-*-linux*)
159 + enable_esp=yes
160 + ;;
161 + *)
162 @@ -90,9 +198,9 @@
163 disable libquadmath support for Fortran
164 + --enable-esp Enable Stack protector and Position independent
165 + executable as default if we have suppot for it when
166 -+ compiling and link with -z relro and -z now as
167 -+ default. Linux targets supported i*86, x86_64, x32,
168 -+ powerpc, powerpc64, ia64 and arm.
169 ++ compiling and link with -z now as default.
170 ++ Linux targets supported i*86, x86_64, x32,
171 ++ powerpc, powerpc64, ia64, arm and mips.
172
173 Optional Packages:
174 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
175 @@ -116,7 +224,7 @@
176 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $target support esp" >&5
177 +$as_echo_n "checking if $target support esp... " >&6; }
178 + case "$target" in
179 -+ i?86*-*-linux* | x86_64-*-linux* | powerpc-*-linux* | powerpc64-*-linux* | arm*-*-linux* | ia64-*-linux*)
180 ++ i?86*-*-linux* | x86_64-*-linux* | powerpc*-*-linux* | mips*-*-linux* | arm*-*-linux* | ia64-*-linux*)
181 + enable_esp=yes
182 +
183 +$as_echo "#define ENABLE_ESP 1" >>confdefs.h
184
185 diff --git a/gcc-4.8.0/piepatch/05_all_gcc48_gcc.c.patch b/gcc-4.8.0/piepatch/05_all_gcc48_gcc.c.patch
186 new file mode 100644
187 index 0000000..b92607b
188 --- /dev/null
189 +++ b/gcc-4.8.0/piepatch/05_all_gcc48_gcc.c.patch
190 @@ -0,0 +1,25 @@
191 +2013-03-24 Magnus Granberg <zorry@g.o>
192 +
193 + * gcc/gcc.c include esp.h
194 + static const char *cc1_spec We set that in esp.h if ENABLE_ESP.
195 +
196 +--- gcc/gcc.c 2010-01-21 10:29:30.000000000 -0500
197 ++++ gcc/gcc.c 2010-01-29 23:29:16.000000000 -0500
198 +@@ -44,6 +44,7 @@
199 + #include "opts.h"
200 + #include "params.h"
201 + #include "vec.h"
202 ++#include "config/esp.h" /* for --enable-esp support */
203 + #include "filenames.h"
204 +
205 + /* By default there is no special suffix for target executables. */
206 +@@ -822,7 +823,9 @@
207 +
208 + static const char *asm_debug;
209 + static const char *cpp_spec = CPP_SPEC;
210 ++#ifndef ENABLE_ESP
211 + static const char *cc1_spec = CC1_SPEC;
212 ++#endif
213 + static const char *cc1plus_spec = CC1PLUS_SPEC;
214 + static const char *link_gcc_c_sequence_spec = LINK_GCC_C_SEQUENCE_SPEC;
215 + static const char *link_ssp_spec = LINK_SSP_SPEC;
216
217 diff --git a/gcc-4.8.0/piepatch/33_all_gcc48_config_rs6000.patch b/gcc-4.8.0/piepatch/33_all_gcc48_config_rs6000.patch
218 new file mode 100644
219 index 0000000..25e704f
220 --- /dev/null
221 +++ b/gcc-4.8.0/piepatch/33_all_gcc48_config_rs6000.patch
222 @@ -0,0 +1,47 @@
223 +2013-03-26 Peter S. Mazinger <ps.m@×××.net>, Magnus Granberg <zorry@g.o>
224 +
225 + * gcc/config/rs6000/linux64.h (ASM_SPEC32): Change %{fpic:-K PIC} %{fPIC:-K PIC}
226 + to %{fpic|fPIC|fpie|fPIE:-K PIC}
227 + * gcc/config/rs6000/sysv4.h (DRIVER_SELF_SPECS): Add ESP_DRIVER_SELF_SPECS.
228 + (SUBTARGET_EXTRA_SPECS): Add ESP_EXTRA_SPECS.
229 +
230 +--- a/gcc/config/rs6000/linux64.h.psm 2009-04-10 01:23:07.000000000 +0200
231 ++++ b/gcc/config/rs6000/linux64.h 2009-09-23 12:34:26.000000000 +0200
232 +@@ -162,7 +162,7 @@
233 + #endif
234 +
235 + #define ASM_SPEC32 "-a32 \
236 +-%{mrelocatable} %{mrelocatable-lib} %{fpic:-K PIC} %{fPIC:-K PIC} \
237 ++%{mrelocatable} %{mrelocatable-lib} %{fpic|fPIC|fpie|fPIE:-K PIC} \
238 + %{memb} %{!memb: %{msdata=eabi: -memb}} \
239 + %{!mlittle: %{!mlittle-endian: %{!mbig: %{!mbig-endian: \
240 + %{mcall-freebsd: -mbig} \
241 +--- a/gcc/config/rs6000/sysv4.h 2013-01-10 21:38:27.000000000 +0100
242 ++++ b/gcc/config/rs6000/sysv4.h 2013-03-26 01:30:33.257003189 +0100
243 +@@ -627,8 +627,13 @@ extern int fixuplabelno;
244 +
245 + #define LINK_OS_DEFAULT_SPEC ""
246 +
247 ++#ifdef ENABLE_ESP
248 ++#define DRIVER_SELF_SPECS "%{mfpu=none: %<mfpu=* \
249 ++ %<msingle-float %<mdouble-float}", ESP_DRIVER_SELF_SPECS
250 ++#else
251 + #define DRIVER_SELF_SPECS "%{mfpu=none: %<mfpu=* \
252 + %<msingle-float %<mdouble-float}"
253 ++#endif
254 +
255 + /* Override rs6000.h definition. */
256 + #undef CPP_SPEC
257 +@@ -933,7 +938,11 @@ ncrtn.o%s"
258 + { "cpp_os_openbsd", CPP_OS_OPENBSD_SPEC }, \
259 + { "cpp_os_default", CPP_OS_DEFAULT_SPEC }, \
260 + { "fbsd_dynamic_linker", FBSD_DYNAMIC_LINKER }, \
261 +- SUBSUBTARGET_EXTRA_SPECS
262 ++ SUBSUBTARGET_EXTRA_SPECS ESP_EXTRA_SPECS
263 ++
264 ++#ifndef ENABLE_ESP
265 ++#define ESP_EXTRA_SPECS
266 ++#endif
267 +
268 + #define SUBSUBTARGET_EXTRA_SPECS
269 +
270
271 diff --git a/gcc-4.8.0/piepatch/34_all_gcc48_config_i386.patch b/gcc-4.8.0/piepatch/34_all_gcc48_config_i386.patch
272 new file mode 100644
273 index 0000000..9f0f7a3
274 --- /dev/null
275 +++ b/gcc-4.8.0/piepatch/34_all_gcc48_config_i386.patch
276 @@ -0,0 +1,56 @@
277 +2013-03-24 Magnus Granberg <zorry@g.o>
278 +
279 + * gcc/config/i386/gnu-user-common.h (DRIVER_SELF_SPECS): Add ESP_DRIVER_SELF_SPEC.
280 + * gcc/config/i386/gnu-user.h (SUBTARGET_EXTRA_SPECS): Add ESP_EXTRA_SPECS.
281 + * gcc/config/i386/i386.h (SUBTARGET_EXTRA_SPECS): Add ESP_EXTRA_SPECS.
282 +
283 +--- a/gcc/config/i386/gnu-user-common.h 2013-01-10 21:38:27.000000000 +0100
284 ++++ b/gcc/config/i386/gnu-user-common.h 2013-02-14 00:51:44.689637605 +0100
285 +@@ -70,3 +70,7 @@ along with GCC; see the file COPYING3.
286 +
287 + /* Static stack checking is supported by means of probes. */
288 + #define STACK_CHECK_STATIC_BUILTIN 1
289 ++
290 ++#ifdef ENABLE_ESP
291 ++#define DRIVER_SELF_SPECS ESP_DRIVER_SELF_SPEC
292 ++#endif
293 +--- a/gcc/config/i386/gnu-user.h 2011-05-05 14:32:50.000000000 +0200
294 ++++ b/gcc/config/i386/gnu-user.h 2012-07-09 14:28:38.726289455 +0200
295 +@@ -93,9 +93,16 @@ along with GCC; see the file COPYING3.
296 + "--32 %{!mno-sse2avx:%{mavx:-msse2avx}} %{msse2avx:%{!mavx:-msse2avx}}"
297 +
298 + #undef SUBTARGET_EXTRA_SPECS
299 ++#ifdef ENABLE_ESP
300 + #define SUBTARGET_EXTRA_SPECS \
301 + { "link_emulation", GNU_USER_LINK_EMULATION },\
302 +- { "dynamic_linker", GNU_USER_DYNAMIC_LINKER }
303 ++ { "dynamic_linker", GNU_USER_DYNAMIC_LINKER }, \
304 ++ ESP_EXTRA_SPECS
305 ++#else
306 ++#define SUBTARGET_EXTRA_SPECS \
307 ++ { "link_emulation", GNU_USER_LINK_EMULATION },\
308 ++ { "dynamic_linker", GNU_USER_DYNAMIC_LINKER }
309 ++#endif
310 +
311 + #undef LINK_SPEC
312 + #define LINK_SPEC "-m %(link_emulation) %{shared:-shared} \
313 +--- a/gcc/config/i386/i386.h 2011-11-24 23:11:12.000000000 +0100
314 ++++ b/gcc/config/i386/i386.h 2012-07-09 14:21:24.575276517 +0200
315 +@@ -617,13 +617,16 @@ enum target_cpu_default
316 + Do not define this macro if it does not need to do anything. */
317 +
318 + #ifndef SUBTARGET_EXTRA_SPECS
319 ++#ifdef ENABLE_ESP
320 ++#define SUBTARGET_EXTRA_SPECS ESP_EXTRA_SPECS
321 ++#else
322 + #define SUBTARGET_EXTRA_SPECS
323 + #endif
324 ++#endif
325 +
326 + #define EXTRA_SPECS \
327 + { "cc1_cpu", CC1_CPU_SPEC }, \
328 + SUBTARGET_EXTRA_SPECS
329 +-
330 +
331 + /* Set the value of FLT_EVAL_METHOD in float.h. When using only the
332 + FPU, assume that the fpcw is set to extended precision; when using
333
334 diff --git a/gcc-4.8.0/piepatch/35_all_gcc48_config_arm.patch b/gcc-4.8.0/piepatch/35_all_gcc48_config_arm.patch
335 new file mode 100644
336 index 0000000..e50e78e
337 --- /dev/null
338 +++ b/gcc-4.8.0/piepatch/35_all_gcc48_config_arm.patch
339 @@ -0,0 +1,34 @@
340 +2013-04-01 Magnus Granberg <zorry@g.o>
341 +
342 + * gcc/config/arm/arm.h (SUBTARGET_EXTRA_SPECS): Add ESP_EXTRA_SPECS.
343 + (DRIVER_SELF_SPECS): Add ESP_DRIVER_SELF_SPEC.
344 +
345 +--- a/gcc/config/arm/arm.h 2013-01-15 17:17:28.000000000 +0100
346 ++++ b/gcc/config/arm/arm.h 2013-02-18 22:45:18.327284928 +0100
347 +@@ -226,8 +226,12 @@ extern void (*arm_lang_output_object_att
348 + SUBTARGET_EXTRA_SPECS
349 +
350 + #ifndef SUBTARGET_EXTRA_SPECS
351 ++#ifdef ENABLE_ESP
352 ++#define SUBTARGET_EXTRA_SPECS ESP_EXTRA_SPECS
353 ++#else
354 + #define SUBTARGET_EXTRA_SPECS
355 + #endif
356 ++#endif
357 +
358 + #ifndef SUBTARGET_CPP_SPEC
359 + #define SUBTARGET_CPP_SPEC ""
360 +@@ -2326,6 +2326,11 @@ extern const char *host_detect_local_cpu
361 + # define MCPU_MTUNE_NATIVE_SPECS ""
362 + #endif
363 +
364 +-#define DRIVER_SELF_SPECS MCPU_MTUNE_NATIVE_SPECS
365 +-
366 ++#ifdef ENABLE_ESP
367 ++# define DRIVER_SELF_SPECS \
368 ++ MCPU_MTUNE_NATIVE_SPECS, \
369 ++ ESP_DRIVER_SELF_SPEC
370 ++#else
371 ++# define DRIVER_SELF_SPECS MCPU_MTUNE_NATIVE_SPECS
372 ++#endif
373 + #endif /* ! GCC_ARM_H */
374
375 diff --git a/gcc-4.8.0/piepatch/36_all_gcc48_config_mips.patch b/gcc-4.8.0/piepatch/36_all_gcc48_config_mips.patch
376 index 74b856a..a924f85 100644
377 --- a/gcc-4.8.0/piepatch/36_all_gcc48_config_mips.patch
378 +++ b/gcc-4.8.0/piepatch/36_all_gcc48_config_mips.patch
379 @@ -1,3 +1,9 @@
380 +2013-04-01 Magnus Granberg <zorry@g.o>
381 +
382 + * gcc/config/mips/gnu-user.h (DRIVER_SELF_SPECS): Add ESP_DRIVER_SELF_SPEC.
383 + * gcc/config/mips/gnu-user64.h (DRIVER_SELF_SPECS): Add ESP_DRIVER_SELF_SPEC.
384 + * gcc/config/mips/mips.h (SUBTARGET_EXTRA_SPECS): Add ESP_EXTRA_SPECS.
385 +
386 --- a/gcc/config/mips/gnu-user.h 2013-01-10 21:38:27.000000000 +0100
387 +++ b/gcc/config/mips/gnu-user.h 2013-03-10 22:37:33.743176388 +0100
388 @@ -125,9 +125,16 @@ extern const char *host_detect_local_cpu
389 @@ -36,3 +42,20 @@
390
391 #undef GNU_USER_TARGET_LINK_SPEC
392 #define GNU_USER_TARGET_LINK_SPEC "\
393 +--- a/gcc/config/mips/mips.h 2013-01-10 21:38:27.000000000 +0100
394 ++++ b/gcc/config/mips/mips.h 2013-03-24 16:59:01.474513910 +0100
395 +@@ -1197,9 +1197,13 @@ struct mips_cpu_info {
396 + SUBTARGET_EXTRA_SPECS
397 +
398 + #ifndef SUBTARGET_EXTRA_SPECS
399 ++#ifdef ENABLE_ESP
400 ++#define SUBTARGET_EXTRA_SPECS ESP_EXTRA_SPECS
401 ++#else
402 + #define SUBTARGET_EXTRA_SPECS
403 + #endif
404 +-
405 ++#endif
406 ++
407 + #define DBX_DEBUGGING_INFO 1 /* generate stabs (OSF/rose) */
408 + #define DWARF2_DEBUGGING_INFO 1 /* dwarf2 debugging info */
409 +
410
411 diff --git a/gcc-4.8.0/piepatch/37_all_gcc48_config_ia64.patch b/gcc-4.8.0/piepatch/37_all_gcc48_config_ia64.patch
412 new file mode 100644
413 index 0000000..bae8914
414 --- /dev/null
415 +++ b/gcc-4.8.0/piepatch/37_all_gcc48_config_ia64.patch
416 @@ -0,0 +1,30 @@
417 +2013-04-01 Magnus Granberg <zorry@g.o>
418 +
419 + * gcc/config/ia64/linux.h Define DRIVER_SELF_SPECS ESP_DRIVER_SELF_SPECS.
420 + * gcc/config/ia64/ia64.h (SUBTARGET_EXTRA_SPECS): Add ESP_EXTRA_SPECS.
421 +
422 +--- a/gcc/config/ia64/linux.h 2013-01-10 21:38:27.000000000 +0100
423 ++++ b/gcc/config/ia64/linux.h 2013-03-16 22:50:10.363049291 +0100
424 +@@ -88,3 +88,7 @@ do { \
425 +
426 + /* Define this to be nonzero if static stack checking is supported. */
427 + #define STACK_CHECK_STATIC_BUILTIN 1
428 ++
429 ++#ifdef ENABLE_ESP
430 ++#define DRIVER_SELF_SPECS ESP_DRIVER_SELF_SPECS
431 ++#endif
432 +--- a/gcc/config/ia64/ia64.h 2013-01-10 21:38:27.000000000 +0100
433 ++++ b/gcc/config/ia64/ia64.h 2013-03-26 02:03:21.052061828 +0100
434 +@@ -41,8 +41,12 @@ do { \
435 + } while (0)
436 +
437 + #ifndef SUBTARGET_EXTRA_SPECS
438 ++#ifdef ENABLE_ESP
439 ++#define SUBTARGET_EXTRA_SPECS ESP_EXTRA_SPECS
440 ++#else
441 + #define SUBTARGET_EXTRA_SPECS
442 + #endif
443 ++#endif
444 +
445 + #define EXTRA_SPECS \
446 + { "asm_extra", ASM_EXTRA_SPEC }, \
447
448 diff --git a/gcc-4.8.0/piepatch/40_all_gcc48_config_esp.patch b/gcc-4.8.0/piepatch/40_all_gcc48_config_esp.patch
449 index cbb594e..83630f2 100644
450 --- a/gcc-4.8.0/piepatch/40_all_gcc48_config_esp.patch
451 +++ b/gcc-4.8.0/piepatch/40_all_gcc48_config_esp.patch
452 @@ -1,7 +1,7 @@
453 2013-02-14 Magnus Granberg <zorry@g.o>
454
455 * gcc/esp.h New file to support --enable-esp
456 - Version 20120214.1
457 + Version 20130214.1
458
459 --- gcc/config/esp.h 2010-04-09 16:14:00.000000000 +0200
460 +++ gcc/config/esp.h 2012-06-23 01:00:31.248348491 +0200
461
462 diff --git a/gcc-4.8.0/piepatch/README b/gcc-4.8.0/piepatch/README
463 index f322ab8..5d0bc13 100644
464 --- a/gcc-4.8.0/piepatch/README
465 +++ b/gcc-4.8.0/piepatch/README
466 @@ -7,7 +7,7 @@ http://forums.gentoo.org/viewtopic-t-668885.html. I joined the thread and starte
467
468 We started with the pieworld code from kevquinn's overlay. The PIE and minispecs part hit the tree later on.
469 With GCC 4.4.0 I was willing to do some code cleanup, use built-in specs and add it as --enable-esp in the
470 -configure command line.
471 +configure command line. On GCC 4.8.0 we use DRIVER_SELF_SPECS for the specs.
472
473 Thank you all:
474 Kevin K. Quinn, Peter S. Mazinger, Natanael Copa, Alexander Gabert, Solar, PaX Team, SpanKY, Xake, Dwokfur,
475 @@ -15,4 +15,4 @@ KernelOfTruth, SteveL, nixnut, Hopeless, forsaken1, XioXous, obrut<-, mv, qjim,
476 unk, neuron, alexxy, hellboi64, likewhoa, g0rg0n, costel78, polsas, 7v5w7go9ub0o, uberpinguin, Naib, cilly,
477 bonsaikitten, kerframil, agaffney, Gordon Malm, blueness, Matthias Klose, Kees Cook, mentor, Anarchy,
478 devurandom and everyone else for helping to test, suggestions, fixes and anything else we have missed.
479 -/2009-00-09 Magnus Grenberg (Zorry) <zorry@×××.nu>
480 +/2013-03-31 Magnus Grenberg (Zorry) <zorry@g.o>
481
482 diff --git a/gcc-4.8.0/piepatch/README.Changelog b/gcc-4.8.0/piepatch/README.Changelog
483 index 009e128..b73e521 100644
484 --- a/gcc-4.8.0/piepatch/README.Changelog
485 +++ b/gcc-4.8.0/piepatch/README.Changelog
486 @@ -1,3 +1,27 @@
487 +0.5.5 Magnus Granberg <zorry@g.o>
488 +
489 + * configure.ac Add mips
490 + * configure Regenerated
491 + * gcc/configure.ac Clean up the checksand add mips.
492 + * gcc/configure Regenerated
493 + * gcc/config.in Remove ENABLE_ESP_SSP
494 + * gcc/Makefile.in Bumped for 4.8.0 release
495 + * gcc/gcc.c Remove ESP_EXTRA_SPECS and
496 + ESP_COMMAND_OPTIONS_SPEC
497 + * gcc/config/rs6000/sysv4.h Add ESP_DRIVER_SELF_SPECS
498 + and ESP_EXTRA_SPECS
499 + * gcc/config/i386/gnu-user-common.h Add ESP_DRIVER_SELF_SPECS
500 + * gcc/config/i386/gnu-user.h Add ESP_DRIVER_SELF_SPECS
501 + * gcc/config/i386/i386.h Add ESP_DRIVER_SELF_SPECS
502 + * gcc/config/arm/arm.h Add ESP_DRIVER_SELF_SPECS and
503 + ESP_EXTRA_SPECS
504 + * gcc/config/mips/gnu-user.h Add ESP_DRIVER_SELF_SPECS
505 + * gcc/config/mips/gnu-user64.h Add ESP_DRIVER_SELF_SPECS
506 + * gcc/config/mips/mips.h Add ESP_EXTRA_SPECS
507 + * gcc/config/ia64/linux.h Add ESP_DRIVER_SELF_SPECS
508 + * gcc/config/ia64/ia64.h Add ESP_EXTRA_SPECS
509 + * gcc/config/esp.h Bump for ESP_DRIVER_SELF_SPECS support
510 +
511 0.5.4 Magnus Granberg <zorry@g.o>
512
513 #436924
514
515 diff --git a/gcc-4.8.0/piepatch/README.history b/gcc-4.8.0/piepatch/README.history
516 index 82b2ee3..5a2a379 100644
517 --- a/gcc-4.8.0/piepatch/README.history
518 +++ b/gcc-4.8.0/piepatch/README.history
519 @@ -1,3 +1,22 @@
520 +0.5.5 31 Mar 2013
521 + - 01_all_gcc47_configure.patch
522 + + 01_all_gcc48_configure.patch
523 + - 02_all_gcc47_config.in.patch
524 + + 02_all_gcc48_config.in.patch
525 + - 03_all_gcc47_Makefile.in.patch
526 + + 03_all_gcc48_Makefile.in.patch
527 + - 05_all_gcc47_gcc.c.patch
528 + - 05_all_gcc48_gcc.c.patch
529 + - 33_all_gcc46_config_rs6000_linux64.h.patch
530 + + 33_all_gcc48_config_rs6000.patch
531 + - 34_all_gcc47_config_all_gnu_user.patch
532 + + 34_all_gcc48_config_i386.patch
533 + + 35_all_gcc48_config_arm.patch
534 + + 36_all_gcc48_config_mips.patch
535 + + 37_all_gcc48_config_ia64.patch
536 + - 35_all_gcc47_config_esp.h.patch
537 + - 35_all_gcc48_config_esp.h.patch
538 + U README
539 0.5.4 02 Oct 2012
540 U 01_all_gcc47_configure.patch
541 + 01_all_gcc47_configure.ac.patch