Bug#329762: Relaxation and documentation of the "-fPIC" constraint
Package: debian-policy
Severity: normal
Tags: patch
Hi,
As discussed in the debian-policy@ thread at:
<http://lists.debian.org/debian-policy/2005/09/threads.html#00031>
I propose the following changes to the Debian Policy to:
- exceptionally permit not using -fPIC under i386 in CPU intensive
libraries,
- document why -fPIC is required in most cases,
- permit building of static libraries with -fPIC (I don't think this
has any reason to be forbidden, does it?)
At all rates, since I'm not a native speaker and because it is my first
policy patch, I request review and fixes to the debian-policy@ readers.
Bye,
-- System Information:
Debian Release: 3.1
Architecture: i386 (i686)
Kernel: Linux 2.6.9-1-k7
Locale: LANG=fr_FR@euro, LC_CTYPE=fr_FR@euro (charmap=ISO-8859-15)
--
Loïc Minier <lool@dooz.org>
Come, your destiny awaits!
Index: policy.sgml
===================================================================
RCS file: /cvs/debian-policy/debian-policy/policy.sgml,v
retrieving revision 1.156
diff -u -r1.156 policy.sgml
--- policy.sgml 6 Feb 2005 02:32:39 -0000 1.156
+++ policy.sgml 23 Sep 2005 08:51:46 -0000
@@ -6471,10 +6471,18 @@
<heading>Libraries</heading>
<p>
- The shared version of a library must be compiled with
- <tt>-fPIC</tt>, and the static version must not be. In other
- words, each source unit (<tt>*.c</tt>, for example, for C files)
- will need to be compiled twice.
+ In the general case, the shared version of a library must be compiled
+ in a way permitting its runtime memory copy to be shared among
+ processes using it. This requirement is meant to reduce the memory
+ footprint of applications in Debian as a whole. For example, with
+ the ELF format and the GCC compiler, this is achieved by using the
+ <tt>-fPIC</tt> flag. As a special exception, some CPU intensive
+ libraries might be compiled without -fPIC under i386 only; this is
+ because currently only i386 really benefits of and has support for
+ binaries compiled without -fPIC.
+
+ This requirement does not apply to the static version of the library.
+ The static version is usually built separately, without -fPIC.
</p>
<p>
Reply to: