From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1Qa6nL-0007B6-LU for garchives@archives.gentoo.org; Fri, 24 Jun 2011 13:51:40 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 3B42B1C0C2; Fri, 24 Jun 2011 13:51:23 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id D22E91C0C2 for ; Fri, 24 Jun 2011 13:51:22 +0000 (UTC) Received: from pelican.gentoo.org (unknown [66.219.59.40]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id C833C2AC00A for ; Fri, 24 Jun 2011 13:51:20 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by pelican.gentoo.org (Postfix) with ESMTP id D0AA58003C for ; Fri, 24 Jun 2011 13:51:19 +0000 (UTC) From: "Magnus Granberg" To: gentoo-commits@lists.gentoo.org Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Magnus Granberg" Message-ID: <62a8e6794d1c0cc755bf41b193ff8e20685a4f95.zorry@gentoo> Subject: [gentoo-commits] proj/hardened-gccpatchset:master commit in: upstream/ X-VCS-Repository: proj/hardened-gccpatchset X-VCS-Files: upstream/Makefile.in.patch X-VCS-Directories: upstream/ X-VCS-Committer: zorry X-VCS-Committer-Name: Magnus Granberg X-VCS-Revision: 62a8e6794d1c0cc755bf41b193ff8e20685a4f95 Date: Fri, 24 Jun 2011 13:51:19 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: quoted-printable X-Archives-Salt: X-Archives-Hash: a905fc6bc04663c51f4e8e1ea642f8f6 commit: 62a8e6794d1c0cc755bf41b193ff8e20685a4f95 Author: Magnus Granberg gentoo org> AuthorDate: Fri Jun 24 13:50:42 2011 +0000 Commit: Magnus Granberg gentoo org> CommitDate: Fri Jun 24 13:50:42 2011 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Dproj/hardened-gccp= atchset.git;a=3Dcommit;h=3D62a8e679 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 + + * Makefile.in We add -fno-stack-protector to BOOT_CFLAGS, LIBCFLAGS an= d LIBCXXFLAGS if enable_espf yes. + * gcc/Makefile.in Add -fno-PIE. to CRTSTUFF_CFLAGS and ALL_CFLAGS if e= nable_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 =3D @BUILD_PREFIX@ + BUILD_PREFIX_1 =3D @BUILD_PREFIX_1@ +=20 ++# Some stuff don't work well with SSP ++enable_espf =3D @enable_espf@ ++ifeq ($(enable_espf),yes) ++ESPF_NOSSP_CFLAGS =3D -fno-stack-protector ++else ++ESPF_NOSSP_CFLAGS=3D ++endif ++ + # Flags to pass to stage2 and later makes. They are defined + # here so that they can be overridden by Makefile fragments. +-BOOT_CFLAGS=3D -g -O2 ++BOOT_CFLAGS=3D -g -O2 $(ESPF_NOSSP_CFLAGS) + BOOT_LDFLAGS=3D + BOOT_ADAFLAGS=3D-gnatpg -gnata +=20 +@@ -403,9 +403,9 @@ +=20 + CFLAGS =3D @CFLAGS@ + LDFLAGS =3D @LDFLAGS@ +-LIBCFLAGS =3D $(CFLAGS) ++LIBCFLAGS =3D $(CFLAGS) $(ESPF_NOSSP_CFLAGS) + CXXFLAGS =3D @CXXFLAGS@ +-LIBCXXFLAGS =3D $(CXXFLAGS) -fno-implicit-templates ++LIBCXXFLAGS =3D $(CXXFLAGS) -fno-implicit-templates $(ESPF_NOSSP_CFLAGS= ) + GOCFLAGS =3D $(CFLAGS) +=20 + TFLAGS =3D +--- 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 =3D -Dinhibit_libc + endif +=20 ++# We don't want to compile the gcc tree with -fPIE when we have espf en= able. ++enable_espf =3D @enable_espf@ ++ifeq ($(enable_espf),yes) ++ESPF_NOPIE_CFLAGS =3D -fno-PIE ++else ++ESPF_NOPIE_CFLAGS=3D ++endif ++ + # Options to use when compiling libgcc2.a. + # + LIBGCC2_DEBUG_CFLAGS =3D -g + LIBGCC2_CFLAGS =3D -O2 $(LIBGCC2_INCLUDES) $(GCC_CFLAGS) $(TARGET_LIBGC= C2_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) +=20 + # Additional options to use when compiling libgcc2.a. +@@ -662,7 +670,7 @@ + CRTSTUFF_CFLAGS =3D -O2 $(GCC_CFLAGS) $(INCLUDES) $(MULTILIB_CFLAGS) -g= 0 \ + -finhibit-size-directive -fno-inline -fno-exceptions \ + -fno-zero-initialized-in-bss -fno-toplevel-reorder -fno-tree-vectoriz= e \ +- -fno-stack-protector \ ++ -fno-stack-protector $(ESPF_NOPIE_CFLAGS) \ + $(INHIBIT_LIBC_CFLAGS) +=20 + # Additional sources to handle exceptions; overridden by targets as nee= ded. +@@ -1002,7 +1010,7 @@ +=20 + # This is the variable actually used when we compile. If you change thi= s, + # you probably want to update BUILD_CFLAGS in configure.ac +-ALL_CFLAGS =3D $(T_CFLAGS) $(CFLAGS-$@) \ ++ALL_CFLAGS =3D $(ESPF_NOPIE_CFLAGS) $(T_CFLAGS) $(CFLAGS-$@) \ + $(CFLAGS) $(INTERNAL_CFLAGS) $(COVERAGE_FLAGS) $(WARN_CFLAGS) @DEFS@ +=20 + # The C++ version. +@@ -1928,7 +1936,7 @@ + echo LIBGCC_SYNC =3D '$(LIBGCC_SYNC)' >> tmp-libgcc.mvars + echo LIBGCC_SYNC_CFLAGS =3D '$(LIBGCC_SYNC_CFLAGS)' >> tmp-libgcc.mvar= s + echo CRTSTUFF_CFLAGS =3D '$(CRTSTUFF_CFLAGS)' >> tmp-libgcc.mvars +- echo CRTSTUFF_T_CFLAGS =3D '$(CRTSTUFF_T_CFLAGS)' >> tmp-libgcc.mvars ++ echo CRTSTUFF_T_CFLAGS =3D '$(CRTSTUFF_T_CFLAGS) $(ESPF_NOPIE_CFLAGS)'= >> tmp-libgcc.mvars + echo CRTSTUFF_T_CFLAGS_S =3D '$(CRTSTUFF_T_CFLAGS_S)' >> tmp-libgcc.mv= ars + echo TARGET_SYSTEM_ROOT =3D '$(TARGET_SYSTEM_ROOT)' >> tmp-libgcc.mvar= s +=20 \ No newline at end of file