From: "Magnus Granberg" <zorry@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/hardened-gccpatchset:master commit in: upstream/
Date: Fri, 24 Jun 2011 13:51:19 +0000 (UTC) [thread overview]
Message-ID: <62a8e6794d1c0cc755bf41b193ff8e20685a4f95.zorry@gentoo> (raw)
commit: 62a8e6794d1c0cc755bf41b193ff8e20685a4f95
Author: Magnus Granberg <zorry <AT> gentoo <DOT> org>
AuthorDate: Fri Jun 24 13:50:42 2011 +0000
Commit: Magnus Granberg <zorry <AT> gentoo <DOT> org>
CommitDate: Fri Jun 24 13:50:42 2011 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/hardened-gccpatchset.git;a=commit;h=62a8e679
Added the Makefile.in patch for upstream rev 1
---
upstream/Makefile.in.patch | 90 ++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 90 insertions(+), 0 deletions(-)
diff --git a/upstream/Makefile.in.patch b/upstream/Makefile.in.patch
new file mode 100644
index 0000000..df93c63
--- /dev/null
+++ b/upstream/Makefile.in.patch
@@ -0,0 +1,90 @@
+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 @@
+ BUILD_PREFIX = @BUILD_PREFIX@
+ BUILD_PREFIX_1 = @BUILD_PREFIX_1@
+
++# Some stuff don't work well with SSP
++enable_espf = @enable_espf@
++ifeq ($(enable_espf),yes)
++ESPF_NOSSP_CFLAGS = -fno-stack-protector
++else
++ESPF_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 $(ESPF_NOSSP_CFLAGS)
+ BOOT_LDFLAGS=
+ BOOT_ADAFLAGS=-gnatpg -gnata
+
+@@ -403,9 +403,9 @@
+
+ CFLAGS = @CFLAGS@
+ LDFLAGS = @LDFLAGS@
+-LIBCFLAGS = $(CFLAGS)
++LIBCFLAGS = $(CFLAGS) $(ESPF_NOSSP_CFLAGS)
+ CXXFLAGS = @CXXFLAGS@
+-LIBCXXFLAGS = $(CXXFLAGS) -fno-implicit-templates
++LIBCXXFLAGS = $(CXXFLAGS) -fno-implicit-templates $(ESPF_NOSSP_CFLAGS)
+ 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
+
++# We don't want to compile the gcc tree with -fPIE when we have espf enable.
++enable_espf = @enable_espf@
++ifeq ($(enable_espf),yes)
++ESPF_NOPIE_CFLAGS = -fno-PIE
++else
++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-$@) \
++ALL_CFLAGS = $(ESPF_NOPIE_CFLAGS) $(T_CFLAGS) $(CFLAGS-$@) \
+ $(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
+ echo TARGET_SYSTEM_ROOT = '$(TARGET_SYSTEM_ROOT)' >> tmp-libgcc.mvars
+
\ No newline at end of file
next reply other threads:[~2011-06-24 13:51 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-24 13:51 Magnus Granberg [this message]
-- strict thread matches above, loose matches on Subject: below --
2013-11-13 21:13 [gentoo-commits] proj/hardened-gccpatchset:master commit in: upstream/ Magnus Granberg
2013-11-13 21:00 Magnus Granberg
2013-11-10 10:23 Magnus Granberg
2012-10-07 16:54 Magnus Granberg
2012-10-07 16:50 Magnus Granberg
2012-08-27 23:34 Magnus Granberg
2012-08-22 19:19 Magnus Granberg
2012-08-21 20:10 Magnus Granberg
2012-08-08 16:05 Magnus Granberg
2012-08-01 18:35 Magnus Granberg
2012-07-30 21:05 Magnus Granberg
2012-07-25 15:09 Magnus Granberg
2012-04-08 13:00 Magnus Granberg
2012-04-08 12:36 Magnus Granberg
2011-06-24 14:45 Magnus Granberg
2011-06-24 14:32 Magnus Granberg
2011-06-24 14:15 Magnus Granberg
2011-06-24 9:36 Magnus Granberg
2011-06-23 18:15 Magnus Granberg
2011-06-22 0:27 Magnus Granberg
2011-04-27 11:12 Magnus Granberg
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=62a8e6794d1c0cc755bf41b193ff8e20685a4f95.zorry@gentoo \
--to=zorry@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox