aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMagnus Granberg <zorry@gentoo.org>2012-07-08 23:35:30 +0200
committerMagnus Granberg <zorry@gentoo.org>2012-07-08 23:35:30 +0200
commitf75c7f873e548b69686fcff48519d8edb8ddeb32 (patch)
tree9e498a19f04028d0131911d16aadda69a9f86c79 /upstream/Makefile.in.patch
parentFix a typo in the ssp_uclibc_check patch tag 0.5.2 (diff)
downloadhardened-gccpatchset-f75c7f873e548b69686fcff48519d8edb8ddeb32.tar.gz
hardened-gccpatchset-f75c7f873e548b69686fcff48519d8edb8ddeb32.tar.bz2
hardened-gccpatchset-f75c7f873e548b69686fcff48519d8edb8ddeb32.zip
Updete of the upstrem patches
Diffstat (limited to 'upstream/Makefile.in.patch')
-rw-r--r--upstream/Makefile.in.patch92
1 files changed, 46 insertions, 46 deletions
diff --git a/upstream/Makefile.in.patch b/upstream/Makefile.in.patch
index df93c63..cc7d0f0 100644
--- a/upstream/Makefile.in.patch
+++ b/upstream/Makefile.in.patch
@@ -1,15 +1,10 @@
-2011-06-04 Magnus Granberg <zorry@gentoo.org>
-
- * Makefile.in We add -fno-stack-protector to BOOT_CFLAGS, LIBCFLAGS and LIBCXXFLAGS if enable_espf yes.
- * gcc/Makefile.in Add -fno-PIE. to CRTSTUFF_CFLAGS and ALL_CFLAGS if enable_espf yes
-
---- Makefile.in 2010-01-22 08:35:38.000000000 -0500
-+++ Makefile.in 2010-02-07 15:10:59.000000000 -0500
-@@ -350,9 +350,17 @@
+--- a/Makefile.in 2012-01-02 11:59:04.000000000 +0100
++++ b/Makefile.in 2012-06-29 00:11:30.886010145 +0200
+@@ -362,9 +362,17 @@ WINDRES_FOR_BUILD = @WINDRES_FOR_BUILD@
BUILD_PREFIX = @BUILD_PREFIX@
BUILD_PREFIX_1 = @BUILD_PREFIX_1@
-+# Some stuff don't work well with SSP
++# Disable SSP on BOOT_CFLAGS, LIBCFLAGS and LIBCXXFLAGS
+enable_espf = @enable_espf@
+ifeq ($(enable_espf),yes)
+ESPF_NOSSP_CFLAGS = -fno-stack-protector
@@ -24,7 +19,7 @@
BOOT_LDFLAGS=
BOOT_ADAFLAGS=-gnatpg -gnata
-@@ -403,9 +403,9 @@
+@@ -410,9 +418,9 @@ GNATMAKE = @GNATMAKE@
CFLAGS = @CFLAGS@
LDFLAGS = @LDFLAGS@
@@ -36,13 +31,13 @@
GOCFLAGS = $(CFLAGS)
TFLAGS =
---- a/gcc/Makefile.in 2011-04-22 22:04:42.000000000 +0200
-+++ b/gcc/Makefile.in 2011-06-24 15:03:02.440236923 +0200
-@@ -642,13 +642,21 @@
- INHIBIT_LIBC_CFLAGS = -Dinhibit_libc
- endif
+--- a/gcc/Makefile.in 2012-02-11 09:50:23.000000000 +0100
++++ b/gcc/Makefile.in 2012-06-29 00:07:45.230003420 +0200
+@@ -973,14 +973,23 @@ LIBFUNCS_H = libfuncs.h $(HASHTAB_H)
+ # cross compiler which does not use the native headers and libraries.
+ INTERNAL_CFLAGS = -DIN_GCC @CROSS@
-+# We don't want to compile the gcc tree with -fPIE when we have espf enable.
++# We don't want to compile the compiler with -fPIE, it make PCH fail.
+enable_espf = @enable_espf@
+ifeq ($(enable_espf),yes)
+ESPF_NOPIE_CFLAGS = -fno-PIE
@@ -50,28 +45,6 @@
+ESPF_NOPIE_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 \
-- -fno-stack-protector \
-+ -fno-stack-protector $(ESPF_NOPIE_CFLAGS) \
- $(INHIBIT_LIBC_CFLAGS)
-
- # Additional options to use when compiling libgcc2.a.
-@@ -662,7 +670,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 \
-- -fno-stack-protector \
-+ -fno-stack-protector $(ESPF_NOPIE_CFLAGS) \
- $(INHIBIT_LIBC_CFLAGS)
-
- # Additional sources to handle exceptions; overridden by targets as needed.
-@@ -1002,7 +1010,7 @@
-
# 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-$@) \
@@ -79,12 +52,39 @@
$(CFLAGS) $(INTERNAL_CFLAGS) $(COVERAGE_FLAGS) $(WARN_CFLAGS) @DEFS@
# The C++ version.
-@@ -1928,7 +1936,7 @@
- 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) $(ESPF_NOPIE_CFLAGS)' >> tmp-libgcc.mvars
- echo CRTSTUFF_T_CFLAGS_S = '$(CRTSTUFF_T_CFLAGS_S)' >> tmp-libgcc.mvars
+-ALL_CXXFLAGS = $(T_CFLAGS) $(CFLAGS-$@) $(CXXFLAGS) $(INTERNAL_CFLAGS) \
+- $(COVERAGE_FLAGS) $(NOEXCEPTION_FLAGS) $(WARN_CXXFLAGS) @DEFS@
++ALL_CXXFLAGS =$(ESPF_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
+@@ -1815,6 +1824,7 @@ 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
- \ No newline at end of file
++ echo enable_espf = '$(enable_espf)' >> 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 2012-06-29 00:15:04.534016511 +0200
+@@ -275,11 +275,16 @@ override CFLAGS := $(filter-out -fprofil
+ INTERNAL_CFLAGS = $(CFLAGS) $(LIBGCC2_CFLAGS) $(HOST_LIBGCC2_CFLAGS) \
+ $(INCLUDES) @set_have_cc_tls@ @set_use_emutls@
+
++ifeq ($(enable_espf),yes)
++ESPF_NOPIE_CFLAGS = -fno-PIE
++else
++ESPF_NOPIE_CFLAGS=
++endif
+ # Options to use when compiling crtbegin/end.
+ 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 \
+- -fno-stack-protector \
++ -fno-stack-protector $(ESPF_NOPIE_CFLAGS) \
+ $(INHIBIT_LIBC_CFLAGS)
+
+ # Extra flags to use when compiling crt{begin,end}.o.