X-Git-Url: http://gitweb.hugovil.com/?a=blobdiff_plain;f=stage2%2Fpkg%2Fgcc;h=f3b4e73a41545dd3a9d200a8e9220321c02a6b32;hb=1b3f334af67c84997f7b5e6dee56faf556f0ea4b;hp=c73c30dccf1fc5c273dfabbe007a2ff9004c5d10;hpb=3605ab38ca7604b1fe43c3bce5e4963730a85d39;p=hvlinux.git diff --git a/stage2/pkg/gcc b/stage2/pkg/gcc index c73c30d..f3b4e73 100644 --- a/stage2/pkg/gcc +++ b/stage2/pkg/gcc @@ -1,47 +1,34 @@ #!/bin/bash -CC="gcc -Wl,-rpath-link,/lib -isystem /usr/include" -CXX="g++ -Wl,-rpath-link,/lib -isystem /usr/include" - -CONFIGURE_OPTS="\ - --libexecdir=/usr/lib \ - --enable-shared \ - --enable-threads=posix \ - --enable-__cxa_atexit \ - --enable-c99 \ - --enable-long-long \ - --enable-clocale=gnu \ - --enable-languages=c,c++ \ - --disable-multilib \ - --disable-libstdcxx-pch \ - ${CONFIGURE_OPTS}" - -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 + export CC="gcc -Wl,-rpath-link,/lib -isystem /usr/include" + export CXX="g++ -Wl,-rpath-link,/lib -isystem /usr/include" - case "${HVL_TARGET}" in - "x86_64") - # Apply the following patch so that GCC links to /lib instead of /lib64: - apply_patch ${PACKAGE}-pure64-2.patch ${PACKAGE} - ;; - esac + CONFIGURE_OPTS+=" \ + --libexecdir=/usr/lib \ + --enable-shared \ + --enable-threads=posix \ + --enable-__cxa_atexit \ + --enable-c99 \ + --enable-long-long \ + --enable-clocale=gnu \ + --enable-languages=c,c++ \ + --disable-multilib \ + --disable-libstdcxx-pch" } -hvconfig_pre() +hvconfig_post() { - # Applying a sed substitution that will suppress the installation of - # libiberty.a. We want to use the Binutils version of libiberty.a - sed -i 's/install_to_$(INSTALL_DEST) //' ${LFS_TMP}/${PACKAGE}/libiberty/Makefile.in + unset CC + unset CXX } hvbuild_post() { + # Install the libiberty header file that is needed by some packages: + cp -v ${SRC_DIR}/include/libiberty.h /usr/include + ln -svf ../usr/bin/cpp /lib ln -svf gcc /usr/bin/cc }