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

Re: Shared libs with non-PIC code on i386



> And there will not be until and unless XFree86 says so.  You should not
> link static objects into shared ones.  Have the client binary do the
> linking of the static object.  This issue did in fact come up with SDL
> recently, and was resolved (<http://bugs.debian.org/104344>).

Branden,

Actually it's not quite that simple, as the ia64 and hppa porters are
finding out the painful way.

Using SDL as an example, we have made it so that the SDL library does
not link in the non-PIC X libraries. SDL comes with a script,
sdl-config, to help with linking, so we've made sdl-config --libs return

-lSDL -lXxf86dga -lXxf86vm -lXv

This works great for applications that want to link libSDL... but
suppose I wanted to create a shared library that links SDL (we have
quite a few example of these in Debian....) then the library itself will
try to link with `sdl-config --libs` and fail.

One solution for this is to have a separate sdl-config --shlibs flag for
linking shared libs, but this still requires source-level modifications
for each SDL linking library package (many of which are wrapped inside
ugly automake/autoconf calls)

While I understand your reasons for not shipping PIC shared libraries
for xf86dga, etc... it does create a *lot* of problems for the various
platforms where mixing PIC and non-PIC is not allowed :-(

randolph
-- 
Debian Developer <tausq@debian.org>
http://www.TauSq.org/

Attachment: pgp6hiWqJU8ut.pgp
Description: PGP signature


Reply to: