libtool
[Top][All Lists]
Advanced

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

Convenience libraries build both PIC and non-PIC regardless of -static?


From: Steven Brown
Subject: Convenience libraries build both PIC and non-PIC regardless of -static?
Date: Mon, 25 Feb 2008 19:16:42 -0800
User-agent: Thunderbird 2.0.0.9 (Windows/20071031)

For a simple libtool convenience library, I've noticed the compile stage compiles both PIC and non-PIC objects regardless of if it's actually going to need PIC in the link stage. E.g, for something like this, which is explicitly -static:

noinst_LTLIBRARIES = libconvenience.la
libconvenience_la_LDFLAGS = -static
libconvenience_la_SOURCES = convenience.cc convenience.hpp

It'll compile both a -fPIC .libs/convenience.o and a normal convenience.o, despite only using the normal convenience.o when producing the archive. For C++ projects with slow compile times, this burns a lot of time.

Is there a way to tell libtool to not build those PIC objects without disabling shared libraries globally in the project with AC_DISABLE_SHARED? The only thing I could find about this was this thread[1] but the patch doesn't seem to have been applied.


[1] http://www.mail-archive.com/address@hidden/msg03971.html





reply via email to

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