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 1Pwasw-0002Qv-J6 for garchives@archives.gentoo.org; Mon, 07 Mar 2011 13:54:08 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 673C0E055D; Mon, 7 Mar 2011 13:53:59 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 288BCE055D for ; Mon, 7 Mar 2011 13:53:59 +0000 (UTC) Received: from pelican.gentoo.org (unknown [66.219.59.40]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 232931B419C for ; Mon, 7 Mar 2011 13:53:58 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by pelican.gentoo.org (Postfix) with ESMTP id 7A4498006A for ; Mon, 7 Mar 2011 13:53:57 +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: <14148e69cc38dc8d81a6bbc0ee9c596c0d47817d.zorry@gentoo> Subject: [gentoo-commits] proj/hardened-gccpatchset:master commit in: gcc-4.6.0/piepatch/ X-VCS-Repository: proj/hardened-gccpatchset X-VCS-Files: gcc-4.6.0/piepatch/30_all_gcc46_esp.h.patch X-VCS-Directories: gcc-4.6.0/piepatch/ X-VCS-Committer: zorry X-VCS-Committer-Name: Magnus Granberg X-VCS-Revision: 14148e69cc38dc8d81a6bbc0ee9c596c0d47817d Date: Mon, 7 Mar 2011 13:53:57 +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: 212b08d311d76d8a5fba653963afcd3d commit: 14148e69cc38dc8d81a6bbc0ee9c596c0d47817d Author: Magnus Granberg gentoo org> AuthorDate: Mon Mar 7 13:53:29 2011 +0000 Commit: Magnus Granberg gentoo org> CommitDate: Mon Mar 7 13:53:29 2011 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Dproj/hardened-gccp= atchset.git;a=3Dcommit;h=3D14148e69 remove the gcc46_esp.patch in gcc4.6 --- gcc-4.6.0/piepatch/30_all_gcc46_esp.h.patch | 154 ---------------------= ------ 1 files changed, 0 insertions(+), 154 deletions(-) diff --git a/gcc-4.6.0/piepatch/30_all_gcc46_esp.h.patch b/gcc-4.6.0/piep= atch/30_all_gcc46_esp.h.patch deleted file mode 100644 index e516d4c..0000000 --- a/gcc-4.6.0/piepatch/30_all_gcc46_esp.h.patch +++ /dev/null @@ -1,154 +0,0 @@ -2011-01-01 Magnus Granberg - - * gcc/esp.h New file to support --enable-esp - Version 20110101.1 - ---- gcc/esp.h 2010-04-09 16:14:00.000000000 +0200 -+++ gcc/esp.h 2010-04-29 21:30:47.000000000 +0200 -@@ -0,0 +1,146 @@ -+/* License terms see GNU GENERAL PUBLIC LICENSE Version 3. -+ * Version 20110101.1 -+ * Magnus Granberg (Zorry) */ -+#ifndef GCC_ESP_H -+#define GCC_ESP_H -+ -+/* This file will add -fstack-protector-all, -fPIE, -pie and -z now=20 -+ as default if the defines and the spec allow it. -+ Added a hack for gcc-specs-* in toolchain-funcs.eclass and _filter-har= dened in flag-o-matic.eclass -+ to support older hardened GCC patches and we don't need to change the = code on gcc-specs-* and _filter-hardened. -+ This will add some unsupported upstream commands options as -nopie and= -nonow. -+ -D__KERNEL__ is added so we don't have -fPIE, -pie and -fstack-protect= or-all when building kernels. -+ ESP_CC1_SPEC is added to CC1_SPEC. -+ ESP_CC1_STRICT_OVERFLOW_SPEC is added so we don't disable the strict-o= verflow check. -+ ESP_LINK_PIE_CHECK_SPEC check for -pie, -p, -pg, -profile and -static. -+ ENABLE_CRTBEGINTS add support for crtbeginTS.o, build -static with -fP= IE or -fpie. -+*/ -+#ifdef ENABLE_ESP -+=09 -+ /* Hack to support gcc-specs-* in toolchain-funcs.eclass and _filter-h= ardened in flag-o-matic.eclass */ -+ #define ESP_CC1_SPEC " %(esp_cc1_ssp) %(esp_cc1_pie) %(esp_cc1_strict_= overflow)" -+ #if defined ( EFAULT_SSP ) || defined ( EFAULT_PIE_SSP ) -+ #define ESP_CC1_SSP_SPEC "%{!fno-stack-protector: %{!fno-stack-protec= tor-all: }}" -+ #else -+ #define ESP_CC1_SSP_SPEC "" -+ #endif -+ #if defined ( EFAULT_PIE ) || defined ( EFAULT_PIE_SSP ) -+ #define ESP_CC1_PIE_SPEC "%{!nopie: }" -+ #else -+ #define ESP_CC1_PIE_SPEC "" -+ #endif -+ #define ESP_CC1_STRICT_OVERFLOW_SPEC "%{!fstrict-overflow:%{!fno-stric= t-overflow: -fno-strict-overflow}}" -+ -+ /* ESP_LINK_SPEC is added to LINK_PIE_SPEC if esp is enable -+ -z now will be added if we don't have -vanilla spec. We do a -pie inc= ompatible check -+ Don't remove the specs in the end */ -+ #define ESP_LINK_SPEC "%(esp_link_now) %(esp_link_pie_check) " -+ #define ESP_LINK_NOW_SPEC "%{!nonow:-z now}" -+ -+ /* We use ESP_COMMAND_OPTIONS_SPEC to add pie command-line options. *= / -+ #define ESP_COMMAND_OPTIONS_SPEC "%{!D__KERNEL__:%{!nopie:%(esp_option= s_pie) \ -+ %(esp_options_ssp) %(esp_link_pie)}}" -+=09 -+ /* ESP_OPTIONS_SPEC is added to the compiler spec in gcc/gcc.c */ -+ #define ESP_OPTIONS_SPEC "%(esp_options_ssp)" -+ -+ /* ESP_CPP_OPTIONS_SPEC is added to the cpp_options spec in gcc/gcc.c = =20 -+ For precompiling headers. */ -+ #define ESP_CPP_OPTIONS_SPEC "%(esp_options_ssp)" -+ -+ /* This will add -fstack-protector-all if we don't have -nostdlib -no= defaultlibs -fno-stack-protector -fstack-protector -+ -fstack-protector-all and we have EFAULT_SSP or EFAULT_PIE_SSP define= d. */ -+ #if defined ( EFAULT_SSP ) || defined ( EFAULT_PIE_SSP ) -+ #define ESP_OPTIONS_SSP_SPEC \ -+ "%{!nostdlib:%{!nodefaultlibs: %{!fno-stack-protector: \ -+ %{!fstack-protector:%{!fstack-protector-all:-fstack-protector-all}}}= }}" -+ #else -+ #define ESP_OPTIONS_SSP_SPEC "" -+ #endif -+ -+ /* If EFAULT_PIE or EFAULT_PIE_SSP is defined we will add -fPIE -pie = */ -+ #if defined ( EFAULT_PIE ) || defined ( EFAULT_PIE_SSP ) -+ -+ /* This will add -fPIE if we don't have -pie -fpic -fPIC -fpie -fPIE= -fno-pic -fno-PIC -fno-pie -fno-PIE -shared -static -+ -nostdlib -nostartfiles. */ -+ /* With ENABLE_CRTBEGINTS we don't need to check for -static */ -+ #ifdef ENABLE_CRTBEGINTS -+ #define ESP_OPTIONS_PIE_SPEC \ -+ "%{!pie: %{!fpic:%{!fPIC:%{!fpie:%{!fPIE: %{!fno-pic:%{!fno-PIC:%{!= fno-pie:%{!fno-PIE: \ -+ %{!shared: %{!nostdlib: %{!nostartfiles:-fPIE}} } }}}} }}}} }" -+ #else -+ #define ESP_OPTIONS_PIE_SPEC \ -+ "%{!pie: %{!fpic:%{!fPIC:%{!fpie:%{!fPIE: %{!fno-pic:%{!fno-PIC:%{!= fno-pie:%{!fno-PIE: \ -+ %{!shared: %{!static: %{!nostdlib: %{!nostartfiles:-fPIE}} } }}}} }= }}} }}" -+ #endif -+ -+ /* This will add -pie if we don't have -pie -A -fno-pic -fno-PIC -fn= o-pie -fno-PIE -shared -static -r -nostdlib=20 -+ -nostartfiles */ -+ /* With ENABLE_CRTBEGINTS we don't need to check for -static -+ and we add -pie only to get the start and endfiles. -pie will not go= to the linker. */ -+ #ifdef ENABLE_CRTBEGINTS -+ #define ESP_LINK_PIE_SPEC \ -+ "%{!pie:%{!A:%{!fno-pie:%{!fno-PIE:%{!fno-pic:%{!fno-PIC:%{!shared:= %{!r: \ -+ %{!nostdlib:%{!nostartfiles:-pie}}}}}}}}}}" -+ #else -+ #define ESP_LINK_PIE_SPEC \ -+ "%{!pie:%{!A:%{!fno-pie:%{!fno-PIE:%{!fno-pic:%{!fno-PIC:%{!shared:= %{!static:%{!r: \ -+ %{!nostdlib:%{!nostartfiles:-pie}}}}}}}}}}}" -+ #endif -+ =09 -+ /* This will check if -pie is set when (-static) -pg -p -profile. If= set it will make gcc print out -+ "-pie and (static)|pg|p|profile are incompatible when linking" */ -+ /* With ENABLE_CRTBEGINTS we don't need to check for -static */ -+ #ifdef ENABLE_CRTBEGINTS -+ #define ESP_LINK_PIE_CHECK_SPEC \ -+ "%{pie:%{pg|p|profile:%e-pie and -pg|p|profile are incompatible whe= n linking}}" -+ #else -+ #define ESP_LINK_PIE_CHECK_SPEC \ -+ "%{pie:%{static|pg|p|profile:%e-pie and -static|pg|p|profile are in= compatible when linking}}" -+ #endif -+ -+ /* We don't pass -pie to the linker when -static. */ -+ #ifdef ENABLE_CRTBEGINTS -+ #define LINK_PIE_SPEC "%{!static:%{pie:-pie}} %(esp_link)" -+ #else -+ #define LINK_PIE_SPEC "%{pie:-pie} %(esp_link)" -+ #endif -+ -+ #else -+ #define ESP_OPTIONS_PIE_SPEC "" -+ #define ESP_LINK_PIE_CHECK_SPEC "" -+ #define ESP_LINK_PIE_SPEC "" -+ #define LINK_PIE_SPEC "%{pie:-pie} %(esp_link)" -+ #endif -+ -+ /* We add extra spec name's to the EXTRA_SPECS list */ -+ #define ESP_EXTRA_SPECS \ -+ { "esp_cc1", ESP_CC1_SPEC }, \ -+ { "esp_cc1_pie", ESP_CC1_PIE_SPEC }, \ -+ { "esp_cc1_ssp", ESP_CC1_SSP_SPEC }, \ -+ { "esp_cc1_strict_overflow", ESP_CC1_STRICT_OVERFLOW_SPEC }, \ -+ { "esp_link", ESP_LINK_SPEC }, \ -+ { "esp_link_now", ESP_LINK_NOW_SPEC }, \ -+ { "esp_link_pie", ESP_LINK_PIE_SPEC }, \ -+ { "esp_link_pie_check", ESP_LINK_PIE_CHECK_SPEC }, \ -+ { "esp_command_options", ESP_COMMAND_OPTIONS_SPEC }, \ -+ { "esp_cpp_options", ESP_CPP_OPTIONS_SPEC }, \ -+ { "esp_options", ESP_OPTIONS_SPEC }, \ -+ { "esp_options_pie", ESP_OPTIONS_PIE_SPEC }, \ -+ { "esp_options_ssp", ESP_OPTIONS_SSP_SPEC } -+ -+ static const char *esp_command_options_spec =3D ESP_COMMAND_OPTIONS_SP= EC; -+ static const char *cc1_spec =3D CC1_SPEC ESP_CC1_SPEC; -+ -+#else /* If not ESP_ENABLE defined do this. */ -+ -+ #define ESP_OPTIONS_SPEC "" -+ #define ESP_CPP_OPTIONS_SPEC "" -+ -+ /* We add extra spec name's to the EXTRA_SPECS list */ -+ #define ESP_EXTRA_SPECS \ -+ { "esp_options", ESP_OPTIONS_SPEC }, \ -+ { "esp_cpp_options", ESP_CPP_OPTIONS_SPEC } -+ -+#endif -+#endif /* End GCC_ESP_H */