[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Passing options to the linker
From: |
Ralf Wildenhues |
Subject: |
Re: Passing options to the linker |
Date: |
Wed, 24 May 2006 17:40:43 +0200 |
User-agent: |
Mutt/1.5.11 |
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