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

-fPIC for static libraries (+patch)



Hi,

it seems the XFree people have changed their mind on this ($subject)
issue [1] and have made those static libraries compiled as PIC [2] .
Unfortunately it's currently done for non i386 platforms only
currently, but it seems Jakub Jelinek convinced them that the loss
of performance when compiling PIC on i386 is less of a problem,
given that the corresponding libraries aren't performance critical
anway, and that it causes more problems than it helps [3] . It looks
like that along with the prelinking issue it was convincing [4] to
them.

I have extracted the PIC part of the patch Egbert Eich comitted
([2]) and changed its default to compile the static libs PIC for all
platforms. I tested the patch with the latest xfree from unstable on
alpha and i386 and I found it working. You can find the patch at [5]
, ready to be dropped into the patches subdir :)

Now I'm wondering if there is a chance to get this patch included in
the xfree deb in unstable?

Two advantages I see:

(1) On i386 qt3 has Xinerama support enabled (because there mixing
    PIC and non-PIC is not a problem) . However with the static,
    non-PIC libXinerama.a 'contained' in libqt.so it is impossible
    to use ELF prelinking with any Qt or KDE application. With the
    patch applied to xfree and qt3 rebuild it becomes possible to
    use ELF prelinking.

(2) With libXinerama.a being PIC it would be possible for the qt3
    debian package to have Xinerama support enabled on all
    platforms, not only i386.

What's sort of left is that xfree's mesa libGL.so apparently isn't
fully PIC either (at least on i386?) , but here alternatives are
available. (like installing mesag3 for the time being)


Simon

[1] http://marc.theaimsgroup.com/?l=xfree-xpert&m=103901466101301&w=2
[2] http://marc.theaimsgroup.com/?l=xfree-cvs&m=103220011605856&w=2 , changelog entry 317
[3] http://marc.theaimsgroup.com/?l=xfree-xpert&m=103913722104609&w=2
[4] http://marc.theaimsgroup.com/?l=xfree-xpert&m=103909592914356&w=2
[5] http://www.lst.de/~simon/910_static_libs_as_pic.diff



Reply to: