Details on this package are located in Section 6.6.2, “Contents of GCC.”
The GCC package contains the GNU compiler collection, which includes the C and C++ compilers.
To make sure that a couple of tools use the proper syntax, apply the following patch:
patch -Np1 -i ../gcc-4.1.1-posix-1.patch
The following patch fixes the cross-compilation of Glibc for PA-RISC on a 64bit host:
patch -Np1 -i ../gcc-4.1.1-PR29114-1.patch
The following patch ensures that gcc does not search the /usr directory for libgcc_s.so when cross-compiling:
patch -Np1 -i ../gcc-4.1.1-cross_search_paths-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.1.1/configure --prefix=${CLFS}/cross-tools \
--host=${CLFS_HOST} --target=${CLFS_TARGET} --disable-multilib \
--with-sysroot=${CLFS} --disable-nls --disable-shared \
--enable-languages=c
The meaning of the configure options:
Disables the creation of the shared libraries.
This will prevent GCC from looking for the multi-thread include files, since they haven't been created for this architecture yet. GCC will be able to find the multi-thread information after the Glibc headers are created.
This option ensures that only the C compiler is built.
Continue with compiling the package:
make all-gcc
Install the package:
make install-gcc
Details on this package are located in Section 6.6.2, “Contents of GCC.”