GCC-3.3.6

Introduction to GCC-3.3.6

There are several reasons why you may wish to install GCC-3.3.6. Some packages have not been updated so they can be successfully compiled by GCC-4.1.2 as version 4.x.x of GCC is much stricter in enforcing coding standards. Additionally, some pre-compiled packages may require the GCC-3.3.6 libraries at run-time. Another reason you may need to install GCC-3.3.6 is to use the g77 Fortran 77 compiler provided by pre-4.x.x versions of GCC. GCC-4.x.x only includes gfortran, a Fortran 95 compatible compiler that is not yet ready to be used in a production environment.

If all you need is a working {f,g}77 Fortran 77 compiler, you may wish to use the one provided by GCC-3.4.x. This is what the GCC developers recommend. Instructions for building the GCC-3.4.x Fortran compiler can be found on the BLFS Wiki.

Package Information

Additional Downloads

GCC-3.3.6 Dependencies

Optional

DejaGnu-1.4.4 (required to run the full test suite)

User Notes: http://wiki.linuxfromscratch.org/blfs/wiki/gcc3

Installation of GCC-3.3.6

Install GCC-3.3.6 by running the following commands:

patch -Np1 -i ../gcc-3.3.6-no_fixincludes-1.patch &&
patch -Np1 -i ../gcc-3.3.6-linkonce-1.patch &&
mkdir ../gcc-build &&
cd ../gcc-build &&
../gcc-3.3.6/configure --prefix=/opt/gcc-3.3.6 \
    --enable-shared --enable-languages=c,c++ --enable-threads=posix &&
make bootstrap

If desired, run the test suite using the following commands. The test_summary commands create log files which can be compared to known good results located at http://anduin.linuxfromscratch.org/files/BLFS/6.3/gcc336_test.txt.

make -k check &&
../gcc-3.3.6/contrib/test_summary >test_summary.log 2>&1 &&
../gcc-3.3.6/contrib/test_summary | \
    grep -A7 Summ >test_summary_short.log 2>&1

Now, as the root user:

make install &&
mv -v /opt/gcc-3.3.6/lib/libstdc++.so.5* /usr/lib &&
ln -v -sf /usr/lib/libstdc++.so.5.0.7 /opt/gcc-3.3.6/lib &&
ln -v -sf libstdc++.so.5.0.7 /opt/gcc-3.3.6/lib/libstdc++.so.5 &&
chown -v -R root:root \
    /opt/gcc-3.3.6/lib/gcc-lib/i686-pc-linux-gnu/3.3.6/include

Command Explanations

mkdir ../gcc-build; cd ../gcc-build: The GCC development team recommends building in a separate directory.

--enable-shared --enable-languages=c,c++ --enable-threads=posix: Configures GCC to build the C and C++ compilers and enable the related C++ options. In addition to c and c++, you can add f77 for FORTRAN (called g77). Note that GCC-4 no longer provides a FORTRAN 77 compiler.

mv -v /opt/gcc-3.3.6/lib/libstdc++.so.5* /usr/lib: Moves the C++ library to the standard lib directory to avoid having to add /opt/gcc-3.3.6/lib to /etc/ld.so.conf.

Configuring GCC-3.3.6

Configuration information

If you only need the GCC-3.3.6 C++ library, you may delete /opt/gcc-3.3.6.

Whenever you need to use GCC-3.3.6 instead of your system installed compiler, add /opt/gcc-3.3.6/bin to the front of your PATH or (preferably) set the CC environment variable before compiling the concerned package.

If you use g77 programs, you also should move the libg2c.* libraries and symbolic links to /usr/lib. Using export LD_LIBRARY_PATH=/opt/gcc-3.3.6/lib or updating /etc/ld.so.conf to point to /opt/gcc-3.3.6/lib is not recommended as it may conflict with your normal libraries.

Contents

Installed Programs: c++, cpp, g++, gcc, gccbug, gcov, and architecture specific names of these programs.
Installed Libraries: libgcc_s.so, libiberty.a, libstdc++.{a,so}, libsupc++.a, and other support libraries and files.
Installed Directory: /opt/gcc-3.3.6

Short Descriptions

The GCC-3.3.6 package contains the gcc-3.3.6 C and C++ compilers and the GCC-3.3.6 libstdc++.so library that is required by some commercial and pre-compiled packages.

Last updated on 2007-04-04 14:42:53 -0500