vapier      16/11/15 19:38:23

  Modified:             README.history
  Added:               
                        
00_all_0089-configure-accept-__stack_chk_fail_local-for-ssp-supp.patch
  Log:
  add upstream fix for default ssp detection w/gcc-6.2 #582690

Revision  Changes    Path
1.7                  src/patchsets/glibc/2.23/README.history

file : 
http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/glibc/2.23/README.history?rev=1.7&view=markup
plain: 
http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/glibc/2.23/README.history?rev=1.7&content-type=text/plain
diff : 
http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/glibc/2.23/README.history?r1=1.6&r2=1.7

Index: README.history
===================================================================
RCS file: /var/cvsroot/gentoo/src/patchsets/glibc/2.23/README.history,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- README.history      14 Nov 2016 20:05:34 -0000      1.6
+++ README.history      15 Nov 2016 19:38:23 -0000      1.7
@@ -1,3 +1,6 @@
+6              15 Nov 2016
+       + 00_all_0089-configure-accept-__stack_chk_fail_local-for-ssp-supp.patch
+
 5              12 Nov 2016
        + 00_all_0023-configure-fix-test-usage.patch
        + 00_all_0024-Revert-sys-types.h-drop-sys-sysmacros.h-include.patch



1.1                  
src/patchsets/glibc/2.23/00_all_0089-configure-accept-__stack_chk_fail_local-for-ssp-supp.patch

file : 
http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/glibc/2.23/00_all_0089-configure-accept-__stack_chk_fail_local-for-ssp-supp.patch?rev=1.1&view=markup
plain: 
http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/glibc/2.23/00_all_0089-configure-accept-__stack_chk_fail_local-for-ssp-supp.patch?rev=1.1&content-type=text/plain

Index: 00_all_0089-configure-accept-__stack_chk_fail_local-for-ssp-supp.patch
===================================================================
>From e474f526b4ece48cc081a4434b165b3c9082a360 Mon Sep 17 00:00:00 2001
From: Denis Kaganovich <[email protected]>
Date: Thu, 20 Oct 2016 22:01:39 +0200
Subject: [PATCH] configure: accept __stack_chk_fail_local for ssp support too
 [BZ #20662]

When glibc is compiled with gcc 6.2 that has been configured with
--enable-default-pie and --enable-default-ssp, the configure script
fails to detect that the compiler has ssp turned on by default when
being built for i686-linux-gnu.

This is because gcc is emitting __stack_chk_fail_local but the
script is only looking for __stack_chk_fail.  Support both.

Example output:
checking whether x86_64-pc-linux-gnu-gcc -m32 -Wl,-O1 -Wl,--as-needed
implicitly enables -fstack-protector... no

(cherry picked from commit c7409aded44634411a19b0b7178b7faa237835e6)
(cherry picked from commit a6a59e99d1249dc386d0a042c39e3860fbb7b6b6)
---
 configure    | 8 +++++---
 configure.ac | 8 +++++---
 2 files changed, 10 insertions(+), 6 deletions(-)

diff --git a/configure b/configure
index 8fe59377eacf..ee49f286af3e 100755
--- a/configure
+++ b/configure
@@ -6252,12 +6252,14 @@ echo >&5 "libc_undefs='$libc_undefs'"
 # symbols (resolved by the linker), so filter out unknown symbols.
 # This will fail to produce the correct result if the compiler
 # defaults to -fstack-protector but this produces an undefined symbol
-# other than __stack_chk_fail.  However, compilers like that have not
-# been encountered in practice.
-libc_undefs=`echo "$libc_undefs" | egrep '^(foobar|__stack_chk_fail)$'`
+# other than __stack_chk_fail or __stack_chk_fail_local. However,
+# compilers like that have not been encountered in practice.
+libc_undefs=`echo "$libc_undefs" | \
+  egrep '^(foobar|__stack_chk_fail|__stack_chk_fail_local)$'`
 case "$libc_undefs" in
 foobar) libc_cv_predef_stack_protector=no ;;
 '__stack_chk_fail
+foobar'|'__stack_chk_fail_local
 foobar') libc_cv_predef_stack_protector=yes ;;
 *) as_fn_error $? "unexpected symbols in test: $libc_undefs" "$LINENO" 5 ;;
 esac
diff --git a/configure.ac b/configure.ac
index 3c766b7409f7..5932138bbd5e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1603,12 +1603,14 @@ echo >&AS_MESSAGE_LOG_FD "libc_undefs='$libc_undefs'"
 # symbols (resolved by the linker), so filter out unknown symbols.
 # This will fail to produce the correct result if the compiler
 # defaults to -fstack-protector but this produces an undefined symbol
-# other than __stack_chk_fail.  However, compilers like that have not
-# been encountered in practice.
-libc_undefs=`echo "$libc_undefs" | egrep '^(foobar|__stack_chk_fail)$'`
+# other than __stack_chk_fail or __stack_chk_fail_local. However,
+# compilers like that have not been encountered in practice.
+libc_undefs=`echo "$libc_undefs" | \
+  egrep '^(foobar|__stack_chk_fail|__stack_chk_fail_local)$'`
 case "$libc_undefs" in
 foobar) libc_cv_predef_stack_protector=no ;;
 '__stack_chk_fail
+foobar'|'__stack_chk_fail_local
 foobar') libc_cv_predef_stack_protector=yes ;;
 *) AC_MSG_ERROR([unexpected symbols in test: $libc_undefs]) ;;
 esac],
-- 
2.10.2





Reply via email to