diff options
author | Mike Frysinger <vapier@gentoo.org> | 2004-11-17 22:13:07 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2004-11-17 22:13:07 +0000 |
commit | 0b015fd3e8d3d604f84cf5bc9060be422723e3b5 (patch) | |
tree | a459fb9c0e3f055dc98488b601d1a6a3f89dc12b /eclass | |
parent | Stable amd64, sparc, x86. (diff) | |
download | historical-0b015fd3e8d3d604f84cf5bc9060be422723e3b5.tar.gz historical-0b015fd3e8d3d604f84cf5bc9060be422723e3b5.tar.bz2 historical-0b015fd3e8d3d604f84cf5bc9060be422723e3b5.zip |
add a bit more logic to buildcc()
Diffstat (limited to 'eclass')
-rw-r--r-- | eclass/toolchain-funcs.eclass | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/eclass/toolchain-funcs.eclass b/eclass/toolchain-funcs.eclass index 08a6adb8e7c4..c1895b5e459a 100644 --- a/eclass/toolchain-funcs.eclass +++ b/eclass/toolchain-funcs.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-funcs.eclass,v 1.8 2004/10/29 04:13:10 vapier Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/toolchain-funcs.eclass,v 1.9 2004/11/17 22:13:07 vapier Exp $ # # Author: Toolchain Ninjas <ninjas@gentoo.org> # @@ -24,13 +24,10 @@ tc-getPROG() { return 0 fi - # how should we handle the host/target/build ? if [ -n "${CTARGET}" ] ; then search="$(type -p "${CTARGET}-${prog}")" - else - if [ -n "${CHOST}" ] ; then - search="$(type -p "${CHOST}-${prog}")" - fi + elif [ -n "${CHOST}" ] ; then + search="$(type -p "${CHOST}-${prog}")" fi if [ -n "${search}" ] ; then @@ -66,14 +63,18 @@ tc-getBUILD_CC() { return 0 fi - if [ -n "${CBUILD}" ] ; then - local cc="$(type -p "${CBUILD}-gcc")" - if [ -n "${cc}" ] ; then - echo "${cc}" - fi + local search= + if [ -n "${CTARGET}" ] ; then + search="$(type -p "${CTARGET}-gcc")" + elif [ -n "${CHOST}" ] ; then + search="$(type -p "${CHOST}-gcc")" fi - echo "gcc" + if [ -n "${search}" ] ; then + echo "${search##*/}" + else + echo "gcc" + fi } |