%general-entities; ]> GCC-&gcc-version; GCC temporary system Installation of GCC Also, we need to set the directory searched by the fixincludes process for system headers, so it won't look at the host's headers: cp -v gcc/Makefile.in{,.orig} sed -e 's@\(^NATIVE_SYSTEM_HEADER_DIR =\).*@\1 /tools/include@g' \ gcc/Makefile.in.orig > gcc/Makefile.in Before starting to build GCC, remember to unset any environment variables that override the default optimization flags. ../gcc-&gcc-version;/configure --prefix=/tools \ --build=${CLFS_HOST} --host=${CLFS_TARGET} --target=${CLFS_TARGET} \ --with-local-prefix=/tools --enable-long-long --enable-c99 \ --enable-shared --enable-threads=posix --enable-__cxa_atexit \ --disable-nls --enable-languages=c,c++ --disable-libstdcxx-pch \ --disable-multilib The meaning of the new configure options: --disable-libstdcxx-pch Do not build the pre-compiled header (PCH) for libstdc++. It takes up a lot of space, and we have no use for it. When gcc was configured it was told to find MPFR, GMP, PPL, and CLooG-PPL in /tools. However, when compiling gcc uses these same values for building native helper programs that run on the host. The following sed will change those values to look in cross-tools for the native programs only: cp Makefile{,.orig} sed "/^HOST_\(GMP\|PPL\|CLOOG\)\(LIBS\|INC\)/s:-[IL]/\(lib\|include\)::" \ Makefile.orig > Makefile Compile the package: make AS_FOR_TARGET="${AS}" \ LD_FOR_TARGET="${LD}" Install the package: make install <para>Details on this package are located in <xref linkend="contents-gcc" role="."/></para> </sect2> </sect1>