From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id A7F3113800E for ; Wed, 1 Aug 2012 18:36:11 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id ECDA4E07AE; Wed, 1 Aug 2012 18:35:55 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id A2838E07AE for ; Wed, 1 Aug 2012 18:35:55 +0000 (UTC) Received: from hornbill.gentoo.org (hornbill.gentoo.org [94.100.119.163]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id E2EB61B4025 for ; Wed, 1 Aug 2012 18:35:54 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by hornbill.gentoo.org (Postfix) with ESMTP id AA512E543B for ; Wed, 1 Aug 2012 18:35:53 +0000 (UTC) From: "Magnus Granberg" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Magnus Granberg" Message-ID: <1343846136.0e28c5d8e6e028437340bd03b2d450dbe06bf03a.zorry@gentoo> Subject: [gentoo-commits] proj/hardened-gccpatchset:master commit in: upstream/ X-VCS-Repository: proj/hardened-gccpatchset X-VCS-Files: upstream/config_all.patch upstream/config_i386.patch upstream/configure.ac.patch upstream/gcc.c.patch upstream/gcc_doc.patch X-VCS-Directories: upstream/ X-VCS-Committer: zorry X-VCS-Committer-Name: Magnus Granberg X-VCS-Revision: 0e28c5d8e6e028437340bd03b2d450dbe06bf03a X-VCS-Branch: master Date: Wed, 1 Aug 2012 18:35:53 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 45618d67-7ea3-41f2-b2dd-680f34b589ff X-Archives-Hash: bf31bf455bed6635dc1f289b2bbe7503 commit: 0e28c5d8e6e028437340bd03b2d450dbe06bf03a Author: Magnus Granberg gentoo org> AuthorDate: Wed Aug 1 18:35:36 2012 +0000 Commit: Magnus Granberg gentoo org> CommitDate: Wed Aug 1 18:35:36 2012 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/hardened-gccpatchset.git;a=commit;h=0e28c5d8 updated upstream patches with small fixes --- upstream/config_all.patch | 3 ++- upstream/config_i386.patch | 6 ++++-- upstream/configure.ac.patch | 10 ++++++---- upstream/gcc.c.patch | 12 ++++++------ upstream/gcc_doc.patch | 14 +++++++------- 5 files changed, 25 insertions(+), 20 deletions(-) diff --git a/upstream/config_all.patch b/upstream/config_all.patch index aa16b1b..3fe4824 100644 --- a/upstream/config_all.patch +++ b/upstream/config_all.patch @@ -1,10 +1,11 @@ --- a/gcc/config/linux.h 2011-07-07 17:38:34.000000000 +0200 +++ b/gcc/config/linux.h 2012-07-09 14:24:08.599281404 +0200 -@@ -104,3 +104,31 @@ see the files COPYING3 and COPYING.RUNTI +@@ -104,3 +104,32 @@ see the files COPYING3 and COPYING.RUNTI /* Whether we have Bionic libc runtime */ #undef TARGET_HAS_BIONIC #define TARGET_HAS_BIONIC (OPTION_BIONIC) + ++/* Needed by configure --enable-espf */ +#ifdef ENABLE_ESPF +#ifdef ENABLE_ESPF_PIE +#define ESPF_GCC_PIE_SPEC \ diff --git a/upstream/config_i386.patch b/upstream/config_i386.patch index 58ceebe..f8c10cb 100644 --- a/upstream/config_i386.patch +++ b/upstream/config_i386.patch @@ -1,20 +1,22 @@ --- a/gcc/config/i386/linux.h 2011-06-03 20:30:39.000000000 +0200 +++ b/gcc/config/i386/linux.h 2012-07-05 21:00:38.304691613 +0200 -@@ -22,3 +22,7 @@ along with GCC; see the file COPYING3. +@@ -22,3 +22,8 @@ along with GCC; see the file COPYING3. #define GNU_USER_LINK_EMULATION "elf_i386" #define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2" + ++/* Needed by configure --enable-espf */ +#ifdef ENABLE_ESPF +#define DRIVER_SELF_SPECS ESPF_DRIVER_SELF_SPECS +#endif --- a/gcc/config/i386/linux64.h 2011-07-07 17:38:34.000000000 +0200 +++ b/gcc/config/i386/linux64.h 2012-07-05 20:59:39.342689855 +0200 -@@ -31,3 +31,7 @@ see the files COPYING3 and COPYING.RUNTI +@@ -31,3 +31,8 @@ see the files COPYING3 and COPYING.RUNTI #define GLIBC_DYNAMIC_LINKER32 "/lib/ld-linux.so.2" #define GLIBC_DYNAMIC_LINKER64 "/lib64/ld-linux-x86-64.so.2" #define GLIBC_DYNAMIC_LINKERX32 "/libx32/ld-linux-x32.so.2" + ++/* Needed by configure --enable-espf */ +#ifdef ENABLE_ESPF +#define DRIVER_SELF_SPECS ESPF_DRIVER_SELF_SPECS +#endif diff --git a/upstream/configure.ac.patch b/upstream/configure.ac.patch index 49a7e21..8fc9730 100644 --- a/upstream/configure.ac.patch +++ b/upstream/configure.ac.patch @@ -1,6 +1,6 @@ --- a/configure.ac 2012-02-02 11:20:32.000000000 +0100 +++ b/configure.ac 2012-07-01 00:44:27.845218414 +0200 -@@ -424,6 +424,35 @@ AC_ARG_ENABLE(libssp, +@@ -424,6 +424,36 @@ AC_ARG_ENABLE(libssp, ENABLE_LIBSSP=$enableval, ENABLE_LIBSSP=yes) @@ -9,7 +9,8 @@ +[AS_HELP_STRING([--enable-espf[=ARG]], + [Enable Stack protector, Position independent executable and + Fortify_source as default. If we have suppot for it when compiling. -+ Linux targets supported x86_64. @<:@ARG={all,pie,ssp,no}@:>@ ])], ++ Linux targets supported x86, x32 and x86_64. ++ @<:@ARG={all,pie,ssp,no}@:>@ ])], +set_enable_espf=$enableval, +set_enable_espf=no) +case "${set_enable_espf}" in @@ -50,7 +51,7 @@ # Enable --enable-checking in stage1 of the compiler. --- a/gcc/configure.ac 2012-02-22 12:27:45.000000000 +0100 +++ b/gcc/configure.ac 2012-07-01 00:43:14.054216215 +0200 -@@ -5193,6 +5193,155 @@ if test x"${LINKER_HASH_STYLE}" != x; th +@@ -5193,6 +5193,156 @@ if test x"${LINKER_HASH_STYLE}" != x; th [The linker hash style]) fi @@ -63,7 +64,8 @@ +[AS_HELP_STRING([--enable-espf[=ARG]], + [Enable Stack protector, Position independent executable and + Fortify_source as default. If we have suppot for it when compiling. -+ Linux targets supported x86_64. @<:@ARG={all,pie,ssp,no}@:>@ ])], ++ Linux targets supported x86, x32 and x86_64. ++ @<:@ARG={all,pie,ssp,no}@:>@ ])], +set_enable_espf=$enableval, +set_enable_espf=no) +case "${set_enable_espf}" in diff --git a/upstream/gcc.c.patch b/upstream/gcc.c.patch index 556f0a5..605cbb8 100644 --- a/upstream/gcc.c.patch +++ b/upstream/gcc.c.patch @@ -1,17 +1,17 @@ --- a/gcc/gcc.c 2012-02-28 18:31:38.000000000 +0100 -+++ b/gcc/gcc.c 2012-07-06 17:03:20.505842011 +0200 -@@ -756,9 +756,11 @@ static const char *cpp_unique_options = ++++ b/gcc/gcc.c 2012-08-01 03:10:01.060123826 +0200 +@@ -756,8 +756,12 @@ static const char *cpp_unique_options = %{!iplugindir*:%{fplugin*:%:find-plugindir()}}\ %{H} %C %{D*&U*&A*} %{i*} %Z %i\ %{fmudflap:-D_MUDFLAP -include mf-runtime.h}\ - %{fmudflapth:-D_MUDFLAP -D_MUDFLAPTH -include mf-runtime.h}\ - %{E|M|MM:%W{o*}}"; -- + %{fmudflapth:-D_MUDFLAP -D_MUDFLAPTH -include mf-runtime.h} " -+#ifdef ENABLE_ESPF_FORTIFY -+"%(espf_cpp_unique_options) " ++ /* Needed by configure --enable-espf */ ++ #ifdef ENABLE_ESPF_FORTIFY ++"%(espf_cpp_unique_options)" +#endif +"%{E|M|MM:%W{o*}}"; + /* This contains cpp options which are common with cc1_options and are passed only when preprocessing only to avoid duplication. We pass the cc1 spec - options to the preprocessor so that it the cc1 spec may manipulate diff --git a/upstream/gcc_doc.patch b/upstream/gcc_doc.patch index ba76d17..fc39347 100644 --- a/upstream/gcc_doc.patch +++ b/upstream/gcc_doc.patch @@ -55,7 +55,7 @@ that were used to generate code (@option{-fpie}, @option{-fPIE}, or model suboptions) when you specify this option. -+NOTE: With configure --enable-espf=@r{[}all@r{|}ssp@r{]} this option is ++NOTE: With configure --enable-espf=@r{[}all@r{|}pie@r{]} this option is +enabled by default for C, C++, ObjC, ObjC++, if none of @option{-fno-PIE}, +@option{-fno-pie}, @option{-fPIC}, @option{-fpic}, @option{-fno-PIC}, +@option{-fno-pic}, @option{-nostdlib}, @option{-nostartfiles}, @@ -68,7 +68,7 @@ @code{__pie__} and @code{__PIE__}. The macros have the value 1 for @option{-fpie} and 2 for @option{-fPIE}. -+NOTE: With configure --enable-espf=@r{[}all@r{|}ssp@r{]} this option is ++NOTE: With configure --enable-espf=@r{[}all@r{|}pie@r{]} this option is +enabled by default for C, C++, ObjC, ObjC++, if none of @option{-fno-PIE}, +@option{-fno-pie}, @option{-fPIC}, @option{-fpic}, @option{-fno-PIC}, +@option{-fno-pic}, @option{-nostdlib}, @option{-nostartfiles}, @@ -88,11 +88,11 @@ +@option{-D_FORTIFY_SOURCE=2}, @option{-Wformat} and +@option{-Wformat-security} will be turn on as default and depend on +if you use @samp{all} it will turn on @option{-fstack-protection}and -+@option{-fPIE} by default. if the support is there. If you use -+@samp{ssp} it will turn on @option{-fstack-protection} by default if the -+support is there. If you use @samp{pie} it will turn on @option{-fPIE} -+by default if the support is there. We only support x86-64-*-linux* as target -+for now. ++@option{-fPIE} and @option{-pie} by default. if the support is there. If you ++use @samp{ssp} it will turn on @option{-fstack-protection} by default if the ++support is there. If you use @samp{pie} it will turn on @option{-fPIE} and ++@option{-pie} by default if the support is there. We only support ++i?86*-*-linux*, x86_32*-*-linux* and x86_64*-*-linux* as target for now. + @item --disable-libquadmath Specify that the GCC quad-precision math library should not be built.