aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMagnus Granberg <zorry@gentoo.org>2011-04-27 13:12:41 +0200
committerMagnus Granberg <zorry@gentoo.org>2011-04-27 13:12:41 +0200
commitde738d984c6dcabfd2ef044227333474a3115738 (patch)
tree1cef95a7f35f90a9766e544a5a62cc4d4cbddf5c /upstream/configure.ac.patch
parentbump the gcc-4.6 patchset (diff)
downloadhardened-gccpatchset-de738d984c6dcabfd2ef044227333474a3115738.tar.gz
hardened-gccpatchset-de738d984c6dcabfd2ef044227333474a3115738.tar.bz2
hardened-gccpatchset-de738d984c6dcabfd2ef044227333474a3115738.zip
Added the configure.ac patch for upstream fist rev
Diffstat (limited to 'upstream/configure.ac.patch')
-rw-r--r--upstream/configure.ac.patch43
1 files changed, 43 insertions, 0 deletions
diff --git a/upstream/configure.ac.patch b/upstream/configure.ac.patch
new file mode 100644
index 0000000..cfee97f
--- /dev/null
+++ b/upstream/configure.ac.patch
@@ -0,0 +1,43 @@
+2011-04-27 Magnus Granberg <zorry@gentoo.org>
+
+ * configure Add --enable-espf. Add -fno-stack-protector
+ to stage1_cflags.
+--- a/configure.ac 2011-04-18 23:27:00.000000000 +0200
++++ b/configure.ac 2011-04-27 12:47:11.351473240 +0200
+@@ -419,6 +419,25 @@
+ noconfigdirs="$noconfigdirs gnattools"
+ fi
+
++# Check whether --enable-espf was given and target have the support.
++AC_ARG_ENABLE([espf],
++[AS_HELP_STRING([--enable-espf],
++ [Enable Stack protector, Position independent executable and
++ Fortify_sources as default if we have suppot for it when compiling
++ and link with -z relro and -z now as default.
++ Linux targets supported x86_64.])],
++[
++ case $target in
++ x86_64*-*-linux*)
++ enable_espf=yes
++ ;;
++ *)
++ AC_MSG_WARN([*** --enable-espf is not supported on this $target target.])
++ ;;
++ esac
++])
++AC_SUBST([enable_espf])
++
+ AC_ARG_ENABLE(libssp,
+ [AS_HELP_STRING([--enable-libssp], [build libssp directory])],
+ ENABLE_LIBSSP=$enableval,
+@@ -3152,6 +3171,10 @@
+ esac ;;
+ esac
+
++# Disable -fstack-protector on stage1
++if test x$enable_espf = xyes; then
++ stage1_cflags="$stage1_cflags -fno-stack-protector"
++fi
+ # This is aimed to mimic bootstrap with a non-GCC compiler to catch problems.
+ if test "$GCC" = yes -a "$ENABLE_BUILD_WITH_CXX" != yes; then
+ saved_CFLAGS="$CFLAGS"