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 ) id 1RXmR5-0005EQ-Vi for garchives@archives.gentoo.org; Tue, 06 Dec 2011 04:15:20 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 7335321C191; Tue, 6 Dec 2011 04:15:12 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 3606C21C191 for ; Tue, 6 Dec 2011 04:15:12 +0000 (UTC) Received: from flycatcher.gentoo.org (flycatcher.gentoo.org [81.93.255.6]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 78A5C1B4001 for ; Tue, 6 Dec 2011 04:15:11 +0000 (UTC) Received: by flycatcher.gentoo.org (Postfix, from userid 559) id 4D8542004B; Tue, 6 Dec 2011 04:15:10 +0000 (UTC) From: "Mike Frysinger (vapier)" To: gentoo-commits@lists.gentoo.org Reply-To: gentoo-dev@lists.gentoo.org, vapier@gentoo.org Subject: [gentoo-commits] gentoo-x86 commit in eclass: toolchain.eclass X-VCS-Repository: gentoo-x86 X-VCS-Files: toolchain.eclass X-VCS-Directories: eclass X-VCS-Committer: vapier X-VCS-Committer-Name: Mike Frysinger Content-Type: text/plain; charset=utf8 Message-Id: <20111206041510.4D8542004B@flycatcher.gentoo.org> Date: Tue, 6 Dec 2011 04:15:10 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: quoted-printable X-Archives-Salt: 1febfd12-c48f-40a8-9265-e8153dabc61a X-Archives-Hash: a1c80146bb6944ed89f012b2f1ce36c9 vapier 11/12/06 04:15:10 Modified: toolchain.eclass Log: turn libssp support into a USE flag and drop all the manual detection o= f SSP in the C library Revision Changes Path 1.495 eclass/toolchain.eclass file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/toolchain.e= class?rev=3D1.495&view=3Dmarkup plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/toolchain.e= class?rev=3D1.495&content-type=3Dtext/plain diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/toolchain.e= class?r1=3D1.494&r2=3D1.495 Index: toolchain.eclass =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /var/cvsroot/gentoo-x86/eclass/toolchain.eclass,v retrieving revision 1.494 retrieving revision 1.495 diff -u -r1.494 -r1.495 --- toolchain.eclass 6 Dec 2011 04:07:16 -0000 1.494 +++ toolchain.eclass 6 Dec 2011 04:15:10 -0000 1.495 @@ -1,6 +1,6 @@ # Copyright 1999-2011 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/toolchain.eclass,v 1.494 2011/= 12/06 04:07:16 vapier Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/toolchain.eclass,v 1.495 2011/= 12/06 04:15:10 vapier Exp $ # # Maintainer: Toolchain Ninjas =20 @@ -94,7 +94,7 @@ IUSE+=3D" bootstrap doc gcj gtk hardened libffi multilib objc" =20 tc_version_is_at_least "4.0" && IUSE+=3D" objc-gc mudflap" - tc_version_is_at_least "4.1" && IUSE+=3D" objc++" + tc_version_is_at_least "4.1" && IUSE+=3D" libssp objc++" tc_version_is_at_least "4.2" && IUSE+=3D" openmp" tc_version_is_at_least "4.3" && IUSE+=3D" fixed-point" tc_version_is_at_least "4.4" && IUSE+=3D" graphite" @@ -424,18 +424,6 @@ return 1 } =20 -has_libssp() { - [[ -e /$(get_libdir)/libssp.so ]] && return 0 - return 1 -} - -want_libssp() { - [[ ${GCC_LIBSSP_SUPPORT} =3D=3D "true" ]] || return 1 - has_libssp || return 1 - [[ -n ${PP_VER} ]] || return 1 - return 0 -} - _want_stuff() { local var=3D$1 flag=3D$2 [[ -z ${!var} ]] && return 1 @@ -469,39 +457,6 @@ return 1 } =20 -# This function determines whether or not libc has been patched with sta= ck -# smashing protection support. -libc_has_ssp() { - [[ ${ROOT} !=3D "/" ]] && return 0 - - # lib hacks taken from sandbox configure - echo 'int main(){}' > "${T}"/libctest.c - LC_ALL=3DC gcc "${T}"/libctest.c -lc -o libctest -Wl,-verbose &> "${T}"= /libctest.log || return 1 - local libc_file=3D$(awk '/attempt to open/ { if (($4 ~ /\/libc\.so/) &&= ($5 =3D=3D "succeeded")) LIBC =3D $4; }; END {print LIBC}' "${T}"/libcte= st.log) - - [[ -z ${libc_file} ]] && die "Unable to find a libc !?" - - # Check for gcc-4.x style ssp support - if [[ -n $(readelf -s "${libc_file}" 2>/dev/null | \ - grep 'FUNC.*GLOBAL.*__stack_chk_fail') ]] - then - return 0 - else - # Check for gcc-3.x style ssp support - if [[ -n $(readelf -s "${libc_file}" 2>/dev/null | \ - grep 'OBJECT.*GLOBAL.*__guard') ]] && \ - [[ -n $(readelf -s "${libc_file}" 2>/dev/null | \ - grep 'FUNC.*GLOBAL.*__stack_smash_handler') ]] - then - return 0 - elif is_crosscompile ; then - die "'${libc_file}' was detected w/out ssp, that sucks (a lot)" - else - return 1 - fi - fi -} - # This is to make sure we don't accidentally try to enable support for a # language that doesnt exist. GCC 3.4 supports f77, while 4.0 supports f= 95, etc. # @@ -672,8 +627,6 @@ use_if_iuse gcj && ewarn 'GCJ requires a C++ compiler, disabled due to= USE=3D"-cxx"' fi =20 - want_libssp && libc_has_ssp && \ - die "libssp cannot be used with a glibc that has been patched to provi= de ssp symbols" want_minispecs =20 unset LANGUAGES #265283 @@ -971,7 +924,7 @@ confgcc+=3D" --disable-libmudflap" fi =20 - if want_libssp ; then + if use_if_iuse libssp ; then confgcc+=3D" --enable-libssp" else export gcc_cv_libc_provides_ssp=3Dyes