Boost logo

Boost :

From: Rene Rivera (grafikrobot_at_[hidden])
Date: 2008-05-16 23:22:26


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 1.1.1.1
> +++ 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
options. 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.

* Have users specify in the user-config.jam which architecture the
compiler defaults to:

     toolset.add-requirements <toolset>gcc:<architecture>x86 ;

(Adjusting the toolset name to be as specific as needed)

-- 
-- 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 list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk