#!/bin/bash
-# This file is 'sourced' by other scripts, therefore the above line is of no
-# use, except when modifying the file in emacs to have syntax highlighting.
+set -o errtrace # Let shell functions inherit ERR trap.
+set -o errexit
# Constants for return codes
EXIT_SUCCESS=0
exit 1
}
+ipkg_display_build_infos()
+{
+ echo "hvlinux: configure options:"
+ for opt in ${CONFIGURE_OPTS}; do
+ echo " ${opt}"
+ done
+ echo "hvlinux: environment variables:"
+ echo " HOST: ${CLFS_HOST}"
+ echo " TARGET: ${CLFS_TARGET}"
+ echo " BUILD64: ${BUILD64}"
+ echo " CFLAGS: ${CFLAGS}"
+ echo " CPPFLAGS: ${CPPFLAGS}"
+ echo " CXXFLAGS: ${CFLAGS}"
+ echo " LDFLAGS: ${LDFLAGS}"
+ echo " RANLIB: ${RANLIB}"
+ echo " CC: ${CC}"
+ echo " CXX: ${CXX}"
+ echo " AR: ${AR}"
+ echo " AS: ${AS}"
+ echo " PATH: ${PATH}"
+}
+
# Installation of a package
# Arg. #1: Package name and version (ex: gcc-4.5.1)
# Remaining arguments: Additional configure options
echo "------------------------" 1>> ${LFS_LOG_FILE}
echo "${MSGSTRING}" 1>> ${LFS_LOG_FILE}
+ exec 7>&1 # Save current "value" of stdout.
+ # All output from commands in this block sent to file $LFS_LOG_FILE.
+ exec >> ${LFS_LOG_FILE} 2>&1
+ ipkg_display_build_infos
+ exec 1>&7 7>&- # Restore stdout and close file descriptor #7.
+
# All output from commands in this block sent to file $PACKAGE_LOG.
exec > ${PACKAGE_LOG} 2>&1
return $?
}
-unset -f hvconfig_cache
unset -f hvconfig_pre
+unset -f hvconfig_cache
unset -f hvconfig_post
unset -f hvbuild_post
# Default configure function
hvconfig()
{
- echo "Running configure with options:"
- echo " <${CONFIGURE_OPTS}>"
-
if [ "x${IPKG_MODE}" = "xacnb" ]; then
# Broken autoconf package that must build in source dir
cd ${LFS_TMP}/${PACKAGE}
hvpatch
+ # Execute pre-configure function if applicable
+ if function_exists hvconfig_pre ; then
+ echo "Running configure pre-script"
+ hvconfig_pre
+ fi
+
# Execute config-cache function if applicable
if function_exists hvconfig_cache ; then
echo "Running configure cache script"
hvconfig_cache
-
- CONFIGURE_OPTS="${CONFIGURE_OPTS} --cache-file=${LFS_TMP}/${PACKAGE}-build/config.cache"
+ CONFIGURE_OPTS="\
+ ${CONFIGURE_OPTS} \
+ --cache-file=${LFS_TMP}/${PACKAGE}-build/config.cache"
fi
- # Execute pre-configure function if applicable
- if function_exists hvconfig_pre ; then
- echo "Running configure pre-script"
- hvconfig_pre
- fi
+ ipkg_display_build_infos
if [ "x${IPKG_MODE}" = "xnoac" ]; then
echo "Not calling configure because ${PACKAGE} has no configure script"
echo "Running build post-script"
hvbuild_post
fi
+
+ ipkg_finish
}
1. Create your destination partition and make sure that it is
formatted and mounted.
-2. Create the LFS user.
-
-3. Copy the hvlinux-src directory, containing packages and installation
- scripts, anywhere in your LFS partition (usually in root directory).
- If installing from a CD-ROM, mount it under your LFS partition.
- Make sure that your files are owned by the LFS user.
-
-4. Modify the 'sysinfos' configuration file to reflect your
+2. Modify the 'sysinfos' configuration file to reflect your
system configuration.
-5. Launch './stage0-install'
+3. Launch './install-1'
#!/bin/bash
-set -o errtrace # Let shell functions inherit ERR trap. Same as `set -E'.
# Reading system configuration informations, functions and package versions.
source ../sysinfos
#!/bin/bash
+export BUILD64="-m64"
+
# Setting default configure options for all scripts
CONFIGURE_OPTS="\
--prefix=/cross-tools \
#!/bin/bash
-export AR=ar
-export AS=as
-
-CONFIGURE_OPTS="\
- --host=${CLFS_HOST} \
- --target=${CLFS_TARGET} \
- --with-sysroot=${CLFS} \
- --with-lib-path=/tools/lib \
- --disable-nls \
- --enable-shared \
- --disable-multilib \
- ${CONFIGURE_OPTS}"
-
hvconfig_pre()
{
+ export AR=ar
+ export AS=as
+
+ CONFIGURE_OPTS="\
+ ${CONFIGURE_OPTS} \
+ --host=${CLFS_HOST} \
+ --target=${CLFS_TARGET} \
+ --with-sysroot=${CLFS} \
+ --with-lib-path=/tools/lib \
+ --disable-nls \
+ --enable-shared \
+ --disable-multilib"
+
case "${HVL_TARGET}" in
"x86_64")
# This adds 64 bit support to Binutils.
CONFIGURE_OPTS="${CONFIGURE_OPTS} --enable-64-bit-bfd"
;;
esac
-
}
-hvbuild()
+hvconfig_post()
{
+ unset AR
+ unset AS
${HVMAKE} configure-host
- ${HVMAKE}
- ${HVMAKE} install
+}
+
+hvbuild_post()
+{
cp -v ../${PACKAGE}/include/libiberty.h /tools/include
}
#!/bin/bash
-BUILD_CC="gcc"
-CC="${CLFS_TARGET}-gcc ${CLFS_BUILDFLAGS}"
-AR="${CLFS_TARGET}-ar"
-RANLIB="${CLFS_TARGET}-ranlib"
-
-CONFIGURE_OPTS="\
- --prefix=/tools \
- --host=${CLFS_TARGET} \
- --build=${CLFS_HOST} \
- --disable-profile \
- --enable-add-ons \
- --with-tls \
- --enable-kernel=$(get_pkg_ver ${KERNEL}) \
- --with-__thread \
- --with-binutils=/cross-tools/bin \
- --with-headers=/tools/include"
-
-# For Glibc to support NPTL:
-hvconfig_cache()
-{
-cat > ${LFS_TMP}/${PACKAGE}-build/config.cache << EOF
-libc_cv_forced_unwind=yes
-libc_cv_c_cleanup=yes
-libc_cv_gnu89_inline=yes
-libc_cv_ssp=no
-EOF
-}
-
hvconfig_pre()
{
+ export BUILD_CC="gcc"
+ export CC="${CLFS_TARGET}-gcc ${CLFS_BUILDFLAGS}"
+ export AR="${CLFS_TARGET}-ar"
+ export RANLIB="${CLFS_TARGET}-ranlib"
+
+ CONFIGURE_OPTS="\
+ --prefix=/tools \
+ --host=${CLFS_TARGET} \
+ --build=${CLFS_HOST} \
+ --disable-profile \
+ --enable-add-ons \
+ --with-tls \
+ --enable-kernel=$(get_pkg_ver ${KERNEL}) \
+ --with-__thread \
+ --with-binutils=/cross-tools/bin \
+ --with-headers=/tools/include"
+
case "${HVL_TARGET}" in
"x86")
CFLAGS="-march=$(cut -d- -f1 <<< ${CLFS_TARGET}) -mtune=native -g -O2"
# Disable linking to libgcc_eh:
sed -e 's/-lgcc_eh//g' -i Makeconfig
}
+
+# For Glibc to support NPTL:
+hvconfig_cache()
+{
+cat > ${LFS_TMP}/${PACKAGE}-build/config.cache << EOF
+libc_cv_forced_unwind=yes
+libc_cv_c_cleanup=yes
+libc_cv_gnu89_inline=yes
+libc_cv_ssp=no
+EOF
+}
+
+hvconfig_post()
+{
+ unset BUILD_CC
+ unset CC
+ unset AR
+ unset RANLIB
+ unset CFLAGS
+}
#!/bin/bash
-AR=ar
-LDFLAGS="-Wl,-rpath,/cross-tools/lib"
-
hvpatch()
{
# Manually applying patches if specified
hvconfig_pre()
{
+ export AR=ar
+ export LDFLAGS="-Wl,-rpath,/cross-tools/lib"
+
# Common options for passes 1 & 2
- CONFIGURE_OPTS="${CONFIGURE_OPTS} \
+ CONFIGURE_OPTS="\
+ ${CONFIGURE_OPTS} \
--build=${CLFS_HOST} \
--host=${CLFS_HOST} \
--target=${CLFS_TARGET} \
--with-local-prefix=/tools \
--disable-nls \
--with-mpfr=/cross-tools \
- --with-gmp=/cross-tools"
+ --with-gmp=/cross-tools \
+ --with-ppl=/cross-tools \
+ --with-cloog=/cross-tools \
+ --disable-multilib"
if [ "x${HVLABEL}" = "x${GCC}-pass1" ]; then
CONFIGURE_OPTS="${CONFIGURE_OPTS} \
--enable-threads=posix"
fi
- case "${HVL_TARGET}" in
- *)
- CONFIGURE_OPTS="${CONFIGURE_OPTS} --with-ppl=/cross-tools \
- --with-cloog=/cross-tools \
- --disable-multilib"
- ;;
- esac
-
cd ${LFS_TMP}/${PACKAGE}
# Change the StartFile Spec to point to the correct library location:
fi
}
+hvconfig_post()
+{
+ unset AR
+ unset LDFLAGS
+}
+
hvbuild()
{
if [ "x${HVLABEL}" = "x${GCC}-pass1" ]; then
#!/bin/bash
-CONFIGURE_OPTS="\
- --without-debug \
- --without-shared \
- ${CONFIGURE_OPTS}"
+hvconfig_pre()
+{
+ CONFIGURE_OPTS="\
+ ${CONFIGURE_OPTS} \
+ --without-debug \
+ --without-shared"
+}
hvbuid()
{
#!/bin/bash
-LFS_STAGE=stage0
+export LFS_STAGE=stage0
Installation instructions
-------------------------
-1. Create your destination partition and make sure that it is
- formatted and mounted.
-
-2. Copy the hvlinux-src directory, containing packages and installation
- scripts, anywhere in your LFS partition (usually in root directory).
- If installing from a CD-ROM, mount it under your LFS partition.
-
-3. Modify the 'sysinfos' configuration file to reflect your
- system configuration.
-
-4. Launch './stage1-install'
+1. Launch './install-1'
Post-install guide
------------------
init_log_file
# Building temporary system
-export CC="${CLFS_TARGET}-gcc"
-export CXX="${CLFS_TARGET}-g++"
-export AR="${CLFS_TARGET}-ar"
-export AS="${CLFS_TARGET}-as"
-export RANLIB="${CLFS_TARGET}-ranlib"
-export LD="${CLFS_TARGET}-ld"
-export STRIP="${CLFS_TARGET}-strip"
HOST_CC=gcc CPPFLAGS=-fexceptions \
ipkg ${GMP} "--enable-cxx"
ipkg ${FILE_PKG}
ipkg ${FLEX}
ipkg ${GAWK}
-ipkg ${GETTEXT} "--disable-shared"
+ipkg ${GETTEXT}
ipkg ${GREP} "\
--disable-perl-regexp \
--without-included-regex"
--host=${CLFS_TARGET} \
${CONFIGURE_OPTS}"
-CC="${CC} ${CLFS_BUILDFLAGS}"
-CXX="${CXX} ${CLFS_BUILDFLAGS}"
+export CC="${CLFS_TARGET}-gcc ${CLFS_BUILDFLAGS}"
+export CXX="${CLFS_TARGET}-g++ ${CLFS_BUILDFLAGS}"
+export AR="${CLFS_TARGET}-ar"
+export AS="${CLFS_TARGET}-as"
+export RANLIB="${CLFS_TARGET}-ranlib"
+export LD="${CLFS_TARGET}-ld"
+export STRIP="${CLFS_TARGET}-strip"
#!/bin/bash
-CONFIGURE_OPTS="\
- ${CONFIGURE_OPTS} \
- --target=${CLFS_TARGET} \
- --with-lib-path=/tools/lib \
- --disable-nls \
- --enable-shared \
- --disable-multilib"
-
hvconfig_pre()
{
+ CONFIGURE_OPTS="\
+ ${CONFIGURE_OPTS} \
+ --target=${CLFS_TARGET} \
+ --with-lib-path=/tools/lib \
+ --disable-nls \
+ --enable-shared \
+ --disable-multilib"
+
case "${HVL_TARGET}" in
"x86_64")
# This adds 64 bit support to Binutils.
esac
}
-hvbuild()
+hvconfig_post()
{
${HVMAKE} configure-host
- ${HVMAKE}
- ${HVMAKE} install
}
#!/bin/bash
+hvconfig_pre()
+{
+ # Fix a bug when the uname patch is automatically applied
+ touch ${LFS_TMP}/${PACKAGE}/man/{uname,hostname}.1
+}
+
# Configure cannot properly determine how to get free space when cross-compiling
# and as a result the df program will not be built. Add the following entries to
# config.cache to correct this, and fix various cross-compiling issues:
gl_cv_func_working_mkstemp=yes
EOF
}
-
-hvconfig_pre()
-{
- # Fix a bug when the uname patch is automatically applied
- touch ${LFS_TMP}/${PACKAGE}/man/{uname,hostname}.1
-}
#!/bin/bash
-CC="${CC} ${CLFS_BUILDFLAGS}"
-PKG_CONFIG=true
+hvconfig_pre()
+{
+ export PKG_CONFIG=true
+
+ CONFIGURE_OPTS="\
+ --prefix=/tools \
+ --enable-elf-shlibs \
+ --with-linker=${LD} \
+ --host=${CLFS_TARGET} \
+ --disable-libblkid \
+ --disable-libuuid \
+ --disable-fsck \
+ --disable-uuidd"
+}
-CONFIGURE_OPTS="\
- --prefix=/tools \
- --enable-elf-shlibs \
- --with-linker=${LD} \
- --host=${CLFS_TARGET} \
- --disable-libblkid \
- --disable-libuuid \
- --disable-fsck \
- --disable-uuidd"
+hvconfig_post()
+{
+ unset PKG_CONFIG
+}
hvbuild()
{
#!/bin/bash
+hvconfig_pre()
+{
+ # Make sure that Flex doesn't try to include headers from /usr/include.
+ sed -e "s/-I@includedir@//g" -i ${LFS_TMP}/${PACKAGE}/Makefile.in
+}
+
# When Cross Compiling the configure script does not determine the correct
# values for the following, Set the values manually:
hvconfig_cache()
ac_cv_func_realloc_0_nonnull=yes
EOF
}
-
-hvconfig_pre()
-{
- # Make sure that Flex doesn't try to include headers from /usr/include.
- sed -e "s/-I@includedir@//g" -i ${LFS_TMP}/${PACKAGE}/Makefile.in
-}
#!/bin/bash
-CONFIGURE_OPTS="\
- ${CONFIGURE_OPTS} \
- --target=${CLFS_TARGET} \
- --disable-multilib \
- --with-local-prefix=/tools \
- --libexecdir=/tools/lib \
- --disable-nls \
- --disable-libstdcxx-pch \
- --enable-long-long \
- --enable-c99 \
- --enable-shared \
- --enable-threads=posix \
- --enable-__cxa_atexit \
- --enable-languages=c,c++"
-
hvpatch()
{
# Manually applying patches if specified
hvconfig_pre()
{
+ CONFIGURE_OPTS="\
+ ${CONFIGURE_OPTS} \
+ --target=${CLFS_TARGET} \
+ --disable-multilib \
+ --with-local-prefix=/tools \
+ --libexecdir=/tools/lib \
+ --disable-nls \
+ --disable-libstdcxx-pch \
+ --enable-long-long \
+ --enable-c99 \
+ --enable-shared \
+ --enable-threads=posix \
+ --enable-__cxa_atexit \
+ --enable-languages=c,c++"
+
cd ${LFS_TMP}/${PACKAGE}
# Change the StartFile Spec to point to the correct library location:
#!/bin/bash
-CONFIGURE_OPTS="\
- --prefix=/tools \
- --build=${CLFS_HOST} \
- --host=${CLFS_TARGET} \
- ${CONFIGURE_OPTS}"
+hvconfig_pre()
+{
+ CONFIGURE_OPTS="\
+ ${CONFIGURE_OPTS} \
+ --disable-shared"
+}
# When cross-compiling the Gettext configure script assumes we don't have a
# working wcwidth when we do. The following will fix possible compilation
hvconfig()
{
cd ${LFS_TMP}/${PACKAGE}/gettext-tools
-
- echo "Running configure with options:"
- echo " <${CONFIGURE_OPTS}>"
-
- CC="${CC} ${CLFS_BUILDFLAGS}" CXX="${CXX} ${CLFS_BUILDFLAGS}" \
- ./configure ${CONFIGURE_OPTS}
+ ./configure ${CONFIGURE_OPTS}
}
hvbuild()
#!/bin/bash
+hvconfig_pre()
+{
+ # Add a missing include statement into one of the source files:
+ sed -e '/"m4.h"/i\#include <sys/stat.h>' -i ${LFS_TMP}/${PACKAGE}/src/path.c
+}
+
# Configure can not properly determine the results of the following tests:
hvconfig_cache()
{
gl_cv_func_wctob_works=yes
EOF
}
-
-hvconfig_pre()
-{
- # Add a missing include statement into one of the source files:
- sed -e '/"m4.h"/i\#include <sys/stat.h>' -i ${LFS_TMP}/${PACKAGE}/src/path.c
-}
#!/bin/bash
-CC="${CC} ${CLFS_BUILDFLAGS}"
-
-CONFIGURE_OPTS="\
- --prefix=/ \
- --bindir=/bin \
- --sbindir=/sbin \
- --build=${CLFS_HOST} \
- --host=${CLFS_TARGET}"
+hvconfig_pre()
+{
+ CONFIGURE_OPTS="\
+ --prefix=/ \
+ --bindir=/bin \
+ --sbindir=/sbin \
+ --build=${CLFS_HOST} \
+ --host=${CLFS_TARGET}"
+}
hvbuild()
{
-i src/Makefile
make -C src clobber
- make -C src CC="${CC} ${CLFS_BUILDFLAGS}"
+ make -C src CC="${CC} ${BUILD64}"
make -C src install INSTALL=install ROOT=${LFS}
install -m644 ${SCRDIR}/misc/inittab ${LFS}/etc
#!/bin/bash
-CC="${CC} ${CLFS_BUILDFLAGS}"
-
-CONFIGURE_OPTS="\
- --prefix=/usr \
- --build=${CLFS_HOST} \
- --host=${CLFS_TARGET} \
- --exec-prefix="" \
- --sysconfdir=/etc \
- --libexecdir=/lib/udev \
- --libdir=/usr/lib \
- --disable-extras \
- --disable-introspection"
-
hvconfig_pre()
{
+ CONFIGURE_OPTS="\
+ --prefix=/usr \
+ --build=${CLFS_HOST} \
+ --host=${CLFS_TARGET} \
+ --exec-prefix="" \
+ --sysconfdir=/etc \
+ --libexecdir=/lib/udev \
+ --libdir=/usr/lib \
+ --disable-extras \
+ --disable-introspection"
+
cd ${LFS_TMP}/${PACKAGE}
install -dv ${LFS}/lib/{firmware,udev/devices/{pts,shm}}
}
#!/bin/bash
-CC="${CC} ${CLFS_BUILDFLAGS}"
-CXX="${CXX} ${CLFS_BUILDFLAGS}"
-
-CONFIGURE_OPTS="\
- --build=${CLFS_HOST} \
- --host=${CLFS_TARGET} \
- --enable-login-utils \
- --disable-makeinstall-chown"
+hvconfig_pre()
+{
+ CONFIGURE_OPTS="\
+ --build=${CLFS_HOST} \
+ --host=${CLFS_TARGET} \
+ --enable-login-utils \
+ --disable-makeinstall-chown"
+}
hvbuild()
{
#!/bin/bash
-CC="${CC} ${CLFS_BUILDFLAGS}"
-
-CONFIGURE_OPTS="\
+hvconfig_pre()
+{
+ CONFIGURE_OPTS="\
--prefix=/tools"
+}
#!/bin/bash
-LFS_STAGE=stage1
+export LFS_STAGE=stage1
under ${LFS}/boot.
8. Launch the installation of stage 2:
- >$ /mnt/linux/mnt/hvlinux/scripts/stage2/stage2-install
+ >$ /mnt/linux/mnt/hvlinux/scripts/stage2/install-1
9. After that, compile a fresh kernel.
unset CXX
unset LDFLAGS
-ipkg ${ZLIB}
+ipkg -m acnb ${ZLIB}
ipkg ${BINUTILS}
ipkg ${GCC}
rscr mult "Testing toolchain" toolchain-test
--- /dev/null
+#!/bin/bash
+
+# Setting default configure options for all scripts
+CONFIGURE_OPTS="\
+ --prefix=/usr \
+ --sysconfdir=/etc \
+ ${CONFIGURE_OPTS}"
+++ /dev/null
-#!/bin/bash
-set -o errexit
-
-# First argument of this script is the package name.
-# Remaining arguments are additional configure options.
-
-PACKAGE=${1}
-shift
-CONFIGURE_OPTS=${*}
-
-# Reading system configuration informations, functions and package versions.
-source ${SCRDIR}/../sysinfos
-source ${SCRDIR}/../functions
-source ${SCRDIR}/../packages-list
-
-# Setting default configure options for all scripts
-CONFIGURE_OPTS="\
- --prefix=/usr \
- --sysconfdir=/etc \
- ${CONFIGURE_OPTS}"
-
-source ${SCRDIR}/../functions-ac
-
-ldconfig
-
-exit $?
#!/bin/bash
-CC="gcc -isystem /usr/include"
-LDFLAGS="-Wl,-rpath-link,/lib"
-
-CONFIGURE_OPTS="\
- --libdir=/usr/lib \
- --enable-shared \
- --disable-multilib \
- ${CONFIGURE_OPTS}"
-
hvconfig_pre()
{
+ export CC="gcc -isystem /usr/include"
+ export LDFLAGS="-Wl,-rpath-link,/lib"
+
+ CONFIGURE_OPTS="\
+ ${CONFIGURE_OPTS} \
+ --libdir=/usr/lib \
+ --enable-shared \
+ --disable-multilib"
+
case "${HVL_TARGET}" in
"x86_64")
# Libiberty uses gcc -print-multi-os-directory to determine where to
esac
}
+hvconfig_post()
+{
+ unset CC
+ unset LDFLAGS
+}
+
hvbuild()
{
make configure-host
#!/bin/bash
-CONFIGURE_OPTS="\
- --enable-no-install-program=kill,uptime \
- ${CONFIGURE_OPTS}"
+hvconfig_pre()
+{
+ CONFIGURE_OPTS="\
+ ${CONFIGURE_OPTS} \
+ --enable-no-install-program=kill,uptime"
+}
hvbuild_post()
{
#!/bin/bash
-PKG_CONFIG=true
+hvconfig_pre()
+{
+ export PKG_CONFIG=true
+
+ CONFIGURE_OPTS="\
+ ${CONFIGURE_OPTS} \
+ --with-root-prefix="" \
+ --enable-elf-shlibs \
+ --disable-libblkid \
+ --disable-libuuid \
+ --disable-fsck \
+ --disable-uuidd"
+}
-CONFIGURE_OPTS="\
- --with-root-prefix="" \
- --enable-elf-shlibs \
- --disable-libblkid \
- --disable-libuuid \
- --disable-fsck \
- --disable-uuidd \
- ${CONFIGURE_OPTS}"
+hvconfig_post()
+{
+ unset PKG_CONFIG
+}
hvbuild_post()
{
hvconfig_pre()
{
- CFLAGS="-mtune=generic -g -O2"
+ export CFLAGS="-mtune=generic -g -O2"
CONFIGURE_OPTS="\
+ ${CONFIGURE_OPTS} \
--disable-profile \
--enable-add-ons \
--enable-kernel=$(get_pkg_ver ${KERNEL}) \
- --libexecdir=/usr/lib/eglibc \
- ${CONFIGURE_OPTS}"
+ --libexecdir=/usr/lib/eglibc"
case "${HVL_TARGET}" in
"x86")
esac
}
+hvconfig_post()
+{
+ unset CFLAGS
+}
+
hvbuild()
{
make
#!/bin/bash
-CONFIGURE_OPTS="\
- --libexecdir=/usr/lib/findutils \
- --localstatedir=/var/lib/locate \
- ${CONFIGURE_OPTS}"
+hvconfig_pre()
+{
+ CONFIGURE_OPTS="\
+ ${CONFIGURE_OPTS} \
+ --libexecdir=/usr/lib/findutils \
+ --localstatedir=/var/lib/locate"
+}
hvbuild_post()
{
#!/bin/bash
-CC="gcc -Wl,-rpath-link,/lib -isystem /usr/include"
-CXX="g++ -Wl,-rpath-link,/lib -isystem /usr/include"
+hvconfig_pre()
+{
+ export CC="gcc -Wl,-rpath-link,/lib -isystem /usr/include"
+ export CXX="g++ -Wl,-rpath-link,/lib -isystem /usr/include"
-CONFIGURE_OPTS="\
- --libexecdir=/usr/lib \
- --enable-shared \
- --enable-threads=posix \
- --enable-__cxa_atexit \
- --enable-c99 \
- --enable-long-long \
- --enable-clocale=gnu \
- --enable-languages=c,c++ \
- --disable-multilib \
- --disable-libstdcxx-pch \
- ${CONFIGURE_OPTS}"
+ CONFIGURE_OPTS="\
+ ${CONFIGURE_OPTS} \
+ --libexecdir=/usr/lib \
+ --enable-shared \
+ --enable-threads=posix \
+ --enable-__cxa_atexit \
+ --enable-c99 \
+ --enable-long-long \
+ --enable-clocale=gnu \
+ --enable-languages=c,c++ \
+ --disable-multilib \
+ --disable-libstdcxx-pch"
+
+ # Applying a sed substitution that will suppress the installation of
+ # libiberty.a. We want to use the Binutils version of libiberty.a
+ sed -i 's/install_to_$(INSTALL_DEST) //' ${LFS_TMP}/${PACKAGE}/libiberty/Makefile.in
+}
hvpatch()
{
esac
}
-hvconfig_pre()
+hvconfig_post()
{
- # Applying a sed substitution that will suppress the installation of
- # libiberty.a. We want to use the Binutils version of libiberty.a
- sed -i 's/install_to_$(INSTALL_DEST) //' ${LFS_TMP}/${PACKAGE}/libiberty/Makefile.in
+ unset CC
+ unset CXX
}
hvbuild_post()
#!/bin/bash
-PAGE=letter
+# Groff does not like to be made in parallel???
-CONFIGURE_OPTS="\
- --enable-multibyte
- ${CONFIGURE_OPTS}"
+hvconfig_pre()
+{
+ export PAGE=letter
+
+ CONFIGURE_OPTS="\
+ ${CONFIGURE_OPTS} \
+ --enable-multibyte"
+}
-# Groff does not like to be made in parallel.
+hvconfig_post()
+{
+ unset PAGE
+}
hvbuild_post()
{
#!/bin/bash
-CONFIGURE_OPTS="\
- --bindir=/bin
- ${CONFIGURE_OPTS}"
+hvconfig_pre()
+{
+ CONFIGURE_OPTS="\
+ ${CONFIGURE_OPTS} \
+ --bindir=/bin"
+}
hvbuild_post()
{
#!/bin/bash
-CONFIGURE_OPTS="\
- --libexecdir=/usr/sbin \
- --localstatedir=/var \
- --disable-ifconfig \
- --disable-logger \
- --disable-syslogd \
- --disable-whois \
- --disable-servers"
+hvconfig_pre()
+{
+ CONFIGURE_OPTS="\
+ --libexecdir=/usr/sbin \
+ --localstatedir=/var \
+ --disable-ifconfig \
+ --disable-logger \
+ --disable-syslogd \
+ --disable-whois \
+ --disable-servers"
+}
hvbuild_post()
{
#!/bin/bash
-# --datadir=/lib/kbd
-# This option puts keyboard layout data in a directory that will
-# always be on the root partition instead of the default /usr/share/kbd
-CONFIGURE_OPTS="\
- --datadir=/lib/kbd
- ${CONFIGURE_OPTS}"
+hvconfig_pre()
+{
+ CONFIGURE_OPTS="\
+ ${CONFIGURE_OPTS} \
+ --datadir=/lib/kbd"
+}
hvbuild_post()
{
#!/bin/bash
-# --enable-zlib-dynamic: To handle compressed kernel modules.
-CONFIGURE_OPTS="\
- --enable-zlib-dynamic \
- --mandir=/usr/share/man \
- ${CONFIGURE_OPTS}"
+hvconfig_pre()
+{
+ # --enable-zlib-dynamic: To handle compressed kernel modules.
+ CONFIGURE_OPTS="\
+ ${CONFIGURE_OPTS} \
+ --enable-zlib-dynamic \
+ --mandir=/usr/share/man"
+}
hvbuild()
{
hvbuild_post()
{
- cat > /etc/modprobe.conf << "EOF"
-# modprobe.conf
-EOF
+ install -dv ${LFS}/etc/modprobe.d
}
#!/bin/bash
-CONFIGURE_OPTS="\
- --libdir=/lib \
- --with-shared \
- --without-debug \
- --enable-widec \
- --with-manpage-format=normal \
- ${CONFIGURE_OPTS}"
+hvconfig_pre()
+{
+ CONFIGURE_OPTS="\
+ ${CONFIGURE_OPTS} \
+ --libdir=/lib \
+ --with-shared \
+ --without-debug \
+ --enable-widec \
+ --with-manpage-format=normal"
+}
hvbuild_post()
{
#!/bin/bash
-CONFIGURE_OPTS="\
- --libdir=/lib
- ${CONFIGURE_OPTS}"
-
hvconfig_pre()
{
+ CONFIGURE_OPTS="\
+ ${CONFIGURE_OPTS} \
+ --libdir=/lib"
+
cd ${LFS_TMP}/${PACKAGE}
# Reinstalling Readline will cause the old libraries to be moved to
#!/bin/bash
-CONFIGURE_OPTS="\
- --without-selinux
- ${CONFIGURE_OPTS}"
-
hvconfig_pre()
{
+ CONFIGURE_OPTS="\
+ ${CONFIGURE_OPTS} \
+ --without-selinux"
+
cd ${LFS_TMP}/${PACKAGE}
# Disable the installation of the groups program and its man page, as
hvconfig_pre()
{
+ CONFIGURE_OPTS="\
+ --enable-arch \
+ --enable-partx \
+ --enable-write \
+ --disable-wall"
+
# The FHS recommends that we use /var/lib/hwclock, instead of the usual
# /etc, as the location for the adjtime file. To make the hwclock program
# FHS-compliant, run the following:
mkdir -pv /var/lib/hwclock
}
-hvconfig()
-{
- cd ${LFS_TMP}/${PACKAGE}
-
- ./configure \
- --enable-arch \
- --enable-partx \
- --enable-write \
- --disable-wall
-}
-
hvbuild_post()
{
# Move the logger binary to /bin as it is needed by the CLFS-Bootscripts package:
#!/bin/bash
-CC="gcc -isystem /usr/include"
-CXX="g++ -isystem /usr/include"
-LDFLAGS="-Wl,-rpath-link,/lib"
+hvconfig_pre()
+{
+ export CC="gcc -isystem /usr/include"
+ export CXX="g++ -isystem /usr/include"
+ export LDFLAGS="-Wl,-rpath-link,/lib"
-CONFIGURE_OPTS="\
- --shared \
- ${CONFIGURE_OPTS}"
+ CONFIGURE_OPTS="\
+ ${CONFIGURE_OPTS} \
+ --shared"
+}
-hvconfig()
+hvconfig_post()
{
- cd ${LFS_TMP}/${PACKAGE}
- ./configure ${CONFIGURE_OPTS}
+ unset CC
+ unset CXX
+ unset LDFLAGS
}
hvbuild_post()
#!/bin/bash
-LFS_STAGE=stage2
+export LFS_STAGE=stage2