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 | 1ad97b7371a72da7d758a826ae4f539f3231b642 (patch) | |
tree | 1b2d8aa717259941c98f50400cd4a9e0a02faa71 /eclass | |
parent | Fixed typo in src_install. Closes bug #67581. (diff) | |
download | historical-1ad97b7371a72da7d758a826ae4f539f3231b642.tar.gz historical-1ad97b7371a72da7d758a826ae4f539f3231b642.tar.bz2 historical-1ad97b7371a72da7d758a826ae4f539f3231b642.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` |