From: Vladimir Prus (vladimir_at_[hidden])
Date: 2008-05-17 22:14:33
Rene Rivera wrote:
> Richard Hadsell wrote:
>> Richard Hadsell wrote:
>>> Vladimir Prus wrote:
>>>> Try adding architecture=x86 to the command line.
>>> That works. Thank you for the suggestion.
>>> I think bjam ought to do the equivalent by default on x86 or x86_64
>>> systems, but it's fine with me to explicitly set the architecture.
>>> Perhaps the architecture-dependent lines in gcc.jam could be replaced by
>>> just one that sets the flag for all, since they are all '-m32' or
>>> '-m64'. ...
>>> If I have some time, I'll try it out.
>> Yes, that works, too. With this change in gcc.jam, you don't need to
>> include the architecture option on the command line.
>> If someone is willing to check the current gcc.jam, here is the diff
>> from the version in 1.34.1 to my fix:
>> --- tools/build/v2/tools/gcc.jam 25 Jul 2007 22:22:24 -0000 220.127.116.11
>> +++ tools/build/v2/tools/gcc.jam 16 May 2008 18:58:59 -0000
>> @@ -699,9 +699,10 @@
>> # Set architecture/instruction-set options.
>> +flags gcc OPTIONS <address-model>32 : -m32 ;
>> +flags gcc OPTIONS <address-model>64 : -m64 ;
> But that will then cause problems for architectures that don't use those
Will it? 'address-model' is an optional feature so nothing will break unless
user asks for it explicitly.
> The two "correct" solutions to this are either:
> * Have BBv2 autodetect the host architecture and set that as the default
> instead of dealing with an empty architecture value.
It's doable, but maybe over-engineering.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk