This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Bootstrapping Ada with gnatgcc
- To: Andreas Franck <afranck at gmx dot de>
- Subject: Re: Bootstrapping Ada with gnatgcc
- From: Florian Weimer <fw at deneb dot enyo dot de>
- Date: Thu, 11 Oct 2001 22:26:58 +0200
- Cc: gcc at gcc dot gnu dot org
- References: <01101119105900.00851@dg1kfa>
Andreas Franck <afranck@gmx.de> writes:
> To bootstrap the latest Ada compiler from GCC 3.1 CVS branch, I have
> installed gnat-3.13p-i686-pc-linux-gnu-bin, renaming the "gcc" executable
> from there to "gnatgcc" because I don't want to bootstrap the rest of the
> compiler with this 2.8.1-based compiler.
You shouldn't do this. ;-)
If you haven't got a working gnatmake (for example, after such a
renaming operation), follow these steps:
Building the Ada compiler
=========================
In order to build GNAT, the Ada compiler, you need a working GNAT
compiler, since the Ada front end is written in Ada (with some
GNAT-specific extensions), and GNU make.
However, you do not need a full installation of GNAT, just the GNAT
binary `gnat1', a copy of `gnatbind', and a compiler driver which can
deal with Ada input (by invoking the `gnat1' binary). You can specify
this compiler driver by setting the `ADAC' environment variable at the
configure step. `configure' can detect the driver automatically if it
has got a common name such as `gcc' or `gnatgcc'. Of course, you still
need a working C compiler (the compiler driver can be different or not).
Additional build tools (such as `gnatmake') or a working GNAT
run-time library installation are usually _not_ required. However, if
you want to boostrap the compiler using a minimal version of GNAT, you
have to issue the following commands before invoking `make boostrap'
(this assumes that you start with an unmodified and consistent source
distribution):
cd SRCDIR/gcc/ada
touch treeprs.ads [es]info.h nmake.ad[bs]
At the moment, the GNAT library and several tools for GNAT are not
built by `make bootstrap'. You have to invoke `make gnatlib_and_tools'
in the `OBJDIR/gcc' subdirectory before proceeding with the next steps.
For example, you can build a native Ada compiler by issuing the
following commands (assuming `make' is GNU make):
cd OBJDIR
SRCDIR/configure --enable-languages=c,ada
cd SRCDIR/gcc/ada
touch treeprs.ads [es]info.h nmake.ad[bs]
cd OBJDIR
make bootstrap
cd gcc
make gnatlib_and_tools
cd ..
Currently, when compiling the Ada front end, you cannot use the
parallel build feature described in the previous section.
I'm going to submit this as a patch as soon as the paperwork is done.
No answer from the FSF yet.