libtool
[Top][All Lists]
Advanced

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

Re: -fpic support in libtool?


From: Joakim Tjernlund
Subject: Re: -fpic support in libtool?
Date: Thu, 3 Dec 2009 08:06:25 +0100

Bob Friesenhahn <address@hidden> wrote on 03/12/2009 03:27:55:
>
> 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.

We use auto*, libtool for an internal embedded project. This SW will always
be built in a controlled env.(powerpc, linux). Since powerpc can deal
with -fpic, I want to use it.

>
> 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.

hmm, not sure what/if you are suggesting. Should I just try override the
definition of pic_flag? In my configure.ac or somewhere else?

>
> 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.

Yes, but not in our case.





reply via email to

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