blob: 3fe482403123001f070604756637e0142a6acb62 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
--- 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,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 \
+ "%{pie|fpic|fPIC|fpie|fPIE|fno-pic|fno-PIC|fno-pie|fno-PIE| \
+ shared|static|nostdlib|nostartfiles:;:-fPIE -pie}"
+#else
+#define ESPF_GCC_PIE_SPEC ""
+#endif
+#ifdef ENABLE_ESPF_SSP
+#define ESPF_GCC_SSP_SPEC \
+ "%{nostdlib|nodefaultlibs|fno-stack-protector|freestanding| \
+ fstack-protector|fstack-protector-all:;:-fstack-protector}"
+#else
+#define ESPF_GCC_SSP_SPEC ""
+#endif
+#ifdef ENABLE_ESPF_FORTIFY
+#define ESPF_CPP_UNIQUE_OPTIONS_SPEC \
+ "%{D_FORTIFY_SOURCE|D_FORTIFY_SOURCE=*|U_FORTIFY_SOURCE:;:-D_FORTIFY_SOURCE=2}"
+#else
+#define ESPF_CPP_UNIQUE_OPTIONS_SPEC ""
+#endif
+#define ESPF_DRIVER_SELF_SPECS \
+ ESPF_GCC_PIE_SPEC, \
+ ESPF_GCC_SSP_SPEC
+#define ESPF_EXTRA_SPECS \
+ { "espf_cpp_unique_options", ESPF_CPP_UNIQUE_OPTIONS_SPEC }
+#endif
|