On Mon, 13 Apr 2009 10:57:37 -0400 ABCD <[email protected]> wrote: > 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. I think I read in the Gentoo GCC upgrade guide that there is also ABI incompatibility between GCC 3.4 and GCC 4.1 Weirdly, the page http://gcc.gnu.org/onlinedocs/libstdc++/manual/abi.html seems to indicate that at least the libstdc++.so library has been forward compatible since GCC 3.4. Anyway, thank you for your information (which I had already heard), but nevertheless I think it would be a good idea to recompile world after all these years of upgrading packages, changing USE flags, upgrading the toolchain ... I think recompiling world would lead to a more harmonious system. And it would benefit from the increased optimization abilities of GCC 4.3 (which I assume generates faster code than GCC 4.1; at least with my simple programs, it seems to generate better assembly code - I often check the generated assembly code of my programs through the flags -S -fverbose-asm)
> > 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). I already knew that (on a superficial way), but thank you for being helpful. > So, to answer your question, yes, they > are perfectly compatible with each other. Thank you. -- Software is like sex: it is better when it is free. --Linus Torvalds

