On Mon, 13 Apr 2009 10:57:37 -0400
ABCD <[email protected]> wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Jorge Morais wrote:
> > I want these two flags (--as-needed and --hash-style=gnu) to be active
> > before I adopt GCC 4.3 and recompile world.
> 
> Just as an FYI, you do not need to rebuild the world when you upgrade
> GCC - the only time this was needed was around the GCC 3.3 to 3.4
> transition, because of a one-time ABI breakage.
> 
> > By the way, binaries linked with --as-needed are compatible with binaries
> > linked without it, yes?
> > 
> 
> The --as-needed flag simply tells the linker to be more selective about
> which libraries to link against -- it does not change anything about the
> format, etc. of the library itself (to be precise, using --as-needed
> will cause only the NEEDED entries that are actually needed to be
> emitted to the final binary).  So, to answer your question, yes, they
> are perfectly compatible with each other.
From http://www.gentoo.org/proj/en/qa/asneeded.xml#doc_chap2

Note: While applying patches to libraries to fix --as-needed support, it is 
usually not the case to apply a revision bump: those who don't want to use the 
flag don't need to rebuild the library. For this reason, those who want to use 
--as-needed are invited to run an emerge -e world so that libraries are 
rebuilt. 


This suggests that, to be safe, I should activate --as-needed only *after*
the next world compilation.

-- 
Software is like sex: it is better when it is free. --Linus Torvalds

Reply via email to