#!/bin/bash hvconfig_pre() { CONFIGURE_OPTS+=" \ --target=${CLFS_TARGET} \ --disable-multilib \ --with-local-prefix=/tools \ --libexecdir=/tools/lib \ --disable-nls \ --disable-libstdcxx-pch \ --with-system-zlib \ --with-native-system-header-dir=/tools/include \ --disable-libssp \ --enable-checking=release \ --enable-libstdcxx-time \ --enable-languages=c,c++" cd ${LFS_TMP}/${PACKAGE} # Change the StartFile Spec to point to the correct library location: echo -en '\n' >> gcc/config/linux.h echo -en '#undef STANDARD_STARTFILE_PREFIX_1\n' >> gcc/config/linux.h echo -en '#define STANDARD_STARTFILE_PREFIX_1 "/tools/lib/"\n' >> \ gcc/config/linux.h echo -en '#undef STANDARD_STARTFILE_PREFIX_2\n' >> gcc/config/linux.h echo -en '#define STANDARD_STARTFILE_PREFIX_2 ""\n' >> \ gcc/config/linux.h # Suppress the execution of the fixincludes script: sed -i -e 's@\./fixinc\.sh@-c true@' gcc/Makefile.in } hvconfig_post() { # Prevent GCC from looking in the wrong directories for headers and # libraries: sed -i -e \ "/^HOST_\(GMP\|ISL\|CLOOG\)\(LIBS\|INC\)/s:/tools:/cross-tools:g" \ Makefile } hvbuild() { ${HVMAKE} AS_FOR_TARGET="${AS}" LD_FOR_TARGET="${LD}" ${HVMAKE} install } hvbuild_post() { # Install the libiberty header file that is needed by some packages: cp -v ${LFS_TMP}/${PACKAGE}/include/libiberty.h ${TOOLS_DIR}/include }