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

Re: Reason for 10.2 -fPIC requirement



On Sep 18, Loïc Minier <lool+debian@via.ecp.fr> wrote:

>  Would someone please sched some light on the origins of this
>  requirement?  If this requirement is only to save memory in most cases,
>  would it be reasonable to permit building with -fPIC by changing this
>  "must" in a "should"?
Not quite.

Having non-PIC shared libraries is not generally acceptable, but
policy does not reflect the current practice.
Shared non-relocatable code is acceptable on the few architectures which
can support it (i386 and maybe another one) only when there is a
positive tradeoff between the speed gained and the RAM wasted.
The most common situation where a non-PIC shared library is a good idea
is when it contains hand-optimized assembly code. It may still be
possible to rewrite it to be relocatable without a major performance
loss, but it would probably take a lot of time. And again, very few
architectures support non-PIC shared libraries at all: on most they
would just not work.
Even if a library should be built non-PIC on a specific architecture
I see no reason to make it static unless required by the system ABI,
which definitely is not the case for i386.


(Can somebody refactor this in a policy change proposal please?)

-- 
ciao,
Marco

Attachment: signature.asc
Description: Digital signature


Reply to: