summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2004-12-16 01:03:42 +0000
committerMike Frysinger <vapier@gentoo.org>2004-12-16 01:03:42 +0000
commit9500b9065905aafd9d9e884a1c38d47b8fb7b426 (patch)
treeec50b70afb8a352a9037492d5df365db707336a5 /eclass/toolchain-funcs.eclass
parentrequire newer binutils-config (diff)
downloadgentoo-2-9500b9065905aafd9d9e884a1c38d47b8fb7b426.tar.gz
gentoo-2-9500b9065905aafd9d9e884a1c38d47b8fb7b426.tar.bz2
gentoo-2-9500b9065905aafd9d9e884a1c38d47b8fb7b426.zip
force cross-compiling users to set CBUILD
Diffstat (limited to 'eclass/toolchain-funcs.eclass')
-rw-r--r--eclass/toolchain-funcs.eclass13
1 files changed, 2 insertions, 11 deletions
diff --git a/eclass/toolchain-funcs.eclass b/eclass/toolchain-funcs.eclass
index bc2b25afa474..861ffc9ddf1d 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.15 2004/12/14 14:28:57 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/toolchain-funcs.eclass,v 1.16 2004/12/16 01:03:42 vapier Exp $
#
# Author: Toolchain Ninjas <ninjas@gentoo.org>
#
@@ -89,19 +89,10 @@ tc-export() {
# A simple way to see if we're using a cross-compiler ...
tc-is-cross-compiler() {
- # Simple case ... the user tells us what's going on
if [[ -n ${CBUILD} ]] ; then
return $([[ ${CBUILD} != ${CHOST} ]])
fi
-
- # Hard case ... compile a simple prog and run it ...
- 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
- return ${ret}
+ return 1
}