On Mon, 13 Apr 2009 13:22:39 +0300
Nikos Chantziaras <rea...@arcor.de> wrote:

> Jorge Morais wrote:
> > Hi. According to discussion on gentoo-dev
> > http://archives.gentoo.org/gentoo-dev/msg_50182554f851bedb82f8a349fbc90352.xml
> > it seems the only reasons for -Wl,--hash-style=gnu not being default (yet)
> > are these headaches for the developers:
> > 1) Apparently it does not work on mips
> > 2) Apparently it needs >=glibc-2.5 and >=binutils-2.17.50.0.2
> > 
> > My PC is x86 and my toolchain is obviously more recent than
> > these old verions, so apparently the flag is completely safe.
> > 
> > I've enabled it in /etc/make.conf and I like the slight reduction
> > in binary size.
> > 
> > My main question is:
> > Can I just compile new packages with this flag, or do I need to
> > recompile the whole world? In other words, is there any incompatibility
> > between binaries linked with this flag and binaries linked with the default
> > hash-style (which in Gentoo is --hash-style=both, AFAIK)?
> 
> No, there's no need to rebuild everything since the older binaries have 
> GNU-style hash too and there's no problem.  Also, rebuilding anyway in 
> order to "gain" something is not really recommendable; we're talking a 
> few kilobytes here, *so* not worth the effort.
OK, thank you very much. Hum, and to be pedantic, not all other
binaries have GNU-style hash, since some are probably older than
the introduction of --hash-style=both in Gentoo. And thinking about
it, the fact that the devs silently introduced --hash-style=both
by default offers some evidence that this kind of linker flag
does not lead to incompatibilities.

And next I am going to use --as-needed.
From bug 129413, it seems to be very close to be ready for general use.
And many people seem to be using it without any problems (and many begun
many months or even years ago, when the packages were not as --as-needed
ready as they are now.)
So, for a guy prepared to look at bug 129413 and compare all the
bugs with the software installed in his computer
(should be quite easy to automate) it should be very safe.

I want these two flags (--as-needed and --hash-style=gnu) to be active
before I adopt GCC 4.3 and recompile world.

By the way, binaries linked with --as-needed are compatible with binaries
linked without it, yes?

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

Reply via email to