Boost logo

Boost Users :

Subject: Re: [Boost-users] Using 'address-model-32_64' on Mac OS 10.6
From: Boris Dušek (boris.dusek_at_[hidden])
Date: 2010-01-11 02:37:30


Hello Dane,

On Mon, Jan 11, 2010 at 7:49 AM, Dane Springmeyer <blake_at_[hidden]> wrote:
> I'm now trying to compile boost (I happen to be using trunk), and am
> noticing that passing 'address-model-32_64' does not seem to have the effect
> I'd expect. If the flag is passed the only affect I notice is that the build
> directories include it 'address-model-32_64' in the path, but notably the
> '-arch -i386 -arch x86_64' flags are not properly added to the CXXFLAGS and
> LINKFLAGS. Therefore the compiled dynamic libraries are still single
> architecture, x86_64.
>
> Passing 'architecture=combined' does prompt these flags, but includes the
> 'arch ppc' flag as well which I don't want. So, is it a bug that using
> address-model alone does not work or am I am misunderstanding something?

First check that you are using address-model=32_64, not
address-model-32_64. Not sure whether the second works, but the first
one is what I know for sure that works (works = just specifies the
option in this case).

To have Intel-only universal binary with IA32 and Intel64
architectures, use architecture=x86 along with address-model=32_64.
The possible architectures for toolset=darwin are combined, x86, power
and arm, and you have to always specify one of these explicitly if you
are already specifying address-model, since there is no "fallback"
architecture choice Boost.Build does when you don't specify one (i.e.
simply no flags are set in that case and therefore g++ is used without
any arch flags, i.e. outputting whatever is the default of the
compiler on the build machine / os version / compiler version). On the
other hand, specifying architecture and omitting address-model
defaults to "32" (in fact, there is only 64 and 32_64, and everything
else is a fallback case behaving like if "32" was specified and had
its supposed meaning).

Another question is whether there should be, for usability purposes, a
default for architecture when address-model is specified. I currently
have no opinion on what (if) the default should be :-).

HTH,
Boris


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net