Gentoo Archives: gentoo-commits

From: "Mike Frysinger (vapier)" <vapier@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo commit in src/patchsets/gcc/4.9.2/pie: 01_all_gcc49_configure.patch 02_all_gcc48_config.in.patch 03_all_gcc49_Makefile.in.patch 05_all_gcc48_gcc.c.patch 16_all_gcc47_nopie_option.patch 20_all_gcc49_config_crtbeginp.patch 24_all_gcc49_invoke.texi.patch 33_all_gcc48_config_rs6000.patch 34_all_gcc48_config_i386.patch 35_all_gcc48_config_arm.patch 36_all_gcc48_config_mips.patch 37_all_gcc48_config_ia64.patch 40_all_gcc49_config_esp.patch README README.Changelog README.history
Date: Sat, 01 Nov 2014 07:55:03
Message-Id: 20141101075459.97EEA9321@oystercatcher.gentoo.org
1 vapier 14/11/01 07:54:59
2
3 Added: 01_all_gcc49_configure.patch
4 02_all_gcc48_config.in.patch
5 03_all_gcc49_Makefile.in.patch
6 05_all_gcc48_gcc.c.patch
7 16_all_gcc47_nopie_option.patch
8 20_all_gcc49_config_crtbeginp.patch
9 24_all_gcc49_invoke.texi.patch
10 33_all_gcc48_config_rs6000.patch
11 34_all_gcc48_config_i386.patch
12 35_all_gcc48_config_arm.patch
13 36_all_gcc48_config_mips.patch
14 37_all_gcc48_config_ia64.patch
15 40_all_gcc49_config_esp.patch README
16 README.Changelog README.history
17 Log:
18 initial 4.9.2 patchset based on last 4.9.1 patchset
19
20 Revision Changes Path
21 1.1 src/patchsets/gcc/4.9.2/pie/01_all_gcc49_configure.patch
22
23 file : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gcc/4.9.2/pie/01_all_gcc49_configure.patch?rev=1.1&view=markup
24 plain: http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gcc/4.9.2/pie/01_all_gcc49_configure.patch?rev=1.1&content-type=text/plain
25
26 Index: 01_all_gcc49_configure.patch
27 ===================================================================
28 2013-12-30 Magnus Granberg <zorry@g.o>
29
30 * gcc/configure.ac Add --enable-esp and define ENABLE_ESP.
31 Check if we support crtbeginP and define ENABLE_CRTBEGINP.
32 * gcc/configure Regenerated
33
34
35 --- a/gcc/configure.ac 2011-11-18 11:52:32.000000000 +0100
36 +++ b/gcc/configure.ac 2012-10-02 17:39:15.649526241 +0200
37 @@ -5130,6 +5237,55 @@ if test x"${LINKER_HASH_STYLE}" != x; th
38 [The linker hash style])
39 fi
40
41 +# --------------
42 +# Esp checks
43 +# --------------
44 +
45 +# Check whether --enable-esp was given and target have the support.
46 +AC_ARG_ENABLE([esp],
47 +[AS_HELP_STRING([--enable-esp],
48 + [Enable Stack protector and Position independent executable as
49 + default if we have suppot for it when compiling
50 + and link with -z now as default.
51 + Linux targets supported i*86, x86_64, x32,
52 + powerpc, powerpc64, ia64, arm and mips.])],
53 + enable_esp=$enableval,
54 + enable_esp=no)
55 +if test $enable_esp = yes ; then
56 + AC_MSG_CHECKING(if $target support esp)
57 + case "$target" in
58 + i?86*-*-linux* | x86_64-*-linux* | powerpc*-*-linux* | mips-*-linux* | arm*-*-linux* | ia64-*-linux*)
59 + enable_esp=yes
60 + AC_DEFINE(ENABLE_ESP, 1,
61 + [Define if your target support esp and you have enable it.])
62 + ;;
63 + *)
64 + enable_esp=no
65 + ;;
66 + esac
67 +AC_MSG_RESULT($enable_esp)
68 +fi
69 +AC_SUBST([enable_esp])
70 +if test $enable_esp = yes ; then
71 + AC_MSG_CHECKING(checking for crtbeginP.o support)
72 + if test x$enable_esp = xyes ; then
73 + case "$target" in
74 + ia64*-*-linux*)
75 + enable_crtbeginP=no ;;
76 + *-*-linux*)
77 + if test x$gcc_cv_ld_pie = xyes && test x$lt_cv_prog_compiler_static_works = xyes; then
78 + enable_crtbeginP=yes
79 + AC_DEFINE(ENABLE_CRTBEGINP, 1,
80 + [Define if your compiler will support crtbeginP.])
81 + fi
82 + ;;
83 + *) enable_crtbeginP=no ;;
84 + esac
85 + fi
86 + AC_MSG_RESULT($enable_crtbeginP)
87 +fi
88 +AC_SUBST([enable_crtbeginP])
89 +
90 # Configure the subdirectories
91 # AC_CONFIG_SUBDIRS($subdirs)
92
93 --- a/gcc/configure 2013-02-01 21:26:24.000000000 +0100
94 +++ b/gcc/configure 2013-02-12 01:59:20.000000000 +0100
95 @@ -600,6 +600,8 @@
96 ac_subst_vars='LTLIBOBJS
97 LIBOBJS
98 PICFLAG
99 +enable_crtbeginP
100 +enable_esp
101 enable_host_shared
102 enable_plugin
103 pluginlibs
104 @@ -920,6 +922,7 @@
105 enable_plugin
106 enable_libquadmath_support
107 with_linker_hash_style
108 +enable_esp
109 '
110 ac_precious_vars='build_alias
111 host_alias
112 @@ -1633,6 +1636,11 @@
113 --enable-plugin enable plugin support
114 --disable-libquadmath-support
115 disable libquadmath support for Fortran
116 + --enable-esp Enable Stack protector and Position independent
117 + executable as default if we have suppot for it when
118 + compiling and link with -z now as default.
119 + Linux targets supported i*86, x86_64, x32,
120 + powerpc, powerpc64, ia64, arm and mips.
121
122 Optional Packages:
123 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
124 @@ -27419,6 +27427,59 @@
125
126 fi
127
128 +# --------------
129 +# Esp checks
130 +# --------------
131 +
132 +# Check whether --enable-esp was given and target have the support.
133 +# Check whether --enable-esp was given.
134 +if test "${enable_esp+set}" = set; then :
135 + enableval=$enable_esp; enable_esp=$enableval
136 +else
137 + enable_esp=no
138 +fi
139 +
140 +if test $enable_esp = yes ; then
141 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $target support esp" >&5
142 +$as_echo_n "checking if $target support esp... " >&6; }
143 + case "$target" in
144 + i?86*-*-linux* | x86_64-*-linux* | powerpc*-*-linux* | mips*-*-linux* | arm*-*-linux* | ia64-*-linux*)
145 + enable_esp=yes
146 +
147 +$as_echo "#define ENABLE_ESP 1" >>confdefs.h
148 +
149 + ;;
150 + *)
151 + enable_esp=no
152 + ;;
153 + esac
154 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_esp" >&5
155 +$as_echo "$enable_esp" >&6; }
156 +fi
157 +
158 +if test $enable_esp = yes ; then
159 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking checking for crtbeginP.o support" >&5
160 +$as_echo_n "checking checking for crtbeginP.o support... " >&6; }
161 + if test x$enable_esp = xyes ; then
162 + case "$target" in
163 + ia64*-*-linux*)
164 + enable_crtbeginP=no ;;
165 + *-*-linux*)
166 + if test x$gcc_cv_ld_pie = xyes && test x$lt_cv_prog_compiler_static_works = xyes; then
167 + enable_crtbeginP=yes
168 +
169 +$as_echo "#define ENABLE_CRTBEGINP 1" >>confdefs.h
170 +
171 + fi
172 + ;;
173 + *) enable_crtbeginP=no ;;
174 + esac
175 + fi
176 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_crtbeginP" >&5
177 +$as_echo "$enable_crtbeginP" >&6; }
178 +fi
179 +
180 +
181 # Configure the subdirectories
182 # AC_CONFIG_SUBDIRS($subdirs)
183
184
185
186
187 1.1 src/patchsets/gcc/4.9.2/pie/02_all_gcc48_config.in.patch
188
189 file : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gcc/4.9.2/pie/02_all_gcc48_config.in.patch?rev=1.1&view=markup
190 plain: http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gcc/4.9.2/pie/02_all_gcc48_config.in.patch?rev=1.1&content-type=text/plain
191
192 Index: 02_all_gcc48_config.in.patch
193 ===================================================================
194 2013-02-13 Magnus Granberg <zorry@g.o>
195
196 * gcc/config.in Add ENABLE_CRTBEGINP, ENABLE_ESP
197
198 --- gcc/config.in 2009-04-21 11:08:08.000000000 +0200
199 +++ gcc/config.in 2009-05-12 00:10:08.000000000 +0200
200 @@ -46,6 +46,12 @@
201 #endif
202
203
204 +/* Define to 1 to enable crtbeginP.o. */
205 +#ifndef USED_FOR_TARGET
206 +#undef ENABLE_CRTBEGINP
207 +#endif
208 +
209 +
210 /* Define to 1 to specify that we are using the BID decimal floating point
211 format instead of DPD */
212 #ifndef USED_FOR_TARGET
213 @@ -65,6 +65,12 @@
214 #endif
215
216
217 +/* Define to 1 to enable esp. */
218 +#ifndef USED_FOR_TARGET
219 +#undef ENABLE_ESP
220 +#endif
221 +
222 +
223 /* Define to 1 to enable fixed-point arithmetic extension to C. */
224 #ifndef USED_FOR_TARGET
225 #undef ENABLE_FIXED_POINT
226
227
228
229 1.1 src/patchsets/gcc/4.9.2/pie/03_all_gcc49_Makefile.in.patch
230
231 file : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gcc/4.9.2/pie/03_all_gcc49_Makefile.in.patch?rev=1.1&view=markup
232 plain: http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gcc/4.9.2/pie/03_all_gcc49_Makefile.in.patch?rev=1.1&content-type=text/plain
233
234 Index: 03_all_gcc49_Makefile.in.patch
235 ===================================================================
236 2012-01-17 Magnus Granberg <zorry@g.o>
237
238 * gcc/Makefile.in Add -fno-PIE. to ALL_CFLAGS and
239 ALL_CXXFLAGS if enable_esp yes.
240 Echo enable_esp and enable_crtbeginP to tmp-libgcc.mvars.
241 * libgcc/Makefile.in Add crtbeginP.o to EXTRA_PARTS if enable_crtbeginP yes
242 We add new file crtbeginP.o if enable_crtbeginP yes
243 Add -fno-PIE. to CRTSTUFF_CFLAGS.
244
245 --- a/gcc/Makefile.in 2011-11-09 02:20:14.000000000 +0100
246 +++ b/gcc/Makefile.in 2011-12-24 22:28:08.864804375 +0100
247 @@ -247,6 +247,14 @@ LINKER_FLAGS = $(CFLAGS)
248 endif
249 endif
250
251 +# We don't want to compile the compiler with -fPIE, it make PCH fail.
252 +enable_esp = @enable_esp@
253 +ifeq ($(enable_esp),yes)
254 +ESP_NOPIE_CFLAGS = -fno-PIE
255 +else
256 +ESP_NOPIE_CFLAGS=
257 +endif
258 +
259 # -------------------------------------------
260 # Programs which operate on the build machine
261 # -------------------------------------------
262 @@ -974,12 +982,13 @@ INTERNAL_CFLAGS = -DIN_GCC @CROSS@
263
264 # This is the variable actually used when we compile. If you change this,
265 # you probably want to update BUILD_CFLAGS in configure.ac
266 -ALL_CFLAGS = $(T_CFLAGS) $(CFLAGS-$@) \
267 +ALL_CFLAGS = $(ESP_NOPIE_CFLAGS) $(T_CFLAGS) $(CFLAGS-$@) \
268 $(CFLAGS) $(INTERNAL_CFLAGS) $(COVERAGE_FLAGS) $(WARN_CFLAGS) @DEFS@
269
270 # The C++ version.
271 -ALL_CXXFLAGS = $(T_CFLAGS) $(CFLAGS-$@) $(CXXFLAGS) $(INTERNAL_CFLAGS) \
272 - $(COVERAGE_FLAGS) $(NOEXCEPTION_FLAGS) $(WARN_CXXFLAGS) @DEFS@
273 +ALL_CXXFLAGS = $(ESP_NOPIE_CFLAGS) $(T_CFLAGS) $(CFLAGS-$@) $(CXXFLAGS) \
274 + $(INTERNAL_CFLAGS) $(COVERAGE_FLAGS) $(NOEXCEPTION_FLAGS) \
275 + $(WARN_CXXFLAGS) @DEFS@
276
277 # Likewise. Put INCLUDES at the beginning: this way, if some autoconf macro
278 # puts -I options in CPPFLAGS, our include files in the srcdir will always
279 @@ -1814,6 +1823,8 @@ libgcc.mvars: config.status Makefile spe
280 echo GCC_CFLAGS = '$(GCC_CFLAGS)' >> tmp-libgcc.mvars
281 echo INHIBIT_LIBC_CFLAGS = '$(INHIBIT_LIBC_CFLAGS)' >> tmp-libgcc.mvars
282 echo TARGET_SYSTEM_ROOT = '$(TARGET_SYSTEM_ROOT)' >> tmp-libgcc.mvars
283 + echo enable_esp = '$(enable_esp)' >> tmp-libgcc.mvars
284 + echo enable_crtbeginP = '@enable_crtbeginP@' >> tmp-libgcc.mvars
285
286 mv tmp-libgcc.mvars libgcc.mvars
287
288 --- a/libgcc/Makefile.in 2011-11-22 04:01:02.000000000 +0100
289 +++ b/libgcc/Makefile.in 2011-12-25 15:18:22.449610631 +0100
290 @@ -219,6 +219,17 @@ else
291 DECNUMINC =
292 endif
293
294 +ifeq ($(enable_esp),yes)
295 +ESP_NOPIE_CFLAGS = -fno-PIE
296 +else
297 +ESP_NOPIE_CFLAGS=
298 +endif
299 +
300 +# We add crtbeginP.o to the EXTRA_PARTS list if enable_crtbeginP = yes
301 +ifeq ($(enable_crtbeginP),yes)
302 +EXTRA_PARTS += crtbeginP.o
303 +endif
304 +
305 # Options to use when compiling libgcc2.a.
306 #
307 LIBGCC2_DEBUG_CFLAGS = -g
308 @@ -279,7 +290,7 @@ INTERNAL_CFLAGS = $(CFLAGS) $(LIBGCC2_CF
309 CRTSTUFF_CFLAGS = -O2 $(GCC_CFLAGS) $(INCLUDES) $(MULTILIB_CFLAGS) -g0 \
310 -finhibit-size-directive -fno-inline -fno-exceptions \
311 -fno-zero-initialized-in-bss -fno-toplevel-reorder -fno-tree-vectorize \
312 - -fno-stack-protector \
313 + -fno-stack-protector $(ESP_NOPIE_CFLAGS) \
314 $(INHIBIT_LIBC_CFLAGS)
315
316 # Extra flags to use when compiling crt{begin,end}.o.
317 @@ -966,6 +977,13 @@ crtendS$(objext): $(srcdir)/crtstuff.c
318 # This is a version of crtbegin for -static links.
319 crtbeginT$(objext): $(srcdir)/crtstuff.c
320 $(crt_compile) $(CRTSTUFF_T_CFLAGS) -c $< -DCRT_BEGIN -DCRTSTUFFT_O
321 +
322 +# This is a version of crtbegin for -static -fPIE links.
323 +ifeq ($(enable_crtbeginP),yes)
324 +crtbeginP$(objext): $(srcdir)/crtstuff.c
325 + $(crt_compile) $(CRTSTUFF_T_CFLAGS_S) \
326 + -c $< -DCRT_BEGIN -DCRTSTUFFT_O -DCRTSTUFFS_O
327 +endif
328
329 ifeq ($(enable_vtable_verify),yes)
330 # These are used in vtable verification; see comments in source files for
331
332
333
334 1.1 src/patchsets/gcc/4.9.2/pie/05_all_gcc48_gcc.c.patch
335
336 file : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gcc/4.9.2/pie/05_all_gcc48_gcc.c.patch?rev=1.1&view=markup
337 plain: http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gcc/4.9.2/pie/05_all_gcc48_gcc.c.patch?rev=1.1&content-type=text/plain
338
339 Index: 05_all_gcc48_gcc.c.patch
340 ===================================================================
341 2014-01-01 Magnus Granberg <zorry@g.o>
342
343 * gcc/gcc.c include esp.h
344 static const char *cc1_spec We set that in esp.h if ENABLE_ESP.
345
346 --- gcc/gcc.c 2010-01-21 10:29:30.000000000 -0500
347 +++ gcc/gcc.c 2010-01-29 23:29:16.000000000 -0500
348 @@ -44,6 +44,7 @@
349 #include "opts.h"
350 #include "params.h"
351 #include "vec.h"
352 +#include "config/esp.h" /* for --enable-esp support */
353 #include "filenames.h"
354
355 /* By default there is no special suffix for target executables. */
356 @@ -822,7 +823,9 @@
357
358 static const char *asm_debug;
359 static const char *cpp_spec = CPP_SPEC;
360 +#ifndef ENABLE_ESP
361 static const char *cc1_spec = CC1_SPEC CC1_SSP_DEFAULT_SPEC;
362 +#endif
363 static const char *cc1plus_spec = CC1PLUS_SPEC;
364 static const char *link_gcc_c_sequence_spec = LINK_GCC_C_SEQUENCE_SPEC;
365 static const char *link_ssp_spec = LINK_SSP_SPEC;
366
367
368
369 1.1 src/patchsets/gcc/4.9.2/pie/16_all_gcc47_nopie_option.patch
370
371 file : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gcc/4.9.2/pie/16_all_gcc47_nopie_option.patch?rev=1.1&view=markup
372 plain: http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gcc/4.9.2/pie/16_all_gcc47_nopie_option.patch?rev=1.1&content-type=text/plain
373
374 Index: 16_all_gcc47_nopie_option.patch
375 ===================================================================
376 2012-01-24 Magnus Granberg <zorry@g.o>
377
378 * gcc/common.opt Add -nopie
379
380 --- a/gcc/common.opt 2011-11-23 19:51:17.000000000 +0100
381 +++ b//gcc/common.opt 2012-01-24 16:56:24.302224357 +0100
382 @@ -2280,6 +2280,9 @@ Driver
383 nodefaultlibs
384 Driver
385
386 +nopie
387 +Driver
388 +
389 nostartfiles
390 Driver
391
392
393
394
395 1.1 src/patchsets/gcc/4.9.2/pie/20_all_gcc49_config_crtbeginp.patch
396
397 file : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gcc/4.9.2/pie/20_all_gcc49_config_crtbeginp.patch?rev=1.1&view=markup
398 plain: http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gcc/4.9.2/pie/20_all_gcc49_config_crtbeginp.patch?rev=1.1&content-type=text/plain
399
400 Index: 20_all_gcc49_config_crtbeginp.patch
401 ===================================================================
402 2014-04-23 Magnus Granberg <zorry@g.o>
403
404 * gcc/config/gnu-user.h If ENABLE_CRTBEGINP, -static and -pie use crtbegineP.o.
405 * gcc/config/rs6000/sysv4.h If ENABLE_CRTBEGINP, -static and -pie use crtbegineP.o.
406
407 --- gcc/config/gnu-user.h 2014-01-02 23:23:26.000000000 +0100
408 +++ gcc/config/gnu-user.h 2014-04-23 00:55:06.390265454 +0200
409 @@ -40,7 +40,15 @@ see the files COPYING3 and COPYING.RUNTI
410 provides part of the support for getting C++ file-scope static
411 object constructed before entering `main'. */
412
413 -#if defined HAVE_LD_PIE
414 +#if defined (HAVE_LD_PIE) && defined (ENABLE_CRTBEGINP)
415 +#define GNU_USER_TARGET_STARTFILE_SPEC \
416 + "%{!shared: %{pg|p|profile:gcrt1.o%s;pie:Scrt1.o%s;:crt1.o%s}} \
417 + crti.o%s %{static:%{pie:crtbeginP.o%s;:crtbeginT.o%s}; \
418 + shared|pie:crtbeginS.o%s;:crtbegin.o%s} \
419 + %{fvtable-verify=none:%s; \
420 + fvtable-verify=preinit:vtv_start_preinit.o%s; \
421 + fvtable-verify=std:vtv_start.o%s}"
422 +#elif defined (HAVE_LD_PIE) && ! defined (ENABLE_CRTBEGINP)
423 #define GNU_USER_TARGET_STARTFILE_SPEC \
424 "%{!shared: %{pg|p|profile:gcrt1.o%s;pie:Scrt1.o%s;:crt1.o%s}} \
425 crti.o%s %{static:crtbeginT.o%s;shared|pie:crtbeginS.o%s;:crtbegin.o%s} \
426 --- gcc/config/rs6000/sysv4.h 2009-04-10 01:23:07.000000000 +0200
427 +++ gcc/config/rs6000/sysv4.h 2009-09-08 04:41:50.000000000 +0200
428 @@ -883,7 +883,12 @@
429 %{!mnewlib: %{pthread:-lpthread} %{shared:-lc} \
430 %{!shared: %{profile:-lc_p} %{!profile:-lc}}}"
431
432 -#ifdef HAVE_LD_PIE
433 +#if defined (HAVE_LD_PIE) && defined (ENABLE_CRTBEGINP)
434 +#define STARTFILE_LINUX_SPEC "\
435 +%{!shared: %{pg|p|profile:gcrt1.o%s;pie:Scrt1.o%s;:crt1.o%s}} \
436 +%{mnewlib:ecrti.o%s;:crti.o%s} \
437 +%{static:%{pie:crtbeginP.o%s;:crtbeginT.o%s}} %{!static:%{shared|pie:crtbeginS.o%s;:crtbegin.o%s}}"
438 +#elif defined (HAVE_LD_PIE) && ! defined (ENABLE_CRTBEGINP)
439 #define STARTFILE_LINUX_SPEC "\
440 %{!shared: %{pg|p|profile:gcrt1.o%s;pie:Scrt1.o%s;:crt1.o%s}} \
441 %{mnewlib:ecrti.o%s;:crti.o%s} \
442
443
444
445 1.1 src/patchsets/gcc/4.9.2/pie/24_all_gcc49_invoke.texi.patch
446
447 file : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gcc/4.9.2/pie/24_all_gcc49_invoke.texi.patch?rev=1.1&view=markup
448 plain: http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gcc/4.9.2/pie/24_all_gcc49_invoke.texi.patch?rev=1.1&content-type=text/plain
449
450 Index: 24_all_gcc49_invoke.texi.patch
451 ===================================================================
452 2014-04-24 Magnus Granberg <zorry@g.o>
453
454 * gcc/doc/invoke.texi Add NOTES about -fstack-protector-all, -pie and
455 -fPIE/-fpie when --enable-esp is enable, this options is on by default.
456
457 --- gcc/doc/invoke.texi 2009-04-01 09:18:47.000000000 +0200
458 +++ gcc/doc/invoke.texi 2009-06-18 14:08:38.000000000 +0200
459 @@ -9233,6 +9245,11 @@ If a guard check fails, an error message
460 @opindex fstack-protector-all
461 Like @option{-fstack-protector} except that all functions are protected.
462
463 +NOTE: NOTE: When --enable-esp this option is enabled by default
464 +for C, C++, ObjC, ObjC++, if neither @option{-fno-stack-protector},
465 +@option{-nostdlib}, @option{-ffreestanding}, @option{-fstack-protector},
466 +@option{-fstack-protector-strong}or @option{-fstack-protector-all}are found.
467 +
468 @item -fstack-protector-strong
469 @opindex fstack-protector-strong
470 Like @option{-fstack-protector} but includes additional functions to
471 @@ -7960,6 +7965,12 @@
472 that were used to generate code (@option{-fpie}, @option{-fPIE},
473 or model suboptions) when you specify this option.
474
475 +NOTE: When --enable-esp this option is enabled by default
476 +for C, C++, ObjC, ObjC++, if neither @option{-fno-pie} or @option{-fno-PIE}
477 +or @option{-fno-pic} or @option{-fno-PIC} or @option{-nostdlib} or
478 +@option{-nostartfiles} or @option{-shared} or @option{-pg} or @option{-p}
479 +are found.
480 +
481 @item -rdynamic
482 @opindex rdynamic
483 Pass the flag @option{-export-dynamic} to the ELF linker, on targets
484 @@ -15889,6 +15910,11 @@
485 @code{__pie__} and @code{__PIE__}. The macros have the value 1
486 for @option{-fpie} and 2 for @option{-fPIE}.
487
488 +NOTE: When --enable-esp this option is enabled by default
489 +for C, C++, ObjC, ObjC++, if neither @option{-fno-pie} or @option{-fno-PIE}
490 +or @option{-fno-pic} or @option{-fno-PIC} or @option{-nostdlib} or
491 +@option{-nostartfiles} or @option{-shared} are found.
492 +
493 @item -fno-jump-tables
494 @opindex fno-jump-tables
495 Do not use jump tables for switch statements even where it would be
496
497
498
499 1.1 src/patchsets/gcc/4.9.2/pie/33_all_gcc48_config_rs6000.patch
500
501 file : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gcc/4.9.2/pie/33_all_gcc48_config_rs6000.patch?rev=1.1&view=markup
502 plain: http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gcc/4.9.2/pie/33_all_gcc48_config_rs6000.patch?rev=1.1&content-type=text/plain
503
504 Index: 33_all_gcc48_config_rs6000.patch
505 ===================================================================
506 2014-08-07 Magnus Granberg <zorry@g.o>
507
508 * gcc/config/rs6000/sysv4.h (DRIVER_SELF_SPECS): Add ESP_DRIVER_SELF_SPECS.
509 (SUBTARGET_EXTRA_SPECS): Add ESP_EXTRA_SPECS.
510
511 --- a/gcc/config/rs6000/sysv4.h 2013-01-10 21:38:27.000000000 +0100
512 +++ b/gcc/config/rs6000/sysv4.h 2013-03-26 01:30:33.257003189 +0100
513 @@ -627,8 +627,13 @@ extern int fixuplabelno;
514
515 #define LINK_OS_DEFAULT_SPEC ""
516
517 +#ifdef ENABLE_ESP
518 +#define DRIVER_SELF_SPECS "%{mfpu=none: %<mfpu=* \
519 + %<msingle-float %<mdouble-float}", ESP_DRIVER_SELF_SPEC
520 +#else
521 #define DRIVER_SELF_SPECS "%{mfpu=none: %<mfpu=* \
522 %<msingle-float %<mdouble-float}"
523 +#endif
524
525 /* Override rs6000.h definition. */
526 #undef CPP_SPEC
527 @@ -933,7 +938,11 @@ ncrtn.o%s"
528 { "cpp_os_openbsd", CPP_OS_OPENBSD_SPEC }, \
529 { "cpp_os_default", CPP_OS_DEFAULT_SPEC }, \
530 { "fbsd_dynamic_linker", FBSD_DYNAMIC_LINKER }, \
531 - SUBSUBTARGET_EXTRA_SPECS
532 + SUBSUBTARGET_EXTRA_SPECS ESP_EXTRA_SPECS
533 +
534 +#ifndef ENABLE_ESP
535 +#define ESP_EXTRA_SPECS
536 +#endif
537
538 #define SUBSUBTARGET_EXTRA_SPECS
539
540
541
542
543 1.1 src/patchsets/gcc/4.9.2/pie/34_all_gcc48_config_i386.patch
544
545 file : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gcc/4.9.2/pie/34_all_gcc48_config_i386.patch?rev=1.1&view=markup
546 plain: http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gcc/4.9.2/pie/34_all_gcc48_config_i386.patch?rev=1.1&content-type=text/plain
547
548 Index: 34_all_gcc48_config_i386.patch
549 ===================================================================
550 2013-03-24 Magnus Granberg <zorry@g.o>
551
552 * gcc/config/i386/gnu-user-common.h (DRIVER_SELF_SPECS): Add ESP_DRIVER_SELF_SPEC.
553 * gcc/config/i386/gnu-user.h (SUBTARGET_EXTRA_SPECS): Add ESP_EXTRA_SPECS.
554 * gcc/config/i386/i386.h (SUBTARGET_EXTRA_SPECS): Add ESP_EXTRA_SPECS.
555
556 --- a/gcc/config/i386/gnu-user-common.h 2013-01-10 21:38:27.000000000 +0100
557 +++ b/gcc/config/i386/gnu-user-common.h 2013-02-14 00:51:44.689637605 +0100
558 @@ -70,3 +70,7 @@ along with GCC; see the file COPYING3.
559
560 /* Static stack checking is supported by means of probes. */
561 #define STACK_CHECK_STATIC_BUILTIN 1
562 +
563 +#ifdef ENABLE_ESP
564 +#define DRIVER_SELF_SPECS ESP_DRIVER_SELF_SPEC
565 +#endif
566 --- a/gcc/config/i386/gnu-user.h 2011-05-05 14:32:50.000000000 +0200
567 +++ b/gcc/config/i386/gnu-user.h 2012-07-09 14:28:38.726289455 +0200
568 @@ -93,9 +93,16 @@ along with GCC; see the file COPYING3.
569 "--32 %{!mno-sse2avx:%{mavx:-msse2avx}} %{msse2avx:%{!mavx:-msse2avx}}"
570
571 #undef SUBTARGET_EXTRA_SPECS
572 +#ifdef ENABLE_ESP
573 #define SUBTARGET_EXTRA_SPECS \
574 { "link_emulation", GNU_USER_LINK_EMULATION },\
575 - { "dynamic_linker", GNU_USER_DYNAMIC_LINKER }
576 + { "dynamic_linker", GNU_USER_DYNAMIC_LINKER }, \
577 + ESP_EXTRA_SPECS
578 +#else
579 +#define SUBTARGET_EXTRA_SPECS \
580 + { "link_emulation", GNU_USER_LINK_EMULATION },\
581 + { "dynamic_linker", GNU_USER_DYNAMIC_LINKER }
582 +#endif
583
584 #undef LINK_SPEC
585 #define LINK_SPEC "-m %(link_emulation) %{shared:-shared} \
586 --- a/gcc/config/i386/i386.h 2011-11-24 23:11:12.000000000 +0100
587 +++ b/gcc/config/i386/i386.h 2012-07-09 14:21:24.575276517 +0200
588 @@ -617,13 +617,16 @@ enum target_cpu_default
589 Do not define this macro if it does not need to do anything. */
590
591 #ifndef SUBTARGET_EXTRA_SPECS
592 +#ifdef ENABLE_ESP
593 +#define SUBTARGET_EXTRA_SPECS ESP_EXTRA_SPECS
594 +#else
595 #define SUBTARGET_EXTRA_SPECS
596 #endif
597 +#endif
598
599 #define EXTRA_SPECS \
600 { "cc1_cpu", CC1_CPU_SPEC }, \
601 SUBTARGET_EXTRA_SPECS
602 -
603
604 /* Set the value of FLT_EVAL_METHOD in float.h. When using only the
605 FPU, assume that the fpcw is set to extended precision; when using
606
607
608
609 1.1 src/patchsets/gcc/4.9.2/pie/35_all_gcc48_config_arm.patch
610
611 file : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gcc/4.9.2/pie/35_all_gcc48_config_arm.patch?rev=1.1&view=markup
612 plain: http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gcc/4.9.2/pie/35_all_gcc48_config_arm.patch?rev=1.1&content-type=text/plain
613
614 Index: 35_all_gcc48_config_arm.patch
615 ===================================================================
616 2013-06-03 Magnus Granberg <zorry@g.o>
617
618 * gcc/config/arm/arm.h (DRIVER_SELF_SPECS): Add ESP_DRIVER_SELF_SPEC.
619 * gcc/config/arm/elf.h (SUBSUBTARGET_EXTRA_SPECS): Add ESP_EXTRA_SPECS.
620
621 --- a/gcc/config/arm/arm.h 2013-01-15 17:17:28.000000000 +0100
622 +++ b/gcc/config/arm/arm.h 2013-02-18 22:45:18.327284928 +0100
623 @@ -2326,6 +2326,11 @@ extern const char *host_detect_local_cpu
624 # define MCPU_MTUNE_NATIVE_SPECS ""
625 #endif
626
627 -#define DRIVER_SELF_SPECS MCPU_MTUNE_NATIVE_SPECS
628 -
629 +#ifdef ENABLE_ESP
630 +# define DRIVER_SELF_SPECS \
631 + MCPU_MTUNE_NATIVE_SPECS, \
632 + ESP_DRIVER_SELF_SPEC
633 +#else
634 +# define DRIVER_SELF_SPECS MCPU_MTUNE_NATIVE_SPECS
635 +#endif
636 #endif /* ! GCC_ARM_H */
637 --- a/gcc/config/arm/elf.h 2013-01-10 21:38:27.000000000 +0100
638 +++ b/gcc/config/arm/elf.h 2013-05-19 02:15:49.595855825 +0200
639 @@ -49,7 +49,11 @@
640 #endif
641
642 #undef SUBSUBTARGET_EXTRA_SPECS
643 +#ifdef ENABLE_ESP
644 +#define SUBSUBTARGET_EXTRA_SPECS ESP_EXTRA_SPECS
645 +#else
646 #define SUBSUBTARGET_EXTRA_SPECS
647 +#endif
648
649 #ifndef ASM_SPEC
650 #define ASM_SPEC "\
651
652
653
654 1.1 src/patchsets/gcc/4.9.2/pie/36_all_gcc48_config_mips.patch
655
656 file : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gcc/4.9.2/pie/36_all_gcc48_config_mips.patch?rev=1.1&view=markup
657 plain: http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gcc/4.9.2/pie/36_all_gcc48_config_mips.patch?rev=1.1&content-type=text/plain
658
659 Index: 36_all_gcc48_config_mips.patch
660 ===================================================================
661 2013-04-01 Magnus Granberg <zorry@g.o>
662
663 * gcc/config/mips/gnu-user.h (DRIVER_SELF_SPECS): Add ESP_DRIVER_SELF_SPEC.
664 * gcc/config/mips/gnu-user64.h (DRIVER_SELF_SPECS): Add ESP_DRIVER_SELF_SPEC.
665 * gcc/config/mips/mips.h (SUBTARGET_EXTRA_SPECS): Add ESP_EXTRA_SPECS.
666
667 --- a/gcc/config/mips/gnu-user.h 2013-01-10 21:38:27.000000000 +0100
668 +++ b/gcc/config/mips/gnu-user.h 2013-03-10 22:37:33.743176388 +0100
669 @@ -125,9 +125,16 @@ extern const char *host_detect_local_cpu
670 "%{mabi=64:%{!msym32:%<mplt}}"
671
672 #undef DRIVER_SELF_SPECS
673 +#ifdef ENABLE_ESP
674 #define DRIVER_SELF_SPECS \
675 BASE_DRIVER_SELF_SPECS, \
676 + ESP_DRIVER_SELF_SPEC, \
677 LINUX_DRIVER_SELF_SPECS
678 +# else
679 +#define DRIVER_SELF_SPECS \
680 + BASE_DRIVER_SELF_SPECS, \
681 + LINUX_DRIVER_SELF_SPECS
682 +#endif
683
684 /* Similar to standard Linux, but adding -ffast-math support. */
685 #undef GNU_USER_TARGET_MATHFILE_SPEC
686 --- a/gcc/config/mips/gnu-user64.h 2013-01-10 21:38:27.000000000 +0100
687 +++ b/gcc/config/mips/gnu-user64.h 2013-03-10 22:32:11.209166777 +0100
688 @@ -26,9 +26,16 @@ along with GCC; see the file COPYING3.
689 " %{!mabi=*: -" MULTILIB_ABI_DEFAULT "}"
690
691 #undef DRIVER_SELF_SPECS
692 +#ifdef ENABLE_ESP
693 #define DRIVER_SELF_SPECS \
694 BASE_DRIVER_SELF_SPECS, \
695 + ESP_DRIVER_SELF_SPEC, \
696 LINUX64_DRIVER_SELF_SPECS
697 +# else
698 +#define DRIVER_SELF_SPECS \
699 + BASE_DRIVER_SELF_SPECS, \
700 + LINUX64_DRIVER_SELF_SPECS
701 +#endif
702
703 #undef GNU_USER_TARGET_LINK_SPEC
704 #define GNU_USER_TARGET_LINK_SPEC "\
705 --- a/gcc/config/mips/mips.h 2013-01-10 21:38:27.000000000 +0100
706 +++ b/gcc/config/mips/mips.h 2013-03-24 16:59:01.474513910 +0100
707 @@ -1197,9 +1197,13 @@ struct mips_cpu_info {
708 SUBTARGET_EXTRA_SPECS
709
710 #ifndef SUBTARGET_EXTRA_SPECS
711 +#ifdef ENABLE_ESP
712 +#define SUBTARGET_EXTRA_SPECS ESP_EXTRA_SPECS
713 +#else
714 #define SUBTARGET_EXTRA_SPECS
715 #endif
716 -
717 +#endif
718 +
719 #define DBX_DEBUGGING_INFO 1 /* generate stabs (OSF/rose) */
720 #define DWARF2_DEBUGGING_INFO 1 /* dwarf2 debugging info */
721
722
723
724
725 1.1 src/patchsets/gcc/4.9.2/pie/37_all_gcc48_config_ia64.patch
726
727 file : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gcc/4.9.2/pie/37_all_gcc48_config_ia64.patch?rev=1.1&view=markup
728 plain: http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gcc/4.9.2/pie/37_all_gcc48_config_ia64.patch?rev=1.1&content-type=text/plain
729
730 Index: 37_all_gcc48_config_ia64.patch
731 ===================================================================
732 2013-06-03 Magnus Granberg <zorry@g.o>
733
734 * gcc/config/ia64/linux.h Define DRIVER_SELF_SPECS ESP_DRIVER_SELF_SPEC.
735 * gcc/config/ia64/ia64.h (SUBTARGET_EXTRA_SPECS): Add ESP_EXTRA_SPECS.
736
737 --- a/gcc/config/ia64/linux.h 2013-01-10 21:38:27.000000000 +0100
738 +++ b/gcc/config/ia64/linux.h 2013-03-16 22:50:10.363049291 +0100
739 @@ -88,3 +88,7 @@ do { \
740
741 /* Define this to be nonzero if static stack checking is supported. */
742 #define STACK_CHECK_STATIC_BUILTIN 1
743 +
744 +#ifdef ENABLE_ESP
745 +#define DRIVER_SELF_SPECS ESP_DRIVER_SELF_SPEC
746 +#endif
747 --- a/gcc/config/ia64/ia64.h 2013-01-10 21:38:27.000000000 +0100
748 +++ b/gcc/config/ia64/ia64.h 2013-03-26 02:03:21.052061828 +0100
749 @@ -41,8 +41,12 @@ do { \
750 } while (0)
751
752 #ifndef SUBTARGET_EXTRA_SPECS
753 +#ifdef ENABLE_ESP
754 +#define SUBTARGET_EXTRA_SPECS ESP_EXTRA_SPECS
755 +#else
756 #define SUBTARGET_EXTRA_SPECS
757 #endif
758 +#endif
759
760 #define EXTRA_SPECS \
761 { "asm_extra", ASM_EXTRA_SPEC }, \
762
763
764
765 1.1 src/patchsets/gcc/4.9.2/pie/40_all_gcc49_config_esp.patch
766
767 file : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gcc/4.9.2/pie/40_all_gcc49_config_esp.patch?rev=1.1&view=markup
768 plain: http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gcc/4.9.2/pie/40_all_gcc49_config_esp.patch?rev=1.1&content-type=text/plain
769
770 Index: 40_all_gcc49_config_esp.patch
771 ===================================================================
772 2014-05-12 Magnus Granberg <zorry@g.o>
773
774 * gcc/esp.h New file to support --enable-esp
775 Version 20140512.1
776
777 --- gcc/config/esp.h 2010-04-09 16:14:00.000000000 +0200
778 +++ gcc/config/esp.h 2012-06-23 01:00:31.248348491 +0200
779 @@ -0,0 +1,127 @@
780 +/* License terms see GNU GENERAL PUBLIC LICENSE Version 3.
781 + * Version 20140512.1
782 + * Magnus Granberg (Zorry) <zorry@g.o> */
783 +#ifndef GCC_ESP_H
784 +#define GCC_ESP_H
785 +
786 +/* This file will add -fstack-protector-all, -fstack-check, -fPIE, -pie and -z now
787 + as default if the defines and the spec allow it.
788 + Added a hack for gcc-specs-* in toolchain-funcs.eclass and _filter-hardened in flag-o-matic.eclass
789 + to support older hardened GCC patches and we don't need to change the code on gcc-specs-* and _filter-hardened.
790 + This will add some unsupported upstream commands options as -nopie and -nonow.
791 + -D__KERNEL__ is added so we don't have -fPIE, -pie and -fstack-protector-all and -fstack-check when building kernels.
792 + ESP_CC1_SPEC is added to CC1_SPEC.
793 + ESP_CC1_STRICT_OVERFLOW_SPEC is added so we don't disable the strict-overflow check.
794 + ESP_LINK_PIE_CHECK_SPEC check for -pie, -p, -pg, -profile and -static.
795 + ENABLE_CRTBEGINP add support for crtbeginP.o, build -static with -fPIE or -fpie.
796 +*/
797 +#ifdef ENABLE_ESP
798 +
799 + /* Hack to support gcc-specs-* in toolchain-funcs.eclass and _filter-hardened in flag-o-matic.eclass */
800 + #define ESP_CC1_SPEC " %(esp_cc1_ssp) %(esp_cc1_pie) %(esp_cc1_strict_overflow)"
801 + #if defined ( EFAULT_SSP ) || defined ( EFAULT_PIE_SSP )
802 + #define ESP_CC1_SSP_SPEC "%{!fno-stack-protector: %{!fno-stack-protector-all: %{!fno-stack-check: }}}"
803 + #else
804 + #define ESP_CC1_SSP_SPEC ""
805 + #endif
806 + #if defined ( EFAULT_PIE ) || defined ( EFAULT_PIE_SSP )
807 + #define ESP_CC1_PIE_SPEC "%{!nopie: }"
808 + #else
809 + #define ESP_CC1_PIE_SPEC ""
810 + #endif
811 + #define ESP_CC1_STRICT_OVERFLOW_SPEC "%{!fstrict-overflow:%{!fno-strict-overflow: -fno-strict-overflow}}"
812 +
813 + /* ESP_LINK_SPEC is added to LINK_PIE_SPEC if esp is enable
814 + -z now will be added if we don't have -vanilla spec. We do a -pie incompatible check
815 + Don't remove the specs in the end */
816 + #define ESP_LINK_SPEC "%(esp_link_now) %(esp_link_pie_check) "
817 + #define ESP_LINK_NOW_SPEC "%{!nonow:-z now}"
818 +
819 + /* We use ESP_DRIVER_SELF_SPEC to add pie and ssp command-line options. */
820 + #define ESP_DRIVER_SELF_SPEC "%{D__KERNEL__:;:%{!nopie:%(esp_options_pie) \
821 + %(esp_link_pie)} %(esp_options_ssp) }"
822 +
823 + /* This will add -fstack-protector-all if we don't have -nostdlib -nodefaultlibs -fno-stack-protector -fstack-protector
824 + -fstack-protector-all and we have EFAULT_SSP or EFAULT_PIE_SSP defined. */
825 + #if defined ( EFAULT_SSP ) || defined ( EFAULT_PIE_SSP )
826 + #define ESP_OPTIONS_SSP_SPEC \
827 + "%{nostdlib|ffreestanding|fno-stack-protector|fstack-protector| \
828 + fstack-protector-all|fstack-protector-strong:;:-fstack-protector-all} \
829 + %{fstack-check|fstack-check=*:;: -fstack-check}"
830 + #else
831 + #define ESP_OPTIONS_SSP_SPEC ""
832 + #endif
833 +
834 + /* If EFAULT_PIE or EFAULT_PIE_SSP is defined we will add -fPIE -pie */
835 + #if defined ( EFAULT_PIE ) || defined ( EFAULT_PIE_SSP )
836 +
837 + /* This will add -fPIE if we don't have -pie -fpic -fPIC -fpie -fPIE -fno-pic -fno-PIC -fno-pie -fno-PIE -shared -static
838 + -nostdlib -nostartfiles. */
839 + /* With ENABLE_CRTBEGINP we don't need to check for -static */
840 + #ifdef ENABLE_CRTBEGINP
841 + #define ESP_OPTIONS_PIE_SPEC \
842 + "%{!pie: %{!fpic:%{!fPIC:%{!fpie:%{!fPIE: %{!fno-pic:%{!fno-PIC:%{!fno-pie:%{!fno-PIE: \
843 + %{!shared: %{!nostdlib: %{!nostartfiles:-fPIE}} } }}}} }}}} }"
844 + #else
845 + #define ESP_OPTIONS_PIE_SPEC \
846 + "%{!pie: %{!fpic:%{!fPIC:%{!fpie:%{!fPIE: %{!fno-pic:%{!fno-PIC:%{!fno-pie:%{!fno-PIE: \
847 + %{!shared: %{!static: %{!nostdlib: %{!nostartfiles:-fPIE}} } }}}} }}}} }}"
848 + #endif
849 +
850 + /* This will add -pie if we don't have -pie -A -fno-pic -fno-PIC -fno-pie -fno-PIE -shared -static -r -nostdlib
851 + -nostartfiles */
852 + /* With ENABLE_CRTBEGINP we don't need to check for -static
853 + and we add -pie only to get the start and endfiles. -pie will not go to the linker. */
854 + #ifdef ENABLE_CRTBEGINP
855 + #define ESP_LINK_PIE_SPEC \
856 + "%{!pie:%{!A:%{!fno-pie:%{!fno-PIE:%{!fno-pic:%{!fno-PIC:%{!shared:%{!r: \
857 + %{!nostdlib:%{!nostartfiles:-pie}}}}}}}}}}"
858 + #else
859 + #define ESP_LINK_PIE_SPEC \
860 + "%{!pie:%{!A:%{!fno-pie:%{!fno-PIE:%{!fno-pic:%{!fno-PIC:%{!shared:%{!static:%{!r: \
861 + %{!nostdlib:%{!nostartfiles:-pie}}}}}}}}}}}"
862 + #endif
863 +
864 + /* This will check if -pie is set when (-static) -pg -p -profile. If set it will make gcc print out
865 + "-pie and (static)|pg|p|profile are incompatible when linking" */
866 + /* With ENABLE_CRTBEGINP we don't need to check for -static */
867 + #ifdef ENABLE_CRTBEGINP
868 + #define ESP_LINK_PIE_CHECK_SPEC \
869 + "%{pie:%{pg|p|profile:%e-pie and -pg|p|profile are incompatible when linking}}"
870 + #else
871 + #define ESP_LINK_PIE_CHECK_SPEC \
872 + "%{pie:%{static|pg|p|profile:%e-pie and -static|pg|p|profile are incompatible when linking}}"
873 + #endif
874 +
875 + /* We don't pass -pie to the linker when -static. */
876 + #ifdef ENABLE_CRTBEGINP
877 + #define LINK_PIE_SPEC "%{!static:%{pie:-pie}} %(esp_link)"
878 + #else
879 + #define LINK_PIE_SPEC "%{pie:-pie} %(esp_link)"
880 + #endif
881 +
882 + #else
883 + #define ESP_OPTIONS_PIE_SPEC ""
884 + #define ESP_LINK_PIE_CHECK_SPEC ""
885 + #define ESP_LINK_PIE_SPEC ""
886 + #define LINK_PIE_SPEC "%{pie:-pie} %(esp_link)"
887 + #endif
888 +
889 + /* We add extra spec name's to the EXTRA_SPECS list */
890 + #define ESP_EXTRA_SPECS \
891 + { "esp_cc1", ESP_CC1_SPEC }, \
892 + { "esp_cc1_pie", ESP_CC1_PIE_SPEC }, \
893 + { "esp_cc1_ssp", ESP_CC1_SSP_SPEC }, \
894 + { "esp_cc1_strict_overflow", ESP_CC1_STRICT_OVERFLOW_SPEC }, \
895 + { "esp_link", ESP_LINK_SPEC }, \
896 + { "esp_link_now", ESP_LINK_NOW_SPEC }, \
897 + { "esp_link_pie", ESP_LINK_PIE_SPEC }, \
898 + { "esp_link_pie_check", ESP_LINK_PIE_CHECK_SPEC }, \
899 + { "esp_driver_self", ESP_DRIVER_SELF_SPEC }, \
900 + { "esp_options_pie", ESP_OPTIONS_PIE_SPEC }, \
901 + { "esp_options_ssp", ESP_OPTIONS_SSP_SPEC }
902 +
903 + static const char *cc1_spec = CC1_SPEC ESP_CC1_SPEC;
904 +
905 +#endif
906 +#endif /* End GCC_ESP_H */
907
908
909
910 1.1 src/patchsets/gcc/4.9.2/pie/README
911
912 file : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gcc/4.9.2/pie/README?rev=1.1&view=markup
913 plain: http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gcc/4.9.2/pie/README?rev=1.1&content-type=text/plain
914
915 Index: README
916 ===================================================================
917 This work started with bugs #94325 #100689 #106222 #149292 #149649 and the overlay on http://overlays.gentoo.org/dev/kevquinn.
918 By Kevin K. Quinn, Peter S. Mazinger, Natanael Copa, Alexander Gabert, Solar, PaX Team, SpanKY and mentor.
919
920 The work stalled. Some threads on the Gentoo forum started to do their own fixes to get it working.
921 Xake started the thread where most of the new work was done: "How long until hardened and toolchain will produce a hardened gcc4?"
922 http://forums.gentoo.org/viewtopic-t-668885.html. I joined the thread and started to code.
923
924 We started with the pieworld code from kevquinn's overlay. The PIE and minispecs part hit the tree later on.
925 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
926 configure command line. On GCC 4.8.0 we use DRIVER_SELF_SPECS for the specs.
927 From Gcc 4.9.0 it will have -fstack-protector-strong on as default.
928
929 Thank you all:
930 Kevin K. Quinn, Peter S. Mazinger, Natanael Copa, Alexander Gabert, Solar, PaX Team, SpanKY, Xake, Dwokfur,
931 KernelOfTruth, SteveL, nixnut, Hopeless, forsaken1, XioXous, obrut<-, mv, qjim, Tommy[D], Genewb, radegand,
932 unk, neuron, alexxy, hellboi64, likewhoa, g0rg0n, costel78, polsas, 7v5w7go9ub0o, uberpinguin, Naib, cilly,
933 bonsaikitten, kerframil, agaffney, Gordon Malm, blueness, Matthias Klose, Kees Cook, mentor, Anarchy,
934 devurandom and everyone else for helping to test, suggestions, fixes and anything else we have missed.
935 /2014-05-12 Magnus Grenberg (Zorry) <zorry@g.o>
936
937
938
939 1.1 src/patchsets/gcc/4.9.2/pie/README.Changelog
940
941 file : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gcc/4.9.2/pie/README.Changelog?rev=1.1&view=markup
942 plain: http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gcc/4.9.2/pie/README.Changelog?rev=1.1&content-type=text/plain
943
944 Index: README.Changelog
945 ===================================================================
946 0.6.1 Magnus Granberg <zorry@g.o>
947
948 * gcc/config/rs6000/sysv4.h typo ESP_DRIVER_SELF_SPEC
949
950 0.6.0 Magnus Granberg <zorry@g.o>
951
952 * gcc/configure Regenerated
953 * gcc/config/esp.h. Bumped for 4.9.0 release
954 * gcc/config/gnu-user.h Bumped for 4.9.0 release
955 * gcc/doc/invoke.texi Bumped for 4.9.0 release
956 * libgcc/Makefile.in Bumped for 4.9.0 release
957
958 0.5.9 Magnus Granberg <zorry@g.o>
959
960 * configure.ac Remove
961 * configure Remove
962 * Makefile.in -fno-stack-protector moved to gentoo gcc patchset.
963 * gcc/gcc.c Update cc1_spec define
964 * gcc/doc/invoke.texi And note on ssp-all for --enable-esp and -ffreestanding
965
966 0.5.8 Magnus Granberg <zorry@g.o>
967
968 * gcc/config/rs6000/linux64 (ASM_SPEC32): Allready applay.
969
970 0.5.7 Magnus Granberg <zorry@g.o>
971
972 * gcc/config/esp.h Add -fstack-check as default.
973
974 0.5.6 Magnus Granberg <zorry@g.o>
975
976 * gcc/config/ia64/linux.h Change ESP_DRIVER_SELF_SPECS To ESP_DRIVER_SELF_SPEC
977 * gcc/config/arm/elf.h (SUBSUBTARGET_EXTRA_SPECS): Add ESP_EXTRA_SPECS.
978
979 0.5.5 Magnus Granberg <zorry@g.o>
980
981 * configure.ac Add mips
982 * configure Regenerated
983 * gcc/configure.ac Clean up the checksand add mips.
984 * gcc/configure Regenerated
985 * gcc/config.in Remove ENABLE_ESP_SSP
986 * gcc/Makefile.in Bumped for 4.8.0 release
987 * gcc/gcc.c Remove ESP_EXTRA_SPECS and
988 ESP_COMMAND_OPTIONS_SPEC
989 * gcc/config/rs6000/sysv4.h Add ESP_DRIVER_SELF_SPEC
990 and ESP_EXTRA_SPECS
991 * gcc/config/i386/gnu-user-common.h Add ESP_DRIVER_SELF_SPEC
992 * gcc/config/i386/gnu-user.h Add ESP_DRIVER_SELF_SPEC
993 * gcc/config/i386/i386.h Add ESP_DRIVER_SELF_SPEC
994 * gcc/config/arm/arm.h Add ESP_DRIVER_SELF_SPEC and
995 ESP_EXTRA_SPECS
996 * gcc/config/mips/gnu-user.h Add ESP_DRIVER_SELF_SPEC
997 * gcc/config/mips/gnu-user64.h Add ESP_DRIVER_SELF_SPEC
998 * gcc/config/mips/mips.h Add ESP_EXTRA_SPECS
999 * gcc/config/ia64/linux.h Add ESP_DRIVER_SELF_SPECS
1000 * gcc/config/ia64/ia64.h Add ESP_EXTRA_SPECS
1001 * gcc/config/esp.h Bump for ESP_DRIVER_SELF_SPEC support
1002
1003 0.5.4 Magnus Granberg <zorry@g.o>
1004
1005 #436924
1006 * configure.ac Add --enable-esp. Add -fno-stack-protector
1007 to stage1_cflags.
1008 * gcc/configure.ac Add --enable-esp and check if SSP works.
1009 Define ENABLE_ESP ENABLE_ESP_SSP.
1010 Check if we support crtbeginP and define ENABLE_CRTBEGINP.
1011 * gcc/configure Fix a typo
1012
1013 0.5.3 Magnus Granberg <zorry@g.o>
1014
1015 * gcc/configure Clean up the checks and added
1016 check for uclibc ssp support.
1017 * gcc/config.in Add define for ENABLE_ESP_SSP
1018 * gcc/esp.h Check for ENABLE_ESP_SSP
1019
1020 0.5.2 Magnus Granberg <zorry@g.o>
1021
1022 * gcc/common.opt Add -nopie
1023
1024 0.5.1 Magnus Granberg <zorry@g.o>
1025
1026 * configure Bumped for 4.7.0 release
1027 * gcc/configure Bumped for 4.7.0 release and
1028 added some checks.
1029 * gcc/Makefile Bumped for 4.7.0 release
1030 * gcc/gcc.c Bumped for 4.7.0 release
1031 * libgcc/Makefile Bumped for 4.7.0 release
1032
1033 0.5.0 Magnus Granberg <zorry@g.o>
1034
1035 #393321
1036 * gcc/Makefile.in Rename crtbeginTS.o to crtbeginP.o
1037 * gcc/config/gnu-user.h Rename crtbeginTS.o to crtbeginP.o
1038 * gcc/config/rs6000/sysv4.h Rename crtbeginTS.o to crtbeginP.o
1039 * gcc/esp.h Rename crtbeginTS.o to crtbeginP.o
1040 * gcc/configure Rename crtbeginTS.o to crtbeginP.o
1041 * gcc/config.in Rename crtbeginTS.o to crtbeginP.o
1042 * libgcc/Makefile.in Rename crtbeginTS.o to crtbeginP.o
1043
1044 0.4.9 Magnus Granberg <zorry@g.o>
1045
1046 #380823
1047 * gcc/Makefile.in added ESP_NOPIE_CFLAGS to ALL_CXXFLAGS
1048
1049 0.4.8 Magnus Granberg <zorry@g.o>
1050
1051 * gcc/objc/lang-specs.h Bumped for gcc 4.6.0 release
1052 * gcc/objcp/lang-specs.h Bumped for gcc 4.6.0 release
1053 * gcc/cp/lang-specs.h Bumped for gcc 4.6.0 release
1054
1055 0.4.7 Magnus Granberg <zorry@g.o>
1056
1057 * gcc/gcc.c Add %(esp_options) and %(esp_cpp_options)
1058 * gcc/esp.h Use the esp.h patch from gcc-4.4 patchset
1059 * gcc/config/rs6000/linux64.h Bumed for >2011-02-26 snapshot
1060 * gcc/objc/lang-specs.h Add %(esp_options)
1061 * gcc/objcp/lang-specs.h Add %(esp_options)
1062 * gcc/cp/lang-specs.h Add %(esp_options)
1063 * gcc/config/gnu-user.h Add crtbeginTS.o support
1064
1065 0.4.6 Magnus Granberg <zorry@g.o>
1066
1067 * Makefile.in Bumped for gcc 4.6
1068 * gcc/Makefile.in Bumped for gcc 4.6
1069 added ESP_NOPIE_CFLAGS to ALL_CFLAGS
1070 remove any ESP_NOSSP_CFLAGS
1071 remove any ESP_NOPIE_CFLAGS from crt* when not needed
1072 * gcc/gcc.c Bumped for gcc 4.6
1073 moved espf_options_ssp to espf_command_options_spec
1074 * gcc/esp.h Added espf_options_ssp to espf_cc1_command_spec
1075 * gcc/config/rs6000/linux64.h Bumped for gcc 4.6
1076 * gcc/config/linux.h Bumped for gcc 4.6
1077
1078 0.4.5 Magnus Granberg <zorry@g.o>
1079
1080 * gcc/config/rs6000/sysv4.h Fix a typo in the static spec rules
1081
1082 0.4.4 Magnus Granberg <zorry@g.o>
1083
1084 * gcc/esp.h Renamed ESP_CC1_STRICT_SPEC to ESP_CC1_STRICT_OVERFLOW_SPEC
1085 Renamed ESP_OPTIONS_PIE_CHECK_SPEC to ESP_LINK_PIE_CHECK_SPEC
1086
1087 0.4.3 Magnus Granberg <zorry@g.o>
1088
1089 #299061 b.g.o
1090 * gcc/gcc.c removed the pie incompatible specs rule call
1091 * gcc/esp.h Move the -pie incompatible check to esp_link
1092 remove the -shared incompatible check
1093
1094 0.4.2 Magnus granberg <zorry@g.o>
1095
1096 * configure remove the changes from 0.4.1
1097 * Makefile.in remove the changes from 0.4.1 remove -fstack-protector check.
1098 * gcc/configure remove the changes from 0.4.1
1099 * gcc/config.in remove the changes from 0.4.1 remove HAVE_GCC_SSP
1100 * gcc/Makefile remove the changes from 0.4.1
1101 * gcc/esp.h change HAVE_GCC_LD_PIE to (EFAULT_PIE || EFAULT_PIE_SSP)
1102 change HAVE_GCC_SSP to (EFAULT_SSP || EFAULT_PIE_SSP)
1103 * libmudflap/Makefiles.in remove the changes from 0.4.1
1104
1105 0.4.1 Magnus Granberg <zorry@g.o>
1106
1107 *configure removed check for --enable-esp removed enable_esp
1108 added check for --enable-esp=(no|all|nopie|nossp). added enable_esp_set
1109 *Makefile.in renamed enable_esp to enable_esp_set
1110 *gcc/configure removed check for --enable-esp removed enable_esp
1111 added check for --enable-esp=(no|all|nopie|nossp). added enable_esp_set
1112 added a -fPIE -pie check. change AC_COMPILE_IFELSE to AC_LINK_IFELSE in the
1113 -fstack-protector check.
1114 * gcc/config.in Added HAVE_GCC_LD_PIE
1115 *gcc/Makefile.in renamed enable_esp to enable_esp_set
1116 *gcc/esp.h Renamed HAVE_LD_PIE to HAVE_GCC_LD_PIE
1117 Added HAVE_GCC_LD_PIE to #define ESP_CC1_PIE_SPEC. Move ESP_COMMAND_OPTIONS_SPEC
1118 * libmudflap/Makefiles.in In enable_esp change ifeq to ifdef.
1119
1120 #293843 b.g.o
1121 *gcc/esp.h Added -nonow to the -z now specs.
1122
1123 0.4.0 Anthony G. Basile <basile@××××××××××××××.edu>
1124
1125 rename espf to esp and change espf-patchset to piepatchset
1126
1127 0.3.9 Magnus Granberg <zorry@g.o>
1128
1129 * gcc/configure Added check for TLS on the target in the SSP check.
1130
1131 #149292 b.g.o
1132 * gcc/config/i386/linux.h Removed uclibc don't support TLS on stack-protector
1133 * gcc/config/i386/linux64.h Removed uclibc don't support TLS on stack-protector
1134 * gcc/config/rs6000/linux.h Removed uclibc don't support TLS on stack-protector
1135 * gcc/config/i386/linux.h Removed uclibc don't support TLS on stack-protector
1136 * gcc/config/sparc/linux.h Removed uclibc don't support TLS on stack-protector
1137 * gcc/config/sparc/linux64.h Removed uclibc don't support TLS on stack-protector
1138
1139 0.3.8 Magnus Granberg <zorry@g.o>
1140
1141 * gcc/configure Redone the -fstack-protector check.
1142 * gcc/config.in Added HAVE_GCC_SSP
1143 * gcc/gcc.c Removed code for espf_link_spec in X
1144 * gcc/espf.h Added ifdef HAVE_GCC_SSP, change code for espf_link_spec and link_pie_spec
1145
1146 0.3.7_beta Anthony G. Basile <basile@××××××××××××××.edu>
1147
1148 * gcc/configure Check if -fstack-protector is supported by gcc on ARCH
1149 Updated AC_SUBST enable_espf
1150 * gcc/Makefile.in Remove the fix for $(out_object_file): ix86_split_to_parts() stack smashing attack b.g.o #149292.
1151 * gcc/gcc.c Updaded the .c .cc compiler specs.
1152
1153 0.3.6 Magnus Granberg <zorry@×××.nu>
1154
1155 * configure Check --enable-espf change ppc* to powerpc*, powerpc64 and add ia64.
1156 * gcc/configure Don't check for -z,relro on ia64. Disable crtbeginTS for ia64.
1157 * gcc/espf.h ia64 don't support -fstack-protector*
1158
1159 0.3.5 Maguns Granberg <zorry@×××.nu>
1160
1161 * gcc/espf.h Change the specs for crtbegin.TS.o.
1162 * gcc/gcc.c Rename espf_cc1_options to espf_options_pie_check.
1163 * gcc/config/linux.h Fix typos ENABLE_CRTBEGINS to ENABLE_CRTBEGINTS
1164 * gcc/config/rs6000/linux64.h ASM_SPEC32: %{fpic:-K PIC} %{fPIC:-K PIC} to
1165 %{fpic|fPIC|fpie|fPIE:-K PIC}
1166
1167 0.3.4 Magnus Granberg <zorry@×××.nu>
1168
1169 * gcc/configure Add crtbeginTS.o support.
1170 * gcc/Makefile.in Add crtbeginTS.o support.
1171 * gcc/gcc.c Add espf_cc1_options.
1172 * gcc/espf.h Added espf_cc1_options, crtbeginTS.o support,
1173 espf_cc1_options and espf_cc1_strictoverflow.
1174 * gcc/config.in Add crtbeginTS.o support.
1175 * gcc/config/linux.h Add crtbeginTS.o support.
1176 * gcc/config/rs6000/sysv4.h Add crtbeginTS.o support.
1177 * gcc/doc/invoke.texi Add NOTES about -fstack-protector-all,
1178 -pie and -fPIE.
1179 * libgcc/Makefile.in Add crtbeginTS.o support.
1180
1181 0.3.3 Magnus Granberg <zorry@×××.nu>
1182
1183 * gcc/opts.c change #ifdef ENABLE_ESPF to #ifndef ENABLE_ESPF
1184
1185 0.3.2 Magnus Granberg <zorry@×××.nu>
1186
1187 * gcc/opts.c disable flag_delete_null_pointer_checks >= -O2
1188 * gcc/espf.h add ESPF_CC1_SSP_SPEC and ESPF_CC1_PIE_SPEC to fix bugs on -vanilla spec
1189
1190 #149292 b.g.o
1191 * gcc/config/i386/linux.h uclibc don't support TLS on stack-protector
1192 * gcc/config/i386/linux64.h uclibc don't support TLS on stack-protector
1193 * gcc/config/rs6000/linux.h uclibc don't support TLS on stack-protector
1194 * gcc/config/i386/linux.h uclibc don't support TLS on stack-protector
1195 * gcc/config/sparc/linux.h uclibc don't support TLS on stack-protector
1196 * gcc/config/sparc/linux64.h uclibc don't support TLS on stack-protector
1197
1198 0.3.1 Magnus Granberg <zorry@×××.nu>
1199
1200 * gcc/cp/Make-lang.in cc1plus: pch test fail when cc1plus is compile with -fPIE.
1201 * gcc/configure fix --enable-espf when USE"-hardened"
1202
1203 4.4.1-espf-0.3.0 Magnus Granberg <zorry@×××.nu>
1204
1205 * gcc/espf.h add ESPF_LINK_SPEC ESPF_LINK_NOW_SPEC
1206 * gcc/gcc.c move do_self_spec (espf_command_options_spec)
1207 do_spec_1() add espf_link_spec
1208
1209 0.3.0 Magnus Granberg <zorry@×××.nu>
1210
1211 * gcc/objc/lang-specs.h Add %(espf_options)
1212 * gcc/objcp/lang-specs.h Add %(espf_options)
1213 * gcc/cp/lang-specs.h Add %(espf_options)
1214 * gcc/config.in removed ENABLE_LIBSSP
1215 * Makefile.in We add -fno-stack-protector to
1216 BOOT_CFLAGS, LIBCFLAGS and LIBCXXFLAGS
1217 cc1: pch.exp test fail when cc1 is compile with -fPIE
1218 * libmudflap/Makefiles.in Add -fno-stack-protector -U_FORTIFY_SOURCE
1219 to AM_CFLAGS
1220 * configure add --enable-espf
1221 add -fno-stack-protector to stage1_cflags
1222 add targes ppc* arm sparc*
1223 * gcc/configure change code for check --enable-espf
1224 * libmudflap/configure add enable_espf
1225 * gcc/espf.h ESPF_CC1_OPTIONS_SPEC renamed to ESPF_OPTIONS_SPEC
1226 add ESPF_CPP_OPTIONS_SPEC ESPF_COMMAND_OPTIONS_SPEC
1227 ESPF_CC1_OPTIONS_SSP_SPEC renamed to ESPF_OPTIONS_SSP_SPEC
1228 ESPF_COMPILER_COMMAND_PIE_SPEC renamed to ESPF_OPTIONS_PIE_SPEC
1229 ESPF_LINK_COMMAND_PIE_SPEC renamed to ESPF_LINK_PIE_SPEC
1230 add !p !pg to ESPF_LINK_PIE_SPEC
1231 removed ESPF_LINK_SPEC ESPF_CC1_OPTIONS_PIE_INCOMPATIBLE_SPEC
1232 * gcc/gcc.c cpp_options add %(espf_cpp_options)
1233 compiler spec add %(espf_options)
1234 change code for ESPF_EXTRA_SPECS
1235 process_command(): Check for lazy, or now
1236 do_spec_1(): Add -z now and -z relro
1237 main() add do_self_spec (espf_command_options_spec)
1238 removed do_self_spec (espf_cc1_command_spec) do_self_spec (espf_link_command_spec)
1239
1240 0.2.9 Magnus Granberg <zorry@×××.nu>
1241
1242 * gcc/espf.h add ESPF_COMPILER_COMMAND_PIE_SPEC
1243 add ESPF_LINK_COMMAND_PIE_SPEC
1244 change ESPF_COMPILER_COMMAND_SPEC ESPF_LINK_COMMAND_SPEC
1245
1246 0.2.8 Magnus Granberg <zorry@×××.nu>
1247
1248 * gcc/configure removed check crtbeginTS.o
1249 * gcc/espf.h added notes
1250 add ESPF_CC1_SPEC
1251 removed ESPF_CPP_UNIQUE_OPTIONS espf_override_options()
1252 * gcc/gcc.c cc1_spec Set it to CC1_SPEC if ! ENABLE_ESPF
1253 * gcc/toplev.c removed ESPF_OVERRIDE_OPTIONS
1254
1255 0.2.7 Magnus Granberg <zorry@×××.nu>
1256
1257 * gcc/opts.c (decode_options): Remove flag_strict_overflow as opt2
1258 * gcc/config.in removed HAVE_CRTBEGINTS
1259 * gcc/Makefile removed crtbeginTS.o
1260 * libgcc/Makefile.in removed crtbeginTS.o
1261 * gcc/config/i386/i386.h removed espf_override_options ESPF_EXTRA_SPECS
1262 * gcc/config/linux.h remoevd crtbeginTS.o
1263 * gcc/espf.h ESPF_CC1_OPTIONS_PIE_SPEC renamed to ESPF_CC1_COMMAND_SPEC
1264 * gcc/gcc.c add ESPF_EXTRA_SPECS
1265 main() add do_self_spec (espf_cc1_command_spec)
1266
1267 0.2.6 Magnus Granberg <zorry@×××.nu>
1268
1269 * gcc/config/i386/i386.h add espf_override_options() to OVERRIDE_OPTIONS
1270 * gcc/espf.h add espf_override_options()
1271 * gcc/toplev.c add ESPF_OVERRIDE_OPTIONS
1272
1273 0.2.5 Magnus Granberg <zorry@×××.nu>
1274
1275 * gcc/config/i386/i386.h removed espf_cc1
1276 * gcc/config/i386/linux.h removed espf_cc1 %(crtend_gen)
1277 * gcc/config/i386/x86-64.h removed espf_cc1 %(crtend_gen)
1278 * gcc/config/linux.h removed espf_cc1 %(crtfile_gen)
1279 %(crtbegin_t_gen) %(crtend_gen)
1280 add crtbeginTS.o
1281 * gcc/config.in removed TARGET_LIBC_PROVIDES_PIE
1282 add HAVE_CRTBEGINTS
1283 * gcc/Makefile.in add ESPF_NOPIE_CFLAGS ESPF_NOSSP_CFLAGS to
1284 CRTSTUFF_T_CFLAGS
1285 add ESPF_NOSSP_CFLAGS to CRTSTUFF_T_CFLAGS_S
1286 * espf.h ESPF_CC1_SPEC renamed to ESPF_CC1_OPTIONS_SPEC
1287 add ESPF_LINK_SPEC
1288 ESPF_CC1_SSP_SPEC renamed to ESPF_CC1_OPTIONS_SSP_SPEC
1289 ESPF_CC1_PIE_SPEC renamed to ESPF_CC1_OPTIONS_PIE_SPEC
1290 ESPF_CC1_OPTIONS_SPEC renamed to ESPF_CC1_OPTIONS_PIE_INCOMPATIBLE_SPEC
1291 LINK_PIE_SPEC renamed to ESPF_LINK_COMMAND_SPEC
1292 removed ESPF_CC1_STRICT_SPEC CRTFILE_GEN_SPEC CRTBEGIN_GEN_SPEC
1293 CRTBEGIN_T_GEN_SPEC CRTEND_GEN_SPEC
1294 * gcc/configure remove TARGET_LIBC_PROVIDES_PIE
1295 define HAVE_CRTBEGINTS
1296 * gcc/gcc.c LINK_COMMAND_SPEC add %(espf_link)
1297 main() add do_self_spec (espf_link_command_spec)
1298
1299 0.2.4 Magnus Granberg <zorry@×××.nu>
1300
1301 libgcc/Makefile.in clean specs
1302
1303 0.2.3 Magnus Granberg <zorry@×××.nu>
1304
1305 *gcc/espf.h add ESPF_CC1_STRICT_SPEC
1306
1307 0.2.2 Magnus Granberg <zorry@×××.nu>
1308
1309 * gcc/config/i386/i386.h Add espf_cc1
1310 Add ESPF_EXTRA_SPECS
1311 * gcc/config/i386/linux.h Add espf_cc1
1312 * gcc/config/i386/x86-64.h Add espf_cc1
1313 * gcc/config/linux.h Add espf_cc1
1314 * gcc/Makefile.in add crtbeginTS.o to EXTRA_PARTS list
1315 * libgcc/Makefile.in add crtbeginTS.o to EXTRA_PARTS list
1316 * gcc/configure add define ENABLE_LIBSSP
1317 * gcc/gcc.c %(fortify_default) renamed to %(espf_cpp_unique_options)
1318 %(pie_incompatible) renamed to %(espf_cc1_options)
1319 removed ESPF_EXTRA_SPECS
1320 * gcc/espf.h ESPF_DEFAULT_SPEC renamed to ESPF_CC1_SPEC
1321 SSP_DEFAULT_SPEC renamed to ESPF_CC1_SSP_SPEC
1322 FORTIFY_DEFAULT_SPEC renamed to ESPF_CPP_UNIQUE_OPTIONS
1323 PIE_DEFAULT_SPEC renamed to ESPF_CC1_PIE_SPEC
1324 PIE_INCOMPATIBLE_SPEC renamed to ESPF_CC1_OPTIONS_SPEC
1325 add new CRTFILE_GEN_SPEC CRTBEGIN_T_GEN_SPEC CRTEND_GEN_SPEC if !
1326 TARGET_LIBC_PROVIDES_PIE
1327
1328 4.4.0-espf-0.2.1 Magnus Granberg <zorry@×××.nu>
1329
1330 * gcc/gcc.c include: espf.h
1331 cc1_spec = CC1_SPEC if not ENABLE_ESPF
1332 cpp_unique_options add %(fortify_default)
1333 cc1_options add %(pie_incompatible)
1334 EXTRA_SPECS add ESPF_EXTRA_SPECS
1335 * libgcc/Makefile.in add crtbeginTs.o
1336 gcc/Makefile.in add ESPF_NOPIE_CFLAGS and ESPF_NOSSP_CFLAGS
1337 LIBGCC2_CFLAGS add ESPF_NOSSP_CFLAGS
1338 CRTSTUFF_CFLAGS add ESPF_NOPIE_CFLAGS and ESPF_NOSSP_CFLAGS
1339 crtbegin* add crtbeginTS
1340 $(out_object_file): ix86_split_to_parts() stack smashing attack b.g.o #149292
1341 * libgcc/configure add enable_espf
1342 * gcc/config/linux.h add %(crtfile_gen) %(crtbegin_t_gen) %(crtend_gen)
1343 * gcc/config/i386/linux.h add %(crtend_gen)
1344 * gcc/config/i386/linux64.h add %(crtend_gen)
1345 * gcc/config.gcc extra_parts add crtbeginTS.o
1346 * libgcc/config.host extra_parts add crtbeginTS.o
1347 * gcc/configure check -z relro
1348 check -z now
1349 check FORTIFY_SOURCES level 2
1350 check Scrt1.o
1351 check --enable-espf
1352 check crtbeginTS.o
1353 * gcc/espf.h new file
1354 * gcc/varasm.c (decl_tls_model): Check flag_pic instead of flag_shlib
1355 * gcc/config.in add ENABLE_LIBSSP
1356 add ENABLE_ESPF
1357 add TARGET_LIBC_PROVIDES_FORTIFY2
1358 add TARGET_LIBC_PROVIDES_PIE
1359 * configure define ENABLE_LIBSSP
1360
1361 gcc-4.3.3-piepatches-v10.2.1
1362
1363
1364
1365 1.1 src/patchsets/gcc/4.9.2/pie/README.history
1366
1367 file : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gcc/4.9.2/pie/README.history?rev=1.1&view=markup
1368 plain: http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gcc/4.9.2/pie/README.history?rev=1.1&content-type=text/plain
1369
1370 Index: README.history
1371 ===================================================================
1372 0.6.1 07 Jun 2014
1373 U 33_all_gcc48_config_rs6000.patch
1374 0.6.0 12 May 2014
1375 + 01_all_gcc49_configure.patch
1376 - 01_all_gcc48_configure.patch
1377 + 03_all_gcc49_Makefile.in.patch
1378 - 03_all_gcc48_Makefile.in.patch
1379 + 20_all_gcc49_config_crtbeginp.patch
1380 - 20_all_gcc46_config_crtbeginp.patch
1381 + 24_all_gcc49_invoke.texi.patch
1382 - 24_all_gcc48_invoke.texi.patch
1383 +35_all_gcc49_config_esp.h.patch
1384 - 35_all_gcc48_config_esp.h.patch
1385 U README
1386 0.5.9 4 Jan 2014
1387 U 01_all_gcc48_configure.patch
1388 U 03_all_gcc48_Makefile.in.patch
1389 U 05_all_gcc48_gcc.c.patch
1390 - 24_all_gcc44_invoke.texi.patch
1391 + 24_all_gcc48_invoke.texi.patch
1392 U README
1393 0.5.8 11 Nov 2013
1394 U 33_all_gcc48_config_rs6000.patch
1395 0.5.7 10 Jul 2013
1396 U 35_all_gcc48_config_esp.h.patch
1397 - 15_all_gcc44_decl-tls-model.patch
1398 0.5.6 03 Jun 2013
1399 U 35_all_gcc48_config_arm.patch
1400 U 37_all_gcc48_config_ia64.patch
1401 0.5.5 31 Mar 2013
1402 - 01_all_gcc47_configure.patch
1403 + 01_all_gcc48_configure.patch
1404 - 02_all_gcc47_config.in.patch
1405 + 02_all_gcc48_config.in.patch
1406 - 03_all_gcc47_Makefile.in.patch
1407 + 03_all_gcc48_Makefile.in.patch
1408 - 05_all_gcc47_gcc.c.patch
1409 + 05_all_gcc48_gcc.c.patch
1410 - 33_all_gcc46_config_rs6000_linux64.h.patch
1411 + 33_all_gcc48_config_rs6000.patch
1412 - 34_all_gcc47_config_all_gnu_user.patch
1413 + 34_all_gcc48_config_i386.patch
1414 + 35_all_gcc48_config_arm.patch
1415 + 36_all_gcc48_config_mips.patch
1416 + 37_all_gcc48_config_ia64.patch
1417 - 35_all_gcc47_config_esp.h.patch
1418 - 35_all_gcc48_config_esp.h.patch
1419 U README
1420 0.5.4 02 Oct 2012
1421 U 01_all_gcc47_configure.patch
1422 + 01_all_gcc47_configure.ac.patch
1423 0.5.3 06 Apr 2012
1424 U 01_all_gcc47_configure.patch
1425 + 02_all_gcc47_config.in.patch
1426 - 02_all_gcc45_config.in.patch
1427 + 06_all_gcc46_esp.h.patch
1428 - 06_all_gcc45_esp.h.patch
1429 0.5.2 24 Jan 2012
1430 + 16_all_gcc47_nopie_option.patch
1431 0.5.1 17 Jan 2012
1432 + 01_all_gcc47_configure.patch
1433 - 10_all_gcc45_configure.patch
1434 + 03_all_gcc47_Makefile.in.patch
1435 - 12_all_gcc46_Makefile.in.patch
1436 + 02_all_gcc45_config.in.patch
1437 - 11_all_gcc45_config.in.patch
1438 + 05_all_gcc46_gcc.c.patch
1439 - 20_all_gcc46_gcc.c.patch
1440 + 06_all_gcc45_esp.h.patch
1441 - 30_all_gcc45_esp.h.patch
1442 + 10_all_gcc46_default-ssp.patch
1443 - 22_all_gcc46-default-ssp.patch
1444 + 15_all_gcc44_decl-tls-model.patch
1445 - 21_all_gcc44_decl-tls-model.patch
1446 + 20_all_gcc46_config_crtbeginp.patch
1447 - 35_all_gcc46_config_crtbegints.patch
1448 + 24_all_gcc44_invoke.texi.patch
1449 + 60_all_gcc44_invoke.texi.patch
1450 0.5.0 07 Dec 2011
1451 + 35_all_gcc46_config_crtbeginp.patch
1452 - 35_all_gcc46_config_crtbegints.patch
1453 U 10_all_gcc45_configure.patch
1454 U 12_all_gcc46_Makefile.in.patch
1455 + 11_all_gcc45_config.in.patch
1456 - 11_all_gcc44_config.in.patch
1457 + 30_all_gcc45_esp.h.patch
1458 - 30_all_gcc44_esp.h.patch
1459 0.4.9 09 Nov 2011
1460 U 12_all_gcc46_Makefile.in.patch
1461 0.4.8 26 Mar 2011
1462 U 22_all_gcc46-default-ssp.patch
1463 0.4.7 05 Mar 2011
1464 U 20_all_gcc46_gcc.c.patch
1465 + 22_all_gcc46-default-ssp.patch
1466 - 30_all_gcc46_esp.h.patch
1467 + 30_all_gcc44_esp.h.patch
1468 U 33_all_gcc46_config_rs6000_linux64.h.patch
1469 U 35_all_gcc46_config_crtbegints.patch
1470 0.4.6 07 Jan 2011
1471 + 12_all_gcc46_Makefile.in.patch
1472 - 12_all_gcc44_Makefile.in.patch
1473 + 20_all_gcc46_gcc.c.patch
1474 - 20_all_gcc44_gcc.c.patch
1475 + 30_all_gcc46_esp.h.patch
1476 - 30_all_gcc44_esp.h.patch
1477 + 33_all_gcc46_config_rs6000_linux64.h.patch
1478 - 33_all_gcc45_config_rs6000_linux64.h.patch
1479 + 35_all_gcc46_config_crtbegints.patch
1480 - 35_all_gcc44_config_crtbegints.patch
1481 - 40_all_gcc44_obj_lang-specs.h.patch
1482 - 40_all_gcc44_objp_lang-specs.h.patch
1483 - 40_all_gcc44_cp_lang-specs.h.patch
1484 0.4.5 18 Jun 2010
1485 U 35_all_gcc44_config_crtbegints.patch
1486 0.4.4 26 May 2010
1487 U 30_all_gcc44_esp.h.patch
1488 0.4.3 26 May 2010
1489 U 20_all_gcc44_gcc.c.patch
1490 U 30_all_gcc44_esp.h.patch
1491 0.4.2 24 May 2010
1492 U 10_all_gcc44_configure.patch
1493 U 12_all_gcc44_Makefile.in.patch
1494 U 11_all_gcc44_config.in.patch
1495 U 30_all_gcc44_esp.h.patch
1496 0.4.1 29 Apr 2010
1497 U 10_all_gcc45_configure.patch
1498 U 12_all_gcc45_Makefile.in.patch
1499 U 11_all_gcc44_config.in.patch
1500 U 30_all_gcc44_esp.h.patch
1501
1502 0.4.0 19 Apr 2010
1503 U 10_all_gcc45_configure.patch
1504 U 12_all_gcc45_Makefile.in.patch
1505 U 11_all_gcc44_config.in.patch
1506 U 20_all_gcc45_gcc.c.patch
1507 - 30_all_gcc44_espf.h.patch
1508 + 30_all_gcc44_esp.h.patch
1509
1510 0.3.9 14 Apr 2010
1511 U 10_all_gcc45_configure.patch
1512 - 50_all_gcc44_no_ssp_tls_uclibc.patch
1513 U 33_all_gcc45_config_rs6000_linux64.h.patch
1514
1515 0.3.8 10 Apr 2010
1516 10_all_gcc44_configure.patch
1517 11_all_gcc44_config.in.patch
1518 20_all_gcc44_gcc.c.patch
1519 30_all_gcc44_espf.h.patch
1520
1521 0.3.7 10 Feb 2010
1522 20_all_gcc44_gcc.c.patch
1523 30_all_gcc44_espf.h.patch
1524 10_all_gcc44_configure.patch
1525
1526 0.3.6 23 Dec 2009
1527 - 10_all_gcc44_configure.patch
1528 + 10_all_gcc44_configure.patch
1529 - 30_all_gcc44_espf.h.patch
1530 + 30_all_gcc44_espf.h.patch
1531 - README.Changelog
1532 + README.Changelog
1533 - README.history
1534 + README.history
1535 - README
1536 + README
1537
1538 0.3.5 24 Sep 2009
1539 - 30_all_gcc44_espf.h.patch
1540 + 30_all_gcc44_espf.h.patch
1541 - 35_all_gcc44_config_crtbegints.patch
1542 + 35_all_gcc44_config_crtbegints.patch
1543 + 33_all_gcc44_config_rs6000_linux64.h.patch
1544 - README.Changelog
1545 + README.Changelog
1546 - README.history
1547 + README.history
1548 + README.Gentoo.patches
1549
1550 0.3.4 11 Sep 2009
1551 - 10_all_gcc44_configure.patch
1552 + 10_all_gcc44_configure.patch
1553 - 11_all_gcc44_config.in.patch
1554 + 11_all_gcc44_config.in.patch
1555 - 12_all_gcc44_Makefile.in.patch
1556 + 12_all_gcc44_Makefile.in.patch
1557 - 20_all_gcc44_gcc.c.patch
1558 + 20_all_gcc44_gcc.c.patch
1559 - 23_all_gcc44_opts.c.patch
1560 - 30_all_gcc44_espf.h.patch
1561 + 30_all_gcc44_espf.h.patch
1562 + 35_all_gcc44_config_crtbegints.patch
1563 + 60_all_gcc44_invoke.texi.patch
1564 - README.Changelog
1565 + README.Changelog
1566 - README.history
1567 + README.history
1568 - README
1569 + README
1570
1571 0.3.3 14 Aug 2009
1572 - 23_all_gcc44_opts.c.patch
1573 + 23_all_gcc44_opts.c.patch
1574
1575 0.3.2 09 Aug 2009
1576 + 50_all_gcc44_no_ssp_tls_uclibc.patch
1577 + README.Changelog
1578 + README.history
1579 - 23_all_gcc44_opts.c.patch
1580 + 23_all_gcc44_opts.c.patch
1581 - 30_all_gcc44-espf.h.patch
1582 + 30_all_gcc44-espf.h.patch
1583
1584 0.3.1 23 Jul 2009
1585 - 10_all_gcc44_configure.patch
1586 + 10_all_gcc44_configure.patch
1587
1588 0.3.0 23 Jul 2009
1589 - 10_all_gcc44_configure.patch
1590 + 10_all_gcc44_configure.patch
1591 - 11_all_gcc44_config.in.patch
1592 + 11_all_gcc44_config.in.patch
1593 - 12_all_gcc44_Makefile.in.patch
1594 + 12_all_gcc44_Makefile.in.patch
1595 - 20_all_gcc44_gcc.c.patch
1596 + 20_all_gcc44_gcc.c.patch
1597 + 40_all_gcc44_obj_lang-specs.h.patch
1598 + 40_all_gcc44_objp_lang-specs.h.patch
1599 + 40_all_gcc44_cp_lang-specs.h.patch
1600 - 50_all_gcc44_gentoo_v20090614.1.patch
1601 - 30_all_gcc44-espf.h.patch
1602 + 30_all_gcc44-espf.h.patch
1603
1604 0.2.9 14 Jun 2009
1605 - 12_all_gcc44_Makefile.in.patch
1606 + 12_all_gcc44_Makefile.in.patch
1607 - 30_all_gcc44-espf.h.patch
1608 + 30_all_gcc44-espf.h.patch
1609 - 50_all_gcc44_gentoo_v20090612.2.patch
1610 + 50_all_gcc44_gentoo_v20090614.1.patch
1611
1612 0.2.8 12 Jun 2009
1613 - 10_all_gcc44_configure.patch
1614 + 10_all_gcc44_configure.patch
1615 - 11_all_gcc44_config.in.patch
1616 + 11_all_gcc44_config.in.patch
1617 - 12_all_gcc44_Makefile.in.patch
1618 + 12_all_gcc44_Makefile.in.patch
1619 - 22_all_gcc44-toplev.c.patch
1620 - 25_all_gcc44-espf.h.patch
1621 + 30_all_gcc44-espf.h.patch
1622 + 50_all_gcc44_gentoo_v20090612.2.patch
1623
1624 0.2.7 29 May 2009
1625 - 11_all_gcc44_config.in.patch
1626 + 11_all_gcc44_config.in.patch
1627 - 12_all_gcc44_Makefile.in.patch
1628 + 12_all_gcc44_Makefile.in.patch
1629 - 20_all_gcc44_gcc.c.patch
1630 + 20_all_gcc44_gcc.c.patch
1631 + 23_all_gcc44_opts.c.patch
1632 - 25_all_gcc44-espf.h.patch
1633 + 25_all_gcc44-espf.h.patch
1634 - 30_all_gcc44-config-defaul-linux.patch
1635
1636 0.2.6 28 May 2009
1637 + 22_all_gcc44-toplev.c.patch
1638 - 25_all_gcc44-espf.h.patch
1639 + 25_all_gcc44-espf.h.patch
1640 - 30_all_gcc44-config-defaul-linux.patch
1641 + 30_all_gcc44-config-defaul-linux.patch
1642
1643 0.2.5 27 May 2009
1644 - 10_all_gcc44_configure.patch
1645 + 10_all_gcc44_configure.patch
1646 - 12_all_gcc44_Makefile.in.patch
1647 + 12_all_gcc44_Makefile.in.patch
1648 - 20_all_gcc44_gcc.c.patch
1649 + 20_all_gcc44_gcc.c.patch
1650 - 25_all_gcc44-espf.h.patch
1651 + 25_all_gcc44-espf.h.patch
1652 - 30_all_gcc44-config-defaul-linux.patch
1653 + 30_all_gcc44-config-defaul-linux.patch
1654 - 40_all_gcc44-gentoo.patch
1655
1656 0.2.4 08 May 2009
1657 - 12_all_gcc44_Makefile.in.patch
1658 + 12_all_gcc44_Makefile.in.patch
1659
1660 0.2.3 08 May 2009
1661 - 20_all_gcc44_gcc.c.patch
1662 + 20_all_gcc44_gcc.c.patch
1663 - 40_all_gcc44-gentoo.patch
1664 + 40_all_gcc44-gentoo.patch
1665
1666 0.2.2 04 May 2009
1667 + 10_all_gcc44_configure.patch
1668 + 11_all_gcc44_config.in.patch
1669 + 12_all_gcc44_Makefile.in.patch
1670 + 20_all_gcc44_gcc.c.patch
1671 + 21_all_gcc44_decl-tls-model.patch
1672 + 25_all_gcc44-espf.h.patch
1673 + 30_all_gcc44-config-defaul-linux.patch
1674 + 40_all_gcc44-gentoo.patch
1675 - 01_all_gcc44-configure.patch
1676 - 10_all_gcc44-gcc_configure.patch
1677 - 11_all_gcc44-gcc_config.in.patch
1678 - 12_all_gcc44-gcc_config.gcc.patch
1679 - 13_all_gcc44-gcc_Makefile.in.patch
1680 - 15_all_gcc44-libgcc_config.host.patch
1681 - 16_all_gcc44-libgcc_configure.patch
1682 - 17_all_gcc44-libgcc_Makefile.in.patch
1683 - 21_all_gcc44-gcc_espf.h.patch
1684 - 22_all_gcc44-gcc_gcc.c.patch
1685 - 23_all_gcc44-gcc_varasm.c.patch
1686 - 30_all_gcc44-add-crt-start-endfiles-linux.patch
1687
1688 0.2.1 28 Apr 2009
1689 + 01_all_gcc44-configure.patch
1690 + 10_all_gcc44-gcc_configure.patch
1691 + 11_all_gcc44-gcc_config.in.patch
1692 + 12_all_gcc44-gcc_config.gcc.patch
1693 + 13_all_gcc44-gcc_Makefile.in.patch
1694 + 15_all_gcc44-libgcc_config.host.patch
1695 + 16_all_gcc44-libgcc_configure.patch
1696 + 17_all_gcc44-libgcc_Makefile.in.patch
1697 + 21_all_gcc44-gcc_espf.h.patch
1698 + 22_all_gcc44-gcc_gcc.c.patch
1699 + 23_all_gcc44-gcc_varasm.c.patch
1700 + 30_all_gcc44-add-crt-start-endfiles-linux.patch
1701 - 00_all_gcc4.4-cvs-incompat.patch
1702 - 05_all_gcc4.4-compile-no-ssp.patch
1703 - 10_all_gcc4.4-hardened-minispecs-support.patch
1704 - 11_all_gcc4.4-decl-tls-model.patch
1705 - 12_all_gcc4.4-fortify-minispecs-support.patch
1706 - 20-all_gcc4.4-default-crt-start-endfile.patch
1707 - 30-all_gcc4.4-crtbeginTS-fno-PIE.patch
1708
1709 0.1.0 16 Apr 2009
1710 + 00_all_gcc4.4-cvs-incompat.patch
1711 + 05_all_gcc4.4-compile-no-ssp.patch
1712 + 10_all_gcc4.4-hardened-minispecs-support.patch
1713 + 11_all_gcc4.4-decl-tls-model.patch
1714 + 12_all_gcc4.4-fortify-minispecs-support.patch
1715 + 20-all_gcc4.4-default-crt-start-endfile.patch
1716 + 30-all_gcc4.4-crtbeginTS-fno-PIE.patch