
Porting GNAT to NetBSD/68k
I'm not quite sure if I'm going to have time to do this real soon, so
this might be a slightly academic question.
Tell me if this is a sensible plan of attack.
0. Install a more modern GCC on the NetBSD/68k machine so that I'll
have a decent RTL back-end. (Currently it's gcc 2.4.5 running under
NetBSD1.1 on a macintosh).
+----------+ +---------+
|NetBSD/68k| |x86 Linux|
+----------+ +---------+
|68k gcc | |x86 gcc |
+----------+ +---------+
1. Build a 68k GCC cross-compiler under x86 Linux (My only non-68k
machine).
+----------+ +---------+
|NetBSD/68k| |x86 Linux|
+----------+ +---------+
|68k gcc | |x86 gcc |
+----------+ |68k gcc |
+---------+
2. Install GNAT over the 68k-gcc. (Is this as simple as it sounds?.
+----------+ +---------+
|NetBSD/68k| |x86 Linux|
+----------+ +---------+
|68k gcc | |x86 gcc |
+----------+ |68k gcc |
|68k GNAT |
+---------+
3. Take the source to the x86-NetBSD GNAT run-time libraries
and compile it with the Linux-hosted 68k-GNAT compiler.
+----------+ +---------+
|NetBSD/68k| |x86 Linux|
+----------+ +---------+
|68k gcc | |x86 gcc |
|BSD rts | |68k gcc |
+----------+ |68k GNAT |
+---------+
4. Use the Linux-hosted GNAT to compile GNAT for NetBSD.
+----------+ +---------+
|NetBSD/68k| |x86 Linux|
+----------+ +---------+
|68k gcc | |x86 gcc |
|BSD rts | |68k gcc |
|GNAT | |68k GNAT |
+----------+ +---------+
5. Install this GNAT over gcc.
6 (Optionally). Compile the compiler itself to make sure it's
capable of it and hasn't suffered bit rot.
As far as I can tell, the only tricky part is building the cross
compiler. Would it be easier if I hosted it on an x86-NetBSD machine?
Is building a GNAT cross compiler difficult?
--
- predictions of the future - quantum computers - silly poetry -
- the "langue musicale universale" (Solresol) revival project -