[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Disable --whole-archive when using convenience archives

From: Alon Bar-Lev
Subject: Re: Disable --whole-archive when using convenience archives
Date: Thu, 3 Dec 2009 22:28:59 +0200

Thank you for quick response (as usual... :) )

I had to add -prefer-pic to CFLAGS in order it to work properly... :)

Wow... this is an ugly workaround... Any reason why a simple switch to
"libtool --mode=link" is not supported? Is it the first time someone
needs this?



AUTOMAKE_OPTIONS = foreign 1.10


lib1_la_CFLAGS = $(AM_CFLAGS) -prefer-pic
lib1_la_SOURCES = a.c b.c
lib1_la_LDFLAGS = -rpath $(libdir) -static

module_la_SOURCES = m.c
module_la_LIBADD =
module_la_LDFLAGS = -avoid-version -module -shared -no-undefined

On Thu, Dec 3, 2009 at 10:17 PM, Ralf Wildenhues <address@hidden> wrote:
> Hello Alon,
> * Alon Bar-Lev wrote on Thu, Dec 03, 2009 at 07:08:03PM CET:
> > I have some convenience archives linked against several modules.
> >
> > I wish only required objects to be included in modules.
> Then make the convenience archives not be convenience archives any
> longer, i.e., make them libtool libraries.
> You can make them "normal" libtool libraries with either
> but then they will be installed in $(foodir) ('foo' often being 'lib').
> If you don't want that, then you can get automake to not install them,
> but libtool still treat them as normal libraries with
>  noinst_LTLIBRARIES =
>  libbar_la_LDFLAGS = -rpath /some/dir
> In either case, they may end up being shared libraries (or both), so if
> you don't want that, add -static to libbar_la_LDFLAGS.
> Cheers,
> Ralf

reply via email to

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