gcc-3.2.1

Introduction to gnat (binary version)

Download location (HTTP):       
Download location (FTP):        ftp://cs.nyu.edu/pub/gnat/3.14p/gnat-3.14p-i686-pc-linux-gnu-bin.tar.gz
Version used:                   3.14p
Package size:                   10.5 MB
Estimated Disk space required:  40 MB

The gnat package contains a precompiled Ada compiler. This package is used to satisfy the circular dependency when you recompile gcc to include ada.

You may skip installation of gnat if you do not want to recompile gcc with ada support.

gnat depends on:
tcsh-6.12

Installation of gnat

Install gnat by running the following commands:

./doconfig

The above script will ask you how and where you would like to install gnat. To avoid conflicts with the system gcc, the package will be installed in a separate directory, that can later be removed from the system.

In response to the questions asked by the doconfig script, enter 3 in response to the first question and /opt/gnat in response to the second question.

To finish the install, run

./doinstall

The gnat compiler can be invoked by executing the gcc binary installed by the above script. To avoid conflicts with the system gcc, we will rename the gcc command.

cd /opt/gnat/bin &&
mv gcc gnatgcc &&
cd real &&
mv gcc gnatgcc

Introduction to gcc

Download location (HTTP):       http://mirrors.rcn.net/pub/sourceware/gcc/releases/gcc-3.2.1/gcc-3.2.1.tar.bz2
Download location (FTP):        ftp://mirrors.rcn.net/pub/sourceware/gcc/releases/gcc-3.2.1/gcc-3.2.1.tar.bz2
Version used:                   3.2.1
Package size:                   20.1 MB
Estimated Disk space required:  591 MB

The gcc package contains GNU compilers. This is useful for compiling programs written in Ada, C, C++, Fortran, Java and Objective C.

Installation of gcc

Install gcc by running the following commands:

PATH_HOLD=$PATH &&
export PATH=$PATH:/opt/gnat/bin &&
cd gcc/ada &&
touch treeprs.ads [es]info.h nmake.ad[bs] &&
cd ../.. &&
mkdir ../gcc-build &&
cd ../gcc-build &&
../gcc-3.2.1/configure --prefix=/usr --enable-shared \
--enable-languages=c,c++,objc,f77,ada,java --enable-threads=posix \
--enable-__cxa_atexit --enable-clocale=gnu &&
make bootstrap &&
make -C gcc gnatlib_and_tools &&
make install-no-fixedincludes &&
ln -sf g77 /usr/bin/f77 &&
export PATH=$PATH_HOLD

You may remove the gnat installation:

rm -rf /opt/gnat

Command explanations

PATH_HOLD=$PATH : This command stores your current path before it's modified so that it can be restored after installation.

export PATH=$PATH:/opt/gnat/bin : This command allows the build to find gnat's Ada compiler to build Ada.

touch treeprs.ads [es]info.h nmake.ad[bs] : This command creates necessary files for the Ada build. This step may be skipped if you don't want to compile the ada frontend.

--enable-languages=c,c++,objc,f77,ada,java : This command builds all available languages in the gcc package. You may modify this command to remove unwanted languages.

--enable-shared --enable-threads=posix --enable-__cxa_atexit : These commands are required to build the C++ libraries to published standards.

--enable-clocale=gnu : This command is a failsafe for incomplete locale data.

make gnatlib_and tools : This command completes the Ada build process. Skip this step if you have not enabled ADA as one of the languages.

Contents

The gcc package contains c++, c++filt, cpp, g++, g77, gcc, gccbug, gcov, glob, gnat, gnatbind, gnatbl, gnatchop, gnatfind, gnatkr, gnatlink, gnatls, gnatmake, gnatprep, gnatpsta, gnatpsys, gnatxref and gcc libraries.

Description

The programs and libraries whose descriptions are missing here have been described in the LFS gcc-3.2.1 page.

g77

g77 is the Fortran compiler invoked by gcc.

add2line

add2line converts the ASCII form of the 2-line orbital elements in a file to binary form and appends them to the orbdata files.

gcov

gcov is a test coverage program.

gdb

gdb is the GNAT debugger.

gnatbind

gnatbind is used to bind compiled objects.

gnatbl

gnatbl is the Ada linker.

gnatchop

gnatchop is useful for renaming files to meet the standard Ada default file naming conventions.

gnatelim

gnatelim is used to detect and eliminate unused subprograms in an Ada partition.

gnatfind

gnatfind is the GNAT definition/use finder.

gnatgcc

gnatgcc is the compiler.

gnathtml.pl

gnathtml.pl converts Ada source files to html for viewing in Web browsers.

gnatkr

gnatkr is used to determine the crunched name for a given file, when crunched to a specified maximum length.

gnatlink

gnatlink is used to link programs and build an executable file.

gnatls

gnatls is the compiled unit browser.

gnatemake

gnatmake is an automatic make facility.

gnatmem

gnatmem is the GNAT utility that monitors dynamic allocation and deallocation activity in a program.

gnatprep

gnatprep is the GNAT external preprocessor.

gnatpsta

gnatpsta determines the values of all the relevant parameters in Standard and outputs to stdout.

gnatpsys

gnatpsys determines the values of all the relevant parameters in System and outputs to stdout.

gnatstub

gnatstub is a generator of body stubs.

gnatxref

gnatxref is the GNAT cross-referencer.

gvd

gvd is the GNU Visual Debugger.