From mboxrd@z Thu Jan  1 00:00:00 1970
Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org)
	by finch.gentoo.org with esmtp (Exim 4.60)
	(envelope-from <gentoo-commits+bounces-356574-garchives=archives.gentoo.org@lists.gentoo.org>)
	id 1QZoR3-0007xi-4F
	for garchives@archives.gentoo.org; Thu, 23 Jun 2011 18:15:25 +0000
Received: from pigeon.gentoo.org (localhost [127.0.0.1])
	by pigeon.gentoo.org (Postfix) with SMTP id 7B96E1C06A;
	Thu, 23 Jun 2011 18:15:09 +0000 (UTC)
Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183])
	by pigeon.gentoo.org (Postfix) with ESMTP id 34AA11C06A
	for <gentoo-commits@lists.gentoo.org>; Thu, 23 Jun 2011 18:15:09 +0000 (UTC)
Received: from pelican.gentoo.org (unknown [66.219.59.40])
	(using TLSv1 with cipher ADH-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by smtp.gentoo.org (Postfix) with ESMTPS id 626F11B4016
	for <gentoo-commits@lists.gentoo.org>; Thu, 23 Jun 2011 18:15:08 +0000 (UTC)
Received: from localhost.localdomain (localhost [127.0.0.1])
	by pelican.gentoo.org (Postfix) with ESMTP id 8B2988003C
	for <gentoo-commits@lists.gentoo.org>; Thu, 23 Jun 2011 18:15:07 +0000 (UTC)
From: "Magnus Granberg" <zorry@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Content-type: text/plain; charset=UTF-8
Reply-To: gentoo-dev@lists.gentoo.org, "Magnus Granberg" <zorry@gentoo.org>
Message-ID: <0e22467160c8c89a7fb7837f132cfb7b82f76e91.zorry@gentoo>
Subject: [gentoo-commits] proj/hardened-gccpatchset:master commit in: upstream/
X-VCS-Repository: proj/hardened-gccpatchset
X-VCS-Files: upstream/configure.ac.patch
X-VCS-Directories: upstream/
X-VCS-Committer: zorry
X-VCS-Committer-Name: Magnus Granberg
X-VCS-Revision: 0e22467160c8c89a7fb7837f132cfb7b82f76e91
Date: Thu, 23 Jun 2011 18:15:07 +0000 (UTC)
Precedence: bulk
List-Post: <mailto:gentoo-commits@lists.gentoo.org>
List-Help: <mailto:gentoo-commits+help@lists.gentoo.org>
List-Unsubscribe: <mailto:gentoo-commits+unsubscribe@lists.gentoo.org>
List-Subscribe: <mailto:gentoo-commits+subscribe@lists.gentoo.org>
List-Id: Gentoo Linux mail <gentoo-commits.gentoo.org>
X-BeenThere: gentoo-commits@lists.gentoo.org
Content-Transfer-Encoding: quoted-printable
X-Archives-Salt: 
X-Archives-Hash: 7783d129e3e10436042e12b682b87d77

commit:     0e22467160c8c89a7fb7837f132cfb7b82f76e91
Author:     Magnus Granberg <zorry <AT> gentoo <DOT> org>
AuthorDate: Thu Jun 23 18:14:26 2011 +0000
Commit:     Magnus Granberg <zorry <AT> gentoo <DOT> org>
CommitDate: Thu Jun 23 18:14:26 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=3Dproj/hardened-gccp=
atchset.git;a=3Dcommit;h=3D0e224671

Updated the configure.ac patch for upstream version 3

---
 upstream/configure.ac.patch |   31 +++++++++++++++++++++++++------
 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>
=20
 		* configure		Add --enable-espf.  Add -fno-stack-protector
 		to stage1_cflags.
@@ -44,8 +44,8 @@
  if test "$GCC" =3D yes -a "$ENABLE_BUILD_WITH_CXX" !=3D yes; then
    saved_CFLAGS=3D"$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
 =20
  # --------------
@@ -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=3Dyes],
-+    [gcc_cv_libc_provides_fortify=3Dno])
++# 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=3Dno
++    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=3Dyes
++        elif $EGREP '^[ 	]*#[ 	]*define[ 	]+__UCLIBC__[ 	]+1' \
++	     $target_header_dir/features.h > /dev/null ; then
++             gcc_cv_libc_provides_fortify=3Dno
++	fi
++      fi]
++	;;
++  *) gcc_cv_libc_provides_fortify=3Dno ;;
++    esac])
 +
 +  AC_MSG_CHECKING(if the compiler default to use -fPIE and link with -p=
ie)
 +  if test $set_enable_espf =3D yes && test x"$gcc_cv_ld_pie" =3D xyes; =
then