diff options
author | Magnus Granberg <zorry@gentoo.org> | 2012-04-08 14:33:17 +0200 |
---|---|---|
committer | Magnus Granberg <zorry@gentoo.org> | 2012-04-08 14:33:17 +0200 |
commit | a47328a2beadfa7ab70802444f0aabac82ede1b9 (patch) | |
tree | 0689f57520cc5bf96c9a632847ed97a55a484f88 /gcc-4.6.0/piepatch | |
parent | piepatch 0.5.2 for gcc 4.7 (diff) | |
download | hardened-gccpatchset-a47328a2beadfa7ab70802444f0aabac82ede1b9.tar.gz hardened-gccpatchset-a47328a2beadfa7ab70802444f0aabac82ede1b9.tar.bz2 hardened-gccpatchset-a47328a2beadfa7ab70802444f0aabac82ede1b9.zip |
Update 4.6 and 4.7
Diffstat (limited to 'gcc-4.6.0/piepatch')
-rw-r--r-- | gcc-4.6.0/piepatch/10_all_gcc45_configure.patch | 4 | ||||
-rw-r--r-- | gcc-4.6.0/piepatch/13_all_gcc46_ssp_uclibc_check.patch | 68 | ||||
-rw-r--r-- | gcc-4.6.0/piepatch/30_all_gcc46_esp.h.patch (renamed from gcc-4.6.0/piepatch/30_all_gcc45_esp.h.patch) | 8 | ||||
-rw-r--r-- | gcc-4.6.0/piepatch/README.Changelog | 6 | ||||
-rw-r--r-- | gcc-4.6.0/piepatch/README.history | 66 |
5 files changed, 115 insertions, 37 deletions
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 357e63a..a526b00 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-07 Magnus Granberg <zorry@gentoo.org>, Anthony G. Basile <basile@opensource.dyc.edu> +2012-02-14 Magnus Granberg <zorry@gentoo.org>, Anthony G. Basile <basile@opensource.dyc.edu> * configure Add --enable-esp. Add-fno-stack-protector to stage1_cflags. @@ -26,7 +26,7 @@ + Enable Stack protector, Position independent executable as + default if we have suppot for it when compiling + and link with -z relro and -z now as default. -+ Linux targets supported i*86, x86_64, powerpc, powerpc64, ia64 and arm ++ Linux targets supported i*86, x86_64, powerpc, powerpc64, ia64 and arm. --enable-libssp build libssp directory --disable-ppl-version-check disable check for PPL version --disable-cloog-version-check disable check for CLooG version diff --git a/gcc-4.6.0/piepatch/13_all_gcc46_ssp_uclibc_check.patch b/gcc-4.6.0/piepatch/13_all_gcc46_ssp_uclibc_check.patch new file mode 100644 index 0000000..c0abb3e --- /dev/null +++ b/gcc-4.6.0/piepatch/13_all_gcc46_ssp_uclibc_check.patch @@ -0,0 +1,68 @@ +2012-04-03 Magnus Granberg <zorry@gentoo.org> + + * gcc/config.in Add define for ENABLE_ESP_SSP + * gcc/configure Check SSP for uClibc + +--- a/gcc/config.in 2012-04-03 17:44:35.173548352 +0200 ++++ b/gcc/config.in 2012-04-03 15:25:23.272299470 +0200 +@@ -89,6 +89,12 @@ + #endif + + ++/* Define to 1 to enable esp ssp. */ ++#ifndef USED_FOR_TARGET ++#undef ENABLE_ESP_SSP ++#endif ++ ++ + /* Define to 1 to enable fixed-point arithmetic extension to C. */ + #ifndef USED_FOR_TARGET + #undef ENABLE_FIXED_POINT +--- a/gcc/configure 2012-04-03 17:44:32.793548281 +0200 ++++ b/gcc/configure 2012-04-03 17:40:00.000000000 +0200 +@@ -25915,6 +25915,45 @@ _ACEOF + + fi + ++ ++# Check if we have SSP support. if uClibc we need 0.9.32 or newer and TLS. ++echo "$as_me:$LINENO: checking for SSP support" >&5 ++echo $ECHO_N "checking for SSP support... $ECHO_C" >&6 ++if test "${enable_esp_SSP+set}" = set; then ++ echo $ECHO_N "(cached) $ECHO_C" >&6 ++else ++ if test x$enable_esp = xyes && test x$gcc_cv_libc_provides_ssp = xyes \ ++ && test x$set_have_as_tls = xyes; then ++ if $EGREP '^[ ]*#[ ]*define[ ]+__UCLIBC__[ ]+1' \ ++ $target_header_dir/features.h > /dev/null; then ++ if test -f $target_header_dir/bits/uClibc_config.h && \ ++ $EGREP '^[ ]*#[ ]*define[ ]+__UCLIBC_SUBLEVEL__[ ]+([3-9][2-9]|[4-9][0-9])' \ ++ $target_header_dir/bits/uClibc_config.h > /dev/null && \ ++ $EGREP '^[ ]*#[ ]*define[ ]+__UCLIBC_HAS_TLS__[ ]+1' \ ++ $target_header_dir/bits/uClibc_config.h > /dev/null; then ++ enable_esp_SSP=yes ++ else ++ enable_esp_SSP=no ++ fi ++ else ++ enable_esp_SSP=yes ++ fi ++ else ++ enable_esp_SSP=no ++ fi ++fi ++echo "$as_me:$LINENO: result: $enable_esp_SSP" >&5 ++echo "${ECHO_T}$enable_esp_SSP" >&6 ++ ++if test x$$enable_esp_SSP = xyes; then ++ ++cat >>confdefs.h <<\_ACEOF ++#define ENABLE_ESP_SSP 1 ++_ACEOF ++ ++fi ++ ++ + # Check if TFmode long double should be used by default or not. + # Some glibc targets used DFmode long double, but with glibc 2.4 + # and later they can use TFmode. diff --git a/gcc-4.6.0/piepatch/30_all_gcc45_esp.h.patch b/gcc-4.6.0/piepatch/30_all_gcc46_esp.h.patch index c51e8b4..e11c910 100644 --- a/gcc-4.6.0/piepatch/30_all_gcc45_esp.h.patch +++ b/gcc-4.6.0/piepatch/30_all_gcc46_esp.h.patch @@ -1,13 +1,13 @@ -2011-12-05 Magnus Granberg <zorry@gentoo.org> +2012-04-03 Magnus Granberg <zorry@gentoo.org> * gcc/esp.h New file to support --enable-esp - Version 20111205.1 + Version 20120403.2 --- 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 20111205.1 ++ * Version 20120403.2 + * Magnus Granberg (Zorry) <zorry@gentoo.org> */ +#ifndef GCC_ESP_H +#define GCC_ESP_H @@ -57,7 +57,7 @@ + + /* 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 ) ++ #if ( defined ( EFAULT_SSP ) || defined ( EFAULT_PIE_SSP ) ) && defined ( ENABLE_ESP_SSP ) + #define ESP_OPTIONS_SSP_SPEC \ + "%{!D__KERNEL__:%{!nostdlib:%{!nodefaultlibs: %{!fno-stack-protector: \ + %{!fstack-protector:%{!fstack-protector-all:-fstack-protector-all}}}}}}" diff --git a/gcc-4.6.0/piepatch/README.Changelog b/gcc-4.6.0/piepatch/README.Changelog index abf59f9..d903cb9 100644 --- a/gcc-4.6.0/piepatch/README.Changelog +++ b/gcc-4.6.0/piepatch/README.Changelog @@ -1,3 +1,9 @@ +0.5.1 Magnus Granberg <zorry@gentoo.org> + + * gcc/config.in Add define for ENABLE_ESP_SSP + * gcc/configure Check SSP for uClibc + * gcc/esp.h ENABLE_ESP_SSP + 0.5.0 Magnus Granberg <zorry@gentoo.org> #393321 diff --git a/gcc-4.6.0/piepatch/README.history b/gcc-4.6.0/piepatch/README.history index 49980dc..6fd4386 100644 --- a/gcc-4.6.0/piepatch/README.history +++ b/gcc-4.6.0/piepatch/README.history @@ -1,4 +1,8 @@ -0.5.0 07-12-2011 +0.5.1 03 Apr 2012 + 13_all_gcc46_ssp_uclibc_check.patch + + 30_all_gcc46_esp.h.patch + - 30_all_gcc45_esp.h.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 @@ -7,18 +11,18 @@ - 11_all_gcc44_config.in.patch + 30_all_gcc45_esp.h.patch - 30_all_gcc44_esp.h.patch -0.4.9 09-11-2011 +0.4.9 09 Nov 2011 U 12_all_gcc46_Makefile.in.patch -0.4.8 26-03-2011 +0.4.8 26 Mar 2011 U 22_all_gcc46-default-ssp.patch -0.4.7 05-03-2011 +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-01-2011 +0.4.6 07 Jan 2011 + 12_all_gcc46_Makefile.in.patch - 12_all_gcc44_Makefile.in.patch + 20_all_gcc46_gcc.c.patch @@ -32,25 +36,25 @@ - 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-06-2010 +0.4.5 18 Jun 2010 U 35_all_gcc44_config_crtbegints.patch -0.4.4 26-05-2010 +0.4.4 26 May 2010 U 30_all_gcc44_esp.h.patch -0.4.3 26-05-2010 +0.4.3 26 May 2010 U 20_all_gcc44_gcc.c.patch U 30_all_gcc44_esp.h.patch -0.4.2 24-05-2010 +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-04-2010 +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-04-2010 +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 @@ -58,23 +62,23 @@ - 30_all_gcc44_espf.h.patch + 30_all_gcc44_esp.h.patch -0.3.9 14-04-2010 +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-04-2010 +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-02-2010 +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-12-2009 +0.3.6 23 Dec 2009 - 10_all_gcc44_configure.patch + 10_all_gcc44_configure.patch - 30_all_gcc44_espf.h.patch @@ -86,7 +90,7 @@ - README + README -0.3.5 24-09-2009 +0.3.5 24 Sep 2009 - 30_all_gcc44_espf.h.patch + 30_all_gcc44_espf.h.patch - 35_all_gcc44_config_crtbegints.patch @@ -98,7 +102,7 @@ + README.history + README.Gentoo.patches -0.3.4 11-09-2009 +0.3.4 11 Sep 2009 - 10_all_gcc44_configure.patch + 10_all_gcc44_configure.patch - 11_all_gcc44_config.in.patch @@ -119,11 +123,11 @@ - README + README -0.3.3 14-08-2009 +0.3.3 14 Aug 2009 - 23_all_gcc44_opts.c.patch + 23_all_gcc44_opts.c.patch -0.3.2 09-08-2009 +0.3.2 09 Aug 2009 + 50_all_gcc44_no_ssp_tls_uclibc.patch + README.Changelog + README.history @@ -132,11 +136,11 @@ - 30_all_gcc44-espf.h.patch + 30_all_gcc44-espf.h.patch -0.3.1 23-07-2009 +0.3.1 23 Jul 2009 - 10_all_gcc44_configure.patch + 10_all_gcc44_configure.patch -0.3.0 23-07-2009 +0.3.0 23 Jul 2009 - 10_all_gcc44_configure.patch + 10_all_gcc44_configure.patch - 11_all_gcc44_config.in.patch @@ -152,7 +156,7 @@ - 30_all_gcc44-espf.h.patch + 30_all_gcc44-espf.h.patch -0.2.9 14-06-2009 +0.2.9 14 Jun 2009 - 12_all_gcc44_Makefile.in.patch + 12_all_gcc44_Makefile.in.patch - 30_all_gcc44-espf.h.patch @@ -160,7 +164,7 @@ - 50_all_gcc44_gentoo_v20090612.2.patch + 50_all_gcc44_gentoo_v20090614.1.patch -0.2.8 12-06-2009 +0.2.8 12 Jun 2009 - 10_all_gcc44_configure.patch + 10_all_gcc44_configure.patch - 11_all_gcc44_config.in.patch @@ -172,7 +176,7 @@ + 30_all_gcc44-espf.h.patch + 50_all_gcc44_gentoo_v20090612.2.patch -0.2.7 29-05-2009 +0.2.7 29 May 2009 - 11_all_gcc44_config.in.patch + 11_all_gcc44_config.in.patch - 12_all_gcc44_Makefile.in.patch @@ -184,14 +188,14 @@ + 25_all_gcc44-espf.h.patch - 30_all_gcc44-config-defaul-linux.patch -0.2.6 28-05-2009 +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-05-2009 +0.2.5 27 May 2009 - 10_all_gcc44_configure.patch + 10_all_gcc44_configure.patch - 12_all_gcc44_Makefile.in.patch @@ -204,17 +208,17 @@ + 30_all_gcc44-config-defaul-linux.patch - 40_all_gcc44-gentoo.patch -0.2.4 08-05-2009 +0.2.4 08 May 2009 - 12_all_gcc44_Makefile.in.patch + 12_all_gcc44_Makefile.in.patch -0.2.3 08-05-2009 +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-05-2009 +0.2.2 04 May 2009 + 10_all_gcc44_configure.patch + 11_all_gcc44_config.in.patch + 12_all_gcc44_Makefile.in.patch @@ -236,7 +240,7 @@ - 23_all_gcc44-gcc_varasm.c.patch - 30_all_gcc44-add-crt-start-endfiles-linux.patch -0.2.1 28-04-2009 +0.2.1 28 Apr 2009 + 01_all_gcc44-configure.patch + 10_all_gcc44-gcc_configure.patch + 11_all_gcc44-gcc_config.in.patch @@ -257,7 +261,7 @@ - 20-all_gcc4.4-default-crt-start-endfile.patch - 30-all_gcc4.4-crtbeginTS-fno-PIE.patch -0.1.0 16.04.2009 +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 |