X-Git-Url: http://gitweb.hugovil.com/?a=blobdiff_plain;f=stage2%2Fcis-eglibc;h=103a21b7656872a2f3313a3ee8bfe52d0fa6f98c;hb=eb29a384d8d1bcb7efdb7ce9d41666f1bbe02d46;hp=314f30cdec3d3564c8d314f78fc073837178d4cc;hpb=f9cf3632a64429991fa5e6f556b0c4017e0e9435;p=hvlinux.git diff --git a/stage2/cis-eglibc b/stage2/cis-eglibc index 314f30c..103a21b 100755 --- a/stage2/cis-eglibc +++ b/stage2/cis-eglibc @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash set -o errexit # First argument of this script is the package name. @@ -13,8 +13,22 @@ PACKAGE=${1} shift CONFIGURE_OPTS=${*} -# Applying patches (if any) -apply_patches ${PACKAGE} +EGLIBC_VER=$(echo ${PACKAGE} | sed "s!eglibc-\([0-9]*\.[0-9]*\.[0-9]*\)-.*!\1!g") + +case "${HVL_TARGET}" in + "x86" | "x86_64") + # Manually apply patch + apply_patch ${PACKAGE}-rpath.patch ${PACKAGE} + ;; +esac + +TMP_CFLAGS="-mtune=generic -g -O2" + +case "${HVL_TARGET}" in + "x86") + TMP_CFLAGS="-march=$(cut -d- -f1 <<< ${CLFS_TARGET}) ${TMP_CFLAGS}" + ;; +esac # When running make install, a script called test-installation.pl # performs a small sanity test on our newly installed Glibc. However, @@ -40,12 +54,12 @@ esac # Configure options: # --libexecdir=/usr/lib/eglibc # Changes the location of the pt_chown program from its default of /usr/libexec to /usr/lib/eglibc. -CFLAGS="-march=$(cut -d- -f1 <<< $MACHTYPE) -mtune=generic -g -O2" \ - ../${PACKAGE}/configure \ +CFLAGS=${TMP_CFLAGS} \ + ../${PACKAGE}/configure \ --prefix=/usr \ --disable-profile \ --enable-add-ons \ - --enable-kernel=2.6.32 \ + --enable-kernel=$(get_pkg_ver ${KERNEL}) \ --libexecdir=/usr/lib/eglibc \ ${CONFIGURE_OPTS} make @@ -59,7 +73,7 @@ case "${HVL_TARGET}" in # 32-bit loader which has a different name from the 64-bit loader # (unlike on other 64-bit architectures). We fool it by creating a # symlink to the real loader. - ln -svfT ld-$(get_pkg_ver ${PACKAGE}).so /lib/ld-linux.so.2 + ln -svfT ld-${EGLIBC_VER}.so /lib/ld-linux.so.2 make install # Now we can remove this symlink.