Fixed build problems with WindowMaker
[hvlinux.git] / stage0 / cis-gcc-pass2
index 0df47dd..4ec8626 100755 (executable)
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
 set -o errexit
 
 # Reading system configuration informations, functions and package versions.
@@ -9,6 +9,14 @@ source ../packages-list
 # Manually applying patches
 apply_patch ${1}-branch_update-1.patch ${1}
 
+case "${HVL_TARGET}" in
+    *)
+        TARGET_CONFIGURE_OPTS="--with-ppl=/cross-tools \
+            --with-cloog=/cross-tools \
+            --disable-multilib"
+        ;;
+esac
+
 case "${HVL_TARGET}" in
     "x86")
         apply_patch ${1}-specs-1.patch ${1}
@@ -34,10 +42,12 @@ sed -e "s@\(^CROSS_SYSTEM_HEADER_DIR =\).*@\1 /tools/include@g" \
 # --enable-languages=c,c++
 #     This option ensures that only the C and C++ compilers are built.
 # --enable-__cxa_atexit
-#     This option allows use of __cxa_atexit, rather than atexit, to register C++ destructors for local
-#     statics and global objects and is essential for fully standards-compliant handling of
-#     destructors. It also affects the C++ ABI and therefore results in C++ shared libraries and C++
-#     programs that are interoperable with other Linux distributions.
+#     This option allows use of __cxa_atexit, rather than atexit, to register
+#     C++ destructors for local
+#     statics and global objects and is essential for fully standards-compliant
+#     handling of destructors. It also affects the C++ ABI and therefore results
+#     in C++ shared libraries and C++ programs that are interoperable with other
+#     Linux distributions.
 # --enable-c99
 #     Enable C99 support for C programs.
 # --enable-long-long
@@ -59,12 +69,10 @@ AR=ar LDFLAGS="-Wl,-rpath,/cross-tools/lib" \
     --enable-__cxa_atexit \
     --with-mpfr=/cross-tools \
     --with-gmp=/cross-tools \
-    --with-ppl=/cross-tools \
-    --with-cloog=/cross-tools \
     --enable-c99 \
     --enable-long-long \
     --enable-threads=posix \
-    --disable-multilib
+    ${TARGET_CONFIGURE_OPTS}
 ${HVMAKE} \
     AS_FOR_TARGET="${CLFS_TARGET}-as" \
     LD_FOR_TARGET="${CLFS_TARGET}-ld"