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.
Download (HTTP): http://ftp.gnu.org/gnu/gcc/gcc-3.3.4/gcc-3.3.4.tar.bz2
Download (FTP): ftp://ftp.gnu.org/gnu/gcc/gcc-3.3.4/gcc-3.3.4.tar.bz2
Download MD5 sum: a1c267b34f05c8660b24251865614d8b
Download size: 23 MB
Estimated disk space required: 489 MB
Estimated build time: 5.72 SBU (additional 12.54 SBU to run the test suite)
DejaGnu-1.4.4 (required to run the full test suite)
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
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.
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.
Last updated on 2005-02-27 19:21:57 -0700