public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Magnus Granberg" <zorry@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/hardened-gccpatchset:master commit in: upstream/
Date: Sun,  7 Oct 2012 16:50:12 +0000 (UTC)	[thread overview]
Message-ID: <1349628594.df8bf548b501ad28ddb7a1ba4408054be6d97cf9.zorry@gentoo> (raw)

commit:     df8bf548b501ad28ddb7a1ba4408054be6d97cf9
Author:     Magnus Granberg <zorry <AT> gentoo <DOT> org>
AuthorDate: Sun Oct  7 16:49:54 2012 +0000
Commit:     Magnus Granberg <zorry <AT> gentoo <DOT> org>
CommitDate: Sun Oct  7 16:49:54 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/hardened-gccpatchset.git;a=commit;h=df8bf548

Add new Makefile patch

---
 upstream/Makefile.patch |  100 +++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 100 insertions(+), 0 deletions(-)

diff --git a/upstream/Makefile.patch b/upstream/Makefile.patch
new file mode 100644
index 0000000..a116e5f
--- /dev/null
+++ b/upstream/Makefile.patch
@@ -0,0 +1,100 @@
+--- a/Makefile.tpl	2012-01-02 11:59:04.000000000 +0100
++++ b/Makefile.tpl	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@
+ 
++# Disable SSP on BOOT_CFLAGS, LIBCFLAGS and LIBCXXFLAGS
++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
+ 
+@@ -410,9 +418,9 @@ GNATMAKE = @GNATMAKE@
+ 
+ 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	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 compiler with -fPIE, it make PCH fail.
++enable_espf = @enable_espf@
++ifeq ($(enable_espf),yes)
++ESPF_NOPIE_CFLAGS = -fno-PIE
++else
++ESPF_NOPIE_CFLAGS=
++endif
++
+ # 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.
+-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
++	echo enable_espf = '$(enable_espf)' >> tmp-libgcc.mvars
+ 
+ 	mv tmp-libgcc.mvars libgcc.mvars
+ 
+@@ -4893,6 +4903,9 @@ site.exp: ./config.status Makefile
+ 	@if test "@enable_lto@" = "yes" ; then \
+ 	  echo "set ENABLE_LTO 1" >> ./site.tmp; \
+ 	fi
++	@if test "@enable_espf@" = "yes" ; then \
++	  echo "set ENABLE_ESPF 1" >> ./site.tmp; \
++	fi
+ # If newlib has been configured, we need to pass -B to gcc so it can find
+ # newlib's crt0.o if it exists.  This will cause a "path prefix not used"
+ # message if it doesn't, but the testsuite is supposed to ignore the message -
+--- 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.


             reply	other threads:[~2012-10-07 16:50 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-07 16:50 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-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 13:51 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=1349628594.df8bf548b501ad28ddb7a1ba4408054be6d97cf9.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