aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMagnus Granberg <zorry@gentoo.org>2011-06-23 20:14:26 +0200
committerMagnus Granberg <zorry@gentoo.org>2011-06-23 20:14:26 +0200
commit0e22467160c8c89a7fb7837f132cfb7b82f76e91 (patch)
tree0f08caf8442560f7e209717c22ddc3c6e4ddfea9 /upstream
parentUpdated configure.ac patch for upstreem (diff)
downloadhardened-gccpatchset-0e22467160c8c89a7fb7837f132cfb7b82f76e91.tar.gz
hardened-gccpatchset-0e22467160c8c89a7fb7837f132cfb7b82f76e91.tar.bz2
hardened-gccpatchset-0e22467160c8c89a7fb7837f132cfb7b82f76e91.zip
Updated the configure.ac patch for upstream version 3
Diffstat (limited to 'upstream')
-rw-r--r--upstream/configure.ac.patch31
1 files changed, 25 insertions, 6 deletions
diff --git a/upstream/configure.ac.patch b/upstream/configure.ac.patch
index 54cd876..a0918cd 100644
--- a/upstream/configure.ac.patch
+++ b/upstream/configure.ac.patch
@@ -1,4 +1,4 @@
-2011-06-22 Magnus Granberg <zorry@gentoo.org>
+2011-06-23 Magnus Granberg <zorry@gentoo.org>
* configure Add --enable-espf. Add -fno-stack-protector
to stage1_cflags.
@@ -44,8 +44,8 @@
if test "$GCC" = yes -a "$ENABLE_BUILD_WITH_CXX" != yes; then
saved_CFLAGS="$CFLAGS"
--- a/gcc/configure.ac 2011-04-13 19:12:53.000000000 +0200
-+++ b/gcc/configure.ac 2011-06-21 02:51:23.602374686 +0200
-@@ -4515,6 +4515,131 @@
++++ b/gcc/configure.ac 2011-06-23 20:07:06.952639786 +0200
+@@ -4515,6 +4515,150 @@
AC_SUBST(MAINT)dnl
# --------------
@@ -118,9 +118,28 @@
+ fi
+ ])
+
-+ # Check for -D_FORTIFY_SOURCES support in target C library
-+ AC_CHECK_FUNC(__fortify_fail,[gcc_cv_libc_provides_fortify=yes],
-+ [gcc_cv_libc_provides_fortify=no])
++# Check for FORTIFY_SOURCES support in target C library.
++AC_CACHE_CHECK(for _FORTIFY_SOURCES support in target C library,
++ gcc_cv_libc_provides_fortify,
++ [gcc_cv_libc_provides_fortify=no
++ case "$target" in
++ *-*-linux*)
++ [# glibc 2.4 and later provides __stack_chk_fail and
++ # either __stack_chk_guard, or TLS access to stack guard canary.
++ if test -f $target_header_dir/features.h; then
++ if $EGREP '^[ ]*#[ ]*define[ ]+__GLIBC__[ ]+2' \
++ $target_header_dir/features.h > /dev/null \
++ && $EGREP '^[ ]*#[ ]*define[ ]+__GLIBC_MINOR__[ ]+([1-9][0-9]|[4-9])' \
++ $target_header_dir/features.h > /dev/null; then
++ gcc_cv_libc_provides_fortify=yes
++ elif $EGREP '^[ ]*#[ ]*define[ ]+__UCLIBC__[ ]+1' \
++ $target_header_dir/features.h > /dev/null ; then
++ gcc_cv_libc_provides_fortify=no
++ fi
++ fi]
++ ;;
++ *) gcc_cv_libc_provides_fortify=no ;;
++ esac])
+
+ AC_MSG_CHECKING(if the compiler default to use -fPIE and link with -pie)
+ if test $set_enable_espf = yes && test x"$gcc_cv_ld_pie" = xyes; then