gcc-3.2

Introduction to gcc

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

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

Installation of gcc

Install gcc by running the following commands:

export CC=cc &&
unset CFLAGS &&
unset CXXFLAGS &&
export PATH_HOLD=$PATH &&
export PATH=/usr/src/gnat/bin:$PATH &&
mkdir ../gcc-build &&
cd ../gcc-build &&
../gcc-3.2/configure --prefix=/usr --enable-shared \
--enable-languages=c,c++,objc,f77,ada --enable-threads=posix \
--with-slibdir=/lib --enable-__cxa_atexit &&
cd ../gcc-3.2/gcc/ada &&
touch treeprs.ads [es]info.h nmake.ad[bs] &&
cd /usr/src/gcc-build &&
make bootstrap &&
cd gcc &&
make gnatlib_and_tools &&
cd .. &&
make install &&
export PATH=$PATH_HOLD


Command explanations

export CC=cc : This command allows you to use gcc's C compiler instead of gnat's C compiler.

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

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

--enable-languages=c,c++,objc,f77,ada : This command builds all available languages in the gcc package except java. You can modify this command to remove unwanted languages. If you are removing Ada, use the separate installation instructions below.

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

--with-slibdir=/lib : This command sets the path to libgcc_s.so.

touch treeprs.ads [es]info.h nmake.ad[bs] : This command creates necessary files for the Ada build.

make gnatlib_and tools : This command completes the Ada build process.

Installation of gcc without Ada

Install gcc by running the following commands:

unset CFLAGS &&
unset CXXFLAGS &&
mkdir ../gcc-build &&
cd ../gcc-build &&
../gcc-3.2/configure --prefix=/usr --enable-shared \
--enable-languages=c,c++,objc,f77 --enable-threads=posix \
--with-slibdir=/lib --enable-__cxa_atexit &&
make bootstrap &&
make install


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

These programs and libraries have been documented on the LFS gcc-3.2 page and at gnat-3.14p except for:

g77

g77 is the fortran compiler invoked by gcc.