aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMagnus Granberg (Zorry) <zorry@gentoo.org>2010-04-26 22:02:46 +0200
committerMagnus Granberg (Zorry) <zorry@gentoo.org>2010-04-26 22:02:46 +0200
commitae600eb603381a7f1d97d24d4a9333f25a31183e (patch)
tree11cd1d9bb67dc565299baac55cdb67c84b3cc5d7
parentUpdated pipatches to 0.4.1 in gcc 4.4.3 part4 (diff)
downloadhardened-gccpatchset-ae600eb603381a7f1d97d24d4a9333f25a31183e.tar.gz
hardened-gccpatchset-ae600eb603381a7f1d97d24d4a9333f25a31183e.tar.bz2
hardened-gccpatchset-ae600eb603381a7f1d97d24d4a9333f25a31183e.zip
Updated pipatches to 0.4.1 in gcc 4.5.0
-rw-r--r--gcc-4.5.0/piepatch/00_all_gcc45-trampolinewarn.patch33
-rw-r--r--gcc-4.5.0/piepatch/10_all_gcc45_configure.patch33
-rw-r--r--gcc-4.5.0/piepatch/11_all_gcc44_config.in.patch52
-rw-r--r--gcc-4.5.0/piepatch/12_all_gcc45_Makefile.in.patch16
-rw-r--r--gcc-4.5.0/piepatch/20_all_gcc45_gcc.c.patch4
-rw-r--r--gcc-4.5.0/piepatch/21_all_gcc44_decl-tls-model.patch4
-rw-r--r--gcc-4.5.0/piepatch/30_all_gcc44_esp.h.patch4
-rw-r--r--gcc-4.5.0/piepatch/33_all_gcc45_config_rs6000_linux64.h.patch4
-rw-r--r--gcc-4.5.0/piepatch/35_all_gcc44_config_crtbegints.patch4
-rw-r--r--gcc-4.5.0/piepatch/40_all_gcc44_cp_lang-specs.h.patch4
-rw-r--r--gcc-4.5.0/piepatch/41_all_gcc44_objc_lang-specs.h.patch4
-rw-r--r--gcc-4.5.0/piepatch/42_all_gcc44_objcp_lang-specs.h.patch4
-rw-r--r--gcc-4.5.0/piepatch/60_all_gcc44_invoke.texi.patch4
-rw-r--r--gcc-4.5.0/piepatch/README.Changelog4
-rw-r--r--gcc-4.5.0/piepatch/README.history1
15 files changed, 125 insertions, 50 deletions
diff --git a/gcc-4.5.0/piepatch/00_all_gcc45-trampolinewarn.patch b/gcc-4.5.0/piepatch/00_all_gcc45-trampolinewarn.patch
new file mode 100644
index 0000000..f35a56c
--- /dev/null
+++ b/gcc-4.5.0/piepatch/00_all_gcc45-trampolinewarn.patch
@@ -0,0 +1,33 @@
+ This trivial patch causes gcc to emit a warning whenever
+ it generates a trampoline. These are otherwise hard to
+ locate. It is rigged to default ON - to have it default
+ to OFF remove the text 'Init(1)' from the common.opt
+ patch, leaving just 'Common Var(warn_trampolines)'.
+ Kevin F. Quinn <kevquinn@gentoo.org> 17 Jan 2006
+
+--- gcc/common.opt
++++ gcc/common.opt
+@@ -141,6 +141,10 @@
+ Common Var(warn_system_headers)
+ Do not suppress warnings from system headers
+
++Wtrampolines
++Common Var(warn_trampolines) Init(1)
++Warn whenever a trampoline is generated
++
+ Wuninitialized
+ Common Var(warn_uninitialized)
+ Warn about uninitialized automatic variables
+--- gcc/builtins.c
++++ gcc/builtins.c
+@@ -5150,6 +5150,10 @@
+ targetm.calls.trampoline_init (m_tramp, t_func, r_chain);
+
+ trampolines_created = 1;
++
++ if (warn_trampolines)
++ warning (OPT_Wtrampolines, "generating trampoline in object (requires executable stack)");
++
+ return const0_rtx;
+ }
+
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 15fdf1e..a6ffbb4 100644
--- a/gcc-4.5.0/piepatch/10_all_gcc45_configure.patch
+++ b/gcc-4.5.0/piepatch/10_all_gcc45_configure.patch
@@ -9,8 +9,8 @@
Check if we support crtbeginTS and define ENABLE_CRTBEGINTS.
* libmudflap/configure Add AC_SUBST enable_esp.
---- a/configure 2010-01-31 13:12:21.000000000 -0500
-+++ b/configure 2010-02-07 14:29:51.000000000 -0500
+--- configure 2010-01-31 13:12:21.000000000 -0500
++++ configure 2010-02-07 14:29:51.000000000 -0500
@@ -707,6 +707,7 @@
CFLAGS
CC
@@ -62,9 +62,9 @@
+fi;
+
+
- # Check whether --enable-libssp or --disable-libssp was given.
- if test "${enable_libssp+set}" = set; then
- enableval="$enable_libssp"
+ # Check whether --enable-libssp was given.
+ if test "${enable_libssp+set}" = set; then :
+ enableval=$enable_libssp; ENABLE_LIBSSP=$enableval
@@ -14266,6 +14290,9 @@
*) stage1_cflags="-g -J" ;;
esac ;;
@@ -75,8 +75,8 @@
# This is aimed to mimic bootstrap with a non-GCC compiler to catch problems.
if test "$GCC" = yes -a "$ENABLE_BUILD_WITH_CXX" != yes; then
---- a/gcc/configure 2010-01-31 10:01:53.000000000 -0500
-+++ b/gcc/configure 2010-02-07 14:29:56.000000000 -0500
+--- gcc/configure 2010-01-31 10:01:53.000000000 -0500
++++ gcc/configure 2010-02-07 14:29:56.000000000 -0500
@@ -678,6 +678,8 @@
HOST_LIBS
GGC
@@ -86,21 +86,6 @@
gcc_cv_readelf
gcc_cv_objdump
ORIGINAL_NM_FOR_TARGET
-@@ -1078,6 +1076,14 @@
- --enable-fast-install[=PKGS]
- optimize for fast installation [default=yes]
- --disable-libtool-lock avoid locking (might break parallel builds)
-+ --enable-esp[=all]
-+ 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.
-+ --enable-esp=all will enable SSP and PIE
-+ --enable-esp=nossp will disable SSP
-+ --enable-esp=nopie will disable PIE
-+ Linux targets supported i*86, x86_64, powerpc, powerpc64, ia64 and arm
- --enable-maintainer-mode
- enable make rules and dependencies not useful
- (and sometimes confusing) to the casual installer
@@ -24480,6 +24481,50 @@
;;
esac
@@ -406,8 +391,8 @@
# 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.
---- a/libmudflap/configure 2009-12-05 12:18:53.000000000 -0500
-+++ b/libmudflap/configure 2010-02-07 14:29:51.000000000 -0500
+--- libmudflap/configure 2009-12-05 12:18:53.000000000 -0500
++++ libmudflap/configure 2010-02-07 14:29:51.000000000 -0500
@@ -652,6 +652,7 @@
MAINTAINER_MODE_FALSE
MAINTAINER_MODE_TRUE
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
new file mode 100644
index 0000000..efab612
--- /dev/null
+++ b/gcc-4.5.0/piepatch/11_all_gcc44_config.in.patch
@@ -0,0 +1,52 @@
+2010-04-22 Magnus Granberg <zorry@gentoo.org>
+
+ * gcc/config.in Add ENABLE_CRTBEGINTS ENABLE_ESP and
+ HAVE_GCC_SSP HAVE_GCC_LD_PIE
+
+--- 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 crtbeginTS.o. */
++#ifndef USED_FOR_TARGET
++#undef ENABLE_CRTBEGINTS
++#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
+@@ -912,6 +924,18 @@
+ #endif
+
+
++/* Define if your compiler supports SSP */
++#ifndef USED_FOR_TARGET
++#undef HAVE_GCC_SSP
++#endif
++
++
++/* Define if your compiler and linker supports PIE */
++#ifndef USED_FOR_TARGET
++#undef HAVE_GCC_LD_PIE
++#endif
++
++
+ /* Define to 1 if you have the `getchar_unlocked' function. */
+ #ifndef USED_FOR_TARGET
+ #undef HAVE_GETCHAR_UNLOCKED
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 3f54c90..418a267 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
@@ -17,8 +17,8 @@
* libmudflap/Makefiles.in Add -fno-stack-protector -U_FORTIFY_SOURCE
to AM_CFLAGS ifdef enable_esp.
---- a/Makefile.in 2010-01-22 08:35:38.000000000 -0500
-+++ b/Makefile.in 2010-02-07 15:10:59.000000000 -0500
+--- 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@
@@ -50,8 +50,8 @@
TFLAGS =
---- a/gcc/Makefile.in 2010-01-22 17:22:51.000000000 -0500
-+++ b/gcc/Makefile.in 2010-02-07 15:15:13.000000000 -0500
+--- 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
@@ -147,8 +147,8 @@
# Compile the start modules crt0.o and mcrt0.o that are linked with
# every program
$(T)crt0.o: s-crt0 ; @true
---- a/libgcc/Makefile.in 2009-07-30 18:33:49.000000000 -0400
-+++ b/libgcc/Makefile.in 2010-02-07 15:10:59.000000000 -0500
+--- 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
@@ -176,8 +176,8 @@
endif
# Build extra startfiles in the libgcc directory.
---- a/libmudflap/Makefile.in 2009-12-05 12:18:53.000000000 -0500
-+++ b/libmudflap/Makefile.in 2010-02-07 15:10:59.000000000 -0500
+--- 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
diff --git a/gcc-4.5.0/piepatch/20_all_gcc45_gcc.c.patch b/gcc-4.5.0/piepatch/20_all_gcc45_gcc.c.patch
index d661a73..1783de5 100644
--- a/gcc-4.5.0/piepatch/20_all_gcc45_gcc.c.patch
+++ b/gcc-4.5.0/piepatch/20_all_gcc45_gcc.c.patch
@@ -15,8 +15,8 @@
* gcc/gcc.c default_compilers[] Add %(esp_options)
*cpp_unique_options Add %(esp_cpp_unique_options)
---- a/gcc/gcc.c 2010-01-21 10:29:30.000000000 -0500
-+++ b/gcc/gcc.c 2010-01-29 23:29:16.000000000 -0500
+--- 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"
diff --git a/gcc-4.5.0/piepatch/21_all_gcc44_decl-tls-model.patch b/gcc-4.5.0/piepatch/21_all_gcc44_decl-tls-model.patch
index ed37a3f..09438a0 100644
--- a/gcc-4.5.0/piepatch/21_all_gcc44_decl-tls-model.patch
+++ b/gcc-4.5.0/piepatch/21_all_gcc44_decl-tls-model.patch
@@ -3,8 +3,8 @@
b.g.o #232601
* gcc/varasm.c (decl_tls_model): Check flag_pic instead of flag_shlib.
---- a/gcc/varasm.c 2009-03-17 21:18:21.000000000 +0100
-+++ b/gcc/varasm.c 2009-04-29 03:10:09.000000000 +0200
+--- gcc/varasm.c 2009-03-17 21:18:21.000000000 +0100
++++ gcc/varasm.c 2009-04-29 03:10:09.000000000 +0200
@@ -5607,7 +5607,11 @@
bool is_local;
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 6634a33..8e6e8a3 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
@@ -3,8 +3,8 @@
* gcc/esp.h New file to support --enable-esp
Version 20100422.1
---- a/gcc/esp.h 2010-04-09 16:14:00.000000000 +0200
-+++ b/gcc/esp.h 2010-04-22 13:48:18.000000000 +0200
+--- gcc/esp.h 2010-04-09 16:14:00.000000000 +0200
++++ gcc/esp.h 2010-04-22 13:48:18.000000000 +0200
@@ -0,0 +1,147 @@
+/* License terms see GNU GENERAL PUBLIC LICENSE Version 3.
+ * Version 20100422.1
diff --git a/gcc-4.5.0/piepatch/33_all_gcc45_config_rs6000_linux64.h.patch b/gcc-4.5.0/piepatch/33_all_gcc45_config_rs6000_linux64.h.patch
index d49e358..b1271c2 100644
--- a/gcc-4.5.0/piepatch/33_all_gcc45_config_rs6000_linux64.h.patch
+++ b/gcc-4.5.0/piepatch/33_all_gcc45_config_rs6000_linux64.h.patch
@@ -3,8 +3,8 @@
* gcc/config/rs6000/linux64.h ASM_SPEC32 Change %{fpic:-K PIC} %{fPIC:-K PIC}
to %{fpic|fPIC|fpie|fPIE:-K PIC}
---- a/gcc/config/rs6000/linux64.h.psm 2009-04-10 01:23:07.000000000 +0200
-+++ b/gcc/config/rs6000/linux64.h 2009-09-23 12:34:26.000000000 +0200
+--- 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
diff --git a/gcc-4.5.0/piepatch/35_all_gcc44_config_crtbegints.patch b/gcc-4.5.0/piepatch/35_all_gcc44_config_crtbegints.patch
index a8ba490..f1e6532 100644
--- a/gcc-4.5.0/piepatch/35_all_gcc44_config_crtbegints.patch
+++ b/gcc-4.5.0/piepatch/35_all_gcc44_config_crtbegints.patch
@@ -3,8 +3,8 @@
* 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.
---- a/gcc/config/linux.h 2009-04-10 01:23:07.000000000 +0200
-+++ b/gcc/config/linux.h 2009-09-08 04:08:06.000000000 +0200
+--- 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'. */
diff --git a/gcc-4.5.0/piepatch/40_all_gcc44_cp_lang-specs.h.patch b/gcc-4.5.0/piepatch/40_all_gcc44_cp_lang-specs.h.patch
index 9f61343..091f443 100644
--- a/gcc-4.5.0/piepatch/40_all_gcc44_cp_lang-specs.h.patch
+++ b/gcc-4.5.0/piepatch/40_all_gcc44_cp_lang-specs.h.patch
@@ -3,8 +3,8 @@
LP #346126
* gcc/cp/lang-specs.h compiler spec Add %(esp_options).
---- a/gcc/cp/lang-specs.h.orig 2009-03-23 01:21:54.000000000 +0100
-+++ b/gcc/cp/lang-specs.h 2009-03-23 01:22:16.000000000 +0100
+--- 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}}\
diff --git a/gcc-4.5.0/piepatch/41_all_gcc44_objc_lang-specs.h.patch b/gcc-4.5.0/piepatch/41_all_gcc44_objc_lang-specs.h.patch
index 181fae0..418217e 100644
--- a/gcc-4.5.0/piepatch/41_all_gcc44_objc_lang-specs.h.patch
+++ b/gcc-4.5.0/piepatch/41_all_gcc44_objc_lang-specs.h.patch
@@ -3,8 +3,8 @@
LP #346126
* gcc/objc/lang-specs.h compiler spec Add %(esp_options).
---- a/gcc/objc/lang-specs.h 2009-03-23 01:21:54.000000000 +0100
-+++ b/gcc/objc/lang-specs.h 2009-03-23 01:22:16.000000000 +0100
+--- 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}\
diff --git a/gcc-4.5.0/piepatch/42_all_gcc44_objcp_lang-specs.h.patch b/gcc-4.5.0/piepatch/42_all_gcc44_objcp_lang-specs.h.patch
index c0e48c4..50ab607 100644
--- a/gcc-4.5.0/piepatch/42_all_gcc44_objcp_lang-specs.h.patch
+++ b/gcc-4.5.0/piepatch/42_all_gcc44_objcp_lang-specs.h.patch
@@ -3,8 +3,8 @@
LP #346126
* gcc/objcp/lang-specs.h compiler spec Add %(esp_options).
---- a/gcc/objcp/lang-specs.h 2009-03-23 01:21:54.000000000 +0100
-+++ b/gcc/objcp/lang-specs.h 2009-03-23 01:22:16.000000000 +0100
+--- 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}}\
diff --git a/gcc-4.5.0/piepatch/60_all_gcc44_invoke.texi.patch b/gcc-4.5.0/piepatch/60_all_gcc44_invoke.texi.patch
index 899e2d5..15b3417 100644
--- a/gcc-4.5.0/piepatch/60_all_gcc44_invoke.texi.patch
+++ b/gcc-4.5.0/piepatch/60_all_gcc44_invoke.texi.patch
@@ -3,8 +3,8 @@
* 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.
---- a/gcc/doc/invoke.texi 2009-04-01 09:18:47.000000000 +0200
-+++ b/gcc/doc/invoke.texi 2009-06-18 14:08:38.000000000 +0200
+--- gcc/doc/invoke.texi 2009-04-01 09:18:47.000000000 +0200
++++ gcc/doc/invoke.texi 2009-06-18 14:08:38.000000000 +0200
@@ -7134,6 +7134,11 @@
@opindex fstack-protector-all
Like @option{-fstack-protector} except that all functions are protected.
diff --git a/gcc-4.5.0/piepatch/README.Changelog b/gcc-4.5.0/piepatch/README.Changelog
index 41120a4..af550e8 100644
--- a/gcc-4.5.0/piepatch/README.Changelog
+++ b/gcc-4.5.0/piepatch/README.Changelog
@@ -15,6 +15,10 @@
#293843 b.g.o
*gcc/esp.h Added -nonow to the -z now specs.
+
+ The trampolinwarn patch is not longer in default patchset
+ *gcc/common.opt Add Wtrampolines and default it to Init(1)
+ *gcc/builtins.c Add Wtrampolines
0.4.0 Anthony G. Basile <basile@opensource.dyc.edu>
diff --git a/gcc-4.5.0/piepatch/README.history b/gcc-4.5.0/piepatch/README.history
index 9720430..1238f54 100644
--- a/gcc-4.5.0/piepatch/README.history
+++ b/gcc-4.5.0/piepatch/README.history
@@ -1,4 +1,5 @@
0.4.1 23-04-2010
+ + 00_all_gcc45-trampolinwarn.patch
U 10_all_gcc45_configure.patch
U 12_all_gcc45_Makefile.in.patch
U 11_all_gcc44_config.in.patch