Make cross-compiling using clang work better, by respecting the

LLVM_HOSTTRIPLE that is defined during the cross-tools stage.

Using clang, you can now build amd64 world and kernel on i386, and vice
versa.  Other arches still need work.
This commit is contained in:
dim 2011-05-05 16:14:13 +00:00
parent 260ac2ee26
commit cc51ecffd7

View File

@ -35,6 +35,9 @@ static std::string getOSVersion() {
}
std::string sys::getHostTriple() {
#ifdef __FreeBSD__
return LLVM_HOSTTRIPLE;
#else
// FIXME: Derive directly instead of relying on the autoconf generated
// variable.
@ -91,4 +94,5 @@ std::string sys::getHostTriple() {
}
return Triple;
#endif
}