diff options
author | Mike Frysinger <vapier@gentoo.org> | 2005-06-07 22:42:28 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2005-06-07 22:42:28 +0000 |
commit | 944882d610412f0ef0e59013692b79fa9cc154bc (patch) | |
tree | 5a20c83f97171c7616d1886b942ec3e52c43d55c /sys-devel/gcc-config | |
parent | Fix minkernpackage bug. (diff) | |
download | gentoo-2-944882d610412f0ef0e59013692b79fa9cc154bc.tar.gz gentoo-2-944882d610412f0ef0e59013692b79fa9cc154bc.tar.bz2 gentoo-2-944882d610412f0ef0e59013692b79fa9cc154bc.zip |
Make sure we support funky version strings (beta823942) and custom specs (hardened).
(Portage version: 2.0.51.22-r1)
Diffstat (limited to 'sys-devel/gcc-config')
-rw-r--r-- | sys-devel/gcc-config/ChangeLog | 9 | ||||
-rw-r--r-- | sys-devel/gcc-config/files/digest-gcc-config-1.3.11-r2 (renamed from sys-devel/gcc-config/files/digest-gcc-config-1.3.11-r1) | 0 | ||||
-rwxr-xr-x | sys-devel/gcc-config/files/gcc-config-1.3.11 | 41 | ||||
-rw-r--r-- | sys-devel/gcc-config/gcc-config-1.3.11-r2.ebuild (renamed from sys-devel/gcc-config/gcc-config-1.3.11-r1.ebuild) | 2 |
4 files changed, 46 insertions, 6 deletions
diff --git a/sys-devel/gcc-config/ChangeLog b/sys-devel/gcc-config/ChangeLog index f4333183c8c7..cc32de012e17 100644 --- a/sys-devel/gcc-config/ChangeLog +++ b/sys-devel/gcc-config/ChangeLog @@ -1,6 +1,13 @@ # ChangeLog for sys-devel/gcc-config # Copyright 1999-2005 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sys-devel/gcc-config/ChangeLog,v 1.91 2005/06/07 00:39:09 vapier Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-devel/gcc-config/ChangeLog,v 1.92 2005/06/07 22:42:28 vapier Exp $ + +*gcc-config-1.3.11-r2 (07 Jun 2005) + + 07 Jun 2005; Mike Frysinger <vapier@gentoo.org> files/gcc-config-1.3.11, + -gcc-config-1.3.11-r1.ebuild, +gcc-config-1.3.11-r2.ebuild: + Make sure we support funky version strings (beta823942) and custom specs + (hardened). *gcc-config-1.3.11-r1 (07 Jun 2005) diff --git a/sys-devel/gcc-config/files/digest-gcc-config-1.3.11-r1 b/sys-devel/gcc-config/files/digest-gcc-config-1.3.11-r2 index e69de29bb2d1..e69de29bb2d1 100644 --- a/sys-devel/gcc-config/files/digest-gcc-config-1.3.11-r1 +++ b/sys-devel/gcc-config/files/digest-gcc-config-1.3.11-r2 diff --git a/sys-devel/gcc-config/files/gcc-config-1.3.11 b/sys-devel/gcc-config/files/gcc-config-1.3.11 index b7ae23697117..af4c8a1f2380 100755 --- a/sys-devel/gcc-config/files/gcc-config-1.3.11 +++ b/sys-devel/gcc-config/files/gcc-config-1.3.11 @@ -1,7 +1,7 @@ #!/bin/bash # Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-devel/gcc-config/files/gcc-config-1.3.11,v 1.2 2005/06/07 00:39:09 vapier Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-devel/gcc-config/files/gcc-config-1.3.11,v 1.3 2005/06/07 22:42:28 vapier Exp $ trap ":" INT QUIT TSTP @@ -515,17 +515,50 @@ if [[ -z ${CC_COMP} ]] ; then fi chop_gcc_ver() { + # we want to chop off the 'version' part of the profile ... + # possible profile names: + # arm-unknown-linux-gnu-3.3.6 + # mipsel-unknown-linux-uclibc-3.4.4 + # sh4-gentoo-linux-uclibc-3.4.4 + # x86_64-pc-linux-gnu-3.4.3-20050110 + # x86_64-pc-linux-gnu-4.0.0-hardenednopie + # x86_64-pc-linux-gnu-3.3.5-20050130-hardened + # x86_64-pc-linux-gnu-4.0.1-beta20050526 + # + # So below we will start at the end and accept everything + # until we get to a portion where the string is just number/dots ... + # Then we eat all the portions of just number/dots until the TARGET + # is all that's left to us. echo "$@" | awk -F- '{ + foundver=0 gccver="" for (i=NF; i > 0; --i) { - if ($i ~ /^[[:digit:].]+$/) + if ($i ~ /^[[:digit:].]+$/) { gccver=$i"-"gccver - else + foundver=1 + } else if (foundver == 1) break } print substr(gccver,0,length(gccver)-1) }' } +test_chop_gcc_ver() { + local c ver host + local clist=" + arm-unknown-linux-gnu-3.3.6 + mipsel-unknown-linux-uclibc-3.4.4 + sh4-gentoo-linux-uclibc-3.4.4 + x86_64-pc-linux-gnu-3.4.3-20050110 + x86_64-pc-linux-gnu-4.0.1-beta20050526 + x86_64-pc-linux-gnu-4.0.0-hardenednopie + x86_64-pc-linux-gnu-3.3.5-20050130-hardened + " + for c in ${clist} ; do + ver=$(chop_gcc_ver ${c}) + host=${c%-${ver}*} + printf "%-45s %-30s %s\n" ${c} ${host} ${ver} + done +} if [[ ${DOIT} != "get_current_profile" ]] ; then GCC_LIB=$( @@ -535,7 +568,7 @@ if [[ ${DOIT} != "get_current_profile" ]] ; then ) CC_COMP_VERSION=$(chop_gcc_ver ${CC_COMP}) - CC_COMP_TARGET=${CC_COMP:0:${#CC_COMP}-${#CC_COMP_VERSION}-1} + CC_COMP_TARGET=${CC_COMP%-${CC_COMP_VERSION}*} if [[ ! -d ${ROOT}/${GCC_LIB}/${CC_COMP_TARGET}/${CC_COMP_VERSION} ]]; then CC_COMP_VERSION=${CC_COMP_VERSION%-*} diff --git a/sys-devel/gcc-config/gcc-config-1.3.11-r1.ebuild b/sys-devel/gcc-config/gcc-config-1.3.11-r2.ebuild index 9e5c9c8f021f..0ed60dd9a4e8 100644 --- a/sys-devel/gcc-config/gcc-config-1.3.11-r1.ebuild +++ b/sys-devel/gcc-config/gcc-config-1.3.11-r2.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-devel/gcc-config/gcc-config-1.3.11-r1.ebuild,v 1.1 2005/06/07 00:39:09 vapier Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-devel/gcc-config/gcc-config-1.3.11-r2.ebuild,v 1.1 2005/06/07 22:42:28 vapier Exp $ inherit toolchain-funcs |