let the bounds checking patch work for versions of gcc other then 3.4.2
authorTravis Tilley <lv@gentoo.org>
Tue, 9 Nov 2004 21:18:31 +0000 (21:18 +0000)
committerTravis Tilley <lv@gentoo.org>
Tue, 9 Nov 2004 21:18:31 +0000 (21:18 +0000)
eclass/toolchain.eclass

index 1b18bcb3186045a745d18385a1eec35c01d14b24..ea48d147433b2b5c4280fe23b9b29b71fb252b85 100644 (file)
@@ -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