Stage2 semble compléter ok
[hvlinux.git] / stage2 / pkg / gcc
index c73c30d..865f6cd 100644 (file)
@@ -1,20 +1,27 @@
 #!/bin/bash
 
-CC="gcc -Wl,-rpath-link,/lib -isystem /usr/include"
-CXX="g++ -Wl,-rpath-link,/lib -isystem /usr/include"
+hvconfig_pre()
+{
+    export CC="gcc -Wl,-rpath-link,/lib -isystem /usr/include"
+    export 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}"
+    CONFIGURE_OPTS="\
+        ${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"
+
+    # 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()
 {
@@ -33,11 +40,10 @@ hvpatch()
     esac
 }
 
-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()