diff options
author | Jeremy Huddleston <eradicator@gentoo.org> | 2005-03-10 22:43:11 +0000 |
---|---|---|
committer | Jeremy Huddleston <eradicator@gentoo.org> | 2005-03-10 22:43:11 +0000 |
commit | b2ad04976a2f6e9ab453fce74ad0dcca32d5e71b (patch) | |
tree | 4e23cde03e35bd61ccbbc5371c60f25bfbb1178b /eclass/toolchain-funcs.eclass | |
parent | More a11y stuff for Gnome 2.10 (diff) | |
download | gentoo-2-b2ad04976a2f6e9ab453fce74ad0dcca32d5e71b.tar.gz gentoo-2-b2ad04976a2f6e9ab453fce74ad0dcca32d5e71b.tar.bz2 gentoo-2-b2ad04976a2f6e9ab453fce74ad0dcca32d5e71b.zip |
Add support for using get_abi_CHOST as a prefix before CHOST.
Diffstat (limited to 'eclass/toolchain-funcs.eclass')
-rw-r--r-- | eclass/toolchain-funcs.eclass | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/eclass/toolchain-funcs.eclass b/eclass/toolchain-funcs.eclass index 4c0df182dd81..4357651aba5c 100644 --- a/eclass/toolchain-funcs.eclass +++ b/eclass/toolchain-funcs.eclass @@ -1,12 +1,14 @@ # Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/toolchain-funcs.eclass,v 1.33 2005/03/04 13:46:55 vapier Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/toolchain-funcs.eclass,v 1.34 2005/03/10 22:43:11 eradicator Exp $ # # Author: Toolchain Ninjas <ninjas@gentoo.org> # # This eclass contains (or should) functions to get common info # about the toolchain (libc/compiler/binutils/etc...) +inherit multilib + ECLASS=toolchain-funcs INHERITED="$INHERITED $ECLASS" @@ -21,11 +23,12 @@ tc-getPROG() { return 0 fi - if [[ -n $3 ]] ; then - local search=$(type -p "$3-${prog}") - [[ -n ${search} ]] && prog=${search##*/} - elif [[ -n ${CHOST} ]] ; then - local search=$(type -p "${CHOST}-${prog}") + local chost=$3 + [[ -z ${chost} ]] && chost=$(get_abi_CHOST) + [[ -z ${chost} ]] && chost=${CHOST} + + if [[ -n ${chost} ]] ; then + local search=$(type -p "${chost}-${prog}") [[ -n ${search} ]] && prog=${search##*/} fi |