Is there a way to suppress the insertion of --whole-archive/--no-whole-archive placed around static libraries when linking them with a shared library? I have an autotools project containing common code that is linked as several convenience libraries which are subsequently used by both binaries and shared objects within the project. When linking binaries with the convenience libs, only those symbols referenced are brought into the binary. When linking shared objects (e.g. an Apache module, call it mod_foo), all symbols from the convenience libs are included in mod_foo since Libtool wraps them in --whole-archive/--no-whole-archive. I would like only those symbols referenced by mod_foo to be included. I have tried adding the -rpath option to LDFLAGS of the convenience libs with the result that both static and shared libs are created. Libtool then chooses the shared version of the "convenience" libs when linking mod_foo and hence all of the referenced symbols are undefined in mod_foo. I have also tried the lib_LTLIBRARIES primary form with combinations of -static and -rpath LDFLAGS with similar results, i.e. I either get all of the symbols from the "convenience" libs or none. I was unable to locate a similar issue in the archives and the answer is not obvious to me from section 3.7 of the manual. My workaround is to directly create Makefile.in's in the shared object directories and bypass Libtool from linking but would prefer to be consistent and use Automake/Libtool throughout the project. Libtool 1.4.2 Automake 1.6.3 Autoconf 2.53 Thanks in advance. Jim |
_______________________________________________ Libtool mailing list [EMAIL PROTECTED] http://mail.gnu.org/mailman/listinfo/libtool