Re: -Wl,--as-needed considered possibly harmful
On Sun, Dec 09, 2007 at 07:23:00PM +0100, Josselin Mouette wrote:
> Le dimanche 09 décembre 2007 à 19:11 +0100, Bernhard R. Link a écrit :
> > Just curing the symptoms instead of the problems will not help to get
> > there any sooner.
> What if there is no problem?
> For example, pkg-config --libs gtk+-x11-2.0 will return, among others,
> -lglib-2.0 and -lm. And this is perfectly intentional.
Just because it's intentional doesn't mean it isn't absurd and wrong.
> The former is here because you can assume glib functions are available
> when doing "#include <gtk/gtk.h>". The latter is here because some macros
> need math functions. Still, many binaries using it don’t need glib, and
> most of them don’t need libm. There is nothing that can be done to avoid
> that, the only way is a check that removes the dependency if it isn’t
> actually needed.
No, what can be done is to fix upstream's broken declaration that 'you can
assume glib functions are available when doing "#include <gtk/gtk.h>"'. It
doesn't follow that just because this works in practice, it should be a
Steve Langasek Give me a lever long enough and a Free OS
Debian Developer to set it on, and I can move the world.
Ubuntu Developer http://www.debian.org/