#!/bin/bash set -o errexit # Reading system configuration informations, functions and package versions. source ../sysinfos source ../functions source ../packages-list source ./cis-gcc-common # We will create a dummy limits.h so the build will not use the one provided by the host distro: touch /tools/include/limits.h # Configure options: # --with-local-prefix=/tools # Remove /usr/local/include from gcc's include search path. This is not # absolutely essential, however, it helps to minimize the influence of the # host system. # --disable-shared # Disables the creation of the shared libraries. # --disable-threads # Prevents 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 libc headers are created. # --enable-languages=c # This option ensures that only the C compiler is built. cd ${LFS_TMP}/${1}-build AR=ar LDFLAGS="-Wl,-rpath,/cross-tools/lib" \ ../${1}/configure \ --prefix=/cross-tools \ --build=${CLFS_HOST} \ --host=${CLFS_HOST} \ --target=${CLFS_TARGET} \ --with-sysroot=${CLFS} \ --with-local-prefix=/tools \ --disable-nls \ --disable-shared \ --with-mpfr=/cross-tools \ --with-gmp=/cross-tools \ --without-headers \ --with-newlib \ --disable-decimal-float \ --disable-libgomp \ --disable-libmudflap \ --disable-libssp \ --disable-threads \ --enable-languages=c \ ${TARGET_CONFIGURE_OPTS} ${HVMAKE} all-gcc all-target-libgcc ${HVMAKE} install-gcc install-target-libgcc exit $?