This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH 5-6/12 ] New configure option --enable-espf=(all|ssp|pie|no)


Patch: config.in.patch
Add ENABLE_ESPF*

Patch: gcc.c.patch
Add espf_cpp_unique_options to *cpp_unique_options

Gentoo Hardened Project
Magnus Granberg
--- a/gcc/config.in	2011-04-24 00:36:52.000000000 +0200
+++ b/gcc/config.in	2011-06-24 14:17:05.166236726 +0200
@@ -77,6 +77,29 @@
 #endif
 
 
+/* Define to 1 to enable espf. */
+#ifndef USED_FOR_TARGET
+#undef ENABLE_ESPF
+#endif
+
+
+/* Define to 1 to enable espf with FORTIFY_SOURCES. */
+#ifndef USED_FOR_TARGET
+#undef ENABLE_ESPF_FORTIFY
+#endif
+
+
+/* Define to 1 to enable espf with -fPIE -pie. */
+#ifndef USED_FOR_TARGET
+#undef ENABLE_ESPF_PIE
+#endif
+
+
+/* Define to 1 to enable espf with -fstack-protector. */
+#ifndef USED_FOR_TARGET
+#undef ENABLE_ESPF_SSP
+#endif
+
 /* Define to 1 to enable fixed-point arithmetic extension to C. */
 #ifndef USED_FOR_TARGET
 #undef ENABLE_FIXED_POINT
--- a/gcc/gcc.c	2012-02-28 18:31:38.000000000 +0100
+++ 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} "
+ /* 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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]