Subject: NetBSD crosscompiler
To: None <port-mac68k@NetBSD.ORG>
From: Markus Hitter <M.Hitter@trier.fh-rpl.de>
List: port-mac68k
Date: 12/22/1995 20:43:40
Ok, guys,

there seem to be several people which want to setup a cross compiling
environment on a UN*X machine NOT running NetBSD. Since I'm one of these people
and nobody answered to one of these request the last weeks, let's have a look
about I'm right with my ideas:

1) Get the sources for 'config' from .../NetBSD-current/src/usr.sbin/config/*
and compile it on the host machine. Install it somewhere in the PATH.

2) Get the sources for 'make' from .../NetBSD-current/src/usr.bin/make/* and
compile it as well on the host machine. Install it (maybe as 'bmake') in the
PATH.

3) Get all the files listed in .../sup/current/last.include,
.../sup/current/last.ksrc-common and .../sup/current/last.ksrc-mac68k and
install them somewhere on the host machine, let's say in /home/netbsd/.

4) Build GCC with 'configure --target=m68k-mac-netbsd' and install it in the
PATH, too. (GNU make may be more successful than bmake ?)

5) Build a cross-assembler and a cross-linker for NetBSD on the host machine.

6) Build a kernel similar to the steps in .../NetBSD-current/doc/sun3/BUILDING:
     1) cd src/sys/arch/mac-m68k/conf
     2) cp GENERIC FOO (where foo could be the name of your machine)
     3) config FOO
     4) cd ../compile/FOO
     5) bmake depend
     6) bmake

7) Install and use the kernel like the standard kernel.

Hmm. Step 3 seems only a question of time, especially if you can't compile SUP
on your host machine. Steps 1 and 2 may need some code changes but shouldn't be
a major hurdle. Step 4 reported last week a person which did it successful. If
we reach Steps 6 and 7 the goal is won. Is left step 5 !

Until today I have really no idea how to build such a cross-assembler/linker.
binutils' configure ignored the paramater "--target=m68k-mac-netbsd".
Assembling could perhaps be done with MPW or another UN*X machine with a 68k
processor. But how to link and make sure the correct binary format is used
(ELF, COFF...).

Ok, that is what I know, suggestions are welcome.

So long, Markus

-- 

------------------------------------------------------------------------------
 Markus Hitter			email:	hitterm@trier.fh-rpl.de
				WWW:	http://www.trier.fh-rpl.de/~hitterm
				Voice:	++49/0651/828172
------------------------------------------------------------------------------