#!/bin/bash set -o errexit # First argument of this script is the package name. # Remaining arguments are additional configure options. # Reading system configuration informations, functions and package versions. source ../sysinfos source ../functions source ../packages-list PACKAGE=${1} shift CONFIGURE_OPTS=${*} # Applying patches (if any) apply_patches ${PACKAGE} cd ${LFS_TMP}/${PACKAGE} case "${HVL_TARGET}" in "x86_64") # Libiberty uses gcc -print-multi-os-directory to determine where to # install libiberty.a. Because our temporary GCC is still # multilib-aware, the command returns ../lib64 which causes the archive # to be installed into /usr/lib64. The following sed will prevent this: sed -i 's%\(^MULTIOSDIR = \).*%\1 ../lib%' libiberty/Makefile.in # This adds 64 bit support to Binutils. CONFIGURE_OPTS="${CONFIGURE_OPTS} --enable-64-bit-bfd" ;; esac cd ${LFS_TMP}/${PACKAGE}-build ../${PACKAGE}/configure \ --prefix=/usr \ --sysconfdir=/etc \ ${CONFIGURE_OPTS} make configure-host make tooldir=/usr # Install the package: make tooldir=/usr install # Install the libiberty header file that is needed by some packages: cp -v ../${PACKAGE}/include/libiberty.h /usr/include exit $?