On Mon, Jul 30, 2001 at 03:03:23PM +0200, Florian Weimer wrote: > > | 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. > > > > IMHO, it makes sense to drop this C reference as well, if we are in > > the process of changing the section.
On Tue, Jul 31, 2001 at 12:25:34AM +0300, Richard Braakman wrote: > How much of a C reference is it? It's gcc specific, is it not? > Code in shared libraries must be position independent. How it is > achieved is less important, but I expect that it's going to involve a > flag similar to -fPIC. And I don't want to replace it with a general > statement about position independence, because that means more people > will get it wrong. This points at a general need for a distinction between what's important (shared libraries) and what's less important (-fPIC). Still, it's easy to fix the above statement, without losing any of the detail, simply by using a different tense: The shared version would be compiled with -fPIC, and the static version would not be. In other words, each *.c file would need to be compiled twice. This gets the important point across, but doesn't exclude alternate mechanical details. > > In addition, there are some architectures where all code is position > > independent, so -fPIC is a noop, and others, where -fPIC is less > > efficient then -fpic. > > IIRC, policy specifies -fPIC specifically because -fpic does not work > right on all architectures. I think that trying to prescribe different > flags for different architectures will cause insanity. Remember, > there's only one source package. This makes no sense to me. Did you mean to say that -fPIC works right on all platforms? Thanks, -- Raul

