[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: -fpic support in libtool?
From: |
Mike Frysinger |
Subject: |
Re: -fpic support in libtool? |
Date: |
Thu, 3 Dec 2009 02:15:12 -0500 |
User-agent: |
KMail/1.12.4 (Linux/2.6.31.4; KDE/4.3.4; x86_64; ; ) |
On Wednesday 02 December 2009 21:27:55 Bob Friesenhahn wrote:
> 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.
it isnt just a target-specific issue. it's package specific too. for smaller
libraries, people can get away with -fpic. but you really have no way of
knowing until you try and compile something and it fails due to exceeding the
smaller space.
-mike
signature.asc
Description: This is a digitally signed message part.