Harmonize stages 0 and 2 kernel headers installation
[hvlinux.git] / stage0 / hv-install-2
index ef76fbd..53694b2 100755 (executable)
@@ -6,38 +6,32 @@ source ../functions/main
 init_log_file
 
 if [ x"${INSTALL_GLIBC}" == x"1" ]; then
-    ipkg -m noac ${KERNEL}
+    ipkg -m noac -l "kernel-headers" -s "kernel-headers" ${KERNEL}
 fi
 
-case "${HVL_TARGET}" in
-    x86*)
-        ipkg ${FILE_PKG}
-        ipkg ${NCURSES}
-        ;;
-esac
-
-CPPFLAGS=-fexceptions \
-    ipkg ${GMP} "\
+ipkg ${GMP} "\
     --enable-cxx \
     --disable-static"
 
-export LDFLAGS="-Wl,-rpath,/cross-tools/lib"
+export LDFLAGS="-Wl,-rpath,${CROSS_TOOLS_DIR}/lib"
 
 ipkg ${MPFR} "\
-    --enable-shared \
     --disable-static \
-    --with-gmp=/cross-tools"
+    --with-gmp=${CROSS_TOOLS_DIR}"
 
 ipkg ${MPC} "\
     --disable-static \
-    --with-gmp=/cross-tools \
-    --with-mpfr=/cross-tools"
+    --with-gmp=${CROSS_TOOLS_DIR} \
+    --with-mpfr=${CROSS_TOOLS_DIR}"
+
+ipkg ${ISL} "\
+    --disable-static \
+    --with-gmp-prefix=${CROSS_TOOLS_DIR}"
 
 ipkg ${CLOOG} "\
-    --enable-shared \
     --disable-static \
     --with-bits=gmp \
-    --with-gmp-prefix=/cross-tools"
+    --with-gmp-prefix=${CROSS_TOOLS_DIR}"
 
 LDFLAGS=""
 
@@ -49,4 +43,8 @@ if [ x"${INSTALL_GLIBC}" == x"1" ]; then
     ipkg -l "${GCC}-pass2" ${GCC}
 fi
 
+if [ x"${HVL_TARGET}" == x"avr" ]; then
+    ipkg ${AVRLIBC} "--host=avr"
+fi
+
 exit $?