Subject: Re: [Boost-build] clang and 'address-model'
From: Rich E (reakinator_at_[hidden])
Date: 2012-07-16 00:41:26
Thanks for looking into it,
I've been going partially of the clang
but more off of the output I get when building with Xcode / clang 4.0 and
comparing the full build commands. clang does have the -march option, but
it doesn't seem to be the correct one..
On Mon, Jul 16, 2012 at 12:37 AM, Jurko GospodnetiÄ <
> When doing this, I get "error: unknown target CPU 'i386'" after every
>> compile command. The compile commands look like:
>> "clang++" -x c++ -O3 -std=c++11 -stdlib=libc++ -O3 -finline-functions
>> -Wno-inline -Wall -pedantic -march=i386 -DBOOST_ALL_NO_LIB=1 -DNDEBUG
>> -I"." -c -o
>> Now, I'm not sure why it is '-march=i386' here instead of '-arch i386' -
>> I'm not really sure what -march is for but it doesn't appear to be the
>> right one. This can be verified by building something in Xcode / clang
>> that has 'Architectures' set to '32-bit Intel', and noticing the compile
>> command contains the -arch flag.
>> For good measure, the following command does produce i386 static
>> binaries with clang on OS X:
>> ./b2 -d+2 -a toolset=clang cxxflags="-std=c++11 -stdlib=libc++ -arch
>> i386" linkflags="-stdlib=libc++ -arch i386" architecture=x86
>> macosx-version=10.7 stage
> I just checked the Boost Build sources and the -march option is defined
> in tools/gcc.jam and is a gcc option documented at:
> Never used clang myself, but I understand its idea is to be gcc
> compatible. Unfortunately, after 15 minutes of googling I failed to find
> any documentation explaining its command-line options. :-(
> I guess someone familiar with Clang should update its toolset definition
> to use different options.
> Hope this helps.
> Best regards,
> Jurko GospodnetiÄ
> Unsubscribe & other changes: http://lists.boost.org/**
Boost-Build list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk