Subject: Re: Using same .o files for pic/non-pic libraries.
To: Simon Burge <simonb@netbsd.org>
From: Jonathan Stone <jonathan@DSG.Stanford.EDU>
List: tech-toolchain
Date: 09/12/1999 13:43:52
In message <199909111259.WAA28431@balrog.supp.cpr.itg.telecom.com.au>
Simon Burge writes:

>Folks,
>
>I don't know if this can be put to a practical use, but on the pmax (and
>other mips ABI platforms) the .o and .so files generated during library
>builts are exactly the same - it seems a little bit silly to compile
>everything twice when we really don't need to.
>
>A simple test would be if both CPICFLAGS and APICFLAGS are empty, then
>we could depend the .so on the .o and then symlink to the .o.  Does this
>seem workable?

The MIPS ELF ABI means that calls between the .o and .so must follow
the same convention. So it might make more sense to add hooks which
let bsd.lib.mk cp (or ln) the .o files to .so, or vice-versa, and
ignore the cpicflags/apicflags. I beleive that's what OpenBSD on mips
has always done.

Alpha is a candidate, if I recall what cgd said years ago correctly.
Dunno about other ports as they move to ELF.