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
{
${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()
--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 \
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
}