Subject: SunOS compatibility kudos
To: None <port-sparc@NetBSD.ORG>
From: Todd Vierling <tv@pobox.com>
List: port-sparc
Date: 08/22/1997 15:33:19
Well, that settles it.  I recently set up an extra copy of gcc on my system
as a cross-compiler for SunOS 4.1.3_U1 (got the libs and includes from the
CD I finally got a hold of), created /emul/sunos/usr/lib as a symlink to the
/usr/local/sparc-sun-sunos4.1.3_U1/lib directory, compiled binutils as cross
assembler and cross linker for the same, and guess what?  I find that
NetBSD's SunOS binary compatibility is about as rock solid as it gets. 

I found that this setup is _very_ flexible--'configure' scripts conveniently
don't recognize the cross gcc as a cross-compiler (probably because programs
it produces run on the same machine), and the resultant binaries run great
on SunOS, Solaris, and NetBSD.  I was even capable of running a "native gcc"
for SunOS 4.1.3_U1, but because it liked going into /emul/sunos/... for all
files, it was a little less flexible (and slower).

If anyone is interested in details on the way this is all set up, and have
SunOS libraries and includes to borrow (I can't distribute them myself),
mail me and I'll describe it in further detail (or should I post the gory
details here?).  If you want to try it, and have set up cross compilers
before, do note one thing--you'll need to add the following to
/usr/local/lib/gcc-lib/sparc-sun-sunos4.1.3_U1/2.7.2.3/specs:

At the beginning of the line after '*link:', add '-rpath= ' (the -rpath
option with an empty argument and a space).  Without this, the binaries may
fail on one or more platforms because of how GNU ld hardcodes linker paths
into the SunOS executable.

=====
== Todd Vierling (Personal tv@pobox.com; Business tv@lucent.com)
== I know you like the Internet, Bobby.  Now go eat your Frosted Flakes.