vapier      15/12/05 21:12:19

  Added:                01_all_gcc53_configure.patch
                        02_all_gcc48_config.in.patch
                        03_all_gcc51_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_gcc51_config_i386.patch
                        35_all_gcc51_config_arm.patch
                        36_all_gcc51_config_mips.patch
                        37_all_gcc48_config_ia64.patch
                        40_all_gcc49_config_esp.patch README
                        README.Changelog README.history
  Log:
  initial 5.3.0 patchset based on last 5.2.0 patchset

Revision  Changes    Path
1.1                  src/patchsets/gcc/5.3.0/pie/01_all_gcc53_configure.patch

file : 
http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gcc/5.3.0/pie/01_all_gcc53_configure.patch?rev=1.1&view=markup
plain: 
http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gcc/5.3.0/pie/01_all_gcc53_configure.patch?rev=1.1&content-type=text/plain

Index: 01_all_gcc53_configure.patch
===================================================================
2013-12-30  Magnus Granberg <zo...@gentoo.org>

        * gcc/configure.ac              Add --enable-esp and define ENABLE_ESP.
        Check if we support crtbeginP and define ENABLE_CRTBEGINP.
        * gcc/configure Regenerated


--- a/gcc/configure.ac
+++ b/gcc/configure.ac
@@ -5130,6 +5130,55 @@ if test x"${LINKER_HASH_STYLE}" != x; th
                                          [The linker hash style])
 fi
 
+# --------------
+# Esp checks
+# --------------
+
+# Check whether --enable-esp was given and target have the support.
+AC_ARG_ENABLE([esp],
+[AS_HELP_STRING([--enable-esp],
+                [Enable Stack protector and Position independent executable as
+                 default if we have suppot for it when compiling
+                 and link with -z now as default.
+                 Linux targets supported i*86, x86_64, x32,
+                 powerpc, powerpc64, ia64, arm and mips.])],
+  enable_esp=$enableval,
+  enable_esp=no)
+if test "$enable_esp" = yes; then
+  AC_MSG_CHECKING([if $target support esp])
+  case "$target" in
+    i?86*-*-linux* | x86_64-*-linux* | powerpc*-*-linux* | mips-*-linux* | 
arm*-*-linux* | ia64-*-linux*)
+      AC_DEFINE([ENABLE_ESP], [1],
+                [Define if your target support esp and you have enable it.])
+      ;;
+    *)
+      enable_esp=no
+      ;;
+  esac
+AC_MSG_RESULT($enable_esp)
+fi
+AC_SUBST([enable_esp])
+
+enable_crtbeginP=no
+if test "$enable_esp" = yes; then
+  AC_MSG_CHECKING([checking for crtbeginP.o support])
+    if test "$enable_esp" = yes; then
+      case "$target" in
+        ia64*-*-linux*)
+          ;;
+        *-*-linux*)
+          if test "x$gcc_cv_ld_pie" = xyes -a 
"x$lt_cv_prog_compiler_static_works" = xyes; then
+            enable_crtbeginP=yes
+            AC_DEFINE([ENABLE_CRTBEGINP], [1],
+                      [Define if your compiler will support crtbeginP.])
+          fi
+          ;;
+      esac
+    fi
+  AC_MSG_RESULT($enable_crtbeginP)
+fi
+AC_SUBST([enable_crtbeginP])
+
 # Configure the subdirectories
 # AC_CONFIG_SUBDIRS($subdirs)
 
--- a/gcc/configure
+++ b/gcc/configure
@@ -600,6 +600,8 @@ ac_includes_default="\
 
 ac_subst_vars='LTLIBOBJS
 LIBOBJS
+enable_crtbeginP
+enable_esp
 PICFLAG
 enable_host_shared
 enable_plugin
@@ -938,6 +940,7 @@ enable_host_shared
 enable_libquadmath_support
 with_linker_hash_style
 with_diagnostics_color
+enable_esp
 '
       ac_precious_vars='build_alias
 host_alias
@@ -1674,6 +1677,11 @@ Optional Features:
   --enable-host-shared    build host code as shared libraries
   --disable-libquadmath-support
                           disable libquadmath support for Fortran
+  --enable-esp            Enable Stack protector and Position independent
+                          executable as default if we have suppot for it when
+                          compiling and link with -z now as default. Linux
+                          targets supported i*86, x86_64, x32, powerpc,
+                          powerpc64, ia64, arm and mips.
 
 Optional Packages:
   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
@@ -28657,6 +28665,59 @@ cat > gcc-driver-name.h <<EOF
 #define GCC_DRIVER_NAME "${target_noncanonical}-gcc-${gcc_BASEVER}${exeext}"
 EOF
 
+# --------------
+# Esp checks
+# --------------
+
+# Check whether --enable-esp was given and target have the support.
+# Check whether --enable-esp was given.
+if test "${enable_esp+set}" = set; then :
+  enableval=$enable_esp; enable_esp=$enableval
+else
+  enable_esp=no
+fi
+
+if test "$enable_esp" = yes; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $target support esp" >&5
+$as_echo_n "checking if $target support esp... " >&6; }
+  case "$target" in
+    i?86*-*-linux* | x86_64-*-linux* | powerpc*-*-linux* | mips-*-linux* | 
arm*-*-linux* | ia64-*-linux*)
+
+$as_echo "#define ENABLE_ESP 1" >>confdefs.h
+
+      ;;
+    *)
+      enable_esp=no
+      ;;
+  esac
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_esp" >&5
+$as_echo "$enable_esp" >&6; }
+fi
+
+
+enable_crtbeginP=no
+if test "$enable_esp" = yes; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking checking for crtbeginP.o 
support" >&5
+$as_echo_n "checking checking for crtbeginP.o support... " >&6; }
+    if test "$enable_esp" = yes; then
+      case "$target" in
+        ia64*-*-linux*)
+          ;;
+        *-*-linux*)
+          if test "x$gcc_cv_ld_pie" = xyes -a 
"x$lt_cv_prog_compiler_static_works" = xyes; then
+            enable_crtbeginP=yes
+
+$as_echo "#define ENABLE_CRTBEGINP 1" >>confdefs.h
+
+          fi
+          ;;
+      esac
+    fi
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_crtbeginP" >&5
+$as_echo "$enable_crtbeginP" >&6; }
+fi
+
+
 # Configure the subdirectories
 # AC_CONFIG_SUBDIRS($subdirs)
 



1.1                  src/patchsets/gcc/5.3.0/pie/02_all_gcc48_config.in.patch

file : 
http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gcc/5.3.0/pie/02_all_gcc48_config.in.patch?rev=1.1&view=markup
plain: 
http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gcc/5.3.0/pie/02_all_gcc48_config.in.patch?rev=1.1&content-type=text/plain

Index: 02_all_gcc48_config.in.patch
===================================================================
2013-02-13      Magnus Granberg         <zo...@gentoo.org>

                * gcc/config.in Add ENABLE_CRTBEGINP, ENABLE_ESP

--- gcc/config.in       2009-04-21 11:08:08.000000000 +0200
+++ gcc/config.in       2009-05-12 00:10:08.000000000 +0200
@@ -46,6 +46,12 @@
 #endif
 
 
+/* Define to 1 to enable crtbeginP.o. */
+#ifndef USED_FOR_TARGET
+#undef ENABLE_CRTBEGINP
+#endif
+
+
 /* Define to 1 to specify that we are using the BID decimal floating point
    format instead of DPD */
 #ifndef USED_FOR_TARGET
@@ -65,6 +65,12 @@
 #endif
 
 
+/* Define to 1 to enable esp. */
+#ifndef USED_FOR_TARGET
+#undef ENABLE_ESP
+#endif
+
+
 /* Define to 1 to enable fixed-point arithmetic extension to C. */
 #ifndef USED_FOR_TARGET
 #undef ENABLE_FIXED_POINT



1.1                  src/patchsets/gcc/5.3.0/pie/03_all_gcc51_Makefile.in.patch

file : 
http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gcc/5.3.0/pie/03_all_gcc51_Makefile.in.patch?rev=1.1&view=markup
plain: 
http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gcc/5.3.0/pie/03_all_gcc51_Makefile.in.patch?rev=1.1&content-type=text/plain

Index: 03_all_gcc51_Makefile.in.patch
===================================================================
2015-04-23  Magnus Granberg  <zo...@gentoo.org>

                * gcc/Makefile.in       Add -fno-PIE. to ALL_CFLAGS and
                ALL_CXXFLAGS if enable_esp yes.
                Echo enable_esp and enable_crtbeginP to tmp-libgcc.mvars.
                * libgcc/Makefile.in    Add crtbeginP.o to EXTRA_PARTS if 
enable_crtbeginP yes
                We add new file crtbeginP.o if enable_crtbeginP yes
                Add -fno-PIE. to CRTSTUFF_CFLAGS.
                Disable -fstack-check

--- a/gcc/Makefile.in   2011-11-09 02:20:14.000000000 +0100
+++ b/gcc/Makefile.in   2011-12-24 22:28:08.864804375 +0100
@@ -247,6 +247,14 @@ LINKER_FLAGS = $(CFLAGS)
 endif
 endif
 
+# We don't want to compile the compiler with -fPIE, it make PCH fail.
+enable_esp = @enable_esp@
+ifeq ($(enable_esp),yes)
+ESP_NOPIE_CFLAGS = -fno-PIE
+else
+ESP_NOPIE_CFLAGS=
+endif
+
 # -------------------------------------------
 # Programs which operate on the build machine
 # -------------------------------------------
@@ -974,12 +982,13 @@ INTERNAL_CFLAGS = -DIN_GCC @CROSS@
 
 # This is the variable actually used when we compile. If you change this,
 # you probably want to update BUILD_CFLAGS in configure.ac
-ALL_CFLAGS = $(T_CFLAGS) $(CFLAGS-$@) \
+ALL_CFLAGS = $(ESP_NOPIE_CFLAGS) $(T_CFLAGS) $(CFLAGS-$@) \
   $(CFLAGS) $(INTERNAL_CFLAGS) $(COVERAGE_FLAGS) $(WARN_CFLAGS) @DEFS@
 
 # The C++ version.
-ALL_CXXFLAGS = $(T_CFLAGS) $(CFLAGS-$@) $(CXXFLAGS) $(INTERNAL_CFLAGS) \
-  $(COVERAGE_FLAGS) $(NOEXCEPTION_FLAGS) $(WARN_CXXFLAGS) @DEFS@
+ALL_CXXFLAGS = $(ESP_NOPIE_CFLAGS) $(T_CFLAGS) $(CFLAGS-$@) $(CXXFLAGS) \
+  $(INTERNAL_CFLAGS) $(COVERAGE_FLAGS) $(NOEXCEPTION_FLAGS) \
+  $(WARN_CXXFLAGS) @DEFS@
 
 # Likewise.  Put INCLUDES at the beginning: this way, if some autoconf macro
 # puts -I options in CPPFLAGS, our include files in the srcdir will always
@@ -1814,6 +1823,8 @@ libgcc.mvars: config.status Makefile spe
        echo GCC_CFLAGS = '$(GCC_CFLAGS)' >> tmp-libgcc.mvars
        echo INHIBIT_LIBC_CFLAGS = '$(INHIBIT_LIBC_CFLAGS)' >> tmp-libgcc.mvars
        echo TARGET_SYSTEM_ROOT = '$(TARGET_SYSTEM_ROOT)' >> tmp-libgcc.mvars
+       echo enable_esp = '$(enable_esp)' >> tmp-libgcc.mvars
+       echo enable_crtbeginP = '@enable_crtbeginP@' >> tmp-libgcc.mvars
 
        mv tmp-libgcc.mvars libgcc.mvars
 
--- a/libgcc/Makefile.in        2011-11-22 04:01:02.000000000 +0100
+++ b/libgcc/Makefile.in        2011-12-25 15:18:22.449610631 +0100
@@ -219,6 +219,17 @@ else
 DECNUMINC =
 endif
 
+ifeq ($(enable_esp),yes)
+ESP_NOPIE_CFLAGS = -fno-PIE
+else
+ESP_NOPIE_CFLAGS=
+endif
+
+# We add crtbeginP.o to the EXTRA_PARTS list if enable_crtbeginP = yes
+ifeq ($(enable_crtbeginP),yes)
+EXTRA_PARTS += crtbeginP.o
+endif
+
 # Options to use when compiling libgcc2.a.
 #
 LIBGCC2_DEBUG_CFLAGS = -g
@@ -225,7 +225,7 @@ endif
 LIBGCC2_DEBUG_CFLAGS = -g
 LIBGCC2_CFLAGS = -O2 $(LIBGCC2_INCLUDES) $(GCC_CFLAGS) $(HOST_LIBGCC2_CFLAGS) \
                 $(LIBGCC2_DEBUG_CFLAGS) -DIN_LIBGCC2 \
-                -fbuilding-libgcc -fno-stack-protector \
+                -fbuilding-libgcc -fno-stack-protector -fstack-check=no \
                 $(INHIBIT_LIBC_CFLAGS)
 
 # Additional options to use when compiling libgcc2.a.
@@ -279,7 +290,7 @@ INTERNAL_CFLAGS = $(CFLAGS) $(LIBGCC2_CF
   -finhibit-size-directive -fno-inline -fno-exceptions \
   -fno-zero-initialized-in-bss -fno-toplevel-reorder -fno-tree-vectorize \
   -fbuilding-libgcc -fno-stack-protector $(FORCE_EXPLICIT_EH_REGISTRY) \
-  $(INHIBIT_LIBC_CFLAGS)
+  $(ESP_NOPIE_CFLAGS) -fstack-check=no $(INHIBIT_LIBC_CFLAGS)
 
 # Extra flags to use when compiling crt{begin,end}.o.
 CRTSTUFF_T_CFLAGS =
@@ -966,6 +977,13 @@ crtendS$(objext): $(srcdir)/crtstuff.c
 # This is a version of crtbegin for -static links.
 crtbeginT$(objext): $(srcdir)/crtstuff.c
        $(crt_compile) $(CRTSTUFF_T_CFLAGS) -c $< -DCRT_BEGIN -DCRTSTUFFT_O
+
+# This is a version of crtbegin for -static -fPIE links.
+ifeq ($(enable_crtbeginP),yes)
+crtbeginP$(objext): $(srcdir)/crtstuff.c
+       $(crt_compile) $(CRTSTUFF_T_CFLAGS_S) \
+         -c $< -DCRT_BEGIN -DCRTSTUFFT_O -DCRTSTUFFS_O
+endif
 
 ifeq ($(enable_vtable_verify),yes)
 # These are used in vtable verification; see comments in source files for
 


1.1                  src/patchsets/gcc/5.3.0/pie/05_all_gcc48_gcc.c.patch

file : 
http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gcc/5.3.0/pie/05_all_gcc48_gcc.c.patch?rev=1.1&view=markup
plain: 
http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gcc/5.3.0/pie/05_all_gcc48_gcc.c.patch?rev=1.1&content-type=text/plain

Index: 05_all_gcc48_gcc.c.patch
===================================================================
2014-01-01      Magnus Granberg         <zo...@gentoo.org>

                * gcc/gcc.c                                                     
        include esp.h
                static const char *cc1_spec                     We set that in 
esp.h if ENABLE_ESP.

--- gcc/gcc.c   2010-01-21 10:29:30.000000000 -0500
+++ gcc/gcc.c   2010-01-29 23:29:16.000000000 -0500
@@ -44,6 +44,7 @@
 #include "opts.h"
 #include "params.h"
 #include "vec.h"
+#include "config/esp.h" /* for --enable-esp support */
 #include "filenames.h"
 
 /* By default there is no special suffix for target executables.  */
@@ -822,7 +823,9 @@
 
 static const char *asm_debug;
 static const char *cpp_spec = CPP_SPEC;
+#ifndef ENABLE_ESP
 static const char *cc1_spec = CC1_SPEC CC1_SSP_DEFAULT_SPEC;
+#endif
 static const char *cc1plus_spec = CC1PLUS_SPEC;
 static const char *link_gcc_c_sequence_spec = LINK_GCC_C_SEQUENCE_SPEC;
 static const char *link_ssp_spec = LINK_SSP_SPEC;



1.1                  src/patchsets/gcc/5.3.0/pie/16_all_gcc47_nopie_option.patch

file : 
http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gcc/5.3.0/pie/16_all_gcc47_nopie_option.patch?rev=1.1&view=markup
plain: 
http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gcc/5.3.0/pie/16_all_gcc47_nopie_option.patch?rev=1.1&content-type=text/plain

Index: 16_all_gcc47_nopie_option.patch
===================================================================
2012-01-24      Magnus Granberg <zo...@gentoo.org>

                * gcc/common.opt                Add -nopie

--- a/gcc/common.opt    2011-11-23 19:51:17.000000000 +0100
+++ b//gcc/common.opt   2012-01-24 16:56:24.302224357 +0100
@@ -2280,6 +2280,9 @@ Driver
 nodefaultlibs
 Driver
 
+nopie
+Driver
+
 nostartfiles
 Driver
 



1.1                  
src/patchsets/gcc/5.3.0/pie/20_all_gcc49_config_crtbeginp.patch

file : 
http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gcc/5.3.0/pie/20_all_gcc49_config_crtbeginp.patch?rev=1.1&view=markup
plain: 
http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gcc/5.3.0/pie/20_all_gcc49_config_crtbeginp.patch?rev=1.1&content-type=text/plain

Index: 20_all_gcc49_config_crtbeginp.patch
===================================================================
2014-04-23              Magnus Granberg         <zo...@gentoo.org>

                * gcc/config/gnu-user.h                 If ENABLE_CRTBEGINP, 
-static and -pie use crtbegineP.o.
                * gcc/config/rs6000/sysv4.h             If ENABLE_CRTBEGINP, 
-static and -pie use crtbegineP.o.

--- gcc/config/gnu-user.h       2014-01-02 23:23:26.000000000 +0100
+++ gcc/config/gnu-user.h       2014-04-23 00:55:06.390265454 +0200
@@ -40,7 +40,15 @@ see the files COPYING3 and COPYING.RUNTI
    provides part of the support for getting C++ file-scope static
    object constructed before entering `main'.  */
 
-#if defined HAVE_LD_PIE
+#if defined (HAVE_LD_PIE) && defined (ENABLE_CRTBEGINP)
+#define GNU_USER_TARGET_STARTFILE_SPEC \
+  "%{!shared: %{pg|p|profile:gcrt1.o%s;pie:Scrt1.o%s;:crt1.o%s}} \
+   crti.o%s %{static:%{pie:crtbeginP.o%s;:crtbeginT.o%s}; \
+   shared|pie:crtbeginS.o%s;:crtbegin.o%s} \
+   %{fvtable-verify=none:%s; \
+     fvtable-verify=preinit:vtv_start_preinit.o%s; \
+     fvtable-verify=std:vtv_start.o%s}"
+#elif defined (HAVE_LD_PIE) && ! defined (ENABLE_CRTBEGINP)
 #define GNU_USER_TARGET_STARTFILE_SPEC \
   "%{!shared: %{pg|p|profile:gcrt1.o%s;pie:Scrt1.o%s;:crt1.o%s}} \
    crti.o%s %{static:crtbeginT.o%s;shared|pie:crtbeginS.o%s;:crtbegin.o%s} \
--- gcc/config/rs6000/sysv4.h   2009-04-10 01:23:07.000000000 +0200
+++ gcc/config/rs6000/sysv4.h   2009-09-08 04:41:50.000000000 +0200
@@ -883,7 +883,12 @@
 %{!mnewlib: %{pthread:-lpthread} %{shared:-lc} \
 %{!shared: %{profile:-lc_p} %{!profile:-lc}}}"
 
-#ifdef HAVE_LD_PIE
+#if defined (HAVE_LD_PIE) && defined (ENABLE_CRTBEGINP)
+#define STARTFILE_LINUX_SPEC "\
+%{!shared: %{pg|p|profile:gcrt1.o%s;pie:Scrt1.o%s;:crt1.o%s}} \
+%{mnewlib:ecrti.o%s;:crti.o%s} \
+%{static:%{pie:crtbeginP.o%s;:crtbeginT.o%s}} 
%{!static:%{shared|pie:crtbeginS.o%s;:crtbegin.o%s}}"
+#elif defined (HAVE_LD_PIE) && ! defined (ENABLE_CRTBEGINP)
 #define        STARTFILE_LINUX_SPEC "\
 %{!shared: %{pg|p|profile:gcrt1.o%s;pie:Scrt1.o%s;:crt1.o%s}} \
 %{mnewlib:ecrti.o%s;:crti.o%s} \



1.1                  src/patchsets/gcc/5.3.0/pie/24_all_gcc49_invoke.texi.patch

file : 
http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gcc/5.3.0/pie/24_all_gcc49_invoke.texi.patch?rev=1.1&view=markup
plain: 
http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gcc/5.3.0/pie/24_all_gcc49_invoke.texi.patch?rev=1.1&content-type=text/plain

Index: 24_all_gcc49_invoke.texi.patch
===================================================================
2014-04-24  Magnus Granberg  <zo...@gentoo.org>

                * gcc/doc/invoke.texi   Add NOTES about -fstack-protector-all, 
-pie and
                -fPIE/-fpie when --enable-esp is enable, this options is on by 
default.

--- gcc/doc/invoke.texi 2009-04-01 09:18:47.000000000 +0200
+++ gcc/doc/invoke.texi 2009-06-18 14:08:38.000000000 +0200
@@ -9233,6 +9245,11 @@ If a guard check fails, an error message
 @opindex fstack-protector-all
 Like @option{-fstack-protector} except that all functions are protected.
 
+NOTE: When --enable-esp, this option is enabled by default
+for C, C++, ObjC, and ObjC++ if neither @option{-fno-stack-protector},
+@option{-nostdlib}, @option{-ffreestanding}, @option{-fstack-protector},
+@option{-fstack-protector-strong} or @option{-fstack-protector-all} are found.
+
 @item -fstack-protector-strong
 @opindex fstack-protector-strong
 Like @option{-fstack-protector} but includes additional functions to
@@ -7960,6 +7965,12 @@
 used for compilation (@option{-fpie}, @option{-fPIE},
 or model suboptions) when you specify this linker option.
 
+NOTE: When --enable-esp, this option is enabled by default
+for C, C++, ObjC, and ObjC++ if neither @option{-fno-pie} or @option{-fno-PIE}
+or @option{-fno-pic} or @option{-fno-PIC} or @option{-nostdlib} or
+@option{-nostartfiles} or @option{-shared} or @option{-pg} or @option{-p}
+are found.
+
 @item -rdynamic
 @opindex rdynamic
 Pass the flag @option{-export-dynamic} to the ELF linker, on targets
@@ -15889,6 +15910,11 @@
 @code{__pie__} and @code{__PIE__}.  The macros have the value 1
 for @option{-fpie} and 2 for @option{-fPIE}.
 
+NOTE: When --enable-esp, this option is enabled by default
+for C, C++, ObjC, and ObjC++ if neither @option{-fno-pie} or @option{-fno-PIE}
+or @option{-fno-pic} or @option{-fno-PIC} or @option{-nostdlib} or
+@option{-nostartfiles} or @option{-shared} are found.
+
 @item -fno-jump-tables
 @opindex fno-jump-tables
 Do not use jump tables for switch statements even where it would be



1.1                  
src/patchsets/gcc/5.3.0/pie/33_all_gcc48_config_rs6000.patch

file : 
http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gcc/5.3.0/pie/33_all_gcc48_config_rs6000.patch?rev=1.1&view=markup
plain: 
http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gcc/5.3.0/pie/33_all_gcc48_config_rs6000.patch?rev=1.1&content-type=text/plain

Index: 33_all_gcc48_config_rs6000.patch
===================================================================
2014-08-07  Magnus Granberg  <zo...@gentoo.org>

        * gcc/config/rs6000/sysv4.h (DRIVER_SELF_SPECS): Add 
ESP_DRIVER_SELF_SPEC.
        (SUBTARGET_EXTRA_SPECS): Add ESP_EXTRA_SPECS.

--- a/gcc/config/rs6000/sysv4.h 2013-01-10 21:38:27.000000000 +0100
+++ b/gcc/config/rs6000/sysv4.h 2013-03-26 01:30:33.257003189 +0100
@@ -627,8 +627,13 @@ extern int fixuplabelno;
 
 #define LINK_OS_DEFAULT_SPEC ""
 
+#ifdef ENABLE_ESP
+#define DRIVER_SELF_SPECS "%{mfpu=none: %<mfpu=* \
+       %<msingle-float %<mdouble-float}", ESP_DRIVER_SELF_SPEC
+#else
 #define DRIVER_SELF_SPECS "%{mfpu=none: %<mfpu=* \
        %<msingle-float %<mdouble-float}"
+#endif
 
 /* Override rs6000.h definition.  */
 #undef CPP_SPEC
@@ -933,7 +938,11 @@ ncrtn.o%s"
   { "cpp_os_openbsd",          CPP_OS_OPENBSD_SPEC },                  \
   { "cpp_os_default",          CPP_OS_DEFAULT_SPEC },                  \
   { "fbsd_dynamic_linker",     FBSD_DYNAMIC_LINKER },                  \
-  SUBSUBTARGET_EXTRA_SPECS
+  SUBSUBTARGET_EXTRA_SPECS ESP_EXTRA_SPECS
+  
+#ifndef ENABLE_ESP
+#define ESP_EXTRA_SPECS
+#endif
 
 #define        SUBSUBTARGET_EXTRA_SPECS
 



1.1                  src/patchsets/gcc/5.3.0/pie/34_all_gcc51_config_i386.patch

file : 
http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gcc/5.3.0/pie/34_all_gcc51_config_i386.patch?rev=1.1&view=markup
plain: 
http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gcc/5.3.0/pie/34_all_gcc51_config_i386.patch?rev=1.1&content-type=text/plain

Index: 34_all_gcc51_config_i386.patch
===================================================================
2015-04-23  Magnus Granberg <zo...@gentoo.org>

        * gcc/config/i386/gnu-user-common.h (DRIVER_SELF_SPECS): Add 
ESP_DRIVER_SELF_SPEC.
        * gcc/config/i386/gnu-user.h (SUBTARGET_EXTRA_SPECS): Add 
ESP_EXTRA_SPECS.
        * gcc/config/i386/i386.h (SUBTARGET_EXTRA_SPECS): Add ESP_EXTRA_SPECS.

--- a/gcc/config/i386/gnu-user-common.h 2013-01-10 21:38:27.000000000 +0100
+++ b/gcc/config/i386/gnu-user-common.h 2013-02-14 00:51:44.689637605 +0100
@@ -70,3 +70,7 @@ along with GCC; see the file COPYING3.
 #if HAVE_GAS_CFI_PERSONALITY_DIRECTIVE
 #define TARGET_CAN_SPLIT_STACK
 #endif
+
+#ifdef ENABLE_ESP
+#define DRIVER_SELF_SPECS ESP_DRIVER_SELF_SPEC
+#endif
--- a/gcc/config/i386/gnu-user.h        2011-05-05 14:32:50.000000000 +0200
+++ b/gcc/config/i386/gnu-user.h        2012-07-09 14:28:38.726289455 +0200
@@ -93,9 +93,16 @@ along with GCC; see the file COPYING3.
   "--32 %{!mno-sse2avx:%{mavx:-msse2avx}} %{msse2avx:%{!mavx:-msse2avx}}"
 
 #undef  SUBTARGET_EXTRA_SPECS
+#ifdef ENABLE_ESP
 #define SUBTARGET_EXTRA_SPECS \
   { "link_emulation", GNU_USER_LINK_EMULATION },\
-  { "dynamic_linker", GNU_USER_DYNAMIC_LINKER }
+  { "dynamic_linker", GNU_USER_DYNAMIC_LINKER }, \
+  ESP_EXTRA_SPECS
+#else
+#define SUBTARGET_EXTRA_SPECS \
+  { "link_emulation", GNU_USER_LINK_EMULATION },\
+  { "dynamic_linker", GNU_USER_DYNAMIC_LINKER }
+#endif
 
 #undef LINK_SPEC
 #define LINK_SPEC "-m %(link_emulation) %{shared:-shared} \
--- a/gcc/config/i386/i386.h    2011-11-24 23:11:12.000000000 +0100
+++ b/gcc/config/i386/i386.h    2012-07-09 14:21:24.575276517 +0200
@@ -617,13 +617,16 @@ enum target_cpu_default
    Do not define this macro if it does not need to do anything.  */
 
 #ifndef SUBTARGET_EXTRA_SPECS
+#ifdef ENABLE_ESP
+#define SUBTARGET_EXTRA_SPECS ESP_EXTRA_SPECS
+#else
 #define SUBTARGET_EXTRA_SPECS
 #endif
+#endif
 
 #define EXTRA_SPECS                                                    \
   { "cc1_cpu",  CC1_CPU_SPEC },                                                
\
   SUBTARGET_EXTRA_SPECS
-
 
 /* Set the value of FLT_EVAL_METHOD in float.h.  When using only the
    FPU, assume that the fpcw is set to extended precision; when using



1.1                  src/patchsets/gcc/5.3.0/pie/35_all_gcc51_config_arm.patch

file : 
http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gcc/5.3.0/pie/35_all_gcc51_config_arm.patch?rev=1.1&view=markup
plain: 
http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gcc/5.3.0/pie/35_all_gcc51_config_arm.patch?rev=1.1&content-type=text/plain

Index: 35_all_gcc51_config_arm.patch
===================================================================
2015-04-26  Magnus Granberg  <zo...@gentoo.org>

        * gcc/config/arm/arm.h (DRIVER_SELF_SPECS): Add ESP_DRIVER_SELF_SPEC.
        * gcc/config/arm/elf.h (SUBSUBTARGET_EXTRA_SPECS): Add ESP_EXTRA_SPECS.

--- a/gcc/config/arm/arm.h      2013-01-15 17:17:28.000000000 +0100
+++ b/gcc/config/arm/arm.h      2013-02-18 22:45:18.327284928 +0100
@@ -2326,6 +2326,14 @@ extern const char *host_detect_local_cpu
 # define EXTRA_SPEC_FUNCTIONS BIG_LITTLE_CPU_SPEC_FUNCTIONS
 #endif
 
-#define DRIVER_SELF_SPECS MCPU_MTUNE_NATIVE_SPECS
+#ifdef ENABLE_ESP
+# define DRIVER_SELF_SPECS \
+  MCPU_MTUNE_NATIVE_SPECS, \
+  ESP_DRIVER_SELF_SPEC
+/* https://bugs.gentoo.org/518598 */
+# define ESP_NO_STACK_CHECK 1
+#else
+# define DRIVER_SELF_SPECS MCPU_MTUNE_NATIVE_SPECS
+#endif
 #define TARGET_SUPPORTS_WIDE_INT 1
 #endif /* ! GCC_ARM_H */
--- a/gcc/config/arm/elf.h      2013-01-10 21:38:27.000000000 +0100
+++ b/gcc/config/arm/elf.h      2013-05-19 02:15:49.595855825 +0200
@@ -49,7 +49,11 @@
 #endif
 
 #undef SUBSUBTARGET_EXTRA_SPECS
+#ifdef ENABLE_ESP
+#define SUBSUBTARGET_EXTRA_SPECS ESP_EXTRA_SPECS
+#else
 #define SUBSUBTARGET_EXTRA_SPECS
+#endif
 
 #ifndef ASM_SPEC
 #define ASM_SPEC "\



1.1                  src/patchsets/gcc/5.3.0/pie/36_all_gcc51_config_mips.patch

file : 
http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gcc/5.3.0/pie/36_all_gcc51_config_mips.patch?rev=1.1&view=markup
plain: 
http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gcc/5.3.0/pie/36_all_gcc51_config_mips.patch?rev=1.1&content-type=text/plain

Index: 36_all_gcc51_config_mips.patch
===================================================================
2013-04-01  Magnus Granberg <zo...@gentoo.org>

        * gcc/config/mips/gnu-user.h (DRIVER_SELF_SPECS): Add 
ESP_DRIVER_SELF_SPEC.
        * gcc/config/mips/mips.h (SUBTARGET_EXTRA_SPECS): Add ESP_EXTRA_SPECS.

--- a/gcc/config/mips/gnu-user.h        2013-01-10 21:38:27.000000000 +0100
+++ b/gcc/config/mips/gnu-user.h        2013-03-10 22:37:33.743176388 +0100
@@ -125,9 +125,17 @@ extern const char *host_detect_local_cpu
   "%{!mabi=*: -" MULTILIB_ABI_DEFAULT "}"
 
 #undef DRIVER_SELF_SPECS
+#ifdef ENABLE_ESP
 #define DRIVER_SELF_SPECS \
   MIPS_ISA_LEVEL_SPEC,    \
   BASE_DRIVER_SELF_SPECS, \
+  ESP_DRIVER_SELF_SPEC, \
   LINUX_DRIVER_SELF_SPECS
+#else
+#define DRIVER_SELF_SPECS \
+  MIPS_ISA_LEVEL_SPEC,    \
+  BASE_DRIVER_SELF_SPECS, \
+  LINUX_DRIVER_SELF_SPECS
+#endif
 
 /* Similar to standard Linux, but adding -ffast-math support.  */
 #undef GNU_USER_TARGET_MATHFILE_SPEC
--- a/gcc/config/mips/mips.h    2013-01-10 21:38:27.000000000 +0100
+++ b/gcc/config/mips/mips.h    2013-03-24 16:59:01.474513910 +0100
@@ -1197,9 +1197,13 @@ struct mips_cpu_info {
   SUBTARGET_EXTRA_SPECS
 
 #ifndef SUBTARGET_EXTRA_SPECS
+#ifdef ENABLE_ESP
+#define SUBTARGET_EXTRA_SPECS ESP_EXTRA_SPECS
+#else
 #define SUBTARGET_EXTRA_SPECS
 #endif
-
+#endif
+
 #define DBX_DEBUGGING_INFO 1           /* generate stabs (OSF/rose) */
 #define DWARF2_DEBUGGING_INFO 1         /* dwarf2 debugging info */
 



1.1                  src/patchsets/gcc/5.3.0/pie/37_all_gcc48_config_ia64.patch

file : 
http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gcc/5.3.0/pie/37_all_gcc48_config_ia64.patch?rev=1.1&view=markup
plain: 
http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gcc/5.3.0/pie/37_all_gcc48_config_ia64.patch?rev=1.1&content-type=text/plain

Index: 37_all_gcc48_config_ia64.patch
===================================================================
2013-06-03  Magnus Granberg <zo...@gentoo.org>

        * gcc/config/ia64/linux.h Define DRIVER_SELF_SPECS ESP_DRIVER_SELF_SPEC.
        * gcc/config/ia64/ia64.h (SUBTARGET_EXTRA_SPECS): Add ESP_EXTRA_SPECS.

--- a/gcc/config/ia64/linux.h   2013-01-10 21:38:27.000000000 +0100
+++ b/gcc/config/ia64/linux.h   2013-03-16 22:50:10.363049291 +0100
@@ -88,3 +88,7 @@ do {                                          \
 
 /* Define this to be nonzero if static stack checking is supported.  */
 #define STACK_CHECK_STATIC_BUILTIN 1
+
+#ifdef ENABLE_ESP
+#define DRIVER_SELF_SPECS ESP_DRIVER_SELF_SPEC
+#endif
--- a/gcc/config/ia64/ia64.h    2013-01-10 21:38:27.000000000 +0100
+++ b/gcc/config/ia64/ia64.h    2013-03-26 02:03:21.052061828 +0100
@@ -41,8 +41,12 @@ do {                                         \
 } while (0)
 
 #ifndef SUBTARGET_EXTRA_SPECS
+#ifdef ENABLE_ESP
+#define SUBTARGET_EXTRA_SPECS ESP_EXTRA_SPECS
+#else
 #define SUBTARGET_EXTRA_SPECS
 #endif
+#endif
 
 #define EXTRA_SPECS \
   { "asm_extra", ASM_EXTRA_SPEC }, \



1.1                  src/patchsets/gcc/5.3.0/pie/40_all_gcc49_config_esp.patch

file : 
http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gcc/5.3.0/pie/40_all_gcc49_config_esp.patch?rev=1.1&view=markup
plain: 
http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gcc/5.3.0/pie/40_all_gcc49_config_esp.patch?rev=1.1&content-type=text/plain

Index: 40_all_gcc49_config_esp.patch
===================================================================
2014-05-12  Magnus Granberg  <zo...@gentoo.org>

        * gcc/esp.h     New file to support --enable-esp
        Version 20140512.1

--- gcc/config/esp.h    2010-04-09 16:14:00.000000000 +0200
+++ gcc/config/esp.h    2012-06-23 01:00:31.248348491 +0200
@@ -0,0 +1,132 @@
+/* License terms see GNU GENERAL PUBLIC LICENSE Version 3.
+ * Version 20140512.1
+ * Magnus Granberg (Zorry) <zo...@gentoo.org>  */
+#ifndef GCC_ESP_H
+#define GCC_ESP_H
+
+/*     This file will add -fstack-protector-all, -fstack-check, -fPIE, -pie 
and -z now 
+       as default if the defines and the spec allow it.
+       Added a hack for gcc-specs-* in toolchain-funcs.eclass and 
_filter-hardened in flag-o-matic.eclass
+       to support older hardened GCC patches and we don't need to change the 
code on gcc-specs-* and _filter-hardened.
+       This will add some unsupported upstream commands options as -nopie and 
-nonow.
+       -D__KERNEL__ is added so we don't have -fPIE, -pie and 
-fstack-protector-all and -fstack-check when building kernels.
+       ESP_CC1_SPEC is added to CC1_SPEC.
+       ESP_CC1_STRICT_OVERFLOW_SPEC is added so we don't disable the 
strict-overflow check.
+       ESP_LINK_PIE_CHECK_SPEC check for -pie, -p, -pg, -profile and -static.
+       ENABLE_CRTBEGINP add support for crtbeginP.o, build -static with -fPIE 
or -fpie.
+*/
+#ifdef ENABLE_ESP
+       
+       /* Hack to support gcc-specs-* in toolchain-funcs.eclass and 
_filter-hardened in flag-o-matic.eclass  */
+       #define ESP_CC1_SPEC " %(esp_cc1_ssp) %(esp_cc1_pie) 
%(esp_cc1_strict_overflow)"
+       #if defined ( EFAULT_SSP ) || defined ( EFAULT_PIE_SSP )
+               #define ESP_CC1_SSP_SPEC "%{!fno-stack-protector: 
%{!fno-stack-protector-all: %{!fno-stack-check: }}}"
+       #else
+               #define ESP_CC1_SSP_SPEC ""
+       #endif
+       #if defined ( EFAULT_PIE ) || defined ( EFAULT_PIE_SSP )
+               #define ESP_CC1_PIE_SPEC "%{!nopie: }"
+       #else
+               #define ESP_CC1_PIE_SPEC ""
+       #endif
+       #define ESP_CC1_STRICT_OVERFLOW_SPEC 
"%{!fstrict-overflow:%{!fno-strict-overflow: -fno-strict-overflow}}"
+
+       /*      ESP_LINK_SPEC is added to LINK_PIE_SPEC if esp is enable
+               -z now will be added if we don't have -vanilla spec. We do a 
-pie incompatible check
+               Don't remove the specs in the end  */
+       #define ESP_LINK_SPEC "%(esp_link_now) %(esp_link_pie_check) "
+       #define ESP_LINK_NOW_SPEC "%{!nonow:-z now}"
+
+       /*      We use ESP_DRIVER_SELF_SPEC to add pie and ssp command-line 
options.  */
+       #define ESP_DRIVER_SELF_SPEC 
"%{D__KERNEL__:;:%{!nopie:%(esp_options_pie) \
+               %(esp_link_pie)} %(esp_options_ssp) }"
+       
+       /*  This will add -fstack-protector-all if we don't have -nostdlib 
-nodefaultlibs -fno-stack-protector -fstack-protector
+               -fstack-protector-all and we have EFAULT_SSP or EFAULT_PIE_SSP 
defined.  */
+       #if defined ( EFAULT_SSP ) || defined ( EFAULT_PIE_SSP )
+               #ifdef ESP_NO_STACK_CHECK
+                       #define ESP_OPTIONS_STACK_CHECK_SPEC
+               #else
+                       #define ESP_OPTIONS_STACK_CHECK_SPEC 
"%{fstack-check|fstack-check=*:;: -fstack-check}"
+               #endif
+               #define ESP_OPTIONS_SSP_SPEC \
+                       
"%{nostdlib|ffreestanding|fno-stack-protector|fstack-protector| \
+                       
fstack-protector-all|fstack-protector-strong:;:-fstack-protector-all} " \
+                       ESP_OPTIONS_STACK_CHECK_SPEC
+       #else
+               #define ESP_OPTIONS_SSP_SPEC ""
+       #endif
+
+       /* If EFAULT_PIE or EFAULT_PIE_SSP is defined we will add -fPIE -pie  */
+       #if defined ( EFAULT_PIE ) || defined ( EFAULT_PIE_SSP )
+
+               /*  This will add -fPIE if we don't have -pie -fpic -fPIC -fpie 
-fPIE -fno-pic -fno-PIC -fno-pie -fno-PIE -shared -static
+                       -nostdlib -nostartfiles.  */
+               /*  With ENABLE_CRTBEGINP we don't need to check for -static  */
+               #ifdef ENABLE_CRTBEGINP
+                       #define ESP_OPTIONS_PIE_SPEC \
+                               "%{!pie: %{!fpic:%{!fPIC:%{!fpie:%{!fPIE: 
%{!fno-pic:%{!fno-PIC:%{!fno-pie:%{!fno-PIE: \
+                               %{!shared: %{!nostdlib: %{!nostartfiles:-fPIE}} 
} }}}} }}}} }"
+               #else
+                       #define ESP_OPTIONS_PIE_SPEC \
+                               "%{!pie: %{!fpic:%{!fPIC:%{!fpie:%{!fPIE: 
%{!fno-pic:%{!fno-PIC:%{!fno-pie:%{!fno-PIE: \
+                               %{!shared: %{!static: %{!nostdlib: 
%{!nostartfiles:-fPIE}} } }}}} }}}} }}"
+               #endif
+
+               /*  This will add -pie if we don't have -pie -A -fno-pic 
-fno-PIC -fno-pie -fno-PIE -shared -static -r -nostdlib 
+                       -nostartfiles  */
+               /*  With ENABLE_CRTBEGINP we don't need to check for -static
+                       and we add -pie only to get the start and endfiles. 
-pie will not go to the linker. */
+               #ifdef ENABLE_CRTBEGINP
+                       #define ESP_LINK_PIE_SPEC \
+                               
"%{!pie:%{!A:%{!fno-pie:%{!fno-PIE:%{!fno-pic:%{!fno-PIC:%{!shared:%{!r: \
+                               %{!nostdlib:%{!nostartfiles:-pie}}}}}}}}}}"
+               #else
+                       #define ESP_LINK_PIE_SPEC \
+                               
"%{!pie:%{!A:%{!fno-pie:%{!fno-PIE:%{!fno-pic:%{!fno-PIC:%{!shared:%{!static:%{!r:
 \
+                               %{!nostdlib:%{!nostartfiles:-pie}}}}}}}}}}}"
+               #endif
+               
+               /*  This will check if -pie is set when (-static) -pg -p 
-profile. If set it will make gcc print out
+                       "-pie and (static)|pg|p|profile are incompatible when 
linking"  */
+               /*  With ENABLE_CRTBEGINP we don't need to check for -static  */
+               #ifdef ENABLE_CRTBEGINP
+                       #define ESP_LINK_PIE_CHECK_SPEC \
+                               "%{pie:%{pg|p|profile:%e-pie and -pg|p|profile 
are incompatible when linking}}"
+               #else
+                       #define ESP_LINK_PIE_CHECK_SPEC \
+                               "%{pie:%{static|pg|p|profile:%e-pie and 
-static|pg|p|profile are incompatible when linking}}"
+               #endif
+
+               /*  We don't pass -pie to the linker when -static.  */
+               #ifdef ENABLE_CRTBEGINP
+                       #define LINK_PIE_SPEC "%{!static:%{pie:-pie}} 
%(esp_link)"
+               #else
+                       #define LINK_PIE_SPEC "%{pie:-pie} %(esp_link)"
+               #endif
+
+       #else
+               #define ESP_OPTIONS_PIE_SPEC ""
+               #define ESP_LINK_PIE_CHECK_SPEC ""
+               #define ESP_LINK_PIE_SPEC ""
+               #define LINK_PIE_SPEC "%{pie:-pie} %(esp_link)"
+       #endif
+
+       /*  We add extra spec name's to the EXTRA_SPECS list  */
+       #define ESP_EXTRA_SPECS \
+               { "esp_cc1",                                                    
        ESP_CC1_SPEC },                                 \
+               { "esp_cc1_pie",                                                
        ESP_CC1_PIE_SPEC },                             \
+               { "esp_cc1_ssp",                                                
        ESP_CC1_SSP_SPEC },                             \
+               { "esp_cc1_strict_overflow",                                    
ESP_CC1_STRICT_OVERFLOW_SPEC }, \
+               { "esp_link",                                                   
        ESP_LINK_SPEC },                                \
+               { "esp_link_now",                                               
        ESP_LINK_NOW_SPEC },                    \
+               { "esp_link_pie",                                               
        ESP_LINK_PIE_SPEC },                    \
+               { "esp_link_pie_check",                                         
ESP_LINK_PIE_CHECK_SPEC },              \
+               { "esp_driver_self",                                            
        ESP_DRIVER_SELF_SPEC },         \
+               { "esp_options_pie",                                            
ESP_OPTIONS_PIE_SPEC },                 \
+               { "esp_options_ssp",                                            
ESP_OPTIONS_SSP_SPEC }
+
+       static const char *cc1_spec = CC1_SPEC ESP_CC1_SPEC;
+
+#endif
+#endif /* End GCC_ESP_H */



1.1                  src/patchsets/gcc/5.3.0/pie/README

file : 
http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gcc/5.3.0/pie/README?rev=1.1&view=markup
plain: 
http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gcc/5.3.0/pie/README?rev=1.1&content-type=text/plain

Index: README
===================================================================
This work started with bugs #94325 #100689 #106222 #149292 #149649 and the 
overlay on http://overlays.gentoo.org/dev/kevquinn.
By Kevin K. Quinn, Peter S. Mazinger, Natanael Copa, Alexander Gabert, Solar, 
PaX Team, Mike Frysinger and mentor.

The work stalled. Some threads on the Gentoo forum started to do their own 
fixes to get it working.
Xake started the thread where most of the new work was done: "How long until 
hardened and toolchain will produce a hardened gcc4?"
http://forums.gentoo.org/viewtopic-t-668885.html. I joined the thread and 
started to code.

We started with the pieworld code from kevquinn's overlay. The PIE and 
minispecs part hit the tree later on.
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
configure command line. On GCC 4.8.0 we use DRIVER_SELF_SPECS for the specs.
>From Gcc 4.9.0 it will have -fstack-protector-strong on as default.

Thank you all:
Kevin K. Quinn, Peter S. Mazinger, Natanael Copa, Alexander Gabert, Solar, PaX 
Team, Mike Frysinger, Xake, Dwokfur,
KernelOfTruth, SteveL, nixnut, Hopeless, forsaken1, XioXous, obrut<-, mv, qjim, 
Tommy[D], Genewb, radegand,
unk, neuron, alexxy, hellboi64, likewhoa, g0rg0n, costel78, polsas, 
7v5w7go9ub0o, uberpinguin, Naib, cilly,
bonsaikitten, kerframil, agaffney, Gordon Malm, blueness, Matthias Klose, Kees 
Cook, mentor, Anarchy,
devurandom and everyone else for helping to test, suggestions, fixes and 
anything else we have missed.
/2014-05-12 Magnus Grenberg (Zorry) <zo...@gentoo.org>



1.1                  src/patchsets/gcc/5.3.0/pie/README.Changelog

file : 
http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gcc/5.3.0/pie/README.Changelog?rev=1.1&view=markup
plain: 
http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gcc/5.3.0/pie/README.Changelog?rev=1.1&content-type=text/plain

Index: README.Changelog
===================================================================
0.6.5  Mike Frysinger  <vap...@gentoo.org>

        * gcc/doc/invoke.texi: Clean up typos/grammar.

0.6.4  Mike Frysinger  <vap...@gentoo.org>

        #518598
        * gcc/config/arm/elf.h (ESP_NO_STACK_CHECK): Define.
        * gcc/config/esp.h (ESP_OPTIONS_SSP_SPEC): Do not add -fstack-check
        when ESP_NO_STACK_CHECK is defined.

0.6.3  Magnus Granberg  <zo...@gentoo.org>

        * gcc/configure                                 Regenerated
        * gcc/config/i386/gnu-user-common.h     Bumped for 5.1.0 release
        * gcc/config/arm/arm.h                          Bumped for 5.1.0 release
        * gcc/config/mips/gnu-user.h                    Bumped for 5.1.0 release
        * gcc/config/mips/gnu-user64.h          Remove
        * libgcc/Makefile.in                                    Bumped for 
5.1.0 release

0.6.2  Magnus Granberg  <zo...@gentoo.org>

        #528690
         * libgcc/Makefile.in  Disable -fstack-check

0.6.1  Magnus Granberg  <zo...@gentoo.org>

        #528968
        * gcc/config/rs6000/sysv4.h     typo ESP_DRIVER_SELF_SPEC

0.6.0  Magnus Granberg  <zo...@gentoo.org>

        * gcc/configure                 Regenerated
        * gcc/config/esp.h.                     Bumped for 4.9.0 release
        * gcc/config/gnu-user.h         Bumped for 4.9.0 release
        * gcc/doc/invoke.texi           Bumped for 4.9.0 release
        * libgcc/Makefile.in                    Bumped for 4.9.0 release

0.5.9  Magnus Granberg  <zo...@gentoo.org>

        * configure.ac Remove
        * configure Remove
        * Makefile.in -fno-stack-protector moved to gentoo gcc patchset.
        * gcc/gcc.c Update cc1_spec define
        * gcc/doc/invoke.texi And note on ssp-all for --enable-esp and 
-ffreestanding

0.5.8  Magnus Granberg  <zo...@gentoo.org>

        * gcc/config/rs6000/linux64 (ASM_SPEC32): Allready applay.

0.5.7 Magnus Granberg  <zo...@gentoo.org>

        * gcc/config/esp.h Add -fstack-check as default.

0.5.6 Magnus Granberg  <zo...@gentoo.org>

        * gcc/config/ia64/linux.h Change ESP_DRIVER_SELF_SPECS To 
ESP_DRIVER_SELF_SPEC
        * gcc/config/arm/elf.h  (SUBSUBTARGET_EXTRA_SPECS): Add ESP_EXTRA_SPECS.

0.5.5 Magnus Granberg  <zo...@gentoo.org>

                * configure.ac                  Add mips
                * configure                             Regenerated
                * gcc/configure.ac              Clean up the checksand add mips.
                * gcc/configure                 Regenerated
                * gcc/config.in                 Remove ENABLE_ESP_SSP
                * gcc/Makefile.in               Bumped for 4.8.0 release
                * gcc/gcc.c                             Remove ESP_EXTRA_SPECS 
and
                ESP_COMMAND_OPTIONS_SPEC
                * gcc/config/rs6000/sysv4.h             Add ESP_DRIVER_SELF_SPEC
                and ESP_EXTRA_SPECS
                * gcc/config/i386/gnu-user-common.h     Add ESP_DRIVER_SELF_SPEC
                * gcc/config/i386/gnu-user.h    Add ESP_DRIVER_SELF_SPEC
                * gcc/config/i386/i386.h        Add ESP_DRIVER_SELF_SPEC
                * gcc/config/arm/arm.h          Add ESP_DRIVER_SELF_SPEC and
                ESP_EXTRA_SPECS
                * gcc/config/mips/gnu-user.h    Add ESP_DRIVER_SELF_SPEC
                * gcc/config/mips/gnu-user64.h  Add ESP_DRIVER_SELF_SPEC
                * gcc/config/mips/mips.h                Add ESP_EXTRA_SPECS
                * gcc/config/ia64/linux.h               Add 
ESP_DRIVER_SELF_SPECS
                * gcc/config/ia64/ia64.h                Add ESP_EXTRA_SPECS
                * gcc/config/esp.h                      Bump for 
ESP_DRIVER_SELF_SPEC support

0.5.4 Magnus Granberg           <zo...@gentoo.org>

                #436924
                * configure.ac                  Add --enable-esp.  Add 
-fno-stack-protector
                to stage1_cflags.
                * gcc/configure.ac              Add --enable-esp and check if 
SSP works.
                Define ENABLE_ESP ENABLE_ESP_SSP.
                Check if we support crtbeginP and define ENABLE_CRTBEGINP.
                * gcc/configure                 Fix a typo
                
0.5.3 Magnus Granberg           <zo...@gentoo.org>

                * gcc/configure                 Clean up the checks and added
                        check for uclibc ssp support.
                * gcc/config.in                         Add define for 
ENABLE_ESP_SSP
                * gcc/esp.h                             Check for ENABLE_ESP_SSP

0.5.2 Magnus Granberg           <zo...@gentoo.org>

                * gcc/common.opt                        Add -nopie

0.5.1 Magnus Granberg           <zo...@gentoo.org>

                * configure                             Bumped for 4.7.0 release
                * gcc/configure                 Bumped for 4.7.0 release and
                        added some checks.
                * gcc/Makefile                          Bumped for 4.7.0 release
                * gcc/gcc.c                             Bumped for 4.7.0 release
                * libgcc/Makefile                       Bumped for 4.7.0 release

0.5.0 Magnus Granberg           <zo...@gentoo.org>

                #393321
                * gcc/Makefile.in                       Rename crtbeginTS.o to 
crtbeginP.o
                * gcc/config/gnu-user.h         Rename crtbeginTS.o to 
crtbeginP.o
                * gcc/config/rs6000/sysv4.h     Rename crtbeginTS.o to 
crtbeginP.o
                * gcc/esp.h                             Rename crtbeginTS.o to 
crtbeginP.o
                * gcc/configure                 Rename crtbeginTS.o to 
crtbeginP.o
                * gcc/config.in                         Rename crtbeginTS.o to 
crtbeginP.o
                * libgcc/Makefile.in                    Rename crtbeginTS.o to 
crtbeginP.o

0.4.9 Magnus Granberg           <zo...@gentoo.org>

                #380823
                * gcc/Makefile.in                       added ESP_NOPIE_CFLAGS 
to ALL_CXXFLAGS

0.4.8 Magnus Granberg           <zo...@gentoo.org>
              
              * gcc/objc/lang-specs.h           Bumped for gcc 4.6.0 release
              * gcc/objcp/lang-specs.h          Bumped for gcc 4.6.0 release
              * gcc/cp/lang-specs.h                     Bumped for gcc 4.6.0 
release

0.4.7   Magnus Granberg         <zo...@gentoo.org>

                * gcc/gcc.c                                     Add 
%(esp_options) and %(esp_cpp_options)
                * gcc/esp.h                                     Use the esp.h 
patch from gcc-4.4 patchset
                * gcc/config/rs6000/linux64.h   Bumed for >2011-02-26 snapshot
                * gcc/objc/lang-specs.h         Add %(esp_options)
                * gcc/objcp/lang-specs.h                Add %(esp_options)
                * gcc/cp/lang-specs.h                   Add %(esp_options)
                * gcc/config/gnu-user.h         Add crtbeginTS.o support
              
0.4.6   Magnus Granberg         <zo...@gentoo.org>

                * Makefile.in                           Bumped for gcc 4.6
                * gcc/Makefile.in                       Bumped for gcc 4.6
                added ESP_NOPIE_CFLAGS to ALL_CFLAGS
                remove any ESP_NOSSP_CFLAGS
                remove any ESP_NOPIE_CFLAGS from crt* when not needed
                * gcc/gcc.c                             Bumped for gcc 4.6
                moved espf_options_ssp  to espf_command_options_spec
                * gcc/esp.h                             Added espf_options_ssp 
to espf_cc1_command_spec
                * gcc/config/rs6000/linux64.h   Bumped for gcc 4.6
                * gcc/config/linux.h                    Bumped for gcc 4.6

0.4.5   Magnus Granberg         <zo...@gentoo.org>

                * gcc/config/rs6000/sysv4.h             Fix a typo in the 
static spec rules

0.4.4   Magnus Granberg         <zo...@gentoo.org>

                * gcc/esp.h                     Renamed ESP_CC1_STRICT_SPEC to  
ESP_CC1_STRICT_OVERFLOW_SPEC
                Renamed ESP_OPTIONS_PIE_CHECK_SPEC to ESP_LINK_PIE_CHECK_SPEC

0.4.3   Magnus Granberg         <zo...@gentoo.org>

                #299061 b.g.o
                * gcc/gcc.c                     removed the pie incompatible 
specs rule call
                * gcc/esp.h                     Move the -pie incompatible 
check to esp_link
                remove the -shared incompatible check

0.4.2   Magnus granberg         <zo...@gentoo.org>

                * configure                     remove the changes from 0.4.1
                * Makefile.in           remove the changes from 0.4.1 remove 
-fstack-protector check.
                * gcc/configure         remove the changes from 0.4.1
                * gcc/config.in         remove the changes from 0.4.1 remove 
HAVE_GCC_SSP
                * gcc/Makefile          remove the changes from 0.4.1
                * gcc/esp.h                     change HAVE_GCC_LD_PIE to 
(EFAULT_PIE || EFAULT_PIE_SSP)
                change HAVE_GCC_SSP to (EFAULT_SSP || EFAULT_PIE_SSP)
                * libmudflap/Makefiles.in remove the changes from 0.4.1

0.4.1   Magnus Granberg         <zo...@gentoo.org>

                *configure                                              removed 
check for --enable-esp removed enable_esp
                added check for --enable-esp=(no|all|nopie|nossp). added 
enable_esp_set
                *Makefile.in                                    renamed 
enable_esp to enable_esp_set
                *gcc/configure                                  removed check 
for --enable-esp removed enable_esp
                added check for --enable-esp=(no|all|nopie|nossp). added 
enable_esp_set
                added a -fPIE -pie check. change AC_COMPILE_IFELSE to 
AC_LINK_IFELSE in the
                -fstack-protector check.
                * gcc/config.in                                 Added 
HAVE_GCC_LD_PIE
                *gcc/Makefile.in                                renamed 
enable_esp to enable_esp_set
                *gcc/esp.h                                              Renamed 
HAVE_LD_PIE to HAVE_GCC_LD_PIE
                Added HAVE_GCC_LD_PIE to #define ESP_CC1_PIE_SPEC. Move 
ESP_COMMAND_OPTIONS_SPEC
                * libmudflap/Makefiles.in               In enable_esp change 
ifeq to ifdef.

                #293843 b.g.o
                *gcc/esp.h                                              Added 
-nonow to the -z now specs.
                
0.4.0   Anthony G. Basile       <bas...@opensource.dyc.edu>

                rename espf to esp and change espf-patchset to piepatchset

0.3.9   Magnus Granberg         <zo...@gentoo.org>

                * gcc/configure                                 Added check for 
TLS on the target in the SSP check.

                #149292 b.g.o
                * gcc/config/i386/linux.h               Removed uclibc don't 
support TLS on stack-protector
                * gcc/config/i386/linux64.h             Removed uclibc don't 
support TLS on stack-protector
                * gcc/config/rs6000/linux.h             Removed uclibc don't 
support TLS on stack-protector
                * gcc/config/i386/linux.h               Removed uclibc don't 
support TLS on stack-protector
                * gcc/config/sparc/linux.h              Removed uclibc don't 
support TLS on stack-protector
                * gcc/config/sparc/linux64.h    Removed uclibc don't support 
TLS on stack-protector

0.3.8   Magnus Granberg         <zo...@gentoo.org>

                * gcc/configure                                 Redone the 
-fstack-protector check.
                * gcc/config.in                                 Added 
HAVE_GCC_SSP
                * gcc/gcc.c                                             Removed 
code for espf_link_spec in X
                * gcc/espf.h                                    Added ifdef 
HAVE_GCC_SSP, change code for espf_link_spec and link_pie_spec

0.3.7_beta      Anthony G. Basile       <bas...@opensource.dyc.edu>

                * gcc/configure                                 Check if 
-fstack-protector is supported by gcc on ARCH
                Updated AC_SUBST enable_espf
                * gcc/Makefile.in                               Remove the fix 
for $(out_object_file): ix86_split_to_parts() stack smashing attack b.g.o 
#149292.
                * gcc/gcc.c                                             Updaded 
the .c .cc compiler specs.

0.3.6   Magnus Granberg         <zo...@ume.nu>

                * configure                                             Check 
--enable-espf change ppc* to powerpc*, powerpc64 and add ia64.
                * gcc/configure                                 Don't check for 
-z,relro on ia64. Disable crtbeginTS for ia64.
                * gcc/espf.h                                    ia64 don't 
support -fstack-protector*

0.3.5   Maguns Granberg         <zo...@ume.nu>

                * gcc/espf.h                                    Change the 
specs for crtbegin.TS.o.
                * gcc/gcc.c                                             Rename 
espf_cc1_options to espf_options_pie_check.
                * gcc/config/linux.h                    Fix typos 
ENABLE_CRTBEGINS to ENABLE_CRTBEGINTS
                * gcc/config/rs6000/linux64.h   ASM_SPEC32: %{fpic:-K PIC} 
%{fPIC:-K PIC} to
                %{fpic|fPIC|fpie|fPIE:-K PIC}

0.3.4   Magnus Granberg         <zo...@ume.nu>

                * gcc/configure                                 Add 
crtbeginTS.o support.
                * gcc/Makefile.in                               Add 
crtbeginTS.o support.
                * gcc/gcc.c                                             Add 
espf_cc1_options.
                * gcc/espf.h                                    Added 
espf_cc1_options, crtbeginTS.o support,
                espf_cc1_options and espf_cc1_strictoverflow.
                * gcc/config.in                                 Add 
crtbeginTS.o support.
                * gcc/config/linux.h                    Add crtbeginTS.o 
support.
                * gcc/config/rs6000/sysv4.h             Add crtbeginTS.o 
support.
                * gcc/doc/invoke.texi                   Add NOTES about 
-fstack-protector-all,
                -pie and -fPIE.
                * libgcc/Makefile.in                    Add crtbeginTS.o 
support.

0.3.3   Magnus Granberg         <zo...@ume.nu>

                * gcc/opts.c            change #ifdef ENABLE_ESPF to #ifndef 
ENABLE_ESPF

0.3.2   Magnus Granberg         <zo...@ume.nu>

                * gcc/opts.c            disable flag_delete_null_pointer_checks 
>= -O2
                * gcc/espf.h            add ESPF_CC1_SSP_SPEC and 
ESPF_CC1_PIE_SPEC to fix bugs on -vanilla spec

                #149292 b.g.o
                * gcc/config/i386/linux.h               uclibc don't support 
TLS on stack-protector
                * gcc/config/i386/linux64.h             uclibc don't support 
TLS on stack-protector
                * gcc/config/rs6000/linux.h             uclibc don't support 
TLS on stack-protector
                * gcc/config/i386/linux.h               uclibc don't support 
TLS on stack-protector
                * gcc/config/sparc/linux.h              uclibc don't support 
TLS on stack-protector
                * gcc/config/sparc/linux64.h    uclibc don't support TLS on 
stack-protector

0.3.1   Magnus Granberg         <zo...@ume.nu>

                * gcc/cp/Make-lang.in   cc1plus: pch test fail when cc1plus is 
compile with -fPIE.
                * gcc/configure                 fix --enable-espf when 
USE"-hardened"

4.4.1-espf-0.3.0        Magnus Granberg         <zo...@ume.nu>

                * gcc/espf.h    add ESPF_LINK_SPEC ESPF_LINK_NOW_SPEC
                * gcc/gcc.c             move    do_self_spec 
(espf_command_options_spec)
                do_spec_1()             add espf_link_spec

0.3.0   Magnus Granberg         <zo...@ume.nu>

                * gcc/objc/lang-specs.h         Add %(espf_options)
                * gcc/objcp/lang-specs.h        Add %(espf_options)
                * gcc/cp/lang-specs.h           Add %(espf_options)
                * gcc/config.in                         removed ENABLE_LIBSSP
                * Makefile.in   We add -fno-stack-protector to
                BOOT_CFLAGS, LIBCFLAGS and LIBCXXFLAGS
                cc1: pch.exp test fail when cc1 is compile with -fPIE
                * libmudflap/Makefiles.in       Add -fno-stack-protector 
-U_FORTIFY_SOURCE
                to AM_CFLAGS
                * configure             add --enable-espf
                add -fno-stack-protector to stage1_cflags
                add targes ppc* arm sparc*
                * gcc/configure         change code for check --enable-espf
                * libmudflap/configure add enable_espf
                * gcc/espf.h    ESPF_CC1_OPTIONS_SPEC renamed to 
ESPF_OPTIONS_SPEC
                add ESPF_CPP_OPTIONS_SPEC ESPF_COMMAND_OPTIONS_SPEC
                ESPF_CC1_OPTIONS_SSP_SPEC renamed to ESPF_OPTIONS_SSP_SPEC
                ESPF_COMPILER_COMMAND_PIE_SPEC renamed to ESPF_OPTIONS_PIE_SPEC
                ESPF_LINK_COMMAND_PIE_SPEC renamed to ESPF_LINK_PIE_SPEC
                add !p !pg to ESPF_LINK_PIE_SPEC
                removed ESPF_LINK_SPEC ESPF_CC1_OPTIONS_PIE_INCOMPATIBLE_SPEC
                * gcc/gcc.c             cpp_options             add 
%(espf_cpp_options)
                compiler spec   add %(espf_options)
                change code for ESPF_EXTRA_SPECS
                process_command():                      Check for lazy, or now
                do_spec_1():                            Add -z now and -z relro
                main()                                          add 
do_self_spec (espf_command_options_spec)
                removed do_self_spec (espf_cc1_command_spec) do_self_spec 
(espf_link_command_spec)

0.2.9   Magnus Granberg         <zo...@ume.nu>

                * gcc/espf.h            add ESPF_COMPILER_COMMAND_PIE_SPEC
                add ESPF_LINK_COMMAND_PIE_SPEC
                change ESPF_COMPILER_COMMAND_SPEC ESPF_LINK_COMMAND_SPEC

0.2.8   Magnus Granberg         <zo...@ume.nu>

                * gcc/configure                         removed check 
crtbeginTS.o
                * gcc/espf.h    added notes
                add ESPF_CC1_SPEC
                removed ESPF_CPP_UNIQUE_OPTIONS espf_override_options()
                * gcc/gcc.c                                     cc1_spec        
Set it to CC1_SPEC if ! ENABLE_ESPF
                * gcc/toplev.c                          removed 
ESPF_OVERRIDE_OPTIONS

0.2.7   Magnus Granberg         <zo...@ume.nu>

                * gcc/opts.c    (decode_options):               Remove 
flag_strict_overflow as opt2
                * gcc/config.in                         removed HAVE_CRTBEGINTS
                * gcc/Makefile                          removed crtbeginTS.o
                * libgcc/Makefile.in            removed crtbeginTS.o
                * gcc/config/i386/i386.h        removed espf_override_options 
ESPF_EXTRA_SPECS
                * gcc/config/linux.h            remoevd crtbeginTS.o
                * gcc/espf.h            ESPF_CC1_OPTIONS_PIE_SPEC renamed to 
ESPF_CC1_COMMAND_SPEC
                * gcc/gcc.c                                     add 
ESPF_EXTRA_SPECS
                main()                  add do_self_spec (espf_cc1_command_spec)

0.2.6   Magnus Granberg         <zo...@ume.nu>

                * gcc/config/i386/i386.h        add espf_override_options() to 
OVERRIDE_OPTIONS
                * gcc/espf.h                            add 
espf_override_options()
                * gcc/toplev.c                          add 
ESPF_OVERRIDE_OPTIONS

0.2.5   Magnus Granberg         <zo...@ume.nu>

                * gcc/config/i386/i386.h        removed espf_cc1
                * gcc/config/i386/linux.h       removed espf_cc1 %(crtend_gen)
                * gcc/config/i386/x86-64.h  removed espf_cc1 %(crtend_gen)
                * gcc/config/linux.h            removed espf_cc1 %(crtfile_gen) 
                %(crtbegin_t_gen) %(crtend_gen)
                add crtbeginTS.o
                * gcc/config.in                         removed 
TARGET_LIBC_PROVIDES_PIE
                add HAVE_CRTBEGINTS
                * gcc/Makefile.in       add ESPF_NOPIE_CFLAGS ESPF_NOSSP_CFLAGS 
to
                CRTSTUFF_T_CFLAGS 
                add ESPF_NOSSP_CFLAGS to CRTSTUFF_T_CFLAGS_S
                * espf.h        ESPF_CC1_SPEC renamed to ESPF_CC1_OPTIONS_SPEC
                add ESPF_LINK_SPEC
                ESPF_CC1_SSP_SPEC renamed to ESPF_CC1_OPTIONS_SSP_SPEC
                ESPF_CC1_PIE_SPEC renamed to ESPF_CC1_OPTIONS_PIE_SPEC
                ESPF_CC1_OPTIONS_SPEC renamed to 
ESPF_CC1_OPTIONS_PIE_INCOMPATIBLE_SPEC
                LINK_PIE_SPEC renamed to ESPF_LINK_COMMAND_SPEC
                removed ESPF_CC1_STRICT_SPEC CRTFILE_GEN_SPEC CRTBEGIN_GEN_SPEC
                CRTBEGIN_T_GEN_SPEC CRTEND_GEN_SPEC
                * gcc/configure         remove TARGET_LIBC_PROVIDES_PIE
                define HAVE_CRTBEGINTS
                * gcc/gcc.c                     LINK_COMMAND_SPEC add 
%(espf_link)
                main()                  add do_self_spec 
(espf_link_command_spec)

0.2.4   Magnus Granberg         <zo...@ume.nu>

                libgcc/Makefile.in clean specs

0.2.3   Magnus Granberg         <zo...@ume.nu>

                *gcc/espf.h                     add ESPF_CC1_STRICT_SPEC

0.2.2   Magnus Granberg         <zo...@ume.nu>

                * gcc/config/i386/i386.h        Add espf_cc1
                Add ESPF_EXTRA_SPECS
                * gcc/config/i386/linux.h       Add espf_cc1
                * gcc/config/i386/x86-64.h  Add espf_cc1
                * gcc/config/linux.h  Add espf_cc1
                * gcc/Makefile.in       add crtbeginTS.o to EXTRA_PARTS list
                * libgcc/Makefile.in    add crtbeginTS.o to EXTRA_PARTS list
                * gcc/configure         add define ENABLE_LIBSSP
                * gcc/gcc.c  %(fortify_default) renamed to 
%(espf_cpp_unique_options)
                %(pie_incompatible) renamed to %(espf_cc1_options)
                removed ESPF_EXTRA_SPECS
                * gcc/espf.h    ESPF_DEFAULT_SPEC renamed to ESPF_CC1_SPEC
                SSP_DEFAULT_SPEC renamed to ESPF_CC1_SSP_SPEC
                FORTIFY_DEFAULT_SPEC renamed to ESPF_CPP_UNIQUE_OPTIONS
                PIE_DEFAULT_SPEC renamed to ESPF_CC1_PIE_SPEC
                PIE_INCOMPATIBLE_SPEC renamed to ESPF_CC1_OPTIONS_SPEC
                add new CRTFILE_GEN_SPEC CRTBEGIN_T_GEN_SPEC CRTEND_GEN_SPEC if 
!
                TARGET_LIBC_PROVIDES_PIE

4.4.0-espf-0.2.1        Magnus Granberg         <zo...@ume.nu>

                * gcc/gcc.c             include:        espf.h
                cc1_spec        = CC1_SPEC if not ENABLE_ESPF
                cpp_unique_options                      add %(fortify_default)
                cc1_options                                     add 
%(pie_incompatible)
                EXTRA_SPECS                                     add 
ESPF_EXTRA_SPECS
                * libgcc/Makefile.in            add crtbeginTs.o
                gcc/Makefile.in                         add ESPF_NOPIE_CFLAGS 
and ESPF_NOSSP_CFLAGS
                LIBGCC2_CFLAGS                          add ESPF_NOSSP_CFLAGS
                CRTSTUFF_CFLAGS                         add ESPF_NOPIE_CFLAGS 
and ESPF_NOSSP_CFLAGS
                crtbegin*                                       add crtbeginTS
                $(out_object_file): ix86_split_to_parts() stack smashing attack 
b.g.o #149292
                * libgcc/configure                      add enable_espf
                * gcc/config/linux.h            add %(crtfile_gen) 
%(crtbegin_t_gen) %(crtend_gen)
                * gcc/config/i386/linux.h       add %(crtend_gen)
                * gcc/config/i386/linux64.h     add %(crtend_gen)
                * gcc/config.gcc        extra_parts             add crtbeginTS.o
                * libgcc/config.host    extra_parts             add crtbeginTS.o
                * gcc/configure         check -z relro
                check -z now
                check FORTIFY_SOURCES level 2
                check Scrt1.o
                check --enable-espf
                check crtbeginTS.o
                * gcc/espf.h                    new file
                * gcc/varasm.c (decl_tls_model): Check flag_pic instead of 
flag_shlib
                * gcc/config.in                         add ENABLE_LIBSSP
                add ENABLE_ESPF
                add TARGET_LIBC_PROVIDES_FORTIFY2
                add TARGET_LIBC_PROVIDES_PIE
                * configure             define ENABLE_LIBSSP

gcc-4.3.3-piepatches-v10.2.1



1.1                  src/patchsets/gcc/5.3.0/pie/README.history

file : 
http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gcc/5.3.0/pie/README.history?rev=1.1&view=markup
plain: 
http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gcc/5.3.0/pie/README.history?rev=1.1&content-type=text/plain

Index: README.history
===================================================================
0.6.5           27 Oct 2015
                U 24_all_gcc49_invoke.texi.patch
0.6.4           29 Aug 2015
                U 35_all_gcc51_config_arm.patch
                U 40_all_gcc49_config_esp.patch
0.6.3           26 Apr 2015
                + 01_all_gcc51_configure.patch
                - 01_all_gcc49_configure.patch
                + 03_all_gcc51_Makefile.in.patch
                - 03_all_gcc49_Makefile.in.patch
                + 34_all_gcc51_config_i386.patch
                - 34_all_gcc48_config_i386.patch
                + 35_all_gcc51_config_arm.patch
                + 35_all_gcc48_config_arm.patch
                + 36_all_gcc51_config_mips.patch
                + 36_all_gcc48_config_mips.patch
0.6.2           5 Jan 2015
                U 03_all_gcc49_Makefile.in.patch
0.6.1           07 Jun 2014
                U 33_all_gcc48_config_rs6000.patch
0.6.0           12 May 2014
                + 01_all_gcc49_configure.patch
                - 01_all_gcc48_configure.patch
                + 03_all_gcc49_Makefile.in.patch
                - 03_all_gcc48_Makefile.in.patch
                + 20_all_gcc49_config_crtbeginp.patch
                - 20_all_gcc46_config_crtbeginp.patch
                + 24_all_gcc49_invoke.texi.patch
                - 24_all_gcc48_invoke.texi.patch
                +35_all_gcc49_config_esp.h.patch
                - 35_all_gcc48_config_esp.h.patch
                U README
0.5.9           4 Jan 2014
                U 01_all_gcc48_configure.patch
                U 03_all_gcc48_Makefile.in.patch
                U 05_all_gcc48_gcc.c.patch
                - 24_all_gcc44_invoke.texi.patch
                + 24_all_gcc48_invoke.texi.patch
                U README
0.5.8           11 Nov 2013
                U 33_all_gcc48_config_rs6000.patch
0.5.7           10 Jul 2013
                U 35_all_gcc48_config_esp.h.patch
                - 15_all_gcc44_decl-tls-model.patch
0.5.6           03 Jun 2013
                U 35_all_gcc48_config_arm.patch
                U 37_all_gcc48_config_ia64.patch
0.5.5           31 Mar 2013
                - 01_all_gcc47_configure.patch
                + 01_all_gcc48_configure.patch
                - 02_all_gcc47_config.in.patch
                + 02_all_gcc48_config.in.patch
                - 03_all_gcc47_Makefile.in.patch
                + 03_all_gcc48_Makefile.in.patch
                - 05_all_gcc47_gcc.c.patch
                + 05_all_gcc48_gcc.c.patch
                - 33_all_gcc46_config_rs6000_linux64.h.patch
                + 33_all_gcc48_config_rs6000.patch
                - 34_all_gcc47_config_all_gnu_user.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
                - 35_all_gcc47_config_esp.h.patch
                - 35_all_gcc48_config_esp.h.patch
                U README
0.5.4           02 Oct 2012
                U 01_all_gcc47_configure.patch
                +  01_all_gcc47_configure.ac.patch
0.5.3           06 Apr 2012
                U 01_all_gcc47_configure.patch
                + 02_all_gcc47_config.in.patch
                - 02_all_gcc45_config.in.patch
                + 06_all_gcc46_esp.h.patch
                - 06_all_gcc45_esp.h.patch
0.5.2           24 Jan 2012
                + 16_all_gcc47_nopie_option.patch
0.5.1           17 Jan 2012
                + 01_all_gcc47_configure.patch
                - 10_all_gcc45_configure.patch
                + 03_all_gcc47_Makefile.in.patch
                - 12_all_gcc46_Makefile.in.patch
                + 02_all_gcc45_config.in.patch
                - 11_all_gcc45_config.in.patch
                + 05_all_gcc46_gcc.c.patch
                - 20_all_gcc46_gcc.c.patch
                + 06_all_gcc45_esp.h.patch
                - 30_all_gcc45_esp.h.patch
                + 10_all_gcc46_default-ssp.patch
                - 22_all_gcc46-default-ssp.patch
                + 15_all_gcc44_decl-tls-model.patch
                - 21_all_gcc44_decl-tls-model.patch
                + 20_all_gcc46_config_crtbeginp.patch
                - 35_all_gcc46_config_crtbegints.patch
                + 24_all_gcc44_invoke.texi.patch
                + 60_all_gcc44_invoke.texi.patch
0.5.0           07 Dec 2011
                + 35_all_gcc46_config_crtbeginp.patch
                - 35_all_gcc46_config_crtbegints.patch
                U 10_all_gcc45_configure.patch
                U 12_all_gcc46_Makefile.in.patch
                + 11_all_gcc45_config.in.patch
                - 11_all_gcc44_config.in.patch
                + 30_all_gcc45_esp.h.patch
                - 30_all_gcc44_esp.h.patch
0.4.9           09 Nov 2011
                U 12_all_gcc46_Makefile.in.patch
0.4.8           26 Mar 2011
                U 22_all_gcc46-default-ssp.patch
0.4.7           05 Mar 2011
                U 20_all_gcc46_gcc.c.patch
                + 22_all_gcc46-default-ssp.patch
                - 30_all_gcc46_esp.h.patch
                + 30_all_gcc44_esp.h.patch
                U 33_all_gcc46_config_rs6000_linux64.h.patch
                U 35_all_gcc46_config_crtbegints.patch
0.4.6           07 Jan 2011
                + 12_all_gcc46_Makefile.in.patch
                - 12_all_gcc44_Makefile.in.patch
                + 20_all_gcc46_gcc.c.patch
                - 20_all_gcc44_gcc.c.patch
                + 30_all_gcc46_esp.h.patch
                - 30_all_gcc44_esp.h.patch
                + 33_all_gcc46_config_rs6000_linux64.h.patch
                - 33_all_gcc45_config_rs6000_linux64.h.patch
                + 35_all_gcc46_config_crtbegints.patch
                - 35_all_gcc44_config_crtbegints.patch
                - 40_all_gcc44_obj_lang-specs.h.patch
                - 40_all_gcc44_objp_lang-specs.h.patch
                - 40_all_gcc44_cp_lang-specs.h.patch
0.4.5           18 Jun 2010
                U 35_all_gcc44_config_crtbegints.patch
0.4.4           26 May 2010
                U 30_all_gcc44_esp.h.patch
0.4.3           26 May 2010
                U 20_all_gcc44_gcc.c.patch
                U 30_all_gcc44_esp.h.patch
0.4.2           24 May 2010
                U 10_all_gcc44_configure.patch
                U 12_all_gcc44_Makefile.in.patch
                U 11_all_gcc44_config.in.patch
                U 30_all_gcc44_esp.h.patch
0.4.1           29 Apr 2010
                U 10_all_gcc45_configure.patch
                U 12_all_gcc45_Makefile.in.patch
                U 11_all_gcc44_config.in.patch
                U 30_all_gcc44_esp.h.patch

0.4.0           19 Apr 2010
                U 10_all_gcc45_configure.patch
                U 12_all_gcc45_Makefile.in.patch
                U 11_all_gcc44_config.in.patch
                U 20_all_gcc45_gcc.c.patch
                - 30_all_gcc44_espf.h.patch
                + 30_all_gcc44_esp.h.patch

0.3.9   14 Apr 2010
                U 10_all_gcc45_configure.patch
                - 50_all_gcc44_no_ssp_tls_uclibc.patch
                U 33_all_gcc45_config_rs6000_linux64.h.patch

0.3.8   10 Apr 2010
                10_all_gcc44_configure.patch
                11_all_gcc44_config.in.patch
                20_all_gcc44_gcc.c.patch
                30_all_gcc44_espf.h.patch

0.3.7   10 Feb 2010
                20_all_gcc44_gcc.c.patch
                30_all_gcc44_espf.h.patch
                10_all_gcc44_configure.patch

0.3.6           23 Dec 2009
                - 10_all_gcc44_configure.patch
                + 10_all_gcc44_configure.patch
                - 30_all_gcc44_espf.h.patch
                + 30_all_gcc44_espf.h.patch
                - README.Changelog
                + README.Changelog
                - README.history
                + README.history
                - README
                + README

0.3.5           24 Sep 2009
                - 30_all_gcc44_espf.h.patch
                + 30_all_gcc44_espf.h.patch
                - 35_all_gcc44_config_crtbegints.patch
                + 35_all_gcc44_config_crtbegints.patch
                + 33_all_gcc44_config_rs6000_linux64.h.patch
                - README.Changelog
                + README.Changelog
                - README.history
                + README.history
                + README.Gentoo.patches

0.3.4           11 Sep 2009
                - 10_all_gcc44_configure.patch
                + 10_all_gcc44_configure.patch
                - 11_all_gcc44_config.in.patch
                + 11_all_gcc44_config.in.patch
                - 12_all_gcc44_Makefile.in.patch
                + 12_all_gcc44_Makefile.in.patch
                - 20_all_gcc44_gcc.c.patch
                + 20_all_gcc44_gcc.c.patch
                - 23_all_gcc44_opts.c.patch
                - 30_all_gcc44_espf.h.patch
                + 30_all_gcc44_espf.h.patch
                + 35_all_gcc44_config_crtbegints.patch
                + 60_all_gcc44_invoke.texi.patch
                - README.Changelog
                + README.Changelog
                - README.history
                + README.history
                - README
                + README
                
0.3.3           14 Aug 2009
                - 23_all_gcc44_opts.c.patch
                + 23_all_gcc44_opts.c.patch

0.3.2           09 Aug 2009
                + 50_all_gcc44_no_ssp_tls_uclibc.patch
                + README.Changelog
                + README.history
                - 23_all_gcc44_opts.c.patch
                + 23_all_gcc44_opts.c.patch
                - 30_all_gcc44-espf.h.patch
                + 30_all_gcc44-espf.h.patch

0.3.1           23 Jul 2009
                - 10_all_gcc44_configure.patch
                + 10_all_gcc44_configure.patch

0.3.0           23 Jul 2009
                - 10_all_gcc44_configure.patch
                + 10_all_gcc44_configure.patch
                - 11_all_gcc44_config.in.patch
                + 11_all_gcc44_config.in.patch
                - 12_all_gcc44_Makefile.in.patch
                + 12_all_gcc44_Makefile.in.patch
                - 20_all_gcc44_gcc.c.patch
                + 20_all_gcc44_gcc.c.patch
                + 40_all_gcc44_obj_lang-specs.h.patch
                + 40_all_gcc44_objp_lang-specs.h.patch
                + 40_all_gcc44_cp_lang-specs.h.patch
                - 50_all_gcc44_gentoo_v20090614.1.patch
                - 30_all_gcc44-espf.h.patch
                + 30_all_gcc44-espf.h.patch

0.2.9           14 Jun 2009
                - 12_all_gcc44_Makefile.in.patch
                + 12_all_gcc44_Makefile.in.patch
                - 30_all_gcc44-espf.h.patch
                + 30_all_gcc44-espf.h.patch
                - 50_all_gcc44_gentoo_v20090612.2.patch
                + 50_all_gcc44_gentoo_v20090614.1.patch

0.2.8           12 Jun 2009
                - 10_all_gcc44_configure.patch
                + 10_all_gcc44_configure.patch
                - 11_all_gcc44_config.in.patch
                + 11_all_gcc44_config.in.patch
                - 12_all_gcc44_Makefile.in.patch
                + 12_all_gcc44_Makefile.in.patch
                - 22_all_gcc44-toplev.c.patch
                - 25_all_gcc44-espf.h.patch
                + 30_all_gcc44-espf.h.patch
                + 50_all_gcc44_gentoo_v20090612.2.patch

0.2.7           29 May 2009
                - 11_all_gcc44_config.in.patch
                + 11_all_gcc44_config.in.patch
                - 12_all_gcc44_Makefile.in.patch
                + 12_all_gcc44_Makefile.in.patch
                - 20_all_gcc44_gcc.c.patch
                + 20_all_gcc44_gcc.c.patch
                + 23_all_gcc44_opts.c.patch
                - 25_all_gcc44-espf.h.patch
                + 25_all_gcc44-espf.h.patch
                - 30_all_gcc44-config-defaul-linux.patch

0.2.6           28 May 2009
                + 22_all_gcc44-toplev.c.patch
                - 25_all_gcc44-espf.h.patch
                + 25_all_gcc44-espf.h.patch
                - 30_all_gcc44-config-defaul-linux.patch
                + 30_all_gcc44-config-defaul-linux.patch

0.2.5           27 May 2009
                - 10_all_gcc44_configure.patch
                + 10_all_gcc44_configure.patch
                - 12_all_gcc44_Makefile.in.patch
                + 12_all_gcc44_Makefile.in.patch
                - 20_all_gcc44_gcc.c.patch
                + 20_all_gcc44_gcc.c.patch
                - 25_all_gcc44-espf.h.patch
                + 25_all_gcc44-espf.h.patch
                - 30_all_gcc44-config-defaul-linux.patch
                + 30_all_gcc44-config-defaul-linux.patch
                - 40_all_gcc44-gentoo.patch

0.2.4           08 May 2009
                - 12_all_gcc44_Makefile.in.patch
                + 12_all_gcc44_Makefile.in.patch

0.2.3           08 May 2009
                - 20_all_gcc44_gcc.c.patch
                + 20_all_gcc44_gcc.c.patch
                - 40_all_gcc44-gentoo.patch
                + 40_all_gcc44-gentoo.patch

0.2.2           04 May 2009
                + 10_all_gcc44_configure.patch
                + 11_all_gcc44_config.in.patch
                + 12_all_gcc44_Makefile.in.patch
                + 20_all_gcc44_gcc.c.patch
                + 21_all_gcc44_decl-tls-model.patch
                + 25_all_gcc44-espf.h.patch
                + 30_all_gcc44-config-defaul-linux.patch
                + 40_all_gcc44-gentoo.patch
                - 01_all_gcc44-configure.patch
                - 10_all_gcc44-gcc_configure.patch
                - 11_all_gcc44-gcc_config.in.patch
                - 12_all_gcc44-gcc_config.gcc.patch
                - 13_all_gcc44-gcc_Makefile.in.patch
                - 15_all_gcc44-libgcc_config.host.patch
                - 16_all_gcc44-libgcc_configure.patch
                - 17_all_gcc44-libgcc_Makefile.in.patch
                - 21_all_gcc44-gcc_espf.h.patch
                - 22_all_gcc44-gcc_gcc.c.patch
                - 23_all_gcc44-gcc_varasm.c.patch
                - 30_all_gcc44-add-crt-start-endfiles-linux.patch

0.2.1           28 Apr 2009
                + 01_all_gcc44-configure.patch
                + 10_all_gcc44-gcc_configure.patch
                + 11_all_gcc44-gcc_config.in.patch
                + 12_all_gcc44-gcc_config.gcc.patch
                + 13_all_gcc44-gcc_Makefile.in.patch
                + 15_all_gcc44-libgcc_config.host.patch
                + 16_all_gcc44-libgcc_configure.patch
                + 17_all_gcc44-libgcc_Makefile.in.patch
                + 21_all_gcc44-gcc_espf.h.patch
                + 22_all_gcc44-gcc_gcc.c.patch
                + 23_all_gcc44-gcc_varasm.c.patch
                + 30_all_gcc44-add-crt-start-endfiles-linux.patch
                - 00_all_gcc4.4-cvs-incompat.patch
                - 05_all_gcc4.4-compile-no-ssp.patch
                - 10_all_gcc4.4-hardened-minispecs-support.patch
                - 11_all_gcc4.4-decl-tls-model.patch
                - 12_all_gcc4.4-fortify-minispecs-support.patch
                - 20-all_gcc4.4-default-crt-start-endfile.patch
                - 30-all_gcc4.4-crtbeginTS-fno-PIE.patch

0.1.0           16 Apr 2009
                + 00_all_gcc4.4-cvs-incompat.patch
                + 05_all_gcc4.4-compile-no-ssp.patch
                + 10_all_gcc4.4-hardened-minispecs-support.patch
                + 11_all_gcc4.4-decl-tls-model.patch
                + 12_all_gcc4.4-fortify-minispecs-support.patch
                + 20-all_gcc4.4-default-crt-start-endfile.patch
                + 30-all_gcc4.4-crtbeginTS-fno-PIE.patch




Reply via email to