GCC-3.3: Difference between revisions
No edit summary |
I added the package description from BLFS. |
||
| Line 12: | Line 12: | ||
---- | ---- | ||
== Introduction to GCC-3.3 == | |||
There are several reasons why you may wish to install GCC-3.3. Some packages have not been updated so they can be successfully compiled by GCC-4.0.3 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 libraries at run-time. Another reason you may need to install GCC-3.3 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. (Non-Multilib) Instructions for building the GCC-3.4.x Fortran compiler can be found on the [http://wiki.linuxfromscratch.org/blfs/wiki/gcc3 BLFS Wiki]. | |||
== Dependencies == | == Dependencies == | ||
Revision as of 08:42, 4 December 2006
Introduction to GCC-3.3
There are several reasons why you may wish to install GCC-3.3. Some packages have not been updated so they can be successfully compiled by GCC-4.0.3 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 libraries at run-time. Another reason you may need to install GCC-3.3 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. (Non-Multilib) Instructions for building the GCC-3.4.x Fortran compiler can be found on the BLFS Wiki.
Dependencies
Optional (Testsuite)
Non-Multilib
Compile the package:
patch -Np1 -i ../gcc-3.3.6-no_fixincludes-1.patch &&
patch -Np1 -i ../gcc-3.3.6-linkonce-1.patch &&
sed -i 's/install_to_$(INSTALL_DEST) //' libiberty/Makefile.in &&
mkdir ../gcc-build &&
cd ../gcc-build &&
../gcc-3.3.6/configure --prefix=/opt/gcc-3.3.6 \
--enable-threads=posix --disable-multilib \
--enable-shared --enable-languages=c,c++ &&
make bootstrap
If desired, run the test suite using the following commands:
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
Installing libstdc++ Only
Copy libstdc++.so.5 to /usr/lib.
cp -av $(gcc -dumpmachine)/libstdc++-v3/src/.libs/libstdc++.so.5* /usr/lib
Installing the Complete Package
Install the entire package:
make install && chown -Rv root:root /opt/gcc-3.3.6/lib/gcc-lib/$(gcc -dumpmachine)/3.3.6/include
Optionally move libstdc++.so.5 to /usr/lib:
mv -v /opt/gcc-3.3.6/lib/libstdc++.so.5* /usr/lib && ln -sfv /usr/lib/libstdc++.so.5.0.7 /opt/gcc-3.3.6/lib && ln -sfv libstdc++.so.5.0.7 /opt/gcc-3.3.6/lib/libstdc++.so.5
Multilib
Compile the package:
patch -Np1 -i ../gcc-3.3.6-no_fixincludes-1.patch &&
patch -Np1 -i ../gcc-3.3.6-linkonce-1.patch &&
sed -i 's/install_to_$(INSTALL_DEST) //' libiberty/Makefile.in &&
mkdir ../gcc-build &&
cd ../gcc-build &&
../gcc-3.3.6/configure --prefix=/opt/gcc-3.3.6 \
--libdir=/opt/gcc-3.3.6/lib64 --enable-multilib \
--enable-threads=posix --enable-shared \
--enable-languages=c,c++ &&
make bootstrap
If desired, run the test suite using the following commands:
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
Installing libstdc++ Only
Copy libstdc++.so.5 to /usr/lib.
32Bit
cp -av $(gcc -dumpmachine)/32/libstdc++-v3/src/.libs/libstdc++.so.5* /usr/lib
N32
Please Contribute
64Bit
cp -av $(gcc -dumpmachine)/libstdc++-v3/src/.libs/libstdc++.so.5* /usr/lib64
Installing the Complete Package
Install the entire package:
make install && chown -Rv root:root /opt/gcc-3.3.6/lib64/gcc-lib/$(gcc -dumpmachine)/3.3.6/include
Optionally move libstdc++.so.5 to /usr/lib:
32Bit
mv -v /opt/gcc-3.3.6/lib/libstdc++.so.5* /usr/lib && ln -sfv /usr/lib/libstdc++.so.5.0.7 /opt/gcc-3.3.6/lib && ln -sfv libstdc++.so.5.0.7 /opt/gcc-3.3.6/lib/libstdc++.so.5
N32
mv -v /opt/gcc-3.3.6/lib32/libstdc++.so.5* /usr/lib32 && ln -sfv /usr/lib32/libstdc++.so.5.0.7 /opt/gcc-3.3.6/lib32 && ln -sfv libstdc++.so.5.0.7 /opt/gcc-3.3.6/lib32/libstdc++.so.5
64Bit
mv -v /opt/gcc-3.3.6/lib64/libstdc++.so.5* /usr/lib64 && ln -sfv /usr/lib64/libstdc++.so.5.0.7 /opt/gcc-3.3.6/lib64 && ln -sfv libstdc++.so.5.0.7 /opt/gcc-3.3.6/lib64/libstdc++.so.5