From de738d984c6dcabfd2ef044227333474a3115738 Mon Sep 17 00:00:00 2001 From: Magnus Granberg Date: Wed, 27 Apr 2011 13:12:41 +0200 Subject: Added the configure.ac patch for upstream fist rev --- upstream/configure.ac.patch | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 upstream/configure.ac.patch 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 + + * 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" -- cgit v1.2.3-65-gdbad