This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Bootstrapping Ada with gnatgcc

Andreas Franck <> 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

         cd SRCDIR/gcc/ada
         touch [es]info.h[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 [es]info.h[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.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]