Subject: Re: Mac68k/Sun3 binary/lib compatibility
To: None <>
From: Gordon W. Ross <>
List: port-sun3
Date: 04/04/1996 08:14:47
> Date: Thu, 4 Apr 1996 12:46:49 +0100
> From: (Julian Bean)

> It is my understanding that the two are binary compatible.  However, how
> far does this go?  My sun3 has its own /usr, but nfs mounts /usr/src
> (read-write) from the mac68k (as well as /usr/local and /usr/share).  I can
> populate /usr/include on the sun3 with up-to-date include files by doing a
> cd /usr/src/include;make install.

They can share most binaries, with the following exceptions:
(Well, these are the ones I know about anyway.)


Once we all get around to porting Leo's new libkvm to the sun3,
we should be able to remove the remaining things in usr/* from
the above list.  That would let us share /usr between any m68k
machines, which is a great convenience.  I'm not so concerned
about trying to share things in /bin or /sbin because it would
not save much space, and there ARE still some truly machine-
dependent programs, like eeprom for the sun3, ite* on amiga...

We might even want to put all MD programs in /bin or /sbin just
to facilitate sharing /usr between, say sun3, amiga, mac68k...

> However, libraries worry me.  If I have the libraries compiled on the
> mac68k, can I simply install those on the sun3?  It seems to me that they
> might have dependencies on mac68k-specific includes under /sys.

No, the libraries should be OK, except for libkvm*

> What I am trying to do is build the tool chain on the sun3 - which brings
> me to my next question - how many of gcc, as, ld, tsort, nm, ar etc. are
> binary compatible between the two systems?  Can I naively cd
> /usr/src/gnu/usr.bin/gcc and make install the mac68k versions in to place?


> Having got libs and a tool chain, I can presumably cd
> /usr/src/sys/arch/sun3/conf, make a config, config it and then cd
> ../compile/MACHINE and make my kernel.... (OK, I'm going to have to install
> the new config on the sun3 as well...)

Yes, I think that should work.  You might need to run configure on
the sun3 (I don't remember), but the rest of the make could be done
on the mac using:  "make MACHINE=sun3 ..."

> Is this all possible?  Some of it could be made neater by using union
> mounts, but I can't use union mounts until I compile a kernel with union_fs
> support ;-)

No, it should not be that hard.  Rather than use union mounts, I'd
just use the "symlink through root" trick:  Replace any MD files in
/usr with symlinks through the root, i.e.:
	ln -s /usr.arch/lib/ /usr/lib/
where /usr.arch points to a different place on each machine.

> P.S. Sun3 people - I have only been watching port-sun3 with half an eye.
> Is the new SCSI driver compiled in by default now?  I could really use a
> faster SCSI driver just now...


Gordon Ross