libtool
[Top][All Lists]
Advanced

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

Re: -fpic support in libtool?


From: Bob Friesenhahn
Subject: Re: -fpic support in libtool?
Date: Wed, 2 Dec 2009 20:27:55 -0600 (CST)
User-agent: Alpine 2.01 (GSO 1266 2009-07-14)

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
address@hidden, http://www.simplesystems.org/users/bfriesen/
GraphicsMagick Maintainer,    http://www.GraphicsMagick.org/




reply via email to

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