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 09:13:40 +0100

Ralf Wildenhues <address@hidden> wrote on 03/12/2009 08:20:22:

> From: Ralf Wildenhues <address@hidden>
> To: Joakim Tjernlund <address@hidden>
> Cc: Bob Friesenhahn <address@hidden>, address@hidden
> Date: 03/12/2009 08:20
> Subject: Re: -fpic support in libtool?
>
> * Joakim Tjernlund wrote on Thu, Dec 03, 2009 at 08:06:25AM CET:
> > > 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?
>
> You can probably get away with overriding lt_prog_compiler_pic,
> lt_prog_compiler_pic_CXX, ..., in configure.ac, when doing it *after*
> the AC_PROG_LIBTOOL aka LT_INIT invocation, and before either of
> AC_OUTPUT or LT_OUTPUT.  However, this is not recommended, doing this
> will let configure test the wrong pic_flag (i.e., the one it sets rather
> than your override), and if this breaks now or in a later release you
> get to keep the pieces.
>
> We should probably change the code so that the override can be done
> before AC_PROG_LIBTOOL, so that at least -DPIC is added consistently,
> and that the compile test uses the right flag.

Would it be possible to write something in acinclude.m4 that will override the
-fPIC flag?

 Jocke





reply via email to

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