Subject: Re: cross-compiling, was 7300 booting
To: Joe Laffey <joe@laffeycomputer.com>
From: Bill Studenmund <wrstuden@netbsd.org>
List: port-macppc
Date: 09/19/2002 20:27:32
On Thu, 19 Sep 2002, Joe Laffey wrote:

> On Thu, 19 Sep 2002, Bill Studenmund wrote:
>
> > -current can be cross-compiled from RedHat 7.3 for x86, so linuxppc
> > shouldn't be hard, and we can probably get Jason to back-port the changes
> > to 1.6.
>
>
> Hmmm. Well I am wiping this linuxppc box and putting netbsd on it ;-) I do
> have a couple other linuxppc boxes, and an x86 linux box. I figure I will
> do most of my compiling for macppc netbsd on the macppc netbsd box. (I
> normally do that... I never bothered trying to install a cross compiler,
> though I have entertained the idea, escpecially for mac68k builds!)

Actually, 1.6 cross-compiles by default.

Since there are many times when compiling -current on the last release
looks like cross-compiling, and also to better support embedded systems,
we now have build.sh. It's in /usr/src, and it's the prefered way to
compile the tree.

The first thing it does is build a tools-dir, and then use that to build
the rest of the tree.

The "1.6" I'm running on my Beige G3 was actually built on my athlon. :-)

There are a lot of controls on what you can put where. For instance, -U
lets you do unprivileged builds (you can build a release w/o being root).
-D sets the destdir, -R the release dir, -T the tools dir, and -m the
machine.

Here's what I've used (all cd /usr/src):

For i386 builds:

./build.sh -U [-u] -T /y/tools -R /y/release/i386 -D /y/dest/i386

For macppc:

./build.sh -U [-u] -m macppc -T /y/tools -R /y/release/macppc -D /y/dest/macppc

for mac68k:

./build.sh -U [-u] -m mac68k -T /y/tools -R /y/release/mac68k -D /y/dest/mac68k

And when all is done, there's a set of release dirs under /y/release.

Take care,

Bill