Boost logo

Boost-Build :

Subject: Re: [Boost-build] instruction-set core2 native; link --as-needed; -fomit-frame-pointer -fno-stack-protector
From: Vladimir Prus (ghost_at_[hidden])
Date: 2009-09-14 05:39:00

On Friday 04 September 2009 Serhat Şevki Dinçer wrote:

> Hi
> Attached are three suggestion patches for Boost.Build where
> 1st adds core2 (available as of gcc 4.3) and 'native' (available as of
> gcc 4.2) x86 instruction-set's (for -march; usable with 'bjam ..
> architecture=x86 ..'),

Hi Serhat,

I've checked in this patch. At present, I kept default value as i386,
since making default be 'native' will break building with gcc < 4.2.
We probably need some conditionals based on gcc versions...

> 2nd adds an optimization for 'linking' (not for compiling; resulting
> boost libraries do have unused dependencies otherwise, as reported by
> 'ldd -r -u'),

Is -as-needed sufficiently safe? Some pages say it's only available with
binutils 2.17, and I am not sure that we can easily check for binutils

> 3rd adds '-fomit-frame-pointer -fno-stack-protector' to optimization
> flags because the former flag is 'not guaranteed' to be chosen for -O
> and above, and -fstack-protector (available as of gcc 4.1) is 'set' by
> default on Ubuntu 6.10 and later.

Oh, so -fno-stack-protector won't work with gcc < 4.1? I guess another
place where this behaviour has to be conditional.


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