Thanks for looking into it,

I've been going partially of the clang manpage, 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..

Cheers,
Rich

On Mon, Jul 16, 2012 at 12:37 AM, Jurko Gospodnetić <jurko.gospodnetic@pke.hr> wrote:
  Hi.


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
"bin.v2/libs/regex/build/clang-darwin-4.2.1/release/address-model-32/architecture-x86/link-static/macosx-version-10.7/threading-multi/cpp_regex_traits.o"
"libs/regex/build/../src/cpp_regex_traits.cpp"

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:
http://gcc.gnu.org/onlinedocs/gcc/i386-and-x86_002d64-Options.html#index-march-1400

  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/mailman/listinfo.cgi/boost-build