Subject: Re: road map for new immigrants?
To: Ted Spradley <tsprad@spradley.tmi.net>
From: Bill Studenmund <skippy@macro.stanford.edu>
List: current-users
Date: 09/14/1998 23:38:43
On Tue, 15 Sep 1998, Ted Spradley wrote:

> > BTW, in case you switched for the multi-arch support: if you want to
> > compile again for a second architecture, you can create a separate
> > object hierarchy for your i386 .o files by creating /usr/obj.i386 and
> > then "make obj", before the "make build".  That lets you compile for
> > other arches from the same source tree.

My suggestion is to set things up for obj work BEFORE compiling. I didn't,
and I still have little bits of crud lying around.

Important make variables (which I set in /etc/mk.conf):

BSDSRCDIR	This is where the source lives. For me, it's on my
			/y2 partition.
BSDOBJDIR	Here's where all the obj stuff will go. For me, it's
			on the /y5 partition.
OBJMACHINE=1	Use the machine name when making obj dirs, so you
			get obj.i386, obj.mac68k, ...

There are two ways the obj.XXX stuff works. If you're compiling from under
the BSDSRCDIR tree (and leaving it /usr/src when /usr/src is a sym link
doesn't count), you get a slew of symlinks to directories under the
BSDOBJDIR tree. For instance, BSDSRCDIR/bin/sh has obj.i386, obj.mac68k,
and obj.macppc, which are symlinks to the BSDOBJDIR/bin/sh.i386,
sh.mac68k, and sh.macppc directories.

If you're not under the BSDSRCDIR hierarchy, you get directories in your
source tree.

> You mean NFS-mount the source tree on the various machines, and the 
> objects will go into /usr/obj.{arch}?  That's cool!

Or, if you're brave of heart, you can try cross-compiling, though it's
still rough going at present. When all of the egcs integration (especially
the binutils integration) is done, things will be much easier.

Take care,

Bill