#!/bin/bash set -o errexit # Reading system configuration informations, functions and package versions. source ../sysinfos source ../functions source ../packages-list # Applying patches (if any) apply_patches ${1} case "${HVL_TARGET}" in "x86_64") # This adds 64 bit support to Binutils. TARGET_CONFIGURE_OPTS="--enable-64-bit-bfd" ########## --with-lib-path=/tools/lib ;; esac # --prefix=/cross-tools # This tells the configure script to prepare to install the package in the /cross-tools directory. # --host=${CLFS_HOST} # When used with --target, this creates a cross-architecture executable that creates files for ${CLFS_TARGET} but runs on ${CLFS_HOST}. # --target=${CLFS_TARGET} # When used with --host, this creates a cross-architecture executable that creates files for ${CLFS_TARGET} but runs on ${CLFS_HOST}. # --with-lib-path=/tools/lib # This tells the configure script to specify the library search path during the compilation of Binutils, resulting in /tools/lib being passed to the linker. This prevents the linker from searching through library directories on the host. # --disable-nls # This disables internationalization as i18n is not needed for the cross-compile tools. # --enable-shared # Enable the creation of the shared libraries. # --disable-multilib # This option disables the building of a multilib capable Binutils. cd ${LFS_TMP}/${1}-build AR=ar AS=as ../${1}/configure \ --prefix=/cross-tools \ --host=${CLFS_HOST} \ --target=${CLFS_TARGET} \ --with-sysroot=${CLFS} \ --with-lib-path=/tools/lib \ --disable-nls \ --enable-shared \ --disable-multilib \ ${TARGET_CONFIGURE_OPTS} ${HVMAKE} configure-host ${HVMAKE} ${HVMAKE} install cp -v ../${1}/include/libiberty.h /tools/include exit $?