summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Huddleston <eradicator@gentoo.org>2005-03-11 02:03:55 +0000
committerJeremy Huddleston <eradicator@gentoo.org>2005-03-11 02:03:55 +0000
commit7502021702739250093659754cb71b097cb92f89 (patch)
treeedf9a9d88bda757ea4b89e5d8f21e663314382a4
parentNew release (1.6.3) (diff)
downloadhistorical-7502021702739250093659754cb71b097cb92f89.tar.gz
historical-7502021702739250093659754cb71b097cb92f89.tar.bz2
historical-7502021702739250093659754cb71b097cb92f89.zip
Fallback to CHOST if $(get_abi_CHOST)-gcc doesn't exist.
-rw-r--r--eclass/toolchain-funcs.eclass15
1 files changed, 6 insertions, 9 deletions
diff --git a/eclass/toolchain-funcs.eclass b/eclass/toolchain-funcs.eclass
index 4357651aba5c..1192ed2c78ee 100644
--- a/eclass/toolchain-funcs.eclass
+++ b/eclass/toolchain-funcs.eclass
@@ -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/eclass/toolchain-funcs.eclass,v 1.34 2005/03/10 22:43:11 eradicator Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/toolchain-funcs.eclass,v 1.35 2005/03/11 02:03:55 eradicator Exp $
#
# Author: Toolchain Ninjas <ninjas@gentoo.org>
#
@@ -23,14 +23,11 @@ tc-getPROG() {
return 0
fi
- 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
+ local search=
+ [[ -n $3 ]] && search=$(type -p "$3-${prog}")
+ [[ -z ${search} && -n $(get_abi_CHOST) ]] && search=$(type -p "$(get_abi_CHOST)-${prog}")
+ [[ -z ${search} && -n ${CHOST} ]] && search=$(type -p "${CHOST}-${prog}")
+ [[ -n ${search} ]] && prog=${search##*/}
export ${var}=${prog}
echo "${!var}"