From: Hugo Villeneuve Date: Fri, 27 Feb 2015 18:47:47 +0000 (-0500) Subject: Add cross-compile ipkg mode for stage1 (DESTDIR) X-Git-Url: http://gitweb.hugovil.com/?p=hvlinux.git;a=commitdiff_plain;h=4b933a7893fa445f7427dad187850312f0c8947b Add cross-compile ipkg mode for stage1 (DESTDIR) --- diff --git a/stage1/hv-install-2 b/stage1/hv-install-2 index af4179e..f1e3a08 100755 --- a/stage1/hv-install-2 +++ b/stage1/hv-install-2 @@ -6,64 +6,70 @@ source ../functions/main init_log_file +# ipkg in cross-compile mode, by specifying an install directory of ${LFS} +function ipkgcc() +{ + ipkg -i ${LFS} ${*} +} + # Building temporary system -ipkg ${GMP} "--enable-cxx" -ipkg ${MPFR} -ipkg ${MPC} -ipkg ${ISL} -ipkg ${CLOOG} "\ +ipkgcc ${GMP} "--enable-cxx" +ipkgcc ${MPFR} +ipkgcc ${MPC} +ipkgcc ${ISL} +ipkgcc ${CLOOG} "\ --with-isl=system" -ipkg -m acnb ${ZLIB} -ipkg ${BINUTILS} -ipkg ${GCC} -ipkg ${NCURSES} "\ +ipkgcc -m acnb ${ZLIB} +ipkgcc ${BINUTILS} +ipkgcc ${GCC} +ipkgcc ${NCURSES} "\ --with-shared \ --without-debug \ --without-ada \ --enable-overwrite \ --with-build-cc=gcc" -ipkg ${BASH} "--without-bash-malloc" -ipkg -m noac ${BZIP2} -ipkg -m acnb -j ${COREUTILS} "--enable-install-program=hostname" -ipkg ${DIFFUTILS} -ipkg ${FINDUTILS} -ipkg ${FILE_PKG} -ipkg ${FLEX} -ipkg ${GAWK} -ipkg -d gettext-tools ${GETTEXT} "--disable-shared" -ipkg ${GREP} "\ +ipkgcc ${BASH} "--without-bash-malloc" +ipkgcc -m noac ${BZIP2} +ipkgcc -m acnb -j ${COREUTILS} "--enable-install-program=hostname" +ipkgcc ${DIFFUTILS} +ipkgcc ${FINDUTILS} +ipkgcc ${FILE_PKG} +ipkgcc ${FLEX} +ipkgcc ${GAWK} +ipkgcc -d gettext-tools ${GETTEXT} "--disable-shared" +ipkgcc ${GREP} "\ --disable-perl-regexp \ --without-included-regex" -ipkg ${GZIP} -ipkg ${MFOUR} -ipkg ${MAKE_PACKAGE} -ipkg ${PATCH_PACKAGE} -ipkg ${SED} -ipkg ${TAR_PACKAGE} -ipkg ${TEXINFO} -ipkg ${XZ_UTILS} +ipkgcc ${GZIP} +ipkgcc ${MFOUR} +ipkgcc ${MAKE_PACKAGE} +ipkgcc ${PATCH_PACKAGE} +ipkgcc ${SED} +ipkgcc ${TAR_PACKAGE} +ipkgcc ${TEXINFO} +ipkgcc ${XZ_UTILS} # Chapter 7 rscr once "Creating directory structure" create-directories rscr once "Creating symbolic links" create-symlinks -ipkg ${NANO} "--enable-color --enable-multibuffer" +ipkgcc ${NANO} "--enable-color --enable-multibuffer" PKG_CONFIG=true \ - ipkg ${UTIL_LINUX} "\ + ipkgcc ${UTIL_LINUX} "\ --exec-prefix=/tools \ --disable-login \ --disable-sulogin \ --disable-su \ --disable-makeinstall-chown" -ipkg -i ${LFS} ${SHADOW} "\ +ipkgcc ${SHADOW} "\ --sysconfdir=/etc \ --cache-file=config.cache" LDFLAGS="-Wl,-lpthread,-ldl" \ - ipkg ${E2FSPROGS} -ipkg -m noac ${SYSVINIT} -ipkg -i ${LFS} ${KMOD} "--bindir=/bin" -ipkg ${EUDEV} + ipkgcc ${E2FSPROGS} +ipkgcc -m noac ${SYSVINIT} +ipkgcc ${KMOD} "--bindir=/bin" +ipkgcc ${EUDEV} ipkg -c -m noac ${KERNEL} rscr once "Creating default users" create-users diff --git a/stage1/pkg/bash b/stage1/pkg/bash index dd9ae53..6d0abc3 100644 --- a/stage1/pkg/bash +++ b/stage1/pkg/bash @@ -26,5 +26,5 @@ EOF hvbuild_post() { - ln -svfT bash ${TOOLS_DIR}/tools/bin/sh + ln -svfT bash ${TOOLS_DIR}/bin/sh } diff --git a/stage1/pkg/bzip2 b/stage1/pkg/bzip2 index d81667a..9805b2e 100644 --- a/stage1/pkg/bzip2 +++ b/stage1/pkg/bzip2 @@ -7,5 +7,5 @@ hvbuild() sed -e 's@^\(all:.*\) test@\1@g' -i Makefile ${HVMAKE} CC="${CC} ${CLFS_BUILDFLAGS}" AR="${AR}" RANLIB="${RANLIB}" - ${HVMAKE} PREFIX=/tools install + ${HVMAKE} PREFIX=${LFS}/tools install } diff --git a/stage1/pkg/e2fsprogs b/stage1/pkg/e2fsprogs index a864793..0f407a2 100644 --- a/stage1/pkg/e2fsprogs +++ b/stage1/pkg/e2fsprogs @@ -21,10 +21,10 @@ hvbuild() { ${HVMAKE} LIBUUID="-luuid" STATIC_LIBUUID="-luuid" \ LIBBLKID="-lblkid" STATIC_LIBBLKID="-lblkid" - ${HVMAKE} install + ${HVMAKE} DESTDIR=${LFS} install # Install the static libraries and headers: - ${HVMAKE} install-libs + ${HVMAKE} DESTDIR=${LFS} install-libs } hvbuild_post() diff --git a/stage1/pkg/gcc b/stage1/pkg/gcc index c499c06..c3f9b1f 100644 --- a/stage1/pkg/gcc +++ b/stage1/pkg/gcc @@ -10,7 +10,7 @@ hvconfig_pre() --disable-nls \ --disable-libstdcxx-pch \ --with-system-zlib \ - --with-native-system-header-dir=/tools/include \ + --with-native-system-header-dir=${TOOLS_DIR}/include \ --disable-libssp \ --enable-checking=release \ --enable-libstdcxx-time \ @@ -43,11 +43,11 @@ hvconfig_post() hvbuild() { ${HVMAKE} AS_FOR_TARGET="${AS}" LD_FOR_TARGET="${LD}" - ${HVMAKE} install + ${HVMAKE} DESTDIR=${LFS} install } hvbuild_post() { # Install the libiberty header file that is needed by some packages: - cp -v ${SRC_DIR}/include/libiberty.h ${TOOLS_DIR}/tools/include + cp -v ${SRC_DIR}/include/libiberty.h ${TOOLS_DIR}/include } diff --git a/stage1/pkg/texinfo b/stage1/pkg/texinfo index fc6050f..987d8ee 100644 --- a/stage1/pkg/texinfo +++ b/stage1/pkg/texinfo @@ -5,5 +5,5 @@ hvbuild() ${HVMAKE} -C tools/gnulib/lib ${HVMAKE} -C tools ${HVMAKE} - ${HVMAKE} install + ${HVMAKE} DESTDIR=${LFS} install }