Boost logo

Boost-Build :

From: Michael van der Westhuizen (r1mikey_at_[hidden])
Date: 2006-06-22 03:26:29

Hi All,

On 6/22/06, Noel Belcourt <kbelco_at_[hidden]> wrote:
> On Jun 19, 2006, at 1:01 AM, Vladimir Prus wrote:
> > On Sunday 18 June 2006 04:02, Tomas Puverle wrote:
> >> In the sun.jam toolset file, I see the following code (this is HEAD in
> >> CVS):
> >>
> >> flags sun.compile OPTIONS <optimization>speed : -fast -xarch=generic ;
> >>
> >> Could you remove the -xarch=generic, please? There are 2 reasons:
> >>
> >> 1) When speccifying an architecture using -xarch/-xtarget, it needs
> >> to
> >> come before the compilation type (e.g. -fast) flags
> I think this is incorrect. On the Sun, -fast will set or modify
> architecture specific settings.
> From the Sun CC man page under the -fast description...
> Incorrect:
> example% CC -xarch=v9 -fast
> Correct:
> example% CC -fast -xarch=v9
> So we always want -fast to precede architecture specific options like
> -xarch and -xtarget on the command line.

None of this is quite right if you want to distribute your libraries
or binaries, as -fast optimises for the machine you're compiling on,
not necessarily the machine your customers are running on.

See for
details of recommended options.
In short, this boils down to the following flags.

Recommended compiler flags for the UltraSPARC platform:
32-bit code: -xtarget=ultra3 -xarch=v8plusa
64-bit code: -xtarget=ultra3 -xarch=v9a

This generates code that will run on all UltraSPARC targets, but will
run best on USIII or higher.

Recommended compiler flags for the x64 platform:
32-bit code: -xtarget=opteron
64-bit code: -xtarget=opteron -xarch=amd64

I personally do not use the recommended 32 bit x64 settings, as we
still have a few PIII machines we need to build on, and
xtarget=opteron generates SSE2 code. We use the following for 32 bit:
-xtarget=pentium3 -xarch=sse -xchip=pentium3

Optimisation settings are can be set pretty high without risk on Sun
Studio compilers. We run most builds with -xO4 or -xO5.


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