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/libtool@gnu.org/msg03971.html
_______________________________________________
http://lists.gnu.org/mailman/listinfo/libtool