Added directory to store Ubuntu specific files
[hvlinux.git] / stage0 / cis-gcc-pass1
index f849774..4e665f8 100755 (executable)
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
 set -o errexit
 
 # Reading system configuration informations, functions and package versions.
@@ -9,6 +9,16 @@ 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 \
+            --with-local-prefix=/tools \
+            --disable-multilib"
+        ;;
+esac
+
+
 case "${HVL_TARGET}" in
     "x86")
         apply_patch ${1}-specs-1.patch ${1}
@@ -34,14 +44,15 @@ sed -e "s@\(^CROSS_SYSTEM_HEADER_DIR =\).*@\1 /tools/include@g" \
 touch /tools/include/limits.h
 
 # --with-local-prefix=/tools
-#     The purpose of this switch is to remove /usr/local/include from gcc's include search path.
-#     This is not absolutely essential, however, it helps to minimize the influence of the host system.
+#     Remove /usr/local/include from gcc's include search path. This is not
+#     absolutely essential, however, it helps to minimize the influence of the
+#     host system.
 # --disable-shared
 #     Disables the creation of the shared libraries.
 # --disable-threads
-#     This will prevent GCC from looking for the multi-thread include files, since they haven't been
-#     created for this architecture yet. GCC will be able to find the multi-thread information after
-#     the Glibc headers are created.
+#     Prevents GCC from looking for the multi-thread include files, since they
+#     haven't been created for this architecture yet. GCC will be able to find
+#     the multi-thread information after the libc headers are created.
 # --enable-languages=c
 #     This option ensures that only the C compiler is built.
 cd ${LFS_TMP}/${1}-build
@@ -52,13 +63,10 @@ AR=ar LDFLAGS="-Wl,-rpath,/cross-tools/lib" \
     --host=${CLFS_HOST} \
     --target=${CLFS_TARGET} \
     --with-sysroot=${CLFS} \
-    --with-local-prefix=/tools \
     --disable-nls \
     --disable-shared \
     --with-mpfr=/cross-tools \
     --with-gmp=/cross-tools \
-    --with-ppl=/cross-tools \
-    --with-cloog=/cross-tools \
     --without-headers \
     --with-newlib \
     --disable-decimal-float \
@@ -67,7 +75,7 @@ AR=ar LDFLAGS="-Wl,-rpath,/cross-tools/lib" \
     --disable-libssp \
     --disable-threads \
     --enable-languages=c \
-    --disable-multilib
+    ${TARGET_CONFIGURE_OPTS}
 ${HVMAKE} all-gcc all-target-libgcc
 ${HVMAKE} install-gcc install-target-libgcc