Boost logo

Boost :

From: Richard Hadsell (hadsell_at_[hidden])
Date: 2008-05-16 15:00:49


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 ;
+#
 # x86 and compatible
-flags gcc OPTIONS <architecture>x86/<address-model>32 : -m32 ;
-flags gcc OPTIONS <architecture>x86/<address-model>64 : -m64 ;
 cpu-flags gcc OPTIONS : x86 : i386 : -march=i386 : default ;
 cpu-flags gcc OPTIONS : x86 : i486 : -march=i486 ;
 cpu-flags gcc OPTIONS : x86 : i586 : -march=i586 ;
@@ -735,8 +736,6 @@
 cpu-flags gcc OPTIONS : x86 : c3 : -march=c3 ;
 cpu-flags gcc OPTIONS : x86 : c3-2 : -march=c3-2 ;
 # Sparc
-flags gcc OPTIONS <architecture>sparc/<address-model>32 : -m32 ;
-flags gcc OPTIONS <architecture>sparc/<address-model>64 : -m64 ;
 cpu-flags gcc OPTIONS : sparc : c3 : -mcpu=c3 : default ;
 cpu-flags gcc OPTIONS : sparc : v7 : -mcpu=v7 ;
 cpu-flags gcc OPTIONS : sparc : cypress : -mcpu=cypress ;
@@ -753,8 +752,6 @@
 cpu-flags gcc OPTIONS : sparc : ultrasparc : -mcpu=ultrasparc ;
 cpu-flags gcc OPTIONS : sparc : ultrasparc3 : -mcpu=ultrasparc3 ;
 # RS/6000 & PowerPC
-flags gcc OPTIONS <architecture>power/<address-model>32 : -m32 ;
-flags gcc OPTIONS <architecture>power/<address-model>64 : -m64 ;
 flags gcc OPTIONS <architecture>power/<address-model>/<instruction-set> : -mcpu=common ;
 cpu-flags gcc OPTIONS : power : 403 : -mcpu=403 ;
 cpu-flags gcc OPTIONS : power : 505 : -mcpu=505 ;

-- 
Dick Hadsell			914-259-6320  Fax: 914-259-6499
Reply-to:			hadsell_at_[hidden]
Blue Sky Studios                http://www.blueskystudios.com
44 South Broadway, White Plains, NY 10601

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk