* Loïc Minier wrote on Sat, Feb 18, 2006 at 09:07:19PM CET: > On mer, jan 11, 2006, Kurt Roeckx wrote: > > I suggest if you create a convience library, you don't link any > > libraries to it at that time. Instead, when you are linking in > > the convience libraries to something, at that point you should > > add those libraries. This will avoid libtool from adding all the > > depedency libraries on the command line. > > Unfortunately, the convenience library depends on another libtool > archive which is not a convenience lib, but a real library.
I don't quite know what you suggest what should happen here, but: when you create a convenience lib, and add real libs as dependencies on the command line, then _all_ libtool will do is add them to the `dependency_libs' variable. Nothing will differ wrt. the created file libfoo.a. That's usually *convenient*, because the whole purpose of that adding is that, when you later put the convenience archive into a real library, you don't forget to *also* link against those other libraries. There simply is no indirection to be eliminated here. None. A convenience archive will never exist as an installed entity, so you're effectively just adding information that some link should also pull in other links. If you now don't want that information added, then simply don't do it. > Beside, > that convenience libcommon.la is used in some places, and it would be > inconvenient to change that (ie. upstream probably wouldn't like it). > > I'm not sure why libtool has to link all dependency_libs of a > convenience library. Because there simply is no indirection to make use of. The lib in which the convenience lib will be merged into, will be a *direct* user of all dependencies of this convenience lib. Cheers, Ralf

