Not to my knowledge. Libtool does this to support the use of "static" libraries, which generally require all of the indirect and direct dependencies, in the correct order (including duplicates), to be provided on the command line at link time. For a shared library link, this can, on some platforms, add data to the output binary that may not necessary on every platform but remember, the purpose of Libtool is not to provide optimal linking on your platform, but to provide portability across platforms.
HTH, Robert Boehne On Mon, Feb 6, 2017 at 7:02 PM, Sashan Govender <sash...@gmail.com> wrote: > Hi > > How do I tell libtool not to recursively add dependant libraries to > the list of libraries to link with. For example, say I have a program > A, that depends on libfoo and libfoo depends on libbar. In my > Makefile.am for A I have a line like this: > > A_LDDADD= libfoo.la > > Behind the scenes libtool will figure out that libfoo depends on > libbar and so after linking the resultant binary contains information > showing that A depends on libfoo and libbar. (i.e. output from > objdump -p A | grep NEEDED shows both libraries). Since libbar is an > indirect dependency of A, libtool has added it. Can this be disabled > such that only the direct dependencies are included? > > _______________________________________________ > https://lists.gnu.org/mailman/listinfo/libtool >
_______________________________________________ https://lists.gnu.org/mailman/listinfo/libtool