Subject: Re: Changes to bsd.lib.mk for some architectures
To: Guenther Grau <Guenther.Grau@de.bosch.com>
From: Simon Burge <simonb@netbsd.org>
List: tech-toolchain
Date: 11/13/1999 01:07:42
Guenther Grau wrote:

> I have no problem with this, but a general comment/question:
> Why is it limited to pmax & alpha, and doesn't work on
> ELF x86 an sparc?

I'm not fully conversant with the whole ABI thing, but for the mips
ABI (and I guess the alpha one too) PIC (Position Independant Code)
and non-PIC use different function calling conventions, so you can't
mix code between the two.  One huge drawback is that you can't compile
a .c file to a .o file and decide later whether you want to link it
statically or dynamically.  So everything is compiled so that it is
position independant (at I believe a slight performance penalty).  This
also means you don't need to remember any fancy compiler options just
because you might want to link statically or dynamically.

I'd guess that just about everything else (including x86 and sparc) use
the same calling conventions for PIC and non-PIC code, so therefore you
use the slightly faster non-pic code when you can.

If I've totally balls'ed up this explaination, I'm sure someone will
explain it better :-)

Simon.