#!/bin/sh # Reading system configuration informations, functions and package versions. source ../sysinfos source ../functions source ../packages-list # Saves CFLAGS and CXXFLAGS, and clears them. save_flags_no_optimizations # Applying patches (if any) apply_patches ${1} && # CC="gcc -B/usr/bin/": This forces gcc to prefer the linker from the host in /usr/bin. # This is necessary on some hosts where the new ld built here is # not compatible with the host's gcc. # --disable-nls: This disables internationalization as i18n is not needed # for the temporary tools. cd ${LFS_TMP}/${1}-build && CC="gcc -B/usr/bin/" ../${1}/configure \ --prefix=/tools \ --disable-nls \ --disable-werror && make -j ${MAKEJOBS} && make install && # Removing all compiled files in ld subdirectory. make -j ${MAKEJOBS} -C ld clean && make -j ${MAKEJOBS} -C ld LIB_PATH=/tools/lib && cp -v ld/ld-new /tools/bin && # Restore original CFLAGS and CXXFLAGS values. restore_flags # Return last error exit $?