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

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

On Mon, Dec 10, 2007 at 08:16:10PM +0000, Hendrik Sattler wrote:
> 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.

You're kidding ? If someone that produces libraries stop at the SYNOPSIS
section while reading documentation, he's a moron. The pkg-config tool
has a very concise documentation that says it all, --static is
documented in the OPTIONS section, and Requires, Libs, Libs.private in
METADATA FILE SYNTAX where due. Calling it undocumented is just either
bad faith or well, I can't see what else it can be in fact.

·O·  Pierre Habouzit
··O                                                madcoder@debian.org
OOO                                                http://www.madism.org

Attachment: pgpIxgj9nk0Lx.pgp
Description: PGP signature

Reply to: