diff options
author | Mike Frysinger <vapier@gentoo.org> | 2004-12-13 23:49:07 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2004-12-13 23:49:07 +0000 |
commit | 08f123a8cc30d128f8b51b758c3d3dbe1ce0bb1d (patch) | |
tree | 3ccfb8f0c98d7678f7585e3e546fbc76f6110f1b /eclass | |
parent | Stable on x86. (Manifest recommit) (diff) | |
download | gentoo-2-08f123a8cc30d128f8b51b758c3d3dbe1ce0bb1d.tar.gz gentoo-2-08f123a8cc30d128f8b51b758c3d3dbe1ce0bb1d.tar.bz2 gentoo-2-08f123a8cc30d128f8b51b758c3d3dbe1ce0bb1d.zip |
tc-is-cross-compiler()
Diffstat (limited to 'eclass')
-rw-r--r-- | eclass/toolchain-funcs.eclass | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/eclass/toolchain-funcs.eclass b/eclass/toolchain-funcs.eclass index f1a4eb2fcd53..5b54c6fabc57 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.11 2004/12/07 22:30:24 vapier Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/toolchain-funcs.eclass,v 1.12 2004/12/13 23:49:07 vapier Exp $ # # Author: Toolchain Ninjas <ninjas@gentoo.org> # @@ -87,6 +87,16 @@ tc-export() { done } +# A simple way to see if we're using a cross-compiler ... +tc-is-cross-compiler() { + local ret tmpfile=$(emktemp).c + echo 'int main(){return 0;}' > "${tmpfile}" + $(tc-getCC) "${tmpfile}" -o "${tmpfile}".bin + "${tmpfile}".bin &>/dev/null + ret=$? + rm -f "${tmpfile}" "${tmpfile}".bin +} + # Returns the version as by `$CC -dumpversion` gcc-fullversion() { |