Re: [porting-dev] -fPIC


Subject: Re: [porting-dev] -fPIC
From: Kevin B. Hendricks (khendricks@ivey.uwo.ca)
Date: Sat Aug 25 2001 - 06:09:34 MDT


Hi Hollis,

As far as I know -fPIC is not a recent requirment at all. It tells gcc to
generate Positision Independent Code which means setting up the proper
relocation code for dynamic linking (REL24, REL 32, etc) of symbols, etc.

All dynamic (shared) libraries are supposed to be built with -fPIC under ppc
linux (and it has been that way for along time). The JDK for ppc linux has
been using it in its build process since the beginnning.

Also, any static libraries that get linked/pulled into a shared library
should have all of its code built with -fPIC too.

I am no expert on this but for the intimate details I am sure we could ask
Geoff Keating or Franz Sirl or David Edohlson and they could explain all the
things that differ when using -fPIC vs -fpic vs no PIC.

Take care,

Kevin

On Friday 24 August 2001 07:32, Hollis wrote:
> on 24/8/01 12:20, Kevin B. Hendricks at khendricks@ivey.uwo.ca wrote:
> > The problem seems to be missing "-fPIC".
> >
> > zlib (/usr/lib/libz.so.1) is linked into alot of code.
> >
> > Would you belive that libz.so is NOT being built with -fPIC for YDL 2.0?
>
> I can easily believe that. -fPIC seems to be a very recent requirement, and
> I have yet to see any explanation other than "it makes those broken
> libraries work". I am not surprised at all that Joe x86 Lib-Hacker has no
> idea that -fPIC might be an absolute requirement on some exotic platforms.
>
> :/
>
> At any rate, a YDL2 update and an upstream mail is clearly needed.
>
> -Hollis



This archive was generated by hypermail 2a24 : Sat Aug 25 2001 - 05:37:57 MDT