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

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

Am Montag 10 Dezember 2007 schrieb Michael Poole:
> Stephen Gran writes:
> > This one time, at band camp, Michael Poole said:
> >> 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.
> >
> > That is supported in pkg-config, but no upstream I've ever met seems to
> > understand it yet.
> Ah, I see.  I overlooked the --static flag to pkg-config because (case
> in point) "pkg-config --libs gtk+-2.0" only misses seven of the
> libraries that the --static version uses.  I would guess this is
> because "Requires.private" is not mentioned in the pkg-config man
> page.  At least on my system, Libs.private seems to be used correctly
> by most or all .pc files, but Requires.private use is spotty.

The flaw in the documentation is surely the part to blame here. 
Requires.Private works but is not mentioned anywhere. Neither is the --static 
option in the SYNOPSIS part of the man page.
Not many use undocumented stuff.


Reply to: