Boost logo

Boost-Build :

From: Rene Rivera (grafikrobot_at_[hidden])
Date: 2007-11-29 16:50:26

Phil Seaver wrote:
> Mat Marcus wrote:

>> One of the issues that remains pertains to folder naming. On the mac,
>> if a build doesn't specify an -arch parameter, the architecture (and
>> perhaps the address model) of the host machine is used. I'm not really
>> comfortable with the same folder path meaning different things on
>> different machines. So, I'd like to do something like the following in
>> darwin.jam (in invented pseudo code)
>> SWITCH(on result of /usr/bin/arch) { # host machine's architecture
>> CASE(ppc) use <architecture>power/<address-mode>32 as the default
>> CASE(i386) use <architecture>x86/<address-mode>32 as the default
>> CASE(ppc64) use <architecture>power/<address-mode>64 as the default
>> CASE(x86_64) use <architecture>x86/<address-mode>64 as the default
>> DEFAULT error, unknown arch
>> Can someone guide me in towards the right way to express this in bbv2?
> What about "feature.set-default architecture : power ;", etc.? Also,
> for the switch, you may be able to use the result of "[ modules.peek :
> OSPLAT ]" -- it's X86 on my intel mac and PPC on my powerpc mac. I
> don't know if it differs on a 64-bit mac.

If it's one of the symbols bjam checks when compiled it will set OSPLAT
to "IA64" or "X86_64". But this only tells one how bjam was compiled.
Since it's easy to get a precompiled bjam, one can easily be in a
position of running a 32bit bjam in a 64bit machine. Note, this is a
general problem, not just for MacOSX. On Windows msvc.jam does some env
var checks for part of this. But good solutions for determining the
default build settings are needed. Running something like
"/usr/bin/arch" is a reasonably good solution IMO.

-- Grafik - Don't Assume Anything
-- Redshift Software, Inc. -
-- rrivera/ - grafik/
-- 102708583/icq - grafikrobot/aim - grafikrobot/yahoo

Boost-Build list run by bdawes at, david.abrahams at, gregod at, cpdaniel at, john at