public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] proj/hardened-gccpatchset:master commit in: gcc-4.6.0/piepatch/, gcc-4.5.0/piepatch/
@ 2011-12-06 22:21 Magnus Granberg
  0 siblings, 0 replies; 2+ messages in thread
From: Magnus Granberg @ 2011-12-06 22:21 UTC (permalink / raw
  To: gentoo-commits

commit:     6e384e6622d3c640f7b9aa4cd976a11c141bd400
Author:     Magnus Granberg <zorry <AT> gentoo <DOT> org>
AuthorDate: Tue Dec  6 22:20:05 2011 +0000
Commit:     Magnus Granberg <zorry <AT> gentoo <DOT> org>
CommitDate: Tue Dec  6 22:20:05 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/hardened-gccpatchset.git;a=commit;h=6e384e66

Fix bugs 380823 and 393321

---
 gcc-4.5.0/piepatch/10_all_gcc45_configure.patch    |   24 ++--
 gcc-4.5.0/piepatch/11_all_gcc44_config.in.patch    |    6 +-
 gcc-4.5.0/piepatch/12_all_gcc45_Makefile.in.patch  |   38 ++--
 gcc-4.5.0/piepatch/30_all_gcc44_esp.h.patch        |   22 +-
 ...s.patch => 35_all_gcc44_config_crtbeginp.patch} |   18 +-
 gcc-4.5.0/piepatch/README.Changelog                |   11 +
 .../{README.Changelog => README.Changelog~}        |   11 +
 gcc-4.5.0/piepatch/README.history                  |    7 +
 gcc-4.6.0/piepatch/10_all_gcc45_configure.patch    |   22 +-
 gcc-4.6.0/piepatch/11_all_gcc44_config.in.patch    |    8 +-
 gcc-4.6.0/piepatch/12_all_gcc45_Makefile.in.patch  |  198 --------------------
 gcc-4.6.0/piepatch/12_all_gcc46_Makefile.in.patch  |   53 +++---
 gcc-4.6.0/piepatch/20_all_gcc45_gcc.c.patch        |  130 -------------
 gcc-4.6.0/piepatch/30_all_gcc44_esp.h.patch        |   22 +-
 .../33_all_gcc45_config_rs6000_linux64.h.patch     |   16 --
 .../piepatch/35_all_gcc44_config_crtbegints.patch  |   36 ----
 ...s.patch => 35_all_gcc46_config_crtbeginp.patch} |   16 +-
 .../piepatch/40_all_gcc44_cp_lang-specs.h.patch    |   30 ---
 .../piepatch/41_all_gcc44_objc_lang-specs.h.patch  |   37 ----
 .../piepatch/42_all_gcc44_objcp_lang-specs.h.patch |   35 ----
 gcc-4.6.0/piepatch/README.Changelog                |   32 +++-
 gcc-4.6.0/piepatch/README.history                  |   11 +-
 22 files changed, 182 insertions(+), 601 deletions(-)

diff --git a/gcc-4.5.0/piepatch/10_all_gcc45_configure.patch b/gcc-4.5.0/piepatch/10_all_gcc45_configure.patch
index 39893f3..afa7a19 100644
--- a/gcc-4.5.0/piepatch/10_all_gcc45_configure.patch
+++ b/gcc-4.5.0/piepatch/10_all_gcc45_configure.patch
@@ -1,10 +1,10 @@
-2010-05-25	Magnus Granberg		<zorry@gentoo.org>, Anthony G. Basile	<basile@opensource.dyc.edu>
+2011-12-05	Magnus Granberg		<zorry@gentoo.org>, Anthony G. Basile	<basile@opensource.dyc.edu>
 
 		* configure		Add --enable-esp.  Add-fno-stack-protector
 		to stage1_cflags.
 		* gcc/configure		Add --enable-esp. Check -z now and -z relro.
 		Define ENABLE_ESP.
-		Check if we support crtbeginTS and define ENABLE_CRTBEGINTS.
+		Check if we support crtbeginP and define ENABLE_CRTBEGINP.
 		* libmudflap/configure		Add AC_SUBST enable_esp.
 
 
@@ -169,33 +169,33 @@
 +   { (exit 1); exit 1; }; }
 +fi
 +
-+echo "$as_me:$LINENO: checking for crtbeginTS.o support" >&5
-+echo $ECHO_N "checking for crtbeginTS.o support... $ECHO_C" >&6
-+if test "${enable_crtbeginTS+set}" = set; then
++echo "$as_me:$LINENO: checking for crtbeginP.o support" >&5
++echo $ECHO_N "checking for crtbeginP.o support... $ECHO_C" >&6
++if test "${enable_crtbeginP+set}" = set; then
 +  echo $ECHO_N "(cached) $ECHO_C" >&6
 +else
 +
 +if test x$enable_esp = xyes ; then
 +	case "$target" in
 +	  ia64*-*-linux*)
-+			enable_crtbeginTS=no ;;
++			enable_crtbeginP=no ;;
 +      *-*-linux*)
 +		if test x$gcc_cv_ld_pie = xyes && test x$lt_cv_prog_compiler_static_works = xyes; then
-+			enable_crtbeginTS=yes
++			enable_crtbeginP=yes
 +     	fi
 +		;;
-+  	  *) enable_crtbeginTS=no ;;
++  	  *) enable_crtbeginP=no ;;
 +    esac
 +fi
 +
 +fi
-+echo "$as_me:$LINENO: result: $enable_crtbeginTS" >&5
-+echo "${ECHO_T}$enable_crtbeginTS" >&6
++echo "$as_me:$LINENO: result: $enable_crtbeginP" >&5
++echo "${ECHO_T}$enable_crtbeginP" >&6
 +
-+if test x$enable_crtbeginTS = xyes; then
++if test x$enable_crtbeginP = xyes; then
 +
 +cat >>confdefs.h <<\_ACEOF
-+#define ENABLE_CRTBEGINTS 1
++#define ENABLE_CRTBEGINP 1
 +_ACEOF
 +
 +fi

diff --git a/gcc-4.5.0/piepatch/11_all_gcc44_config.in.patch b/gcc-4.5.0/piepatch/11_all_gcc44_config.in.patch
index 3e49f03..a4369ee 100644
--- a/gcc-4.5.0/piepatch/11_all_gcc44_config.in.patch
+++ b/gcc-4.5.0/piepatch/11_all_gcc44_config.in.patch
@@ -1,4 +1,4 @@
-2010-05-24	Magnus Granberg		<zorry@gentoo.org>
+2011-12-05	Magnus Granberg		<zorry@gentoo.org>
 
 		* gcc/config.in	Add ENABLE_CRTBEGINTS and ENABLE_ESP
 
@@ -8,9 +8,9 @@
  #endif
  
  
-+/* Define to 1 to enable crtbeginTS.o. */
++/* Define to 1 to enable crtbeginP.o. */
 +#ifndef USED_FOR_TARGET
-+#undef ENABLE_CRTBEGINTS
++#undef ENABLE_CRTBEGINP
 +#endif
 +
 +

diff --git a/gcc-4.5.0/piepatch/12_all_gcc45_Makefile.in.patch b/gcc-4.5.0/piepatch/12_all_gcc45_Makefile.in.patch
index 6700f50..a1f1cd1 100644
--- a/gcc-4.5.0/piepatch/12_all_gcc45_Makefile.in.patch
+++ b/gcc-4.5.0/piepatch/12_all_gcc45_Makefile.in.patch
@@ -1,14 +1,14 @@
-2010-04-25	Magnus Granberg		<zorry@gentoo.org> Anthony G. Basile	<basile@opensource.dyc.edu>
+2011-12-06	Magnus Granberg		<zorry@gentoo.org> Anthony G. Basile	<basile@opensource.dyc.edu>
 
 		* Makefile.in	We add -fno-stack-protector to BOOT_CFLAGS, LIBCFLAGS and LIBCXXFLAGS if enable_esp yes.
 		* gcc/Makefile.in	Add -fno-PIE and -fno-stack-protector.
 	    Libgcc2 doesn't compile with -fstack-protector.
 	    Crtstuff doesn't compile with -fPIE and -fstack-protector.
 		$(out_object_file): ix86_split_to_parts() stack smashing attack b.g.o #149292.
-		Add crtbeginTS.o to EXTRA_PARTS if enable_crtbeginTS yes
-		We add new file crtbeginTS.o if enable_crtbeginTS yes
-		* libgcc/Makefile.in	Add crtbeginTS.o to EXTRA_PARTS if enable_crtbeginTS yes
-		We add new file crtbeginTS.o if enable_crtbeginTS yes
+		Add crtbeginÅ.o to EXTRA_PARTS if enable_crtbeginP yes
+		We add new file crtbeginP.o if enable_crtbeginP yes
+		* libgcc/Makefile.in	Add crtbeginP.o to EXTRA_PARTS if enable_crtbeginP yes
+		We add new file crtbeginP.o if enable_crtbeginP yes
  
 2010-04-25	Magnus Granberg		<zorry@gentoo.org>,	Kees Cook	<kees@outflux.net>
 
@@ -90,10 +90,10 @@
  # The rules for compiling them should be in the t-* file for the machine.
  EXTRA_PARTS = @extra_parts@
  
-+# We add crtbeginTS.o to the EXTRA_PARTS list if enable_crtbeginTS = yes
-+enable_crtbeginTS = @enable_crtbeginTS@
-+ifeq ($(enable_crtbeginTS),yes)
-+EXTRA_PARTS += crtbeginTS.o
++# We add crtbeginP.o to the EXTRA_PARTS list if enable_crtbeginP = yes
++enable_crtbeginP = @enable_crtbeginP@
++ifeq ($(enable_crtbeginP),yes)
++EXTRA_PARTS += crtbeginP.o
 +endif
 +
  # List of extra object files that should be compiled and linked with
@@ -107,7 +107,7 @@
 +	echo CRTSTUFF_T_CFLAGS = '$(CRTSTUFF_T_CFLAGS) $(ESP_NOPIE_CFLAGS)' >> tmp-libgcc.mvars
  	echo CRTSTUFF_T_CFLAGS_S = '$(CRTSTUFF_T_CFLAGS_S)' >> tmp-libgcc.mvars
  	echo TARGET_SYSTEM_ROOT = '$(TARGET_SYSTEM_ROOT)' >> tmp-libgcc.mvars
-+	echo enable_crtbeginTS = '$(enable_crtbeginTS)' >> tmp-libgcc.mvars
++	echo enable_crtbeginP = '$(enable_crtbeginP)' >> tmp-libgcc.mvars
  
  	mv tmp-libgcc.mvars libgcc.mvars
  
@@ -135,12 +135,12 @@
  	  -o $(T)crtbeginT$(objext)
  
 +# This is a version of crtbegin for -static -fPIE links if esp is enable.
-+ifeq ($(enable_crtbeginTS),yes)
-+$(T)crtbeginTS.o: crtstuff.c $(GCC_PASSES) $(TCONFIG_H) auto-host.h \
++ifeq ($(enable_crtbeginP),yes)
++$(T)crtbeginP.o: crtstuff.c $(GCC_PASSES) $(TCONFIG_H) auto-host.h \
 +  gbl-ctors.h stmp-int-hdrs tsystem.h coretypes.h $(TM_H)
 +	$(GCC_FOR_TARGET) $(CRTSTUFF_CFLAGS) $(CRTSTUFF_T_CFLAGS_S) \
 +	  -c $(srcdir)/crtstuff.c -DCRT_BEGIN -DCRTSTUFFT_O -DCRTSTUFFS_O \
-+	  -o $(T)crtbeginTS$(objext)
++	  -o $(T)crtbeginP$(objext)
 +endif
 +
  # Compile the start modules crt0.o and mcrt0.o that are linked with
@@ -152,10 +152,10 @@
  gen-hide-list = echo > \$@
  endif
  
-+# We add crtbeginTS.o to the EXTRA_PARTS list if enable_crtbeginTS = yes
-+enable_libgcc_crtbeginTS = $(enable_crtbeginTS)
-+ifeq ($(enable_libgcc_crtbeginTS),yes)
-+EXTRA_PARTS += crtbeginTS.o
++# We add crtbeginP.o to the EXTRA_PARTS list if enable_crtbeginP = yes
++enable_libgcc_crtbeginP = $(enable_crtbeginP)
++ifeq ($(enable_libgcc_crtbeginP),yes)
++EXTRA_PARTS += crtbeginP.o
 +endif
 +
  ifneq ($(EXTRA_PARTS),)
@@ -167,8 +167,8 @@
  	  -c $(gcc_srcdir)/crtstuff.c -DCRT_BEGIN -DCRTSTUFFT_O
 +
 +# This is a version of crtbegin for -static -fPIE links.
-+ifeq ($(enable_libgcc_crtbeginTS),yes)
-+crtbeginTS.o: $(gcc_srcdir)/crtstuff.c
++ifeq ($(enable_libgcc_crtbeginP),yes)
++crtbeginP.o: $(gcc_srcdir)/crtstuff.c
 +	$(crt_compile) $(CRTSTUFF_T_CFLAGS_S) \
 +	  -c $(gcc_srcdir)/crtstuff.c -DCRT_BEGIN -DCRTSTUFFT_O -DCRTSTUFFS_O
 +endif

diff --git a/gcc-4.5.0/piepatch/30_all_gcc44_esp.h.patch b/gcc-4.5.0/piepatch/30_all_gcc44_esp.h.patch
index df3c2bc..c51e8b4 100644
--- a/gcc-4.5.0/piepatch/30_all_gcc44_esp.h.patch
+++ b/gcc-4.5.0/piepatch/30_all_gcc44_esp.h.patch
@@ -1,13 +1,13 @@
-2010-05-27		Magnus Granberg		<zorry@gentoo.org>
+2011-12-05		Magnus Granberg		<zorry@gentoo.org>
 
 		* gcc/esp.h	New file to support --enable-esp
-		Version 20100527.1
+		Version 20111205.1
 
 --- gcc/esp.h	2010-04-09 16:14:00.000000000 +0200
 +++ gcc/esp.h	2010-04-29 21:30:47.000000000 +0200
 @@ -0,0 +1,145 @@
 +/* License terms see GNU GENERAL PUBLIC LICENSE Version 3.
-+ * Version 20100527.1
++ * Version 20111205.1
 + * Magnus Granberg (Zorry) <zorry@gentoo.org>  */
 +#ifndef GCC_ESP_H
 +#define GCC_ESP_H
@@ -21,7 +21,7 @@
 +	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_CRTBEGINTS add support for crtbeginTS.o, build -static with -fPIE or -fpie.
++	ENABLE_CRTBEGINP add support for crtbeginP.o, build -static with -fPIE or -fpie.
 +*/
 +#ifdef ENABLE_ESP
 +	
@@ -70,8 +70,8 @@
 +
 +		/*  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_CRTBEGINTS we don't need to check for -static  */
-+		#ifdef ENABLE_CRTBEGINTS
++		/*  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}} } }}}} }}}} }"
@@ -83,9 +83,9 @@
 +
 +		/*  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_CRTBEGINTS we don't need to check for -static
++		/*  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_CRTBEGINTS
++		#ifdef ENABLE_CRTBEGINP
 +			#define ESP_LINK_PIE_SPEC \
 +				"%{!pie:%{!A:%{!fno-pie:%{!fno-PIE:%{!fno-pic:%{!fno-PIC:%{!shared:%{!r: \
 +				%{!nostdlib:%{!nostartfiles:-pie}}}}}}}}}}"
@@ -97,8 +97,8 @@
 +		
 +		/*  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_CRTBEGINTS we don't need to check for -static  */
-+		#ifdef ENABLE_CRTBEGINTS
++		/*  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
@@ -107,7 +107,7 @@
 +		#endif
 +
 +		/*  We don't pass -pie to the linker when -static.  */
-+		#ifdef ENABLE_CRTBEGINTS
++		#ifdef ENABLE_CRTBEGINP
 +			#define LINK_PIE_SPEC "%{!static:%{pie:-pie}} %(esp_link)"
 +		#else
 +			#define LINK_PIE_SPEC "%{pie:-pie} %(esp_link)"

diff --git a/gcc-4.5.0/piepatch/35_all_gcc44_config_crtbegints.patch b/gcc-4.5.0/piepatch/35_all_gcc44_config_crtbeginp.patch
similarity index 61%
rename from gcc-4.5.0/piepatch/35_all_gcc44_config_crtbegints.patch
rename to gcc-4.5.0/piepatch/35_all_gcc44_config_crtbeginp.patch
index 8f43a87..d270978 100644
--- a/gcc-4.5.0/piepatch/35_all_gcc44_config_crtbegints.patch
+++ b/gcc-4.5.0/piepatch/35_all_gcc44_config_crtbeginp.patch
@@ -1,7 +1,7 @@
-2010-06-18		Magnus Granberg		<zorry@gentoo.org>
+2011-12-06		Magnus Granberg		<zorry@gentoo.org>
 
-		* gcc/config/linux.h			If ENABLE_CRTBEGINTS, -static and -pie use crtbegineTS.o.
-		* gcc/config/rs6000/sysv4.h		If ENABLE_CRTBEGINTS, -static and -pie use crtbegineTS.o.
+		* gcc/config/linux.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/linux.h	2009-04-10 01:23:07.000000000 +0200
 +++ gcc/config/linux.h	2009-09-08 04:08:06.000000000 +0200
@@ -10,11 +10,11 @@
     
  #undef	STARTFILE_SPEC
 -#if defined HAVE_LD_PIE
-+#if defined (HAVE_LD_PIE) && defined (ENABLE_CRTBEGINTS)
++#if defined (HAVE_LD_PIE) && defined (ENABLE_CRTBEGINP)
 +#define STARTFILE_SPEC \
 +  "%{!shared: %{pg|p|profile:gcrt1.o%s;pie:Scrt1.o%s;:crt1.o%s}} crti.o%s \
-+   %{static:%{pie:crtbeginTS.o%s;:crtbeginT.o%s}} %{!static:%{shared|pie:crtbeginS.o%s;:crtbegin.o%s}}"
-+#elif defined (HAVE_LD_PIE) && ! defined (ENABLE_CRTBEGINTS)
++   %{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_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}"
@@ -25,12 +25,12 @@
  %{!shared: %{profile:-lc_p} %{!profile:-lc}}}"
  
 -#ifdef HAVE_LD_PIE
-+#if defined (HAVE_LD_PIE) && defined (ENABLE_CRTBEGINTS)
++#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:crtbeginTS.o%s;:crtbeginT.o%s}} %{!static:%{shared|pie:crtbeginS.o%s;:crtbegin.o%s}}"
-+#elif defined (HAVE_LD_PIE) && ! defined (ENABLE_CRTBEGINTS)
++%{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} \

diff --git a/gcc-4.5.0/piepatch/README.Changelog b/gcc-4.5.0/piepatch/README.Changelog
index ab59bcb..53b7b44 100644
--- a/gcc-4.5.0/piepatch/README.Changelog
+++ b/gcc-4.5.0/piepatch/README.Changelog
@@ -1,3 +1,14 @@
+0.4.6 Magnus Granberg		<zorry@gentoo.org>
+
+		#393321
+		* gcc/Makefile.in			Rename crtbeginTS.o to crtbeginP.o
+		* gcc/config/linux.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.5	Magnus Granberg		<zorry@gentoo.org>
 
 		* gcc/config/rs6000/sysv4.h		Fix a typo in the static spec rules

diff --git a/gcc-4.5.0/piepatch/README.Changelog b/gcc-4.5.0/piepatch/README.Changelog~
similarity index 96%
copy from gcc-4.5.0/piepatch/README.Changelog
copy to gcc-4.5.0/piepatch/README.Changelog~
index ab59bcb..53b7b44 100644
--- a/gcc-4.5.0/piepatch/README.Changelog
+++ b/gcc-4.5.0/piepatch/README.Changelog~
@@ -1,3 +1,14 @@
+0.4.6 Magnus Granberg		<zorry@gentoo.org>
+
+		#393321
+		* gcc/Makefile.in			Rename crtbeginTS.o to crtbeginP.o
+		* gcc/config/linux.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.5	Magnus Granberg		<zorry@gentoo.org>
 
 		* gcc/config/rs6000/sysv4.h		Fix a typo in the static spec rules

diff --git a/gcc-4.5.0/piepatch/README.history b/gcc-4.5.0/piepatch/README.history
index 07d373c..35a76ad 100644
--- a/gcc-4.5.0/piepatch/README.history
+++ b/gcc-4.5.0/piepatch/README.history
@@ -1,3 +1,10 @@
+0.4.6		06-12-2011
+		+ 35_all_gcc44_config_crtbeginp.patch
+		- 35_all_gcc44_config_crtbegints.patch
+		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.5		18-06-2010
 		U 35_all_gcc44_config_crtbegints.patch
 0.4.4		26-05-2010

diff --git a/gcc-4.6.0/piepatch/10_all_gcc45_configure.patch b/gcc-4.6.0/piepatch/10_all_gcc45_configure.patch
index 39893f3..6ab02eb 100644
--- a/gcc-4.6.0/piepatch/10_all_gcc45_configure.patch
+++ b/gcc-4.6.0/piepatch/10_all_gcc45_configure.patch
@@ -1,10 +1,10 @@
-2010-05-25	Magnus Granberg		<zorry@gentoo.org>, Anthony G. Basile	<basile@opensource.dyc.edu>
+2011-12-05	Magnus Granberg		<zorry@gentoo.org>, Anthony G. Basile	<basile@opensource.dyc.edu>
 
 		* configure		Add --enable-esp.  Add-fno-stack-protector
 		to stage1_cflags.
 		* gcc/configure		Add --enable-esp. Check -z now and -z relro.
 		Define ENABLE_ESP.
-		Check if we support crtbeginTS and define ENABLE_CRTBEGINTS.
+		Check if we support crtbeginP and define ENABLE_CRTBEGINP.
 		* libmudflap/configure		Add AC_SUBST enable_esp.
 
 
@@ -169,33 +169,33 @@
 +   { (exit 1); exit 1; }; }
 +fi
 +
-+echo "$as_me:$LINENO: checking for crtbeginTS.o support" >&5
-+echo $ECHO_N "checking for crtbeginTS.o support... $ECHO_C" >&6
-+if test "${enable_crtbeginTS+set}" = set; then
++echo "$as_me:$LINENO: checking for crtbeginP.o support" >&5
++echo $ECHO_N "checking for crtbeginP.o support... $ECHO_C" >&6
++if test "${enable_crtbeginP+set}" = set; then
 +  echo $ECHO_N "(cached) $ECHO_C" >&6
 +else
 +
 +if test x$enable_esp = xyes ; then
 +	case "$target" in
 +	  ia64*-*-linux*)
-+			enable_crtbeginTS=no ;;
++			enable_crtbeginP=no ;;
 +      *-*-linux*)
 +		if test x$gcc_cv_ld_pie = xyes && test x$lt_cv_prog_compiler_static_works = xyes; then
-+			enable_crtbeginTS=yes
++			enable_crtbeginP=yes
 +     	fi
 +		;;
-+  	  *) enable_crtbeginTS=no ;;
++  	  *) enable_crtbeginP=no ;;
 +    esac
 +fi
 +
 +fi
 +echo "$as_me:$LINENO: result: $enable_crtbeginTS" >&5
-+echo "${ECHO_T}$enable_crtbeginTS" >&6
++echo "${ECHO_T}$enable_crtbeginP" >&6
 +
-+if test x$enable_crtbeginTS = xyes; then
++if test x$enable_crtbeginP = xyes; then
 +
 +cat >>confdefs.h <<\_ACEOF
-+#define ENABLE_CRTBEGINTS 1
++#define ENABLE_CRTBEGINP 1
 +_ACEOF
 +
 +fi

diff --git a/gcc-4.6.0/piepatch/11_all_gcc44_config.in.patch b/gcc-4.6.0/piepatch/11_all_gcc44_config.in.patch
index 3e49f03..489658f 100644
--- a/gcc-4.6.0/piepatch/11_all_gcc44_config.in.patch
+++ b/gcc-4.6.0/piepatch/11_all_gcc44_config.in.patch
@@ -1,6 +1,6 @@
-2010-05-24	Magnus Granberg		<zorry@gentoo.org>
+2011-12-05	Magnus Granberg		<zorry@gentoo.org>
 
-		* gcc/config.in	Add ENABLE_CRTBEGINTS and ENABLE_ESP
+		* gcc/config.in	Add ENABLE_CRTBEGINP and ENABLE_ESP
 
 --- gcc/config.in	2009-04-21 11:08:08.000000000 +0200
 +++ gcc/config.in	2009-05-12 00:10:08.000000000 +0200
@@ -8,9 +8,9 @@
  #endif
  
  
-+/* Define to 1 to enable crtbeginTS.o. */
++/* Define to 1 to enable crtbeginP.o. */
 +#ifndef USED_FOR_TARGET
-+#undef ENABLE_CRTBEGINTS
++#undef ENABLE_CRTBEGINP
 +#endif
 +
 +

diff --git a/gcc-4.6.0/piepatch/12_all_gcc45_Makefile.in.patch b/gcc-4.6.0/piepatch/12_all_gcc45_Makefile.in.patch
deleted file mode 100644
index 6700f50..0000000
--- a/gcc-4.6.0/piepatch/12_all_gcc45_Makefile.in.patch
+++ /dev/null
@@ -1,198 +0,0 @@
-2010-04-25	Magnus Granberg		<zorry@gentoo.org> Anthony G. Basile	<basile@opensource.dyc.edu>
-
-		* Makefile.in	We add -fno-stack-protector to BOOT_CFLAGS, LIBCFLAGS and LIBCXXFLAGS if enable_esp yes.
-		* gcc/Makefile.in	Add -fno-PIE and -fno-stack-protector.
-	    Libgcc2 doesn't compile with -fstack-protector.
-	    Crtstuff doesn't compile with -fPIE and -fstack-protector.
-		$(out_object_file): ix86_split_to_parts() stack smashing attack b.g.o #149292.
-		Add crtbeginTS.o to EXTRA_PARTS if enable_crtbeginTS yes
-		We add new file crtbeginTS.o if enable_crtbeginTS yes
-		* libgcc/Makefile.in	Add crtbeginTS.o to EXTRA_PARTS if enable_crtbeginTS yes
-		We add new file crtbeginTS.o if enable_crtbeginTS yes
- 
-2010-04-25	Magnus Granberg		<zorry@gentoo.org>,	Kees Cook	<kees@outflux.net>
-
-		LP #344502
-		* libmudflap/Makefiles.in	Add -fno-stack-protector -U_FORTIFY_SOURCE
-		to AM_CFLAGS ifdef enable_esp.
-
---- Makefile.in	2010-01-22 08:35:38.000000000 -0500
-+++ Makefile.in	2010-02-07 15:10:59.000000000 -0500
-@@ -350,9 +350,17 @@
- BUILD_PREFIX = @BUILD_PREFIX@
- BUILD_PREFIX_1 = @BUILD_PREFIX_1@
- 
-+# Some stuff don't compile with SSP
-+enable_esp = @enable_esp@
-+ifeq ($(enable_esp),yes)
-+ESP_NOSSP_CFLAGS = -fno-stack-protector
-+else
-+ESP_NOSSP_CFLAGS=
-+endif
-+
- # Flags to pass to stage2 and later makes.  They are defined
- # here so that they can be overridden by Makefile fragments.
--BOOT_CFLAGS= -g -O2
-+BOOT_CFLAGS= -g -O2 $(ESP_NOSSP_CFLAGS)
- BOOT_LDFLAGS=
- BOOT_ADAFLAGS=-gnatpg -gnata
- 
-@@ -397,9 +405,9 @@
- 
- CFLAGS = @CFLAGS@
- LDFLAGS = @LDFLAGS@
--LIBCFLAGS = $(CFLAGS)
-+LIBCFLAGS = $(CFLAGS) $(ESP_NOSSP_CFLAGS)
- CXXFLAGS = @CXXFLAGS@
--LIBCXXFLAGS = $(CXXFLAGS) -fno-implicit-templates
-+LIBCXXFLAGS = $(CXXFLAGS) -fno-implicit-templates $(ESP_NOSSP_CFLAGS)
- 
- TFLAGS =
- 
---- gcc/Makefile.in	2010-01-22 17:22:51.000000000 -0500
-+++ gcc/Makefile.in	2010-02-07 15:15:13.000000000 -0500
-@@ -629,13 +629,24 @@
- INHIBIT_LIBC_CFLAGS = -Dinhibit_libc
- endif
- 
-+# We don't want __stack_chk_fail in crt* and libgcc2.a.
-+# We don't want to compile crtbegin, crtend and crtbeginT with -fPIE.
-+enable_esp = @enable_esp@
-+ifeq ($(enable_esp),yes)
-+ESP_NOPIE_CFLAGS = -fno-PIE
-+ESP_NOSSP_CFLAGS = -fno-stack-protector
-+else
-+ESP_NOPIE_CFLAGS=
-+ESP_NOSSP_CFLAGS=
-+endif
-+
- # Options to use when compiling libgcc2.a.
- #
- LIBGCC2_DEBUG_CFLAGS = -g
- LIBGCC2_CFLAGS = -O2 $(LIBGCC2_INCLUDES) $(GCC_CFLAGS) $(TARGET_LIBGCC2_CFLAGS) \
- 		 $(LIBGCC2_DEBUG_CFLAGS) $(GTHREAD_FLAGS) \
- 		 -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED \
--		 $(INHIBIT_LIBC_CFLAGS)
-+		 $(INHIBIT_LIBC_CFLAGS) $(ESP_NOSSP_CFLAGS)
- 
- # Additional options to use when compiling libgcc2.a.
- # Some targets override this to -isystem include
-@@ -648,7 +659,7 @@
- CRTSTUFF_CFLAGS = -O2 $(GCC_CFLAGS) $(INCLUDES) $(MULTILIB_CFLAGS) -g0 \
-   -finhibit-size-directive -fno-inline -fno-exceptions \
-   -fno-zero-initialized-in-bss -fno-toplevel-reorder -fno-tree-vectorize \
--  $(INHIBIT_LIBC_CFLAGS)
-+  $(INHIBIT_LIBC_CFLAGS) $(ESP_NOSSP_CFLAGS)
- 
- # Additional sources to handle exceptions; overridden by targets as needed.
- LIB2ADDEH = $(srcdir)/unwind-dw2.c $(srcdir)/unwind-dw2-fde.c \
-@@ -678,6 +689,12 @@
- # The rules for compiling them should be in the t-* file for the machine.
- EXTRA_PARTS = @extra_parts@
- 
-+# We add crtbeginTS.o to the EXTRA_PARTS list if enable_crtbeginTS = yes
-+enable_crtbeginTS = @enable_crtbeginTS@
-+ifeq ($(enable_crtbeginTS),yes)
-+EXTRA_PARTS += crtbeginTS.o
-+endif
-+
- # List of extra object files that should be compiled and linked with
- # compiler proper (cc1, cc1obj, cc1plus).
- EXTRA_OBJS = @extra_objs@
-@@ -1856,9 +1873,10 @@
- 	echo LIBGCC_SYNC = '$(LIBGCC_SYNC)' >> tmp-libgcc.mvars
- 	echo LIBGCC_SYNC_CFLAGS = '$(LIBGCC_SYNC_CFLAGS)' >> tmp-libgcc.mvars
- 	echo CRTSTUFF_CFLAGS = '$(CRTSTUFF_CFLAGS)' >> tmp-libgcc.mvars
--	echo CRTSTUFF_T_CFLAGS = '$(CRTSTUFF_T_CFLAGS)' >> tmp-libgcc.mvars
-+	echo CRTSTUFF_T_CFLAGS = '$(CRTSTUFF_T_CFLAGS) $(ESP_NOPIE_CFLAGS)' >> tmp-libgcc.mvars
- 	echo CRTSTUFF_T_CFLAGS_S = '$(CRTSTUFF_T_CFLAGS_S)' >> tmp-libgcc.mvars
- 	echo TARGET_SYSTEM_ROOT = '$(TARGET_SYSTEM_ROOT)' >> tmp-libgcc.mvars
-+	echo enable_crtbeginTS = '$(enable_crtbeginTS)' >> tmp-libgcc.mvars
- 
- 	mv tmp-libgcc.mvars libgcc.mvars
- 
-@@ -1892,12 +1910,14 @@
- $(T)crtbegin.o: crtstuff.c $(GCC_PASSES) $(TCONFIG_H) auto-host.h \
-   gbl-ctors.h stmp-int-hdrs tsystem.h coretypes.h $(TM_H)
- 	$(GCC_FOR_TARGET) $(CRTSTUFF_CFLAGS) $(CRTSTUFF_T_CFLAGS) \
-+	$(ESP_NOPIE_CFLAGS) \
- 	  -c $(srcdir)/crtstuff.c -DCRT_BEGIN \
- 	  -o $(T)crtbegin$(objext)
- 
- $(T)crtend.o: crtstuff.c $(GCC_PASSES) $(TCONFIG_H) auto-host.h \
-   gbl-ctors.h stmp-int-hdrs tsystem.h coretypes.h $(TM_H)
- 	$(GCC_FOR_TARGET) $(CRTSTUFF_CFLAGS) $(CRTSTUFF_T_CFLAGS) \
-+	$(ESP_NOPIE_CFLAGS) \
- 	  -c $(srcdir)/crtstuff.c -DCRT_END \
- 	  -o $(T)crtend$(objext)
- 
-@@ -1918,9 +1938,19 @@
- $(T)crtbeginT.o: crtstuff.c $(GCC_PASSES) $(TCONFIG_H) auto-host.h \
-   gbl-ctors.h stmp-int-hdrs tsystem.h coretypes.h $(TM_H)
- 	$(GCC_FOR_TARGET) $(CRTSTUFF_CFLAGS) $(CRTSTUFF_T_CFLAGS) \
-+	$(ESP_NOPIE_CFLAGS) \
- 	  -c $(srcdir)/crtstuff.c -DCRT_BEGIN -DCRTSTUFFT_O \
- 	  -o $(T)crtbeginT$(objext)
- 
-+# This is a version of crtbegin for -static -fPIE links if esp is enable.
-+ifeq ($(enable_crtbeginTS),yes)
-+$(T)crtbeginTS.o: crtstuff.c $(GCC_PASSES) $(TCONFIG_H) auto-host.h \
-+  gbl-ctors.h stmp-int-hdrs tsystem.h coretypes.h $(TM_H)
-+	$(GCC_FOR_TARGET) $(CRTSTUFF_CFLAGS) $(CRTSTUFF_T_CFLAGS_S) \
-+	  -c $(srcdir)/crtstuff.c -DCRT_BEGIN -DCRTSTUFFT_O -DCRTSTUFFS_O \
-+	  -o $(T)crtbeginTS$(objext)
-+endif
-+
- # Compile the start modules crt0.o and mcrt0.o that are linked with
- # every program
- $(T)crt0.o: s-crt0 ; @true
---- libgcc/Makefile.in	2009-07-30 18:33:49.000000000 -0400
-+++ libgcc/Makefile.in	2010-02-07 15:10:59.000000000 -0500
-@@ -291,6 +291,12 @@
- gen-hide-list = echo > \$@
- endif
- 
-+# We add crtbeginTS.o to the EXTRA_PARTS list if enable_crtbeginTS = yes
-+enable_libgcc_crtbeginTS = $(enable_crtbeginTS)
-+ifeq ($(enable_libgcc_crtbeginTS),yes)
-+EXTRA_PARTS += crtbeginTS.o
-+endif
-+
- ifneq ($(EXTRA_PARTS),)
-   extra-parts = libgcc-extra-parts
-   INSTALL_PARTS = $(EXTRA_PARTS)
-@@ -842,6 +848,13 @@
- crtbeginT.o: $(gcc_srcdir)/crtstuff.c
- 	$(crt_compile) $(CRTSTUFF_T_CFLAGS) \
- 	  -c $(gcc_srcdir)/crtstuff.c -DCRT_BEGIN -DCRTSTUFFT_O
-+
-+# This is a version of crtbegin for -static -fPIE links.
-+ifeq ($(enable_libgcc_crtbeginTS),yes)
-+crtbeginTS.o: $(gcc_srcdir)/crtstuff.c
-+	$(crt_compile) $(CRTSTUFF_T_CFLAGS_S) \
-+	  -c $(gcc_srcdir)/crtstuff.c -DCRT_BEGIN -DCRTSTUFFT_O -DCRTSTUFFS_O
-+endif
- endif
- 
- # Build extra startfiles in the libgcc directory.
---- libmudflap/Makefile.in	2009-12-05 12:18:53.000000000 -0500
-+++ libmudflap/Makefile.in	2010-02-07 15:10:59.000000000 -0500
-@@ -253,9 +253,17 @@
- MAINT_CHARSET = latin1
- SUBDIRS = testsuite
- 
-+# Some stuff don't compile with SSP and FORTIFY_SOURCE
-+enable_esp = @enable_esp@
-+ifeq ($(enable_esp),yes)
-+	NO_ESP_CFLAGS = -fno-stack-protector -U_FORTIFY_SOURCE
-+else
-+	NO_ESP_CFLAGS =
-+endif
-+
- # May be used by various substitution variables.
- gcc_version := $(shell cat $(top_srcdir)/../gcc/BASE-VER)
--AM_CFLAGS = -Wall $(SECTION_FLAGS)
-+AM_CFLAGS = -Wall $(SECTION_FLAGS) $(NO_ESP_CFLAGS)
- @LIBMUDFLAPTH_FALSE@libmudflapth = 
- @LIBMUDFLAPTH_TRUE@libmudflapth = libmudflapth.la
- toolexeclib_LTLIBRARIES = libmudflap.la $(libmudflapth)

diff --git a/gcc-4.6.0/piepatch/12_all_gcc46_Makefile.in.patch b/gcc-4.6.0/piepatch/12_all_gcc46_Makefile.in.patch
index b17c0be..5145a25 100644
--- a/gcc-4.6.0/piepatch/12_all_gcc46_Makefile.in.patch
+++ b/gcc-4.6.0/piepatch/12_all_gcc46_Makefile.in.patch
@@ -1,11 +1,13 @@
-2011-01-01	Magnus Granberg		<zorry@gentoo.org> Anthony G. Basile	<basile@opensource.dyc.edu>
+2011-12-05	Magnus Granberg		<zorry@gentoo.org> Anthony G. Basile	<basile@opensource.dyc.edu>
 
-		* Makefile.in	We add -fno-stack-protector to BOOT_CFLAGS, LIBCFLAGS and LIBCXXFLAGS if enable_esp yes.
-		* gcc/Makefile.in	Add -fno-PIE. to CRTSTUFF_CFLAGS and ALL_CFLAGS if enable_esp yes
-		Add crtbeginTS.o to EXTRA_PARTS if enable_crtbeginTS yes
-		We add new file crtbeginTS.o if enable_crtbeginTS yes
-		* libgcc/Makefile.in	Add crtbeginTS.o to EXTRA_PARTS if enable_crtbeginTS yes
-		We add new file crtbeginTS.o if enable_crtbeginTS yes
+		* Makefile.in	We add -fno-stack-protector to BOOT_CFLAGS, LIBCFLAGS and
+			LIBCXXFLAGS if enable_esp yes.
+		* gcc/Makefile.in	Add -fno-PIE. to CRTSTUFF_CFLAGS, ALL_CFLAGS and
+			ALL_CXXFLAGS if enable_esp yes
+			Add crtbeginP.o to EXTRA_PARTS if enable_crtbeginP yes
+			We add new file crtbeginP.o if enable_crtbeginP yes
+		* libgcc/Makefile.in	Add crtbeginP.o to EXTRA_PARTS if enable_crtbeginP yes
+			We add new file crtbeginP.o if enable_crtbeginP yes
 
 --- Makefile.in	2010-01-22 08:35:38.000000000 -0500
 +++ Makefile.in	2010-02-07 15:10:59.000000000 -0500
@@ -70,16 +72,16 @@
  # The rules for compiling them should be in the t-* file for the machine.
  EXTRA_PARTS = @extra_parts@
  
-+# We add crtbeginTS.o to the EXTRA_PARTS list if enable_crtbeginTS = yes
-+enable_crtbeginTS = @enable_crtbeginTS@
-+ifeq ($(enable_crtbeginTS),yes)
-+EXTRA_PARTS += crtbeginTS.o
++# We add crtbeginP.o to the EXTRA_PARTS list if enable_crtbeginP = yes
++enable_crtbeginP = @enable_crtbeginP@
++ifeq ($(enable_crtbeginP),yes)
++EXTRA_PARTS += crtbeginP.o
 +endif
 +
  # List of extra object files that should be compiled and linked with
  # compiler proper (cc1, cc1obj, cc1plus).
  EXTRA_OBJS = @extra_objs@
-@@ -998,7 +1006,7 @@
+@@ -1002,12 +1010,12 @@
  
  # This is the variable actually used when we compile. If you change this,
  # you probably want to update BUILD_CFLAGS in configure.ac
@@ -88,6 +90,13 @@
    $(CFLAGS) $(INTERNAL_CFLAGS) $(COVERAGE_FLAGS) $(WARN_CFLAGS) @DEFS@
  
  # The C++ version.
+-ALL_CXXFLAGS = $(T_CFLAGS) $(CXXFLAGS) $(INTERNAL_CFLAGS) \
+-  $(COVERAGE_FLAGS) $(WARN_CXXFLAGS) @DEFS@
++ALL_CXXFLAGS = $(ESP_NOPIE_CFLAGS) $(T_CFLAGS) $(CXXFLAGS) \
++  $(INTERNAL_CFLAGS) $(COVERAGE_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
 @@ -1856,9 +1873,10 @@
  	echo LIBGCC_SYNC = '$(LIBGCC_SYNC)' >> tmp-libgcc.mvars
  	echo LIBGCC_SYNC_CFLAGS = '$(LIBGCC_SYNC_CFLAGS)' >> tmp-libgcc.mvars
@@ -96,7 +105,7 @@
 +	echo CRTSTUFF_T_CFLAGS = '$(CRTSTUFF_T_CFLAGS) $(ESP_NOPIE_CFLAGS)' >> tmp-libgcc.mvars
  	echo CRTSTUFF_T_CFLAGS_S = '$(CRTSTUFF_T_CFLAGS_S)' >> tmp-libgcc.mvars
  	echo TARGET_SYSTEM_ROOT = '$(TARGET_SYSTEM_ROOT)' >> tmp-libgcc.mvars
-+	echo enable_crtbeginTS = '$(enable_crtbeginTS)' >> tmp-libgcc.mvars
++	echo enable_crtbeginP = '$(enable_crtbeginP)' >> tmp-libgcc.mvars
  
  	mv tmp-libgcc.mvars libgcc.mvars
  
@@ -109,12 +118,12 @@
  	  -o $(T)crtbeginT$(objext)
  
 +# This is a version of crtbegin for -static -fPIE links if esp is enable.
-+ifeq ($(enable_crtbeginTS),yes)
-+$(T)crtbeginTS.o: crtstuff.c $(GCC_PASSES) $(TCONFIG_H) auto-host.h \
++ifeq ($(enable_crtbeginP),yes)
++$(T)crtbeginP.o: crtstuff.c $(GCC_PASSES) $(TCONFIG_H) auto-host.h \
 +  gbl-ctors.h stmp-int-hdrs tsystem.h coretypes.h $(TM_H)
 +	$(GCC_FOR_TARGET) $(CRTSTUFF_CFLAGS) $(CRTSTUFF_T_CFLAGS_S) \
 +	  -c $(srcdir)/crtstuff.c -DCRT_BEGIN -DCRTSTUFFT_O -DCRTSTUFFS_O \
-+	  -o $(T)crtbeginTS$(objext)
++	  -o $(T)crtbeginP$(objext)
 +endif
 +
  # Compile the start modules crt0.o and mcrt0.o that are linked with
@@ -126,10 +135,10 @@
  gen-hide-list = echo > \$@
  endif
  
-+# We add crtbeginTS.o to the EXTRA_PARTS list if enable_crtbeginTS = yes
-+enable_libgcc_crtbeginTS = $(enable_crtbeginTS)
-+ifeq ($(enable_libgcc_crtbeginTS),yes)
-+EXTRA_PARTS += crtbeginTS.o
++# We add crtbeginP.o to the EXTRA_PARTS list if enable_crtbeginP = yes
++enable_libgcc_crtbeginP = $(enable_crtbeginP)
++ifeq ($(enable_libgcc_crtbeginP),yes)
++EXTRA_PARTS += crtbeginP.o
 +endif
 +
  ifneq ($(EXTRA_PARTS),)
@@ -141,8 +150,8 @@
  	  -c $(gcc_srcdir)/crtstuff.c -DCRT_BEGIN -DCRTSTUFFT_O
 +
 +# This is a version of crtbegin for -static -fPIE links.
-+ifeq ($(enable_libgcc_crtbeginTS),yes)
-+crtbeginTS.o: $(gcc_srcdir)/crtstuff.c
++ifeq ($(enable_libgcc_crtbeginP),yes)
++crtbeginP.o: $(gcc_srcdir)/crtstuff.c
 +	$(crt_compile) $(CRTSTUFF_T_CFLAGS_S) \
 +	  -c $(gcc_srcdir)/crtstuff.c -DCRT_BEGIN -DCRTSTUFFT_O -DCRTSTUFFS_O
 +endif

diff --git a/gcc-4.6.0/piepatch/20_all_gcc45_gcc.c.patch b/gcc-4.6.0/piepatch/20_all_gcc45_gcc.c.patch
deleted file mode 100644
index 714f3d4..0000000
--- a/gcc-4.6.0/piepatch/20_all_gcc45_gcc.c.patch
+++ /dev/null
@@ -1,130 +0,0 @@
-2010-05-26	Magnus Granberg		<zorry@gentoo.org>, Anthony G. Basile	<basile@opensource.dyc.edu>
-
-		* gcc/gcc.c								include esp.h
-		static const char *cc1_spec 			We set that in esp.h if ENABLE_ESP.
-		#ifdef EXTRA_SPECS:						Add ESP_EXTRA_SPECS
-		main():									Add do_self_spec esp_command_options_spec()
-
-2009-06-27	Matthias Klose		<doko@ubuntu.com>, Kees Cook	<kees@outflux.net>,
-			Anthony G. Basile	<basile@opensource.dyc.edu>
-
-		LP #346126
-		* gcc/gcc.c		*cpp_options			Add %(esp_cpp_options)
-		
-		* gcc/gcc.c		default_compilers[]		Add %(esp_options)
-		*cpp_unique_options						Add %(esp_cpp_unique_options)
-
---- gcc/gcc.c	2010-01-21 10:29:30.000000000 -0500
-+++ gcc/gcc.c	2010-01-29 23:29:16.000000000 -0500
-@@ -84,6 +84,7 @@
- #include "gcc.h"
- #include "flags.h"
- #include "opts.h"
-+#include "esp.h" /* for --enable-esp support */
- 
- #ifdef HAVE_MMAP_FILE
- # include <sys/mman.h>
-@@ -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;
-+#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;
-@@ -885,7 +888,7 @@
- static const char *cpp_options =
- "%(cpp_unique_options) %1 %{m*} %{std*&ansi&trigraphs} %{W*&pedantic*} %{w}\
-  %{f*} %{g*:%{!g0:%{g*} %{!fno-working-directory:-fworking-directory}}} %{O*}\
-- %{undef} %{save-temps*:-fpch-preprocess}";
-+ %{undef} %{save-temps*:-fpch-preprocess} %(esp_cpp_options)";
- 
- /* This contains cpp options which are not passed when the preprocessor
-    output will be used by another program.  */
-@@ -1075,15 +1081,15 @@
- 	  %{save-temps*|traditional-cpp|no-integrated-cpp:%(trad_capable_cpp) \
- 		%(cpp_options) -o %{save-temps*:%b.i} %{!save-temps*:%g.i} \n\
- 		    cc1 -fpreprocessed %{save-temps*:%b.i} %{!save-temps*:%g.i} \
--			%(cc1_options)}\
-+			%(cc1_options) %(esp_options)}\
- 	  %{!save-temps*:%{!traditional-cpp:%{!no-integrated-cpp:\
--		cc1 %(cpp_unique_options) %(cc1_options)}}}\
-+		cc1 %(cpp_unique_options) %(cc1_options) %(esp_options)}}}\
-           %{!fsyntax-only:%(invoke_as)}} \
-       %{combine:\
- 	  %{save-temps*|traditional-cpp|no-integrated-cpp:%(trad_capable_cpp) \
- 		%(cpp_options) -o %{save-temps*:%b.i} %{!save-temps*:%g.i}}\
- 	  %{!save-temps*:%{!traditional-cpp:%{!no-integrated-cpp:\
--		cc1 %(cpp_unique_options) %(cc1_options)}}\
-+		cc1 %(cpp_unique_options) %(cc1_options) %(esp_options)}}\
-                 %{!fsyntax-only:%(invoke_as)}}}}}}", 0, 1, 1},
-   {"-",
-    "%{!E:%e-E or -x required when input is from standard input}\
-@@ -1106,7 +1112,7 @@
-                     %W{o*:--output-pch=%*}%V}}}}}}", 0, 0, 0},
-   {".i", "@cpp-output", 0, 1, 0},
-   {"@cpp-output",
--   "%{!M:%{!MM:%{!E:cc1 -fpreprocessed %i %(cc1_options) %{!fsyntax-only:%(invoke_as)}}}}", 0, 1, 0},
-+   "%{!M:%{!MM:%{!E:cc1 -fpreprocessed %i %(cc1_options) %(esp_options) %{!fsyntax-only:%(invoke_as)}}}}", 0, 1, 0},
-   {".s", "@assembler", 0, 1, 0},
-   {"@assembler",
-    "%{!M:%{!MM:%{!E:%{!S:as %(asm_debug) %(asm_options) %i %A }}}}", 0, 1, 0},
-@@ -1699,18 +1705,23 @@
-   INIT_STATIC_SPEC ("sysroot_hdrs_suffix_spec",	&sysroot_hdrs_suffix_spec),
- };
- 
--#ifdef EXTRA_SPECS		/* additional specs needed */
-+/* EXTRA_SPECS needs to be defined  */
-+#ifndef EXTRA_SPECS
-+#define EXTRA_SPECS
-+#endif
-+
-+/* EXTRA_SPECS and ESP_EXTRA_SPECS add additional specs */
- /* Structure to keep track of just the first two args of a spec_list.
--   That is all that the EXTRA_SPECS macro gives us.  */
-+   That is all that the EXTRA_SPECS and ESP_EXTRA_SPECS macro gives us.  */
- struct spec_list_1
- {
-   const char *const name;
-   const char *const ptr;
- };
- 
--static const struct spec_list_1 extra_specs_1[] = { EXTRA_SPECS };
-+/* ESP_EXTRA_SPECS before EXTRA_SPECS  */
-+static const struct spec_list_1 extra_specs_1[] = { ESP_EXTRA_SPECS, EXTRA_SPECS };
- static struct spec_list *extra_specs = (struct spec_list *) 0;
--#endif
- 
- /* List of dynamically allocates specs that have been defined so far.  */
- 
-@@ -1798,7 +1809,6 @@
-   if (verbose_flag)
-     notice ("Using built-in specs.\n");
- 
--#ifdef EXTRA_SPECS
-   extra_specs = XCNEWVEC (struct spec_list, ARRAY_SIZE (extra_specs_1));
- 
-   for (i = ARRAY_SIZE (extra_specs_1) - 1; i >= 0; i--)
-@@ -1811,7 +1821,6 @@
-       sl->ptr_spec = &sl->ptr;
-       next = sl;
-     }
--#endif
- 
-   for (i = ARRAY_SIZE (static_specs) - 1; i >= 0; i--)
-     {
-@@ -7096,6 +7123,12 @@
-     gcc_exec_prefix = concat (gcc_exec_prefix, spec_machine, dir_separator_str,
- 			      spec_version, dir_separator_str, NULL);
- 
-+#ifdef ENABLE_ESP
-+  /* Process ESP_COMMAND_OPTIONS_SPEC, adding any new options to the end
-+     of the command line.  */
-+  do_self_spec (esp_command_options_spec);
-+#endif
-+
-   /* Now we have the specs.
-      Set the `valid' bits for switches that match anything in any spec.  */
- 

diff --git a/gcc-4.6.0/piepatch/30_all_gcc44_esp.h.patch b/gcc-4.6.0/piepatch/30_all_gcc44_esp.h.patch
index df3c2bc..c51e8b4 100644
--- a/gcc-4.6.0/piepatch/30_all_gcc44_esp.h.patch
+++ b/gcc-4.6.0/piepatch/30_all_gcc44_esp.h.patch
@@ -1,13 +1,13 @@
-2010-05-27		Magnus Granberg		<zorry@gentoo.org>
+2011-12-05		Magnus Granberg		<zorry@gentoo.org>
 
 		* gcc/esp.h	New file to support --enable-esp
-		Version 20100527.1
+		Version 20111205.1
 
 --- gcc/esp.h	2010-04-09 16:14:00.000000000 +0200
 +++ gcc/esp.h	2010-04-29 21:30:47.000000000 +0200
 @@ -0,0 +1,145 @@
 +/* License terms see GNU GENERAL PUBLIC LICENSE Version 3.
-+ * Version 20100527.1
++ * Version 20111205.1
 + * Magnus Granberg (Zorry) <zorry@gentoo.org>  */
 +#ifndef GCC_ESP_H
 +#define GCC_ESP_H
@@ -21,7 +21,7 @@
 +	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_CRTBEGINTS add support for crtbeginTS.o, build -static with -fPIE or -fpie.
++	ENABLE_CRTBEGINP add support for crtbeginP.o, build -static with -fPIE or -fpie.
 +*/
 +#ifdef ENABLE_ESP
 +	
@@ -70,8 +70,8 @@
 +
 +		/*  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_CRTBEGINTS we don't need to check for -static  */
-+		#ifdef ENABLE_CRTBEGINTS
++		/*  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}} } }}}} }}}} }"
@@ -83,9 +83,9 @@
 +
 +		/*  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_CRTBEGINTS we don't need to check for -static
++		/*  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_CRTBEGINTS
++		#ifdef ENABLE_CRTBEGINP
 +			#define ESP_LINK_PIE_SPEC \
 +				"%{!pie:%{!A:%{!fno-pie:%{!fno-PIE:%{!fno-pic:%{!fno-PIC:%{!shared:%{!r: \
 +				%{!nostdlib:%{!nostartfiles:-pie}}}}}}}}}}"
@@ -97,8 +97,8 @@
 +		
 +		/*  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_CRTBEGINTS we don't need to check for -static  */
-+		#ifdef ENABLE_CRTBEGINTS
++		/*  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
@@ -107,7 +107,7 @@
 +		#endif
 +
 +		/*  We don't pass -pie to the linker when -static.  */
-+		#ifdef ENABLE_CRTBEGINTS
++		#ifdef ENABLE_CRTBEGINP
 +			#define LINK_PIE_SPEC "%{!static:%{pie:-pie}} %(esp_link)"
 +		#else
 +			#define LINK_PIE_SPEC "%{pie:-pie} %(esp_link)"

diff --git a/gcc-4.6.0/piepatch/33_all_gcc45_config_rs6000_linux64.h.patch b/gcc-4.6.0/piepatch/33_all_gcc45_config_rs6000_linux64.h.patch
deleted file mode 100644
index b1271c2..0000000
--- a/gcc-4.6.0/piepatch/33_all_gcc45_config_rs6000_linux64.h.patch
+++ /dev/null
@@ -1,16 +0,0 @@
-2010-04-25		Peter S. Mazinger	<ps.m@gmx.net>, Magnus Granberg		<zorry@gentoo.org>
-
-		* gcc/config/rs6000/linux64.h	ASM_SPEC32 Change %{fpic:-K PIC} %{fPIC:-K PIC}
-		to %{fpic|fPIC|fpie|fPIE:-K PIC}
-
---- gcc/config/rs6000/linux64.h.psm	2009-04-10 01:23:07.000000000 +0200
-+++ gcc/config/rs6000/linux64.h	2009-09-23 12:34:26.000000000 +0200
-@@ -162,7 +162,7 @@
- #endif
- 
- #define ASM_SPEC32 "-a32 %{n} %{T} %{Ym,*} %{Yd,*} \
--%{mrelocatable} %{mrelocatable-lib} %{fpic:-K PIC} %{fPIC:-K PIC} \
-+%{mrelocatable} %{mrelocatable-lib} %{fpic|fPIC|fpie|fPIE:-K PIC} \
- %{memb} %{!memb: %{msdata=eabi: -memb}} \
- %{!mlittle: %{!mlittle-endian: %{!mbig: %{!mbig-endian: \
-     %{mcall-freebsd: -mbig} \

diff --git a/gcc-4.6.0/piepatch/35_all_gcc44_config_crtbegints.patch b/gcc-4.6.0/piepatch/35_all_gcc44_config_crtbegints.patch
deleted file mode 100644
index 8f43a87..0000000
--- a/gcc-4.6.0/piepatch/35_all_gcc44_config_crtbegints.patch
+++ /dev/null
@@ -1,36 +0,0 @@
-2010-06-18		Magnus Granberg		<zorry@gentoo.org>
-
-		* gcc/config/linux.h			If ENABLE_CRTBEGINTS, -static and -pie use crtbegineTS.o.
-		* gcc/config/rs6000/sysv4.h		If ENABLE_CRTBEGINTS, -static and -pie use crtbegineTS.o.
-
---- gcc/config/linux.h	2009-04-10 01:23:07.000000000 +0200
-+++ gcc/config/linux.h	2009-09-08 04:08:06.000000000 +0200
-@@ -43,7 +43,11 @@
-    object constructed before entering `main'.  */
-    
- #undef	STARTFILE_SPEC
--#if defined HAVE_LD_PIE
-+#if defined (HAVE_LD_PIE) && defined (ENABLE_CRTBEGINTS)
-+#define STARTFILE_SPEC \
-+  "%{!shared: %{pg|p|profile:gcrt1.o%s;pie:Scrt1.o%s;:crt1.o%s}} crti.o%s \
-+   %{static:%{pie:crtbeginTS.o%s;:crtbeginT.o%s}} %{!static:%{shared|pie:crtbeginS.o%s;:crtbegin.o%s}}"
-+#elif defined (HAVE_LD_PIE) && ! defined (ENABLE_CRTBEGINTS)
- #define 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_CRTBEGINTS)
-+#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:crtbeginTS.o%s;:crtbeginT.o%s}} %{!static:%{shared|pie:crtbeginS.o%s;:crtbegin.o%s}}"
-+#elif defined (HAVE_LD_PIE) && ! defined (ENABLE_CRTBEGINTS)
- #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} \

diff --git a/gcc-4.6.0/piepatch/35_all_gcc46_config_crtbegints.patch b/gcc-4.6.0/piepatch/35_all_gcc46_config_crtbeginp.patch
similarity index 65%
rename from gcc-4.6.0/piepatch/35_all_gcc46_config_crtbegints.patch
rename to gcc-4.6.0/piepatch/35_all_gcc46_config_crtbeginp.patch
index 7392252..0e716b0 100644
--- a/gcc-4.6.0/piepatch/35_all_gcc46_config_crtbegints.patch
+++ b/gcc-4.6.0/piepatch/35_all_gcc46_config_crtbeginp.patch
@@ -1,7 +1,7 @@
 2011-03-05		Magnus Granberg		<zorry@gentoo.org>
 
-		* gcc/config/gnu-user.h			If ENABLE_CRTBEGINTS, -static and -pie use crtbegineTS.o.
-		* gcc/config/rs6000/sysv4.h		If ENABLE_CRTBEGINTS, -static and -pie use crtbegineTS.o.
+		* 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	2009-04-10 01:23:07.000000000 +0200
 +++ gcc/config/gnu-user.h	2009-09-08 04:08:06.000000000 +0200
@@ -10,11 +10,11 @@
     object constructed before entering `main'.  */
     
 -#if defined HAVE_LD_PIE
-+#if defined (HAVE_LD_PIE) && defined (ENABLE_CRTBEGINTS)
++#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:crtbeginTS.o%s;:crtbeginT.o%s}} %{!static:%{shared|pie:crtbeginS.o%s;:crtbegin.o%s}}"
-+#elif defined (HAVE_LD_PIE) && ! defined (ENABLE_CRTBEGINTS)
++   %{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 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}"
@@ -25,12 +25,12 @@
  %{!shared: %{profile:-lc_p} %{!profile:-lc}}}"
  
 -#ifdef HAVE_LD_PIE
-+#if defined (HAVE_LD_PIE) && defined (ENABLE_CRTBEGINTS)
++#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:crtbeginTS.o%s;:crtbeginT.o%s}} %{!static:%{shared|pie:crtbeginS.o%s;:crtbegin.o%s}}"
-+#elif defined (HAVE_LD_PIE) && ! defined (ENABLE_CRTBEGINTS)
++%{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} \

diff --git a/gcc-4.6.0/piepatch/40_all_gcc44_cp_lang-specs.h.patch b/gcc-4.6.0/piepatch/40_all_gcc44_cp_lang-specs.h.patch
deleted file mode 100644
index 091f443..0000000
--- a/gcc-4.6.0/piepatch/40_all_gcc44_cp_lang-specs.h.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-2009-06-18	Matthias Klose		<doko@ubuntu.com>, Kees Cook	<kees@outflux.net>
-
-		LP #346126
-		* gcc/cp/lang-specs.h	compiler spec	Add %(esp_options).
-
---- gcc/cp/lang-specs.h.orig	2009-03-23 01:21:54.000000000 +0100
-+++ gcc/cp/lang-specs.h	2009-03-23 01:22:16.000000000 +0100
-@@ -47,7 +47,7 @@
- 		%(cpp_options) %2 -o %{save-temps:%b.ii} %{!save-temps:%g.ii} \n}\
-       cc1plus %{save-temps|no-integrated-cpp:-fpreprocessed %{save-temps:%b.ii} %{!save-temps:%g.ii}}\
- 	      %{!save-temps:%{!no-integrated-cpp:%(cpp_unique_options)}}\
--	%(cc1_options) %2 %{+e1*}\
-+	%(cc1_options) %(esp_options) %2 %{+e1*}\
- 	%{!fsyntax-only:-o %g.s %{!o*:--output-pch=%i.gch} %W{o*:--output-pch=%*}%V}}}}",
-      CPLUSPLUS_CPP_SPEC, 0, 0},
-   {"@c++",
-@@ -57,11 +57,11 @@
- 		%(cpp_options) %2 -o %{save-temps:%b.ii} %{!save-temps:%g.ii} \n}\
-       cc1plus %{save-temps|no-integrated-cpp:-fpreprocessed %{save-temps:%b.ii} %{!save-temps:%g.ii}}\
- 	      %{!save-temps:%{!no-integrated-cpp:%(cpp_unique_options)}}\
--	%(cc1_options) %2 %{+e1*}\
-+	%(cc1_options) %(esp_options) %2 %{+e1*}\
-        %{!fsyntax-only:%(invoke_as)}}}}",
-      CPLUSPLUS_CPP_SPEC, 0, 0},
-   {".ii", "@c++-cpp-output", 0, 0, 0},
-   {"@c++-cpp-output",
-    "%{!M:%{!MM:%{!E:\
--    cc1plus -fpreprocessed %i %(cc1_options) %2 %{+e*}\
-+    cc1plus -fpreprocessed %i %(cc1_options) %(esp_options) %2 %{+e*}\
-     %{!fsyntax-only:%(invoke_as)}}}}", 0, 0, 0},

diff --git a/gcc-4.6.0/piepatch/41_all_gcc44_objc_lang-specs.h.patch b/gcc-4.6.0/piepatch/41_all_gcc44_objc_lang-specs.h.patch
deleted file mode 100644
index 418217e..0000000
--- a/gcc-4.6.0/piepatch/41_all_gcc44_objc_lang-specs.h.patch
+++ /dev/null
@@ -1,37 +0,0 @@
-2009-06-18	Matthias Klose		<doko@ubuntu.com>,	Kees Cook	<kees@outflux.net>
-
-		LP #346126
-		* gcc/objc/lang-specs.h		compiler spec	Add %(esp_options).
-
---- gcc/objc/lang-specs.h	2009-03-23 01:21:54.000000000 +0100
-+++ gcc/objc/lang-specs.h	2009-03-23 01:22:16.000000000 +0100
-@@ -30,13 +30,13 @@
- 	%{traditional|ftraditional|traditional-cpp:\
- %eGNU Objective C no longer supports traditional compilation}\
- 	%{save-temps|no-integrated-cpp:cc1obj -E %(cpp_options) -o %{save-temps:%b.mi} %{!save-temps:%g.mi} \n\
--	    cc1obj -fpreprocessed %{save-temps:%b.mi} %{!save-temps:%g.mi} %(cc1_options) %{print-objc-runtime-info} %{gen-decls}}\
-+	    cc1obj -fpreprocessed %{save-temps:%b.mi} %{!save-temps:%g.mi} %(cc1_options) %(esp_options) %{print-objc-runtime-info} %{gen-decls}}\
- 	%{!save-temps:%{!no-integrated-cpp:\
--	    cc1obj %(cpp_unique_options) %(cc1_options) %{print-objc-runtime-info} %{gen-decls}}}\
-+	    cc1obj %(cpp_unique_options) %(cc1_options) %(esp_options) %{print-objc-runtime-info} %{gen-decls}}}\
-         %{!fsyntax-only:%(invoke_as)}}}}", 0, 0, 0},
-   {".mi", "@objc-cpp-output", 0, 0, 0},
-   {"@objc-cpp-output",
--     "%{!M:%{!MM:%{!E:cc1obj -fpreprocessed %i %(cc1_options) %{print-objc-runtime-info} %{gen-decls}\
-+     "%{!M:%{!MM:%{!E:cc1obj -fpreprocessed %i %(cc1_options) %(esp_options) %{print-objc-runtime-info} %{gen-decls}\
- 			     %{!fsyntax-only:%(invoke_as)}}}}", 0, 0, 0},
-   {"@objective-c-header",
-      "%{E|M|MM:cc1obj -E %{traditional|ftraditional|traditional-cpp:-traditional-cpp}\
-@@ -45,10 +45,10 @@
- 	%{traditional|ftraditional|traditional-cpp:\
- %eGNU Objective C no longer supports traditional compilation}\
- 	%{save-temps|no-integrated-cpp:cc1obj -E %(cpp_options) -o %{save-temps:%b.mi} %{!save-temps:%g.mi} \n\
--	    cc1obj -fpreprocessed %b.mi %(cc1_options) %{print-objc-runtime-info} %{gen-decls}\
-+	    cc1obj -fpreprocessed %b.mi %(cc1_options) %(esp_options) %{print-objc-runtime-info} %{gen-decls}\
-                         -o %g.s %{!o*:--output-pch=%i.gch}\
-                         %W{o*:--output-pch=%*}%V}\
- 	%{!save-temps:%{!no-integrated-cpp:\
--	    cc1obj %(cpp_unique_options) %(cc1_options) %{print-objc-runtime-info} %{gen-decls}\
-+	    cc1obj %(cpp_unique_options) %(cc1_options) %(esp_options) %{print-objc-runtime-info} %{gen-decls}\
-                         -o %g.s %{!o*:--output-pch=%i.gch}\
-                         %W{o*:--output-pch=%*}%V}}}}}", 0, 0, 0},

diff --git a/gcc-4.6.0/piepatch/42_all_gcc44_objcp_lang-specs.h.patch b/gcc-4.6.0/piepatch/42_all_gcc44_objcp_lang-specs.h.patch
deleted file mode 100644
index 50ab607..0000000
--- a/gcc-4.6.0/piepatch/42_all_gcc44_objcp_lang-specs.h.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-2009-06-18	Matthias Klose		<doko@ubuntu.com>,	Kees Cook	<kees@outflux.net>
-
-		LP #346126
-		* gcc/objcp/lang-specs.h	compiler spec	Add %(esp_options).
-
---- gcc/objcp/lang-specs.h	2009-03-23 01:21:54.000000000 +0100
-+++ gcc/objcp/lang-specs.h	2009-03-23 01:22:16.000000000 +0100
-@@ -36,7 +36,7 @@
- 		%(cpp_options) %2 -o %{save-temps:%b.mii} %{!save-temps:%g.mii} \n}\
-       cc1objplus %{save-temps|no-integrated-cpp:-fpreprocessed %{save-temps:%b.mii} %{!save-temps:%g.mii}}\
- 	      %{!save-temps:%{!no-integrated-cpp:%(cpp_unique_options)}}\
--	%(cc1_options) %2 %{+e1*}\
-+	%(cc1_options) %(esp_options) %2 %{+e1*}\
-         -o %g.s %{!o*:--output-pch=%i.gch} %W{o*:--output-pch=%*}%V}}}",
-      CPLUSPLUS_CPP_SPEC, 0, 0},
-   {"@objective-c++",
-@@ -46,15 +46,15 @@
- 		%(cpp_options) %2 -o %{save-temps:%b.mii} %{!save-temps:%g.mii} \n}\
-       cc1objplus %{save-temps|no-integrated-cpp:-fpreprocessed %{save-temps:%b.mii} %{!save-temps:%g.mii}}\
- 	      %{!save-temps:%{!no-integrated-cpp:%(cpp_unique_options)}}\
--	%(cc1_options) %2 %{+e1*}\
-+	%(cc1_options) %(esp_options) %2 %{+e1*}\
-        %{!fsyntax-only:%(invoke_as)}}}}",
-      CPLUSPLUS_CPP_SPEC, 0, 0},
-   {".mii", "@objective-c++-cpp-output", 0, 0, 0},
-   {"@objective-c++-cpp-output",
-    "%{!M:%{!MM:%{!E:\
--    cc1objplus -fpreprocessed %i %(cc1_options) %2 %{+e*}\
-+    cc1objplus -fpreprocessed %i %(cc1_options) %(esp_options) %2 %{+e*}\
-     %{!fsyntax-only:%(invoke_as)}}}}", 0, 0, 0},
-   {"@objc++-cpp-output",
-    "%{!M:%{!MM:%{!E:\
--    cc1objplus -fpreprocessed %i %(cc1_options) %2 %{+e*}\
-+    cc1objplus -fpreprocessed %i %(cc1_options) %(esp_options) %2 %{+e*}\
-     %{!fsyntax-only:%(invoke_as)}}}}", 0, 0, 0},

diff --git a/gcc-4.6.0/piepatch/README.Changelog b/gcc-4.6.0/piepatch/README.Changelog
index e205273..abf59f9 100644
--- a/gcc-4.6.0/piepatch/README.Changelog
+++ b/gcc-4.6.0/piepatch/README.Changelog
@@ -1,4 +1,20 @@
-0.4.8 Magnus granberg		<zorry@gentoo.org>
+0.5.0 Magnus Granberg		<zorry@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		<zorry@gentoo.org>
+
+		#380823
+		* gcc/Makefile.in			added ESP_NOPIE_CFLAGS to ALL_CXXFLAGS
+
+0.4.8 Magnus Granberg		<zorry@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
@@ -6,13 +22,13 @@
 
 0.4.7	Magnus Granberg		<zorry@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
+		* 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		<zorry@gentoo.org>
 

diff --git a/gcc-4.6.0/piepatch/README.history b/gcc-4.6.0/piepatch/README.history
index 8535288..87ca509 100644
--- a/gcc-4.6.0/piepatch/README.history
+++ b/gcc-4.6.0/piepatch/README.history
@@ -1,3 +1,12 @@
+0.5.0		05-12-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
+		U 11_all_gcc44_config.in.patch
+		U 30_all_gcc44_esp.h.patch
+0.4.9		09-11-2011
+		U 12_all_gcc46_Makefile.in.patch
 0.4.8		26-03-2011
 		U 22_all_gcc46-default-ssp.patch
 0.4.7		05-03-2011
@@ -6,7 +15,7 @@
 		- 30_all_gcc46_esp.h.patch
 		+ 30_all_gcc44_esp.h.patch
 		U 33_all_gcc46_config_rs6000_linux64.h.patch
-		U 35_all_gcc44_config_crtbegints.patch
+		U 35_all_gcc46_config_crtbegints.patch
 0.4.6		07-01-2011
 		+ 12_all_gcc46_Makefile.in.patch
 		- 12_all_gcc44_Makefile.in.patch



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [gentoo-commits] proj/hardened-gccpatchset:master commit in: gcc-4.6.0/piepatch/, gcc-4.5.0/piepatch/
@ 2011-12-07 18:14 Magnus Granberg
  0 siblings, 0 replies; 2+ messages in thread
From: Magnus Granberg @ 2011-12-07 18:14 UTC (permalink / raw
  To: gentoo-commits

commit:     cea72843e8a7029ea3ae320f21fa3cf48dd92764
Author:     Magnus Granberg <zorry <AT> gentoo <DOT> org>
AuthorDate: Wed Dec  7 18:14:02 2011 +0000
Commit:     Magnus Granberg <zorry <AT> gentoo <DOT> org>
CommitDate: Wed Dec  7 18:14:02 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/hardened-gccpatchset.git;a=commit;h=cea72843

Fix bugs 380823 and 393321 part3

---
 gcc-4.5.0/piepatch/10_all_gcc45_configure.patch    |    4 ++--
 ...onfig.in.patch => 11_all_gcc45_config.in.patch} |    0
 ..._gcc44_esp.h.patch => 30_all_gcc45_esp.h.patch} |    0
 ...p.patch => 35_all_gcc45_config_crtbeginp.patch} |    0
 gcc-4.5.0/piepatch/README.history                  |    8 +++++---
 gcc-4.6.0/piepatch/10_all_gcc45_configure.patch    |    6 +++---
 ...onfig.in.patch => 11_all_gcc45_config.in.patch} |    0
 gcc-4.6.0/piepatch/12_all_gcc46_Makefile.in.patch  |    2 +-
 ..._gcc44_esp.h.patch => 30_all_gcc45_esp.h.patch} |    0
 gcc-4.6.0/piepatch/README.history                  |    8 +++++---
 10 files changed, 16 insertions(+), 12 deletions(-)

diff --git a/gcc-4.5.0/piepatch/10_all_gcc45_configure.patch b/gcc-4.5.0/piepatch/10_all_gcc45_configure.patch
index afa7a19..357e63a 100644
--- a/gcc-4.5.0/piepatch/10_all_gcc45_configure.patch
+++ b/gcc-4.5.0/piepatch/10_all_gcc45_configure.patch
@@ -1,4 +1,4 @@
-2011-12-05	Magnus Granberg		<zorry@gentoo.org>, Anthony G. Basile	<basile@opensource.dyc.edu>
+2011-12-07	Magnus Granberg		<zorry@gentoo.org>, Anthony G. Basile	<basile@opensource.dyc.edu>
 
 		* configure		Add --enable-esp.  Add-fno-stack-protector
 		to stage1_cflags.
@@ -73,7 +73,7 @@
  GGC
  libgcc_visibility
 +enable_esp
-+enable_crtbeginTS
++enable_crtbeginP
  gcc_cv_readelf
  gcc_cv_objdump
  ORIGINAL_NM_FOR_TARGET

diff --git a/gcc-4.5.0/piepatch/11_all_gcc44_config.in.patch b/gcc-4.5.0/piepatch/11_all_gcc45_config.in.patch
similarity index 100%
rename from gcc-4.5.0/piepatch/11_all_gcc44_config.in.patch
rename to gcc-4.5.0/piepatch/11_all_gcc45_config.in.patch

diff --git a/gcc-4.5.0/piepatch/30_all_gcc44_esp.h.patch b/gcc-4.5.0/piepatch/30_all_gcc45_esp.h.patch
similarity index 100%
rename from gcc-4.5.0/piepatch/30_all_gcc44_esp.h.patch
rename to gcc-4.5.0/piepatch/30_all_gcc45_esp.h.patch

diff --git a/gcc-4.5.0/piepatch/35_all_gcc44_config_crtbeginp.patch b/gcc-4.5.0/piepatch/35_all_gcc45_config_crtbeginp.patch
similarity index 100%
rename from gcc-4.5.0/piepatch/35_all_gcc44_config_crtbeginp.patch
rename to gcc-4.5.0/piepatch/35_all_gcc45_config_crtbeginp.patch

diff --git a/gcc-4.5.0/piepatch/README.history b/gcc-4.5.0/piepatch/README.history
index 35a76ad..a226a3b 100644
--- a/gcc-4.5.0/piepatch/README.history
+++ b/gcc-4.5.0/piepatch/README.history
@@ -1,10 +1,12 @@
 0.4.6		06-12-2011
-		+ 35_all_gcc44_config_crtbeginp.patch
+		+ 35_all_gcc45_config_crtbeginp.patch
 		- 35_all_gcc44_config_crtbegints.patch
 		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
+		+ 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.5		18-06-2010
 		U 35_all_gcc44_config_crtbegints.patch
 0.4.4		26-05-2010

diff --git a/gcc-4.6.0/piepatch/10_all_gcc45_configure.patch b/gcc-4.6.0/piepatch/10_all_gcc45_configure.patch
index 6ab02eb..357e63a 100644
--- a/gcc-4.6.0/piepatch/10_all_gcc45_configure.patch
+++ b/gcc-4.6.0/piepatch/10_all_gcc45_configure.patch
@@ -1,4 +1,4 @@
-2011-12-05	Magnus Granberg		<zorry@gentoo.org>, Anthony G. Basile	<basile@opensource.dyc.edu>
+2011-12-07	Magnus Granberg		<zorry@gentoo.org>, Anthony G. Basile	<basile@opensource.dyc.edu>
 
 		* configure		Add --enable-esp.  Add-fno-stack-protector
 		to stage1_cflags.
@@ -73,7 +73,7 @@
  GGC
  libgcc_visibility
 +enable_esp
-+enable_crtbeginTS
++enable_crtbeginP
  gcc_cv_readelf
  gcc_cv_objdump
  ORIGINAL_NM_FOR_TARGET
@@ -189,7 +189,7 @@
 +fi
 +
 +fi
-+echo "$as_me:$LINENO: result: $enable_crtbeginTS" >&5
++echo "$as_me:$LINENO: result: $enable_crtbeginP" >&5
 +echo "${ECHO_T}$enable_crtbeginP" >&6
 +
 +if test x$enable_crtbeginP = xyes; then

diff --git a/gcc-4.6.0/piepatch/11_all_gcc44_config.in.patch b/gcc-4.6.0/piepatch/11_all_gcc45_config.in.patch
similarity index 100%
rename from gcc-4.6.0/piepatch/11_all_gcc44_config.in.patch
rename to gcc-4.6.0/piepatch/11_all_gcc45_config.in.patch

diff --git a/gcc-4.6.0/piepatch/12_all_gcc46_Makefile.in.patch b/gcc-4.6.0/piepatch/12_all_gcc46_Makefile.in.patch
index 5145a25..8011793 100644
--- a/gcc-4.6.0/piepatch/12_all_gcc46_Makefile.in.patch
+++ b/gcc-4.6.0/piepatch/12_all_gcc46_Makefile.in.patch
@@ -1,4 +1,4 @@
-2011-12-05	Magnus Granberg		<zorry@gentoo.org> Anthony G. Basile	<basile@opensource.dyc.edu>
+2011-12-07	Magnus Granberg		<zorry@gentoo.org> Anthony G. Basile	<basile@opensource.dyc.edu>
 
 		* Makefile.in	We add -fno-stack-protector to BOOT_CFLAGS, LIBCFLAGS and
 			LIBCXXFLAGS if enable_esp yes.

diff --git a/gcc-4.6.0/piepatch/30_all_gcc44_esp.h.patch b/gcc-4.6.0/piepatch/30_all_gcc45_esp.h.patch
similarity index 100%
rename from gcc-4.6.0/piepatch/30_all_gcc44_esp.h.patch
rename to gcc-4.6.0/piepatch/30_all_gcc45_esp.h.patch

diff --git a/gcc-4.6.0/piepatch/README.history b/gcc-4.6.0/piepatch/README.history
index 87ca509..49980dc 100644
--- a/gcc-4.6.0/piepatch/README.history
+++ b/gcc-4.6.0/piepatch/README.history
@@ -1,10 +1,12 @@
-0.5.0		05-12-2011
+0.5.0		07-12-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
-		U 11_all_gcc44_config.in.patch
-		U 30_all_gcc44_esp.h.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-11-2011
 		U 12_all_gcc46_Makefile.in.patch
 0.4.8		26-03-2011



^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-12-07 18:14 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-12-07 18:14 [gentoo-commits] proj/hardened-gccpatchset:master commit in: gcc-4.6.0/piepatch/, gcc-4.5.0/piepatch/ Magnus Granberg
  -- strict thread matches above, loose matches on Subject: below --
2011-12-06 22:21 Magnus Granberg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox