Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 5 May 2011 16:14:13 +0000 (UTC)
From:      Dimitry Andric <dim@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r221503 - head/contrib/llvm/lib/Support/Unix
Message-ID:  <201105051614.p45GEDEg006824@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: dim
Date: Thu May  5 16:14:13 2011
New Revision: 221503
URL: http://svn.freebsd.org/changeset/base/221503

Log:
  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.

Modified:
  head/contrib/llvm/lib/Support/Unix/Host.inc

Modified: head/contrib/llvm/lib/Support/Unix/Host.inc
==============================================================================
--- head/contrib/llvm/lib/Support/Unix/Host.inc	Thu May  5 14:45:24 2011	(r221502)
+++ head/contrib/llvm/lib/Support/Unix/Host.inc	Thu May  5 16:14:13 2011	(r221503)
@@ -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
 }



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201105051614.p45GEDEg006824>