

This directory contains configuration files for gcc-1.37.1
to be compiled under MINIX 1.5.10 with Bruce Evans' 386 patches

Copy Makefile conf.gcc.minix and config/* to the src
directory of gcc

Then to set up the proper links type (my shell fell over with the
standard config)

   conf.gcc.minix

in the compiler src directory, then type 

   make

If make fails due to lack of space, you will need to
play with chmem on /usr/local/lib/gcc/gcc-cc1 it needs 
a little over a megabyte.  Also make itself may fail due to 
lack of space, if so just type make again.

The resulting cc1 and cpp should be copied to 
/usr/local/lib/gcc/gcc-{cc1,cpp}
and gcc to /usr/local/bin 

It takes around 30 minutes to compile on 386/33MHz with a fast disk

Comment about gcc implementation
--------------------------------

The a.out format produced by gcc is not understood by MINIX and so has
to be converted using the program gcc2minix (which is provided) It was
considered that ld could do this conversion but that would require
fairly major changes to ld and would stop other programs like size,
nm, dumping and undumping from working so we decided on a special
conversion program.  Ideally we should modify the MINIX kernel to
recognised gcc a.out format.

Floating point is done in an interesting though inefficient way.  The
loader adds a floating point signal handler to the output file so that
when floating point instructions occur the signal is caught and that
instruction is decoded in software.  This is inefficient but without a
gcc machine description that does not depend on a 387 it is unclear
what to do.  Note that when soft-float is used (as it is by default)
very few 387 instructions are actually generated.  This method of fp
does require a minor change to you kernel to note that there is no 387
processor.

Known bugs:
----------
    Sometimes gcc-cc1 will go into what appears to be
    an infinite loop.  This is characterised by using
    lots of system time and not so much user time. We
    think this is something to do with estdio and floating
    point (Its definately doing many floaring point 
    instructions but somebody else is calling them).
    Probably the estdio setup is wrong.


Alan W Black   awb@ed.ac.uk
Richard Tobin  richard@aiai.ed.ac.uk
Oct 1990
