aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMagnus Granberg <zorry@gentoo.org>2011-06-24 11:35:37 +0200
committerMagnus Granberg <zorry@gentoo.org>2011-06-24 11:35:37 +0200
commit20165346ace9b21623b4ceda5c27fa6600ce783c (patch)
treeb849102faaececb8ba0f4659b21b09a9c7a0320d /upstream/configure.ac.patch
parentUpdated the configure.ac patch for upstream version 3 (diff)
downloadhardened-gccpatchset-20165346ace9b21623b4ceda5c27fa6600ce783c.tar.gz
hardened-gccpatchset-20165346ace9b21623b4ceda5c27fa6600ce783c.tar.bz2
hardened-gccpatchset-20165346ace9b21623b4ceda5c27fa6600ce783c.zip
Updated the configure.ac patch for upstream rev 4
Diffstat (limited to 'upstream/configure.ac.patch')
-rw-r--r--upstream/configure.ac.patch27
1 files changed, 11 insertions, 16 deletions
diff --git a/upstream/configure.ac.patch b/upstream/configure.ac.patch
index a0918cd..396cd0e 100644
--- a/upstream/configure.ac.patch
+++ b/upstream/configure.ac.patch
@@ -1,4 +1,4 @@
-2011-06-23 Magnus Granberg <zorry@gentoo.org>
+2011-06-24 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-23 20:07:06.952639786 +0200
-@@ -4515,6 +4515,150 @@
++++ b/gcc/configure.ac 2011-06-24 03:17:07.448179335 +0200
+@@ -4515,6 +4515,145 @@
AC_SUBST(MAINT)dnl
# --------------
@@ -59,12 +59,8 @@
+ 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 $espf in
-+ yes | no) ;;
-+ *) AC_MSG_ERROR(['$espf' is an invalid value for --enable-espf.
-+Valid choices are 'yes' and 'no'.]) ;;
-+ esac],
-+ [set_espf_enable="$espf"])
++ set_enable_espf=$enableval,
++ set_enable_espf=no)
+if test $set_enable_espf = yes ; then
+ AC_MSG_CHECKING(if $target support espf)
+if test $set_enable_espf = yes ; then
@@ -124,15 +120,14 @@
+ [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.
++ [# glibc 2.8 and later provides _FORTIFY_SOURCES.
+ 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])' \
++ && $EGREP '^[ ]*#[ ]*define[ ]+__GLIBC_MINOR__[ ]+([1-9][0-9]|[8-9])' \
+ $target_header_dir/features.h > /dev/null; then
+ gcc_cv_libc_provides_fortify=yes
-+ elif $EGREP '^[ ]*#[ ]*define[ ]+__UCLIBC__[ ]+1' \
++ elif $EGREP '^[ ]*#[ ]*define[ ]+__UCLIBC__[ ]' \
+ $target_header_dir/features.h > /dev/null ; then
+ gcc_cv_libc_provides_fortify=no
+ fi
@@ -153,11 +148,11 @@
+AC_MSG_CHECKING(if the compiler default to use -fstack-protector)
+ if test $set_enable_espf = yes && test x$gcc_cv_libc_provides_ssp = xyes \
+ && test $set_have_as_tls = yes ; then
-+ enable_espf_pie=yes
++ enable_espf_ssp=yes
+ AC_DEFINE(ENABLE_ESPF_SSP, 1,
+ [Define if your compiler will default to use -fstack-protector.])
+ else
-+ enable_espf_pie=no
++ enable_espf_ssp=no
+ fi
+ AC_MSG_RESULT($enable_espf_ssp)
+
@@ -195,4 +190,4 @@
+# --------------
# Language hooks
# --------------
- \ No newline at end of file
+