On Thu, 3 Dec 2009, Joakim Tjernlund wrote:
Several years ago I asked libtool to support -fpic too but
I don't see it in never libtool(s). I guess it isn't
impl.?
The simplest fix for adding -fpic I can come up with is
doing sed -i 's/-fPIC/-fpic/' aclocal.m4
This is a bit clumsy as one can easily forget
to do this when running aclocal manually.
Is there a simpler way? One that will work both with 1.5 and 2.x
versions of libtool?
How would libtool know which PIC variant will work? Note that some
targets (e.g. PowerPC & SPARC) offer many reduced PIC variants.
These don't really work unless the developer is able to validate the
application/library on many kinds of targets and somehow specify the
correct variant which works for the target.
Libtool can be influenced by the configure script by influencing this
definition which gets output in the libtool script:
# Additional compiler flags for building library objects.
pic_flag=" -fPIC -DPIC"
This seems to be controlled by the lt_prog_compiler_pic configure
script variable.
Note that many compilers use something quite different from -fPIC to
mean the same thing but don't accept -fpic so just
substituting/inserting -fpic is likely to cause failure.
Bob
--
Bob Friesenhahn
bfrie...@simple.dallas.tx.us, http://www.simplesystems.org/users/bfriesen/
GraphicsMagick Maintainer, http://www.GraphicsMagick.org/
_______________________________________________
http://lists.gnu.org/mailman/listinfo/libtool