
This directory contains makefiles and patches to allow a
MINIX library to be built with gcc.

You will need MINIX 1.5.10 with Bruce Evans 386 patches
and have installed gcc and its include files (including the new
stdio.h (for estdio).

You should put this directory and its sub-directories in
the src lib directory for MINIX (e.g. /usr/src/lib).
It expects .. to contain subdirectories 
    ansi other posix estdio

You should install the estdio21 sources in ../estdio

The subdirectory mfiles, contains makefiles and 
patches for the various direcories.

1) Setting up estdio

Copy gcc.sit and gcc.txt to ../estdio/INSTALL 
Then
       cd ../estdio/INSTALL
       sh yinstall.sh

Answer y to the first question (you want a preconfigured site
description) and then select the gcc description.  This will create
various files in the basic estdio directory.  Note that the stdio.h in
estdio should be the same as that in /usr/local/lib/gcc/gcc-include

2) Fixing the other directories

for each directory ansi other and posix copy the Makefile.gcc
from mfiles to the appropriate directories.  Also two patches
are required.  ansi/assert.c and other/nlist.c patches are
provided.

3) Making the library

In this directory it should be possible to build the library by typing 
    make
Make may fail due to lack of space for gcc-cc1 you have to play with
things to get it right.  Don't have extra processes around and 
ensure all processes are at the begining of memory (I type
exec sh - to move a shell to the start of memory).  Secondly
make may fail due to it using up space, just type make again
you may have to do this a number of times.  With a make chmem'ed
to 265535 I have to do this two or three times.

In the worst case you may have to do the makes by hand, look at the
makefiles.

The result should be in the current directory
    crt0.o gnulib libc.a

4) Installing

Make doesn't do this for you.  You should do the following
(saving the old versions just in case).
       cp ../estdio/stdio.h /usr/local/lib/gcc/gcc-include
       cp crt0.o /usr/local/lib/gcc
       cp gnulib /usr/local/lib/gcc
       cp libc.a /usr/lib

Note that on my 33MHz 386 (with a fast disk) a full compilation of the
library takes about 25 minutes, so don't expect this to be fast.

Alan W Black
awb@ed.ac.uk
Oct 1990

