[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

> This is needed due to some conclusions I referred in:

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/ ../lib/ot/src/ ../lib/fm/src/
>   -Wl,--no-whole-archive
> > ../lib/glpkinterface/src/
> > ../lib/ncquest/src/  -lm -lnsl -llog4cpp

and won't do what you want.  Libtool causes all convenience archives to
be linked with --whole-archive.  Are 

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)?


reply via email to

[Prev in Thread] Current Thread [Next in Thread]