1 |
commit: de738d984c6dcabfd2ef044227333474a3115738 |
2 |
Author: Magnus Granberg <zorry <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed Apr 27 11:12:41 2011 +0000 |
4 |
Commit: Magnus Granberg <zorry <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Apr 27 11:12:41 2011 +0000 |
6 |
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/hardened-gccpatchset.git;a=commit;h=de738d98 |
7 |
|
8 |
Added the configure.ac patch for upstream fist rev |
9 |
|
10 |
--- |
11 |
upstream/configure.ac.patch | 43 +++++++++++++++++++++++++++++++++++++++++++ |
12 |
1 files changed, 43 insertions(+), 0 deletions(-) |
13 |
|
14 |
diff --git a/upstream/configure.ac.patch b/upstream/configure.ac.patch |
15 |
new file mode 100644 |
16 |
index 0000000..cfee97f |
17 |
--- /dev/null |
18 |
+++ b/upstream/configure.ac.patch |
19 |
@@ -0,0 +1,43 @@ |
20 |
+2011-04-27 Magnus Granberg <zorry@g.o> |
21 |
+ |
22 |
+ * configure Add --enable-espf. Add -fno-stack-protector |
23 |
+ to stage1_cflags. |
24 |
+--- a/configure.ac 2011-04-18 23:27:00.000000000 +0200 |
25 |
++++ b/configure.ac 2011-04-27 12:47:11.351473240 +0200 |
26 |
+@@ -419,6 +419,25 @@ |
27 |
+ noconfigdirs="$noconfigdirs gnattools" |
28 |
+ fi |
29 |
+ |
30 |
++# Check whether --enable-espf was given and target have the support. |
31 |
++AC_ARG_ENABLE([espf], |
32 |
++[AS_HELP_STRING([--enable-espf], |
33 |
++ [Enable Stack protector, Position independent executable and |
34 |
++ Fortify_sources as default if we have suppot for it when compiling |
35 |
++ and link with -z relro and -z now as default. |
36 |
++ Linux targets supported x86_64.])], |
37 |
++[ |
38 |
++ case $target in |
39 |
++ x86_64*-*-linux*) |
40 |
++ enable_espf=yes |
41 |
++ ;; |
42 |
++ *) |
43 |
++ AC_MSG_WARN([*** --enable-espf is not supported on this $target target.]) |
44 |
++ ;; |
45 |
++ esac |
46 |
++]) |
47 |
++AC_SUBST([enable_espf]) |
48 |
++ |
49 |
+ AC_ARG_ENABLE(libssp, |
50 |
+ [AS_HELP_STRING([--enable-libssp], [build libssp directory])], |
51 |
+ ENABLE_LIBSSP=$enableval, |
52 |
+@@ -3152,6 +3171,10 @@ |
53 |
+ esac ;; |
54 |
+ esac |
55 |
+ |
56 |
++# Disable -fstack-protector on stage1 |
57 |
++if test x$enable_espf = xyes; then |
58 |
++ stage1_cflags="$stage1_cflags -fno-stack-protector" |
59 |
++fi |
60 |
+ # This is aimed to mimic bootstrap with a non-GCC compiler to catch problems. |
61 |
+ if test "$GCC" = yes -a "$ENABLE_BUILD_WITH_CXX" != yes; then |
62 |
+ saved_CFLAGS="$CFLAGS" |