#!/bin/bash hvconfig_pre() { CONFIGURE_OPTS+=" \ --target=${CLFS_TARGET} \ --disable-multilib \ --with-local-prefix=/tools \ --libexecdir=/tools/lib \ --disable-nls \ --disable-libstdcxx-pch \ --enable-long-long \ --enable-c99 \ --enable-shared \ --enable-threads=posix \ --enable-__cxa_atexit \ --enable-languages=c,c++" cd ${LFS_TMP}/${PACKAGE} # Change the StartFile Spec to point to the correct library location: echo -en '#undef STANDARD_INCLUDE_DIR\n#define STANDARD_INCLUDE_DIR "/tools/include/"\n\n' >> gcc/config/linux.h echo -en '\n#undef STANDARD_STARTFILE_PREFIX_1\n#define STANDARD_STARTFILE_PREFIX_1 "/tools/lib/"\n' >> gcc/config/linux.h echo -en '\n#undef STANDARD_STARTFILE_PREFIX_2\n#define STANDARD_STARTFILE_PREFIX_2 ""\n' >> gcc/config/linux.h # 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 } hvconfig_post() { # Prevent GCC from looking in the wrong directories for headers and # libraries: sed -e "/^HOST_\(GMP\|CLOOG\)\(LIBS\|INC\)/s:-[IL]/\(lib\|include\)::" \ -i Makefile } hvbuild() { ${HVMAKE} AS_FOR_TARGET="${AS}" LD_FOR_TARGET="${LD}" ${HVMAKE} install }