From: Rene Rivera (grafikrobot_at_[hidden])
Date: 2008-05-18 01:48:53
I guess only now did I notice I meant to move this conversation to the
build earlier :-\
Vladimir Prus wrote:
> 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 184.108.40.206
>>> +++ 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.
Hm, perhaps. But I was thinking of the use case where someone specifies
it, even if it's optional, thinking to play it safe and be complete. In
which case it would cause extra options to show up that may not work, or
Note: I don't know how GCC will react to using those options in
architecture combination that don't support them. At best it would
ignore them, but I suspect it would error.
>> 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.
-- -- Grafik - Don't Assume Anything -- Redshift Software, Inc. - http://redshift-software.com -- rrivera/acm.org (msn) - grafik/redshift-software.com -- 102708583/icq - grafikrobot/aim,yahoo,skype,efnet,gmail
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