From 6d3d425dbd239fdb9a65a2a0a9834db8a657346c Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Sat, 11 Apr 1998 14:54:20 +0000 Subject: Now a passable Ada manual --- doc/started_ada/buildada.t | 133 ++++++++++++++++++++++++++++++++++----------- 1 file changed, 101 insertions(+), 32 deletions(-) (limited to 'doc/started_ada/buildada.t') diff --git a/doc/started_ada/buildada.t b/doc/started_ada/buildada.t index a078985e0f..9418e3d38c 100644 --- a/doc/started_ada/buildada.t +++ b/doc/started_ada/buildada.t @@ -6,20 +6,22 @@ @c $Id$ @c -@chapter Building the GNU C/C++ Cross Compiler Toolset +@chapter Building the GNAT Cross Compiler Toolset This chapter describes the steps required to acquire the source code for a GNU cross compiler toolset, apply any required RTEMS specific patches, compile that toolset and install it. -@section Get all the pieces +@section Directory Organization The tree structure in the figure below is assumed to be present in the -following discussions: +following discussions: @center @b{XXX directory tree figure goes here} +@section Get all the Pieces + Gather the components that will be required for the installation and place them in an archive directory. Call this directory arc. Be sure that there is sufficient space to hold all necessary information. This will amount to @@ -32,6 +34,13 @@ approximately 20 megabytes. File: @value{GCC-TAR} @end example +@subheading @value{GNAT-VERSION} +@example + FTP Site: @value{GNAT-FTPSITE} + Directory: @value{GNAT-FTPDIR} + File: @value{GNAT-TAR} +@end example + @subheading @value{BINUTILS-VERSION} @example FTP Site: @value{BINUTILS-FTPSITE} @@ -51,15 +60,24 @@ approximately 20 megabytes. FTP Site: @value{RTEMS-FTPSITE} Directory: @value{RTEMS-FTPDIR} File: @value{RTEMS-TAR} - File: bit + File: bit_ada +@ifset BINUTILS-RTEMSPATCH File: @value{BINUTILS-RTEMSPATCH} +@end ifset +@ifset NEWLIB-RTEMSPATCH File: @value{NEWLIB-RTEMSPATCH} +@end ifset +@ifset GCC-RTEMSPATCH File: @value{GCC-RTEMSPATCH} - File: hello_world_c.tgz +@end ifset +@ifset GNAT-RTEMSPATCH + File: @value{GNAT-RTEMSPATCH} +@end ifset + File: hello_world_ada.tgz @end example -@section Create the tools directory +@section Create the tools Directory Create a directory called tools that will serve as a working directory to perform the build of the cross compiler tools. @@ -69,6 +87,7 @@ Unpack the compressed tar files using the following command sequence: @example cd tools tar xzf ../arc/@value{GCC-TAR} +tar xzf ../arc/@value{GNAT-TAR} tar xzf ../arc/@value{BINUTILS-TAR} tar xzf ../arc/@value{NEWLIB-TAR} @end example @@ -79,14 +98,15 @@ directories will have been created under tools. @itemize @bullet @item @value{BINUTILS-UNTAR} @item @value{GCC-UNTAR} +@item @value{GNAT-UNTAR} @item @value{NEWLIB-UNTAR} @end itemize @c -@c EGCS patches +@c GCC patches @c -@section Apply RTEMS Patch to EGCS +@section Apply RTEMS Patch to GCC @ifclear GCC-RTEMSPATCH No RTEMS specific patches are required for @value{GCC-VERSION} to @@ -207,15 +227,73 @@ The files that are found, have been modified by the patch file. @end ifset +@c +@c GNAT patches @c -@c Modify the bit script + +@section Apply RTEMS Patch to GNAT + +@ifclear GNAT-RTEMSPATCH +No RTEMS specific patches are required for @value{GNAT-VERSION} to +support @value{RTEMS-VERSION}. +@end ifclear + +@ifset GNAT-RTEMSPATCH + +Apply the patch using the following command sequence: + +@example +cd tools/@value{GNAT-UNTAR} +zcat arc/@value{GNAT-RTEMSPATCH} | patch -p1 +@end example + +Check to see if any of these patches have been rejected using the following +sequence: + +@example +cd tools/@value{GNAT-UNTAR} +find . -name "*.rej" -print +@end example + +If any files are found with the .rej extension, a patch has been rejected. +This should not happen with a good patch file. + +To see the files that have been modified use the sequence: + +@example +cd tools/@value{GNAT-UNTAR} +find . -name "*.orig" -print +@end example + +The files that are found, have been modified by the patch file. + +@end ifset + +@c +@c Copy the ada directory +@c + + +@section Copy the ada Subdirectory to the GCC Source Tree + +Copy the ada subtree in the patched subtree of +tools/@value{GNAT-UNTAR}/src to the +tools/@value{GCC-UNTAR} directory: + +@example +cd tools/@value{GNAT-UNTAR}/src +cp -r ada ../../../@value{GCC-UNTAR} +@end example + +@c +@c Modify the bit_ada script @c -@section Modify the bit Script +@section Modify the bit_ada Script -Copy the @code{bit} script from arc to the tools directory. +Copy the @code{bit_ada} script from arc to the tools directory. -Edit the @code{bit} file to alter the following environmental variables: +Edit the @code{bit_ada} file to alter the following environmental variables: @itemize @bullet @item INSTALL_POINT @@ -223,7 +301,6 @@ Edit the @code{bit} file to alter the following environmental variables: @item NEWLIB @item GCC @item BUILD_DOCS -@item BUILD_OTHER_LANGUAGES @end itemize These variables are located in the script section that resembles the @@ -241,14 +318,11 @@ extract below: # NEWLIB: Newlib source directory # GCC: Newlib source directory # BUILD_DOCS: Set to "yes" if you want to install documentation. -# BUILD_OTHER_LANGUAGES: -# Set to "yes" if you want to build Fortran and Objective-C # BINUTILS=@value{BINUTILS-UNTAR} GCC=@value{GCC-UNTAR} NEWLIB=@value{NEWLIB-UNTAR} BUILD_DOCS=yes -BUILD_OTHER_LANGUAGES=yes INSTALL_POINT=/home/joel/$@{GCC@}/$@{target@} # USERCHANGE - uncomment this if you want to watch the commands. @@ -295,26 +369,17 @@ For example, BUILD_DOCS=yes @end example -@item BUILD_OTHER_LANGUAGES -is set to "yes" if you want to build languages other than C and C++. At -the current time, this enables Fortan and Objective-C. -For example, - -@example -BUILD_OTHER_LANGUAGES=yes -@end example - @end table -@section Running the bit Script +@section Running the bit_ada Script -After the @code{bit} script has been modified to reflect the -local installation, the modified @code{bit} script is run +After the @code{bit_ada} script has been modified to reflect the +local installation, the modified @code{bit_ada} script is run using the following sequence: @example cd tools -./bit +./bit_ada @end example Where is one of the following: @@ -332,7 +397,11 @@ Where is one of the following: @item sparc @end itemize -If no errors are encountered, the @code{bit} script will conclude by +NOTE: The above list of target configurations is the list of RTEMS supported +targets. Only a subset of these have been tested with GNAT/RTEMS. For more +information, contact your GNAT/RTEMS representative. + +If no errors are encountered, the @code{bit_ada} script will conclude by printing messages similar to the following: @example @@ -343,9 +412,9 @@ Started: Fri Apr 10 10:14:07 CDT 1998 Finished: Fri Apr 10 12:01:33 CDT 1998 @end example -If the @code{bit} script successfully completes, then the +If the @code{bit_ada} script successfully completes, then the GNU C/C++ cross compilation tools are installed. -If the @code{bit} script does not successfully complete, then investigation +If the @code{bit_ada} script does not successfully complete, then investigation will be required to determine the source of the error. -- cgit v1.2.3