-#!/bin/sh
+#!/bin/bash
set -o errexit
# Reading system configuration informations, functions and package versions.
source ../functions
source ../packages-list
-# Manually apply patch
-apply_patch ${1}-rpath.patch ${1}
+case "${HVL_TARGET}" in
+ "x86" | "x86_64")
+ # Manually apply patch
+ apply_patch ${1}-rpath.patch ${1}
+ ;;
+esac
case "${HVL_TARGET}" in
"x86")
cd ${LFS_TMP}/${1}
+decompress_package ${EGLIBC_PORTS} $(pwd) 1> /dev/null
+
# Disable linking to libgcc_eh:
-cp -v Makeconfig{,.orig}
-sed -e 's/-lgcc_eh//g' Makeconfig.orig > Makeconfig
+sed -e 's/-lgcc_eh//g' -i Makeconfig
cd ${LFS_TMP}/${1}-build
# Configure options:
# BUILD_CC="gcc"
-# This sets Glibc to use the current compiler on our system. This is used to create the tools Glibc uses during its build.
+# This sets Glibc to use the current compiler on our system. This is used to
+# create the tools Glibc uses during its build.
# CC="${CLFS_TARGET}-gcc ${CLFS_BUILDFLAGS}"
-# Forces Glibc to build using our target architecture GCC utilizing any special CLFS build flags.
+# Forces Glibc to build using our target architecture GCC utilizing any
+# special CLFS build flags.
# AR="${CLFS_TARGET}-ar"
-# This forces Glibc to use the ar utility we made for our target architecture.
+# This forces Glibc to use the ar utility we made for our target
+# architecture.
# RANLIB="${CLFS_TARGET}-ranlib"
-# This forces Glibc to use the ranlib utility we made for our target architecture.
+# This forces Glibc to use the ranlib utility we made for our target
+# architecture.
#
# --disable-profile
-# This builds the libraries without profiling information. Omit this option if profiling on the temporary tools is necessary.
+# This builds the libraries without profiling information.
# --enable-add-ons
# This tells Glibc to utilize all add-ons that are available.
# --with-tls
# --with-__thread
# This tells Glibc to use use the __thread for libc and libpthread builds.
# --with-binutils=/cross-tools/bin
-# This tells Glibc to use the Binutils that are specific to our target architecture.
+# This tells Glibc to use the Binutils that are specific to our target
+# architecture.
# --disable-profile
# Builds the libraries without profiling information.
BUILD_CC="gcc" \