Gentoo Archives: gentoo-commits

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