[PATCH] Build libxf86config with -fPIC.

Michel Dänzer michel at daenzer.net
Tue Nov 23 07:05:17 PST 2010


On Die, 2010-11-23 at 09:34 -0500, Gaetan Nadon wrote:
> 
> So far no one has claimed adding fPic is the correct way of creating a
> shared lib or that it is a necessary workaround to a situation libtool
> cannot handle

On many Linux architectures (x86 being a notable exception), all code
linked into a shared library must be compiled with -fPIC. If a static
library was built without -fPIC it can't be linked into a shared
library, libtool can't do anything about that.

> and that it will work on all supported platforms.

It should. Static libraries are traditionally built without -fPIC
because it's not required for them and it reserves a precious register
on x86. Building static libraries with -fPIC is an established solution
for linking libraries with no ABI guarantees into shared libraries.


-- 
Earthling Michel Dänzer           |                http://www.vmware.com
Libre software enthusiast         |          Debian, X and DRI developer


More information about the xorg-devel mailing list