Re: Shared libs with non-PIC code on i386
Philippe Troin wrote on Wed Aug 15, 2001 um 04:44:21PM:
> > explain my problems and what the problem is. I have a problem with
> > linking PIC (position independent code) with non-PIC code in a
> > shared library. The current policy requires all libraries to contain
> ^^^^^^^^^^^^^ <--\
> This should read "policy requires all *shared* libraries ------/
I mean "shared", of course.
> All libraries must have a shared version in the `lib*' package and a
> static version in the `lib*-dev' package. The shared version must be
> compiled with `-fPIC', and the static version must not be. In other
> words, each `*.c' file will need to be compiled twice.
Yes, this is the paragraph in the policy I am talking about. Reading
this word after word, I think I wouldn't violate it enabling the DGA
plugin since _my_ stuff is compiled with -fPIC ;)
> > linking on non-x86 plattforms. Fortunately, this works fine on i386
> > and used sometimes.
> This ie evil. Having non-PIC shared libraries makes them non-shared
> anymore (at least in memory).
Yes, at least the non-PIC parts.
> libXxf86dga.a is a static lib, hence should contain non-PIC code
> according to policy.
Yes, and it seems to be not suitable for shared linking, since...
> > without DGA on non-x86? Currently, I had to remove the complete DGA
> > support (though it is stable enough), so this "exceptional case"
> > would make DGA for most users possible.
> Maybe you should lobby for a libXxf86dga.so shared library ? Policy
> mandates that both .a and .so of all libraries should be provided.
...there is no libXxf86dga.so. But I could bother Branden, of course ;)
Es ist einfacher Linux zu konfigurieren, als mit Windows zu leben.
anonymous in dcouln