svn commit: r247166 - head/contrib/llvm/tools/clang/lib/Driver

Dimitry Andric dim at FreeBSD.org
Sun Feb 24 18:11:36 UTC 2013


On 2013-02-24 03:04, Adrian Chadd wrote:
> Just curious about the OS detection - is the default platform
> detection based on the currently running OS, or the cross-built target
> OS?
>
> eg, if I were cross-compiling FreeBSD on (say) haiku, which has
> different CPU defaults, what would the default CPU output be?

When you are cross-compiling, you usually specify -target
$target_triple, e.g.:

   clang -target amd64-unknown-freebsd10.0 -c foo.c

or you make a link or symlink from clang to ${target_triple}-clang, like
so:

   amd64-unknown-freebsd10.0-clang -c foo.c

In either case, the default CPU is whatever the default CPU is for that
target triple.  So for the amd64-unknown-freebsd triple, it would be
x86_64, for i386-unknown-freebsd it would be i486, etc.


More information about the svn-src-head mailing list