libtool
[Top][All Lists]
Advanced

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

Re: -fpic support in libtool?


From: Ralf Wildenhues
Subject: Re: -fpic support in libtool?
Date: Thu, 3 Dec 2009 08:20:22 +0100
User-agent: Mutt/1.5.20 (2009-10-28)

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

Cheers,
Ralf




reply via email to

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