X-Git-Url: http://gitweb.hugovil.com/?a=blobdiff_plain;f=stage1%2Fpkg%2Fgcc;h=c3f9b1fc996fb1128dbc3c0c7ca3af7ebc50dfcb;hb=fc7d8c678ca78bef7c6e7eaeeb579269b7c501be;hp=11a2837ef18569a5a5c479d7e9e19106f73e0b82;hpb=f0d54c69a71d7d5cb32aa342ea38cba6aab9570f;p=hvlinux.git diff --git a/stage1/pkg/gcc b/stage1/pkg/gcc index 11a2837..c3f9b1f 100644 --- a/stage1/pkg/gcc +++ b/stage1/pkg/gcc @@ -9,37 +9,45 @@ hvconfig_pre() --libexecdir=/tools/lib \ --disable-nls \ --disable-libstdcxx-pch \ - --enable-long-long \ - --enable-c99 \ - --enable-shared \ - --enable-threads=posix \ - --enable-__cxa_atexit \ + --with-system-zlib \ + --with-native-system-header-dir=${TOOLS_DIR}/include \ + --disable-libssp \ + --enable-checking=release \ + --enable-libstdcxx-time \ --enable-languages=c,c++" - cd ${LFS_TMP}/${PACKAGE} + cd ${SRC_DIR} # 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 } hvconfig_post() { # Prevent GCC from looking in the wrong directories for headers and # libraries: - sed -e "/^HOST_\(GMP\|ISL\|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() { ${HVMAKE} AS_FOR_TARGET="${AS}" LD_FOR_TARGET="${LD}" - ${HVMAKE} install + ${HVMAKE} DESTDIR=${LFS} install +} + +hvbuild_post() +{ + # Install the libiberty header file that is needed by some packages: + cp -v ${SRC_DIR}/include/libiberty.h ${TOOLS_DIR}/include }