[Top][All Lists]

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

Re: Building static-only or shared-only libraries on a per target basis

From: Sander Niemeijer
Subject: Re: Building static-only or shared-only libraries on a per target basis
Date: Mon, 4 Aug 2003 10:58:29 +0200

Hi Ralph,

Thanks for providing the patch. I tested it with your libtool-demo and it worked fine for me.


On zondag, aug 3, 2003, at 23:26 Europe/Amsterdam, Ralph Schleicher wrote:


over the last months, there were multiple discussions on the libtool
mailing list about the need for building static-only or shared-only
libraries on a per target basis.  Up to now, libtool has a -static
flag for compile and link mode but its meaning is not consistent.
In compile mode, -static forces building of an .o file but also
builds a .lo file if the host system supports shared libraries, and
libtool was configured with --enable-shared.  In link mode, on the
other hand, -static forces building a static library but does not
build a shared library even if building a shared library is supported
or configured.  Adding the -static flag for compile mode is IMHO only
meaningful when using -static for link mode, too.  Therefore -static
must not build a .lo file in compile mode.

While the -static flag allows a package maintainer to explicitly build
a static-only library, libtool has no option for building a shared-only
library.  Below is a patch against libtool CVS from 2003-07-31 together
with a ChangeLog entry.  It adds a -shared flag to libtool and changes
the behavior of -static in compile mode as described above.  I've also
attached a tiny demo project for testing.

2003-08-03  Ralph Schleicher  <address@hidden>

        * doc/libtool.texi (Link mode): Document new -shared option.
        (Compile mode): Document new -shared option, and be more specific
        about the effect of the -static option.
        * Implement it.

Best regards,

Libtool mailing list

reply via email to

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