Hi Paulo, * Paulo J. Matos wrote on Wed, May 24, 2006 at 05:34:50PM CEST: > > I'd like to know what's the best way to pass some options to the linker? > I'd like to add -Wl,--whole-archive to the linker before the libraries > I want to link, which are listed in LIBADD. Any ideas on how to do > this?
Position-dependent linker flags have not yet been implemented in libtool. > This is needed due to some conclusions I referred in: > http://groups.google.com/group/gnu.g++.help/browse_frm/thread/46517713685155f0/ Hmm, that looks very fishy: > > /bin/sh ../libtool --tag=CXX --mode=link g++ -ggdb -Wall -std=c++98 ... > > esatcluster.o extsat.o esatlogger.o > -Wl,--whole-archive > > ../lib/bf/src/libbf.la ../lib/ot/src/libot.la ../lib/fm/src/libfm.la > -Wl,--no-whole-archive > > ../lib/glpkinterface/src/libglpkinterface.la > > ../lib/ncquest/src/libncquest.la -lm -lnsl -llog4cpp and won't do what you want. Libtool causes all convenience archives to be linked with --whole-archive. Are ../lib/bf/src/libbf.la ../lib/ot/src/libot.la ../lib/fm/src/libfm.la convenience archives (noinst_LTLIBRARIES)? If yes, then what you want should work out of the box. If no, where are they to be installed (are they lib_LTLIBRARIES)? Cheers, Ralf
