diff options
author | Mike Frysinger <vapier@gentoo.org> | 2004-12-02 21:13:13 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2004-12-02 21:13:13 +0000 |
commit | 273b398653ad597a57ccdbc86948c66cbdb9a7ff (patch) | |
tree | 6a68f01ba1a18c9291c038b8b5831d7d10e9fecd /eclass | |
parent | patched to fix selftest failure - bug #70529. (Manifest recommit) (diff) | |
download | gentoo-2-273b398653ad597a57ccdbc86948c66cbdb9a7ff.tar.gz gentoo-2-273b398653ad597a57ccdbc86948c66cbdb9a7ff.tar.bz2 gentoo-2-273b398653ad597a57ccdbc86948c66cbdb9a7ff.zip |
make the libc search more dynamic (ia64 has libc.so.6.1 atm :x)
Diffstat (limited to 'eclass')
-rw-r--r-- | eclass/toolchain.eclass | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/eclass/toolchain.eclass b/eclass/toolchain.eclass index e5cd9d005e03..bac55671a613 100644 --- a/eclass/toolchain.eclass +++ b/eclass/toolchain.eclass @@ -1,6 +1,6 @@ # Copyright 1999-2004 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/toolchain.eclass,v 1.57 2004/12/02 16:51:27 vapier Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/toolchain.eclass,v 1.58 2004/12/02 21:13:13 vapier Exp $ HOMEPAGE="http://www.gnu.org/software/gcc/gcc.html" @@ -395,17 +395,18 @@ libc_has_ssp() { use ppc64 && libc_prefix="/lib64/" libc_prefix="${libc_prefix:="/$(get_libdir)/"}" - use uclibc \ - && local libc_file="libc.so.0" \ - || local libc_file="libc.so.6" + echo 'int main(){}' > ${T}/libctest.c + gcc ${T}/libctest.c -lc -o libctest + local libc_file=$(readelf -d libctest | grep 'NEEDED.*\[libc\.so[0-9\.]*\]' | awk '{print $NF}') + libc_file="${libc_file:1:${#libc_file}-2}" local my_libc=${ROOT}/${libc_prefix}/${libc_file} # Check for the libc to have the __guard symbols if [ "$(readelf -s "${my_libc}" 2>/dev/null | \ - grep GLOBAL | grep OBJECT | grep '__guard')" ] && \ + grep 'OBJECT.*GLOBAL.*__guard')" ] && \ [ "$(readelf -s "${my_libc}" 2>/dev/null | \ - grep GLOBAL | grep FUNC | grep '__stack_smash_handler')" ] + grep 'FUNC.*GLOBAL.*__stack_smash_handler')" ] then return 0 else |