libtool
[Top][All Lists]
Advanced

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

Re: -prefer-pic


From: Olly Betts
Subject: Re: -prefer-pic
Date: Thu, 24 Jan 2008 03:34:07 +0000
User-agent: Mutt/1.5.9i

On Mon, Jan 14, 2008 at 10:54:41PM +0100, Ralf Wildenhues wrote:
> Hello Olly,
> 
> * Olly Betts wrote on Thu, Jan 10, 2008 at 07:42:16PM CET:
> > The output from:
> > 
> > libtool --help --mode=compile
> > 
> > contains:
> > 
> >   -prefer-pic       try to building PIC objects only
> >   -prefer-non-pic   try to building non-PIC objects only
> > 
> > Firstly, that's poor grammar ("try to build" would be better).
> > 
> > Secondly, this seems to be the full extent of the documentation for
> > these options - searching the info manual for "-prefer" doesn't find
> > anything.  The NEWS file notes they were added in libtool 1.3d "to
> > control the generation of PIC/non-PIC code".
> 
> Firstly, a patch for both would be cool, and secondly, it's probably not
> documented because it doesn't work all that well.  ;-)

I'm happy to produce a patch for the first issue (though it might take
me a while to get to it as I'm in the throes of relocating to the other
side of the planet).

But I'm not clear on the details of what these options do, despite
peering at the source code, so I don't feel I can usefully write a patch
for the manual.  All I could really do currently is transcribe the
--help output into the manual!  If these options don't work very well,
it seems particularly important to mention the limitations.

> (Of course, the non-PIC code in shared issue is borked because of the
> deplibs_check_method war.  That should be revisited at some time and
> redone right.)

Sorry, I don't get the reference.  Googling for "deplibs_check_method
war" just finds your message.  The only page I found which seemed like
it might be relevant is this, but I'm not really following:

http://www.gnu.org/software/libtool/deplibs.html

The issue that caused me to be looking at these options in the first
place was someone linking a static library (built with libtool) into a
Python module.  As you're no doubt aware, that doesn't work at all on
many architectures (e.g. x86-64), and has drawbacks on some where it
does work (e.g.  on x86), so I wondered if libtool could easily be told
to build a static library with PIC code for this purpose.

Cheers,
    Olly




reply via email to

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