diff options
author | Mike Frysinger <vapier@gentoo.org> | 2005-09-15 00:13:10 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2005-09-15 00:13:10 +0000 |
commit | 4ad3cd38c745a54d58e255f10c1f57367211fa27 (patch) | |
tree | 0c2d7588f6d5f3d0cdb4edfc603168b6bcdf8f57 /eclass/toolchain-funcs.eclass | |
parent | run make in silent mode and remove arm/s390 crap from doc building (diff) | |
download | gentoo-2-4ad3cd38c745a54d58e255f10c1f57367211fa27.tar.gz gentoo-2-4ad3cd38c745a54d58e255f10c1f57367211fa27.tar.bz2 gentoo-2-4ad3cd38c745a54d58e255f10c1f57367211fa27.zip |
handle CBUILD better since it is forced in portage now and check for CC_FOR_BUILD BUILD_CC HOSTCC as the build cc
Diffstat (limited to 'eclass/toolchain-funcs.eclass')
-rw-r--r-- | eclass/toolchain-funcs.eclass | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/eclass/toolchain-funcs.eclass b/eclass/toolchain-funcs.eclass index d914f2e801de..3852416fdcce 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.42 2005/08/02 13:26:59 azarah Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/toolchain-funcs.eclass,v 1.43 2005/09/15 00:13:10 vapier Exp $ # # Author: Toolchain Ninjas <ninjas@gentoo.org> # @@ -9,7 +9,6 @@ inherit multilib - DESCRIPTION="Based on the ${ECLASS} eclass" tc-getPROG() { @@ -52,11 +51,14 @@ tc-getGCJ() { tc-getPROG GCJ gcj "$@"; } # Returns the name of the C compiler for build tc-getBUILD_CC() { - if [[ -n ${CC_FOR_BUILD} ]] ; then - export BUILD_CC=${CC_FOR_BUILD} - echo "${CC_FOR_BUILD}" - return 0 - fi + local v + for v in CC_FOR_BUILD BUILD_CC HOSTCC ; do + if [[ -n ${!v} ]] ; then + export BUILD_CC=${!v} + echo "${!v}" + return 0 + fi + done local search= if [[ -n ${CBUILD} ]] ; then @@ -80,10 +82,7 @@ tc-export() { # A simple way to see if we're using a cross-compiler ... tc-is-cross-compiler() { - if [[ -n ${CBUILD} ]] ; then - return $([[ ${CBUILD} != ${CHOST} ]]) - fi - return 1 + return $([[ ${CBUILD:-${CHOST}} != ${CHOST} ]]) } @@ -212,4 +211,3 @@ gcc-specs-ssp() { directive=$(gcc-specs-directive cc1) return $([[ ${directive/\{!fno-stack-protector:} != ${directive} ]]) } - |