diff mbox

[3-4/12] New configure option --enable-espf=(all|ssp|pie|no)

Message ID 3780683.ka1IE7f3ja@laptop1.gw.ume.nu
State New
Headers show

Commit Message

Magnus Granberg Sept. 7, 2012, 2:12 p.m. UTC
Patch: config_all.patch
This patch define ESPF_GCC_PIE_SPEC, ESPF_GCC_SSP_SPEC,
ESPF_CPP_UNIQUE_OPTIONS_SPEC and ESPF_EXTRA_SPECS
can be used on most linux targets.

Patch_i386.patch
Define DRIVER_SELF_SPECS and add ESPF_EXTRA_SPECS to
SUBTARGET_EXTRA_SPECS

Gentoo Hardened Project
Magnus Granberg

Comments

Joseph Myers Sept. 7, 2012, 6:43 p.m. UTC | #1
On Fri, 7 Sep 2012, Magnus Granberg wrote:

> --- 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

I see nothing related specifically to Linux rather than other targets that 
may use GNU userspace, so I think all this belongs in gnu-user.h.

> --- a/gcc/config/i386/linux.h	2011-06-03 20:30:39.000000000 +0200

Likewise.

> +#if def ENABLE_ESPF

Stray space inside #ifdef.
diff mbox

Patch

--- 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,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,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
--- a/gcc/config/i386/gnu-user.h	2011-05-05 14:32:50.000000000 +0200
+++ b/gcc/config/i386/gnu-user.h	2012-07-09 14:28:38.726289455 +0200
@@ -93,9 +93,16 @@  along with GCC; see the file COPYING3.
   "--32 %{!mno-sse2avx:%{mavx:-msse2avx}} %{msse2avx:%{!mavx:-msse2avx}}"
 
 #undef  SUBTARGET_EXTRA_SPECS
+#if def ENABLE_ESPF
 #define SUBTARGET_EXTRA_SPECS \
   { "link_emulation", GNU_USER_LINK_EMULATION },\
-  { "dynamic_linker", GNU_USER_DYNAMIC_LINKER }
+  { "dynamic_linker", GNU_USER_DYNAMIC_LINKER }, \
+  ESPF_EXTRA_SPECS
+#else
+#define SUBTARGET_EXTRA_SPECS \
+  { "link_emulation", GNU_USER_LINK_EMULATION },\
+  { "dynamic_linker", GNU_USER_DYNAMIC_LINKER }
+#endif
 
 #undef	LINK_SPEC
 #define LINK_SPEC "-m %(link_emulation) %{shared:-shared} \
--- a/gcc/config/i386/i386.h	2011-11-24 23:11:12.000000000 +0100
+++ b/gcc/config/i386/i386.h	2012-07-09 14:21:24.575276517 +0200
@@ -617,13 +617,16 @@  enum target_cpu_default
    Do not define this macro if it does not need to do anything.  */
 
 #ifndef SUBTARGET_EXTRA_SPECS
+#ifdef ENABLE_ESPF
+#define SUBTARGET_EXTRA_SPECS ESPF_EXTRA_SPECS
+#else
 #define SUBTARGET_EXTRA_SPECS
 #endif
+#endif
 
 #define EXTRA_SPECS							\
   { "cc1_cpu",  CC1_CPU_SPEC },						\
   SUBTARGET_EXTRA_SPECS
-
 
 /* Set the value of FLT_EVAL_METHOD in float.h.  When using only the
    FPU, assume that the fpcw is set to extended precision; when using