#!/bin/sh # Reading system configuration informations, functions and package versions. source ../sysinfos source ../functions source ../packages-list # Applying patches (if any) apply_patches ${1} && cd ${LFS_TMP}/${1} && # In the vi_VN.TCVN locale, bash enters an infinite loop at startup. # It is unknown whether this is a bash bug or a Glibc problem. # Disable installation of this locale in order to avoid the problem: sed -i '/vi_VN.TCVN/d' localedata/SUPPORTED && # When running make install, a script called test-installation.pl # performs a small sanity test on our newly installed Glibc. However, # because our toolchain still points to the /tools directory, the # sanity test would be carried out against the wrong Glibc. We can # force the script to check the Glibc we have just installed with: sed -i 's|libs -o|libs -L/usr/lib -Wl,-dynamic-linker=/lib/ld-linux.so.2 -o|' \ scripts/test-installation.pl && # The ldd shell script contains Bash-specific syntax. Change its # default program interpreter to /bin/bash in case another /bin/sh # is installed as described in the Shells chapter of the BLFS book: sed -i 's|@BASH@|/bin/bash|' elf/ldd.bash.in && # Configure options: # --disable-profile # Builds the libraries without profiling information. # --enable-add-ons # Use all the add-ons it finds. # crypt and localdata are now part of glibc. # --enable-kernel=2.x.x # Compile the library for support of linux 2.6.x kernels. # The kernel version specified must not be newer than the # version of the kernel running on the build machine. # --without-gd # Prevents the build of the memusagestat program, which # strangely enough insists on linking against the host's # libraries (libgd, libpng, libz, and so forth). cd ${LFS_TMP}/${1}-build && ../${1}/configure \ --prefix=/usr \ --disable-profile \ --enable-add-ons \ --enable-kernel=${GLIBC_KERNEL_VERSION} \ --libexecdir=/usr/lib/glibc && make -j ${MAKEJOBS} && mkdir -p /tools/etc && touch /tools/etc/ld.so.conf && make install # The following instructions, instead of the install-locales target # above, will install the minimum set of locales necessary for the # tests to run successfully: mkdir -v -p /usr/lib/locale && localedef -i de_DE -f ISO-8859-1 de_DE && localedef -i de_DE@euro -f ISO-8859-15 de_DE@euro && localedef -i en_HK -f ISO-8859-1 en_HK && localedef -i en_PH -f ISO-8859-1 en_PH && localedef -i en_US -f ISO-8859-1 en_US && localedef -i en_US -f UTF-8 en_US.UTF-8 && localedef -i es_MX -f ISO-8859-1 es_MX && localedef -i fa_IR -f UTF-8 fa_IR && localedef -i fr_CA -f UTF-8 fr_CA.UTF-8 && localedef -i fr_CA -f ISO-8859-1 fr_CA && localedef -i ca_FR -f UTF-8 ca_FR.UTF-8 && localedef -i ca_FR -f ISO-8859-1 ca_FR && localedef -i fr_FR -f ISO-8859-1 fr_FR && localedef -i fr_FR@euro -f ISO-8859-15 fr_FR@euro && localedef -i fr_FR -f UTF-8 fr_FR.UTF-8 && localedef -i it_IT -f ISO-8859-1 it_IT && localedef -i ja_JP -f EUC-JP ja_JP && cat > /etc/nsswitch.conf << "EOF" && # /etc/nsswitch.conf passwd: files group: files shadow: files hosts: files dns networks: files protocols: files services: files ethers: files rpc: files EOF ln -sf ${TIMEZONE} /usr/share/zoneinfo/localtime && cp --remove-destination /usr/share/zoneinfo/${TIMEZONE} /etc/localtime && cat > /etc/ld.so.conf << "EOF" # /etc/ld.so.conf /usr/local/lib /opt/lib EOF # Return last error exit $?