diff options
author | dim <dim@FreeBSD.org> | 2011-05-05 16:14:13 +0000 |
---|---|---|
committer | dim <dim@FreeBSD.org> | 2011-05-05 16:14:13 +0000 |
commit | cc51ecffd75ed7c21040013118b1c76ee55f94e7 (patch) | |
tree | 090fde1e9a704b19366e8fb2cdebdab021ffecbe | |
parent | 260ac2ee2628b7897d77e9d016bfadbd8834b008 (diff) | |
download | FreeBSD-src-cc51ecffd75ed7c21040013118b1c76ee55f94e7.zip FreeBSD-src-cc51ecffd75ed7c21040013118b1c76ee55f94e7.tar.gz |
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.
-rw-r--r-- | contrib/llvm/lib/Support/Unix/Host.inc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/contrib/llvm/lib/Support/Unix/Host.inc b/contrib/llvm/lib/Support/Unix/Host.inc index 8cbec8c..9c75230 100644 --- a/contrib/llvm/lib/Support/Unix/Host.inc +++ b/contrib/llvm/lib/Support/Unix/Host.inc @@ -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 } |