GCC-3.3.4

Introduction to GCC-3.3.4

The reason for installing GCC-3.3.4 is that some BLFS packages (such as compiled Java and OpenOffice) have not been updated to be compilable by GCC-3.4.1. Additionally, some pre-compiled packages may require the GCC-3.3.4 libraries.

Package information

GCC-3 dependencies

Optional

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

Installation of GCC-3

patch -Np1 -i ../gcc-3.3.4-no_fixincludes-1.patch &&
patch -Np1 -i ../gcc-3.3.4-linkonce-1.patch &&
mkdir ../gcc-build &&
cd ../gcc-build &&
../gcc-3.3.4/configure \
    --prefix=/opt/gcc-3.3.4 \
    --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://linuxfromscratch.org/~randy/gcc-334-lfs-6.0-test_summary.log and http://linuxfromscratch.org/~randy/gcc-334-lfs-6.0-test_summary_short.log.

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

Now, as the root user:

make install &&
mv /opt/gcc-3.3.4/lib/libstdc++.so.5* /usr/lib &&
ln -sf /usr/lib/libstdc++.so.5.0.6 /opt/gcc-3.3.4/lib &&
ln -sf libstdc++.so.5.0.6 /opt/gcc-3.3.4/lib/libstdc++.so.5 &&
chown -R root:root \
    /opt/gcc-3.3.4/lib/gcc-lib/i686-pc-linux-gnu/3.3.4/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.

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

Configuring GCC

Configuration information

As with most libraries, there is no configuration to do, save that the library directory i.e., /opt/lib or /usr/local/lib should appear in /etc/ld.so.conf so that ldd can find the shared libraries. After checking that this is the case, /sbin/ldconfig should be run while logged in as root.

If you only need the GCC-3.3.4 libraries, you may delete /opt/gcc-3.3.4.

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

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 Directories: /opt/gcc-3.3.4

Short Descriptions

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

Last updated on 2005-02-27 19:21:57 -0700