Subject: Re: [Boost-build] Building Universal Binaries on OS X
From: Vladimir Prus (vladimir_at_[hidden])
Date: 2009-06-20 04:38:55
Michael Jackson wrote:
> I _think_ I have asked this before BUT I can not seem either find my
> post or my notes.
> How would I invoke bjam to build boost with both i386 and x86_64 archs?
> Currently I use the following:
> bjam toolset=darwin --with-test --with-filesystem --with-
> program_options --with-iostreams --with-thread variant=release,debug
> threading=multi link=static runtime-link=shared --prefix=/Users/Shared/
> Toolkits/boost-1_36/ architecture=combined address-model=32_64 --
> without-mpi install
This is will create 4-way fat binaries (i86,ppc)x(32,64)
> This is with Boost 1.36.0. I don't really want to upgrade boost unless
> I have to. Was the multiple Archs available for the version of bjam
> that was shipped with Boost 1.36?
bjam is the low-level build engine, which has no idea whatsoever about
anything of this. Boost.Build shipped in 1.36 does not support this.
> Can I upgrade BJam to get the needed
You can grab tools/build/v2 and tools/jam from 1.39 to have the above
> Can I set CXXFLAGS or CFLAGS to get the necessary results?
You probably can add
cxxflags="-arch i386 -arch x86_64" linkflags="-arch i386 -arch x86_64"
and remove 'architecture' and 'address-model' from the command line you gave
above. It should be possible to figure that out from:
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