This file has been updated for GNAT 3.04 so please read carefully.
This is README.UNIX from the source distribution of GNAT. It contains
directions for building GNAT on a Unix system from the sources.

For GNAT version 3.04 and beyond the sources are organized for building on
Unix systems together with 2.7.2. If building with these versions of GCC
presents a problem, send a bug report to report@gnat.com.

BUILDING GNAT

The current version of GNAT can be built on top of GCC 2.7.2. Beginning
with version 2.6.0 of GCC, the sources for GNAT reside in a subdirectory
named ada under the top level GCC source directory.  The directory named src
in this GNAT distribution contains the subdirectory ada which should be copied
to the GCC source directory.  It (src) also contains any patches that are
needed to the GCC sources -- these should be applied (to the files in the
top level GCC source directory unless otherwise specified). Note that there
is a patch file called gcc-272.dif which need to be applied to the GCC 2.7.2
sources. When applying the patches be sure to use the "-p0" option of the
patch program.

The procedures described here presume that you have GCC and the previous
version of GNAT installed (we can only try to make it possible to compile
one version of the compiler with the previous one -- not any older versions)
-- i.e. the "gcc" command will run GNAT.  The steps here will build and
install new C and Ada compilers.  If you thoroughly understand the process of
building gcc you may find shortcuts that apply to your environment -- the
possibilities are too numerous to spell out here.

This installation starts from the sources of GCC 2.7.2

  -- Apply patches (gcc-272.dif) from the src directory.

  -- Read the sections at the end to see if there are any specific
     instructions for your particular target.

  -- Copy the ada directory into the GCC distribution.

  -- In the ada directory do: 'touch treeprs.ads a-[es]info.h nmake.ad[bs]'

  -- From the GCC top level directory follow the GCC directions for
      configure and then:
      -- make CC=gcc CFLAGS="-O2" LANGUAGES="c ada"
      -- make CC=gcc CFLAGS="-O2" LANGUAGES="c ada" bootstrap
      -- make CC=gcc CFLAGS="-O2" gnatlib_and_tools
      -- make install LANGUAGES="c ada"

The dependencies should be very close to being current now.

---------------------------------------------------------------------------
HP PA-RISC:
All files need to be compiled with -O due to some code generation
problem. On HP PA-RISC sinfo.adb must be compiled with -O to avoid "branch out
of range" errors produced by the linker. You also need to compile
with -mdisable-indexing

---------------------------------------------------------------------------
Sun 3:
You need to change the Makefile so that "-g" is not used to compile
the library. Compiling any file with "-g" does not work currently.


Building GAS (GNU Assembler):
-----------------------------
For certain systems is currently necessary to use GAS with GNAT. If you are
building GAS you need to build it with the patches contained in gas-26.dif.
