From: Travis Tilley Date: Tue, 9 Nov 2004 21:18:31 +0000 (+0000) Subject: let the bounds checking patch work for versions of gcc other then 3.4.2 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=a6fd1990b3a09def447b9ca6767ced36cfa43833;p=gentoo.git let the bounds checking patch work for versions of gcc other then 3.4.2 --- diff --git a/eclass/toolchain.eclass b/eclass/toolchain.eclass index 1b18bcb31860..ea48d147433b 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.46 2004/11/09 18:54:23 lv Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/toolchain.eclass,v 1.47 2004/11/09 21:18:31 lv Exp $ # # This eclass should contain general toolchain-related functions that are # expected to not change, or change much. @@ -267,7 +267,7 @@ get_gcc_src_uri() { if [ -n "${HTB_VER}" ] ; then GCC_SRC_URI="${GCC_SRC_URI} - boundschecking? ( http://web.inter.nl.net/hcc/Haj.Ten.Brugge/bounds-checking-${PN}-${PV}-${HTB_VER}.patch.bz2 )" + boundschecking? ( http://web.inter.nl.net/hcc/Haj.Ten.Brugge/bounds-checking-${PN}-${HTB_GCC_VER:=${PV}}-${HTB_VER}.patch.bz2 )" fi echo "${GCC_SRC_URI}" @@ -339,7 +339,7 @@ gcc_quick_unpack() { # pappy@gentoo.org - Fri Oct 1 23:24:39 CEST 2004 if use boundschecking then - unpack "bounds-checking-${PN}-${PV}-${HTB_VER}.patch.bz2" + unpack "bounds-checking-${PN}-${HTB_GCC_VER:=${PV}}-${HTB_VER}.patch.bz2" fi popd > /dev/null @@ -373,12 +373,9 @@ exclude_gcc_patches() { } do_gcc_HTB_boundschecking_patches() { - # only works for 3.4.2 at the moment - if [ "${GCCMAJOR}" -eq 3 -a "${GCCMINOR}" -eq 4 -a "${GCCMICRO}" -eq 2 ] ; then - # modify the bounds checking patch with a regression patch - epatch "${WORKDIR}/bounds-checking-${PN}-${PV}-${HTB_VER}.patch" - release_version="${release_version}, HTB-${HTB_VER}" - fi + # modify the bounds checking patch with a regression patch + epatch "${WORKDIR}/bounds-checking-${PN}-${HTB_GCC_VER:=${PV}}-${HTB_VER}.patch" + release_version="${release_version}, HTB-${HTB_VER}" } # patch in ProPolice Stack Smashing protection