X-Git-Url: http://gitweb.hugovil.com/?a=blobdiff_plain;f=stage1%2Fpkg%2Fgcc;h=bb77d66b9f94ca9e3c406032621ee3b40a66d062;hb=41b9a371e6df8733c714c204178503fe48ef80f2;hp=c6df1c70678fd4658c912a49e0c52c3b4a839a79;hpb=69ac3e7cf686f8e95e47a7ab89bc38796aace488;p=hvlinux.git diff --git a/stage1/pkg/gcc b/stage1/pkg/gcc index c6df1c7..bb77d66 100644 --- a/stage1/pkg/gcc +++ b/stage1/pkg/gcc @@ -1,46 +1,43 @@ #!/bin/bash -hvpatch() +hvconfig_pre() { - # Manually applying patches if specified - if [ -n "${GCC_PATCHES}" ]; then - for p in ${GCC_PATCHES}; do - apply_patch ${PACKAGE}-${p}.patch ${PACKAGE} - done - fi + 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++" - case "${HVL_TARGET}" in - "x86") - apply_patch ${PACKAGE}-specs-1.patch ${PACKAGE} - ;; - "x86_64") - apply_patch ${PACKAGE}-pure64_specs-1.patch ${PACKAGE} - ;; - esac -} - -configure_pre() -{ 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 + 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 - # 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 + # Suppress the execution of the fixincludes script: + sed -i -e 's@\./fixinc\.sh@-c true@' gcc/Makefile.in } -configure_post() +hvconfig_post() { # Prevent GCC from looking in the wrong directories for headers and # libraries: - sed -e "/^HOST_\(GMP\|PPL\|CLOOG\)\(LIBS\|INC\)/s:-[IL]/\(lib\|include\)::" \ - -i Makefile + sed -i -e \ + "/^HOST_\(GMP\|ISL\|CLOOG\)\(LIBS\|INC\)/s:/tools:/cross-tools:g" \ + Makefile } hvbuild() @@ -48,3 +45,9 @@ 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/include +}