Update for new BUILD_DIR and SRC_DIR variables
[hvlinux.git] / stage2 / pkg / gcc
index 865f6cd..f3b4e73 100644 (file)
@@ -5,8 +5,7 @@ hvconfig_pre()
     export CC="gcc -Wl,-rpath-link,/lib -isystem /usr/include"
     export CXX="g++ -Wl,-rpath-link,/lib -isystem /usr/include"
 
-    CONFIGURE_OPTS="\
-        ${CONFIGURE_OPTS} \
+    CONFIGURE_OPTS+=" \
         --libexecdir=/usr/lib \
         --enable-shared \
         --enable-threads=posix \
@@ -17,27 +16,6 @@ hvconfig_pre()
         --enable-languages=c,c++ \
         --disable-multilib \
         --disable-libstdcxx-pch"
-
-    # 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
-}
-
-hvpatch()
-{
-    # Manually applying patches if specified
-    if [ -n "${GCC_PATCHES}" ]; then
-        for p in ${GCC_PATCHES}; do
-            apply_patch ${PACKAGE}-${p}.patch ${PACKAGE}
-        done
-    fi
-
-    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
 }
 
 hvconfig_post()
@@ -48,6 +26,9 @@ hvconfig_post()
 
 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
 }