diff options
author | Mike Frysinger <vapier@gentoo.org> | 2004-10-15 20:10:45 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2004-10-15 20:10:45 +0000 |
commit | 5a13aeba9a0407c30315c1c1b7862ca5cf68a405 (patch) | |
tree | 61ec677b558d72965252bfb9d114d23a010746f4 /eclass | |
parent | Fixed typo in src_install. Closes bug #67581. (Manifest recommit) (diff) | |
download | gentoo-2-5a13aeba9a0407c30315c1c1b7862ca5cf68a405.tar.gz gentoo-2-5a13aeba9a0407c30315c1c1b7862ca5cf68a405.tar.bz2 gentoo-2-5a13aeba9a0407c30315c1c1b7862ca5cf68a405.zip |
tc-getBUILD_CC()
Diffstat (limited to 'eclass')
-rw-r--r-- | eclass/toolchain-funcs.eclass | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/eclass/toolchain-funcs.eclass b/eclass/toolchain-funcs.eclass index 4891230e2648..cbb136374678 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.3 2004/10/13 23:44:35 vapier Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/toolchain-funcs.eclass,v 1.4 2004/10/15 20:10:45 vapier Exp $ # # Author: Toolchain Ninjas <ninjas@gentoo.org> # @@ -55,6 +55,22 @@ tc-getNM() { tc-getPROG NM nm; } # Returns the name of the archiver indexer tc-getRANLIB() { tc-getPROG RANLIB ranlib; } +# Returns the name of the C compiler for build +tc-getBUILD_CC() { + if [ -n "${CC_FOR_BUILD}" ] ; then + echo "${CC_FOR_BUILD}" + return 0 + fi + + if [ -n "${CBUILD}" ] ; then + local cc="$(type -p "${CBUILD}-gcc")" + if [ -n "${cc}" ] ; then + echo "${cc}" + fi + fi + + echo "gcc" +} # Returns the version as by `$CC -dumpversion` |