6.11.1. Installation of GCC Cross Compiler
The following patch contains a number of updates to the
4.3.3 branch by the GCC developers:
patch -Np1 -i ../gcc-4.3.3-branch_update-5.patch
To make sure that a couple of tools use the proper syntax,
apply the following patch:
patch -Np1 -i ../gcc-4.3.3-posix-1.patch
The GCC documentation recommends building GCC outside of the source
directory in a dedicated build directory:
mkdir -v ../gcc-build
cd ../gcc-build
Prepare GCC for compilation:
../gcc-4.3.3/configure --prefix=${CLFS}/cross-tools \
--build=${CLFS_HOST} --target=${CLFS_TARGET} --host=${CLFS_HOST} \
--with-sysroot=${CLFS} --disable-nls --enable-shared \
--enable-languages=c --enable-c99 --enable-long-long \
--with-mpfr=/cross-tools --with-gmp=/cross-toolsThe meaning of the new configure options:
--enable-languages=cThis option ensures that only the C compiler is built.
--enable-c99Enable C99 support for C programs.
--enable-long-longEnables long long support in the compiler.
Continue with compiling the package:
make
Install the package:
make install