[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: -Wl,--as-needed considered possibly harmful

Steve Langasek writes:

> 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.

What happens for a user who (however absurd or insane he might be to
try this with gtk+) tries to link his application statically?

Perhaps the "absurd and wrong" part is that pkg-config does not
provide a way to distinguish between use cases, and that the name for
the current behavior should also be --static-libs rather than --libs,
but there is a good reason to provide the transitive closure of
dependencies for a package *somewhere* in pkg-config.

Michael Poole

Reply to: