On Mon, Oct 02, 2006 at 09:00:36PM +0200, Kurt Roeckx wrote: > On Mon, Oct 02, 2006 at 01:51:58PM +0200, Axel Thimm wrote: > > Can this be somehow dealt with within libtool? It would need to fork > > the semantics of dependency_libs into static vs shared libs or > > something similar. I guess the difficult part is identifying what > > parts of dependency_libs are needed for a shared build against this > > library. > > Debian has a patch that sets link_all_deplibs to no. This basicly > doesn't use dependency_libs for shared linking. Note that this causes > various problems for which there are open bugs in the Debian bug > tracking system. > > Because of this, Debian is more and more moving from .la files to using > pkg-config's .pc files, which contains the info we need, and also has > cflags (-Is) in it.
If you add LDFLAGS="-Wl,--as-needed", then linking against dependency_libs shouldn't matter. But, that only helps if you use a recent version of GNU ld. And, even for .pc files, it doesn't mean you get _only_ the libraries you need. What if someone has "Requires: -lpng -lz" in a .pc file? Then you have a dependency on libpng and libz, which is unnecessary as libpng already depends on libz. I don't see how libtool can intelligently decide the minimum set of libraries needed to satisfy the link. -- albert chin ([EMAIL PROTECTED]) _______________________________________________ http://lists.gnu.org/mailman/listinfo/libtool