diff options
author | Mike Frysinger <vapier@gentoo.org> | 2006-03-10 00:46:18 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2006-03-10 00:46:18 +0000 |
commit | 426f7ce7c31998f2e0d3c8daf2aff686ada993fa (patch) | |
tree | 674e12ace9b40bd4c5ee9e549f65ab4f9bd32550 /eclass | |
parent | pass --with-sysroot to binutils to fix cross-compiles with gcc-4.1.0 (diff) | |
download | gentoo-2-426f7ce7c31998f2e0d3c8daf2aff686ada993fa.tar.gz gentoo-2-426f7ce7c31998f2e0d3c8daf2aff686ada993fa.tar.bz2 gentoo-2-426f7ce7c31998f2e0d3c8daf2aff686ada993fa.zip |
scan for newer ssp symbols as well as old in libc
Diffstat (limited to 'eclass')
-rw-r--r-- | eclass/toolchain.eclass | 23 |
1 files changed, 15 insertions, 8 deletions
diff --git a/eclass/toolchain.eclass b/eclass/toolchain.eclass index 44dbf9baf22c..1cd316341c70 100644 --- a/eclass/toolchain.eclass +++ b/eclass/toolchain.eclass @@ -1,6 +1,6 @@ # Copyright 1999-2006 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/toolchain.eclass,v 1.249 2006/03/07 23:06:49 vapier Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/toolchain.eclass,v 1.250 2006/03/10 00:46:18 vapier Exp $ HOMEPAGE="http://www.gnu.org/software/gcc/gcc.html" LICENSE="GPL-2 LGPL-2.1" @@ -482,17 +482,24 @@ libc_has_ssp() { local my_libc=${ROOT}/${libc_prefix}/${libc_file} - # Check for the libc to have the __guard symbols + # Check for gcc-4.x style ssp support if [[ -n $(readelf -s "${my_libc}" 2>/dev/null | \ - grep 'OBJECT.*GLOBAL.*__guard') ]] && \ - [[ -n $(readelf -s "${my_libc}" 2>/dev/null | \ - grep 'FUNC.*GLOBAL.*__stack_smash_handler') ]] + grep 'FUNC.*GLOBAL.*__stack_chk_fail') ]] then return 0 - elif is_crosscompile ; then - die "'${my_libc}' was detected w/out ssp, that sucks (a lot)" else - return 1 + # Check for gcc-3.x style ssp support + if [[ -n $(readelf -s "${my_libc}" 2>/dev/null | \ + grep 'OBJECT.*GLOBAL.*__guard') ]] && \ + [[ -n $(readelf -s "${my_libc}" 2>/dev/null | \ + grep 'FUNC.*GLOBAL.*__stack_smash_handler') ]] + then + return 0 + elif is_crosscompile ; then + die "'${my_libc}' was detected w/out ssp, that sucks (a lot)" + else + return 1 + fi fi } |