[comp.os.minix] Hack Report - c68 compiler bootstrap

templon@copper.ucs.indiana.edu (jeffrey templon) (04/18/91)

Another report on trying to get Macminix into a reasonable state.
I have to say that I think the minix philosophy is great - ast et
al supply a working, but not working too well, system which of
course people want to improve.  so they go rip its guts out and
learn alot doing so.  great!

last time i reported troubles getting the c68 compiler by Christoph v.W.
up due to lack of floating point in ACK.  With CvW's help, this is
a sketch of what I did (don't want to spoil anybody's fun by giving
TOO many details.)

First, I learned to use the LISTSERV at vm1.nodak.edu.  Great service!
I found an old article which had the BINARY of the c68 version II
compiler (the current version is c68 III pl 2).  One also needs the
old lib68k, since some of the support functions' names were changed.
I suggest TRYING it with an old binary + new library, if you don't
know much about such stuff, just to see what happens and try and
figure it out.  A great detective story!

Anyway, the new c68k compiler (version III) can be compiled with the
old binary and lib68k.  Now you have a working c68k version III.
However to compile any new thing, you will have to replace the old
vII lib68k with the new one.  Once I did so, I went ahead and
recompiled c68k III with itself just for completeness.  Thanks, CvW!

Note, you will have to modify cc.c in order to get this to work.
The reason is that /usr/bin/cc is NOT the compiler, but only a driver
program.  It is set up to use ACK compiler, so you will have to change
it in order to have it call c68.  CvW supplies a cc.c which will work,
but I recommend that you hack your own first to learn what is happening.
The gist is that to go from a source.c file to a source.o file, ACK
does this:
	runs /usr/lib/cem   on the source.c file  (front end)
	runs /usr/lib/opt   on the output from cem (optimizer)
	runs /usr/lib/cg    on the optimizer output (dunno what this does)
	runs /usr/bin/as    on the cg output (assembles the code)

c68 does a different set:
	runs /usr/lib/cpp   on the source.c file (preprocessor)
	runs /usr/lib/c68   on the preprocessed source
	runs /usr/bin/as    on the c68 output

Thus you have to modify cc.c to run a C source compilation differently.

Happy Hacking.
					jt