The GCC package contains GNU compilers. This is useful for compiling programs written in Ada, C, C++, Fortran, Java and Objective C.
Download (HTTP): http://mirrors.rcn.net/pub/sourceware/gcc/releases/gcc-3.3.3/gcc-3.3.3.tar.bz2
Download (FTP): ftp://mirrors.rcn.net/pub/sourceware/gcc/releases/gcc-3.3.3/gcc-3.3.3.tar.bz2
Download size: 23 MB
Estimated Disk space required: 889 MB
Estimated build time: 29.3 SBU
If you plan to compile Ada, you will need to install GNAT temporarily to satisfy the circular dependency when you recompile GCC to include Ada.
Download (FTP): ftp://cs.nyu.edu/pub/gnat/3.15p/gnat-3.15p-i686-pc-redhat71-gnu-bin.tar.gz
Download size: 13.2 MB
Estimated Disk space required: 48.9 MB
Estimated build time: 0.01 SBU
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.
Patch the source files with the following command:
patch -Np1 -i ../gcc-3.3.3-no_fixincludes-1.patch &&
sed -i 's/install_to_$(INSTALL_DEST) //' libiberty/Makefile.in
Install GCC by running the following commands:
PATH_HOLD=$PATH &&
export PATH=/opt/gnat/bin:$PATH &&
cd gcc/ada &&
touch treeprs.ads [es]info.h nmake.ad[bs] &&
cd ../.. &&
mkdir ../gcc-build &&
cd ../gcc-build &&
CC=/usr/bin/gcc ../gcc-3.3.3/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 -k check &&
make install &&
ln -sf ../usr/bin/cpp /lib &&
ln -sf gcc /usr/bin/cc &&
ln -sf g77 /usr/bin/f77 &&
export PATH=$PATH_HOLD
You may remove the GNAT installation:
rm -rf /opt/gnat
PATH_HOLD=$PATH: This command stores your current path before it's modified so that it can be restored after installation.
export PATH=/opt/gnat/bin:$PATH: 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 front end.
CC=/usr/bin/gcc: This command works around the new PATH which puts GNAT 's gcc as the primary compiler.
--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.
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.
The programs and libraries whose descriptions are missing here have been described in the LFS GCC-3.3.3 page.
add2line converts the ASCII form of the 2-line orbital elements in a file to binary form and appends them to the orbdata files.
gnatchop is useful for renaming files to meet the standard Ada default file naming conventions.
gnatkr is used to determine the crunched name for a given file, when crunched to a specified maximum length.
gnatmem is the GNAT utility that monitors dynamic allocation and deallocation activity in a program.
gnatpsta determines the values of all the relevant parameters in Standard and outputs to stdout.
gnatpsys determines the values of all the relevant parameters in System and outputs to stdout.