Commit e23381df by Geert Bosch

gcc.texi (G++ and GCC): Mention Ada front end.

	* doc/gcc.texi (G++ and GCC): Mention Ada front end.
	(Standards): Refer to GNAT Reference Manual.

	* doc/install.texi (Configuration): Mention Ada front end.
	(Building): Add build instructions for the Ada front end.

	* doc/invoke.texi (Overall Options): Document Ada file types.
	Add "ada" to "-x LANGUAGE" option parameters.

From-SVN: r46479
parent 1ff37128
...@@ -296,16 +296,17 @@ bugs. It corresponds to GCC version 3.1. ...@@ -296,16 +296,17 @@ bugs. It corresponds to GCC version 3.1.
@ifset USING @ifset USING
@node G++ and GCC @node G++ and GCC
@chapter Compile C, C++, Objective-C, Fortran, Java or CHILL @chapter Compile C, C++, Objective-C, Ada, CHILL, Fortran, or Java
@cindex Objective-C @cindex Objective-C
@cindex Fortran @cindex Fortran
@cindex Java @cindex Java
@cindex CHILL @cindex CHILL
Several versions of the compiler (C, C++, Objective-C, Fortran, Java @cindex Ada
and CHILL) are integrated; this is why we use the name Several versions of the compiler (C, C++, Objective-C, Ada, CHILL,
Fortran, and Java) are integrated; this is why we use the name
``GNU Compiler Collection''. GCC can compile programs written in any of these ``GNU Compiler Collection''. GCC can compile programs written in any of these
languages. The Fortran, CHILL, and Java compilers are described in languages. The Ada, CHILL, Fortran, and Java compilers are described in
separate manuals. separate manuals.
@cindex GCC @cindex GCC
...@@ -321,12 +322,17 @@ When referring to C++ compilation, it is usual to call the compiler ...@@ -321,12 +322,17 @@ When referring to C++ compilation, it is usual to call the compiler
it ``GCC'' no matter what the language context; however, the term it ``GCC'' no matter what the language context; however, the term
``G++'' is more useful when the emphasis is on compiling C++ programs. ``G++'' is more useful when the emphasis is on compiling C++ programs.
@cindex Ada
@cindex GNAT
Similarly, when we talk about Ada compilation, we usually call the
compiler ``GNAT'', for the same reasons.
We use the name ``GCC'' to refer to the compilation system as a We use the name ``GCC'' to refer to the compilation system as a
whole, and more specifically to the language-independent part of the whole, and more specifically to the language-independent part of the
compiler. For example, we refer to the optimization options as compiler. For example, we refer to the optimization options as
affecting the behavior of ``GCC'' or sometimes just ``the compiler''. affecting the behavior of ``GCC'' or sometimes just ``the compiler''.
Front ends for other languages, such as Ada 95 and Pascal exist but Front ends for other languages, such as Mercury and Pascal exist but
have not yet been integrated into GCC@. These front ends, like that for C++, have not yet been integrated into GCC@. These front ends, like that for C++,
are built in subdirectories of GCC and link to it. The result is an are built in subdirectories of GCC and link to it. The result is an
integrated compiler that can compile programs written in C, C++, integrated compiler that can compile programs written in C, C++,
...@@ -513,15 +519,19 @@ recent version, while @uref{http://www.toodarkpark.org/computers/objc/} ...@@ -513,15 +519,19 @@ recent version, while @uref{http://www.toodarkpark.org/computers/objc/}
is an older example. @uref{http://www.gnustep.org} includes useful is an older example. @uref{http://www.gnustep.org} includes useful
information as well. information as well.
@xref{Top, GNAT Reference Manual, About This Guide, gnat_rm,
GNAT Reference Manual}, for information on standard
conformance and compatibility of the Ada compiler.
@xref{References,,Language Definition References, chill, GNU Chill},
for details of the CHILL standard.
@xref{Language,,The GNU Fortran Language, g77, Using and Porting GNU @xref{Language,,The GNU Fortran Language, g77, Using and Porting GNU
Fortran}, for details of the Fortran language supported by GCC@. Fortran}, for details of the Fortran language supported by GCC@.
@xref{Compatibility,,Compatibility with the Java Platform, gcj, GNU gcj}, @xref{Compatibility,,Compatibility with the Java Platform, gcj, GNU gcj},
for details of compatibility between @code{gcj} and the Java Platform. for details of compatibility between @code{gcj} and the Java Platform.
@xref{References,,Language Definition References, chill, GNU Chill},
for details of the CHILL standard.
@include invoke.texi @include invoke.texi
@include install-old.texi @include install-old.texi
......
...@@ -632,9 +632,10 @@ their runtime libraries should be built. For a list of valid values for ...@@ -632,9 +632,10 @@ their runtime libraries should be built. For a list of valid values for
grep language= */config-lang.in grep language= */config-lang.in
@end example @end example
Currently, you can use any of the following: Currently, you can use any of the following:
@code{c}, @code{c++}, @code{f77}, @code{java} and @code{objc}. @code{ada}, @code{c}, @code{c++}, @code{f77}, @code{java}, @code{objc}.
@code{CHILL} is not currently maintained, and will almost @code{CHILL} is not currently maintained, and will almost
certainly fail to compile.@* certainly fail to compile. Building the Ada compiler has special
requirements, see below.@*
If you do not pass this flag, all languages available in the @file{gcc} If you do not pass this flag, all languages available in the @file{gcc}
sub-tree will be configured. Re-defining @code{LANGUAGES} when calling sub-tree will be configured. Re-defining @code{LANGUAGES} when calling
@samp{make bootstrap} @strong{does not} work anymore, as those @samp{make bootstrap} @strong{does not} work anymore, as those
...@@ -764,7 +765,8 @@ Now that GCC is configured, you are ready to build the compiler and ...@@ -764,7 +765,8 @@ Now that GCC is configured, you are ready to build the compiler and
runtime libraries. runtime libraries.
We @strong{highly} recommend that GCC be built using GNU make; We @strong{highly} recommend that GCC be built using GNU make;
other versions may work, then again they might not. other versions may work, then again they might not.
GNU make is required for compiling GNAT, the Ada compiler.
(For example, many broken versions of make will fail if you use the (For example, many broken versions of make will fail if you use the
recommended setup where @var{objdir} is different from @var{srcdir}. recommended setup where @var{objdir} is different from @var{srcdir}.
...@@ -921,6 +923,56 @@ when building GCC@. You can use a bigger number instead of two if ...@@ -921,6 +923,56 @@ when building GCC@. You can use a bigger number instead of two if
you like. In most cases, it won't help to use a number bigger than you like. In most cases, it won't help to use a number bigger than
the number of processors in your machine. the number of processors in your machine.
@section 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 @file{gnat1}, a copy of @file{gnatbind}, and a compiler driver
which can deal with Ada input (by invoking the @file{gnat1} binary).
You can specify this compiler driver by setting the @env{ADAC}
environment variable at the configure step. @command{configure} can
detect the driver automatically if it has got a common name such as
@command{gcc} or @command{gnatgcc}. Of course, you still need a working
C compiler (the compiler driver can be different or not).
Additional build tools (such as @command{gnatmake}) or a working GNAT
run-time library installation are usually @emph{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 @samp{make
boostrap} (this assumes that you start with an unmodified and consistent
source distribution):
@example
cd @var{srcdir}/gcc/ada
touch treeprs.ads [es]info.h nmake.ad[bs]
@end example
At the moment, the GNAT library and several tools for GNAT are not built
by @samp{make bootstrap}. You have to invoke
@samp{make gnatlib_and_tools} in the @file{@var{objdir}/gcc}
subdirectory before proceeding with the next steps.
For example, you can build a native Ada compiler by issuing the
following commands (assuming @command{make} is GNU make):
@example
cd @var{objdir}
@var{srcdir}/configure --enable-languages=c,ada
cd @var{srcdir}/gcc/ada
touch treeprs.ads [es]info.h nmake.ad[bs]
cd @var{objdir}
make bootstrap
cd gcc
make gnatlib_and_tools
cd ..
@end example
Currently, when compiling the Ada front end, you cannot use the parallel
build feature described in the previous section.
@html @html
<hr> <hr>
<p> <p>
......
...@@ -706,11 +706,18 @@ Fortran input files. ...@@ -706,11 +706,18 @@ Fortran input files.
@c @var{file}.zip @c @var{file}.zip
@c @var{file}.jar @c @var{file}.jar
@item @var{file}.ads
Ada source code file which contains a library unit declaration (a
declaration of a package, subprogram, or generic, or a generic
instantiation), or a library unit renaming declaration (a package,
generic, or subprogram renaming declaration). Such files are also
called @dfn{specs}.
@itemx @var{file}.adb
Ada source code file containing a library unit body (a subprogram or
package body). Such files are also called @dfn{bodies}.
@c GCC also knows about some suffixes for languages not yet included: @c GCC also knows about some suffixes for languages not yet included:
@c Ada:
@c @var{file}.ads
@c @var{file}.adb
@c @var{file}.ada
@c Pascal: @c Pascal:
@c @var{file}.p @c @var{file}.p
@c @var{file}.pas @c @var{file}.pas
...@@ -744,8 +751,10 @@ c c-header cpp-output ...@@ -744,8 +751,10 @@ c c-header cpp-output
c++ c++-cpp-output c++ c++-cpp-output
objective-c objc-cpp-output objective-c objc-cpp-output
assembler assembler-with-cpp assembler assembler-with-cpp
ada
chill
f77 f77-cpp-input ratfor f77 f77-cpp-input ratfor
java chill java
@end example @end example
@c Also f77-version, for internal use only. @c Also f77-version, for internal use only.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment