X-Git-Url: http://gitweb.hugovil.com/?a=blobdiff_plain;f=stage0%2Fpkg%2Feglibc;h=d86bf1aeee7dd7128fa3e3836fc1df0faa618cc2;hb=f17ab848cb756cad27489bf0c2746e5ead466658;hp=4d98d1b0510ed7cf0804ac12ffe4cbe4cabd24c6;hpb=69ac3e7cf686f8e95e47a7ab89bc38796aace488;p=hvlinux.git diff --git a/stage0/pkg/eglibc b/stage0/pkg/eglibc index 4d98d1b..d86bf1a 100644 --- a/stage0/pkg/eglibc +++ b/stage0/pkg/eglibc @@ -1,17 +1,37 @@ #!/bin/bash -hvpatch() +hvconfig_pre() { - case "${HVL_TARGET}" in - "x86" | "x86_64") - # Manually apply patch - #apply_patch ${1}-rpath.patch ${1} - ;; - esac + export BUILD_CC="gcc" + export CC="${CLFS_TARGET}-gcc ${CLFS_BUILDFLAGS}" + export AR="${CLFS_TARGET}-ar" + export RANLIB="${CLFS_TARGET}-ranlib" + + CONFIGURE_OPTS="\ + --prefix=/tools \ + --host=${CLFS_TARGET} \ + --build=${CLFS_HOST} \ + --disable-profile \ + --enable-add-ons \ + --with-tls \ + --enable-kernel=$(get_pkg_ver3 ${KERNEL}) \ + --with-__thread \ + --with-binutils=/cross-tools/bin \ + --with-headers=/tools/include" + + cd ${LFS_TMP}/${PACKAGE} + + decompress_package ${EGLIBC_PORTS} $(pwd) 1> /dev/null + + # libgcc_eh.a does not get built if building GCC with `--disable-shared'. + # The objects that would otherwise end up in libgcc_eh.a end up in libgcc.a + # instead. Unfortunately, Glibc insists upon linking with `-lgcc_eh'. + # Therefore, disable linking to libgcc_eh: + sed -e 's/-lgcc_eh//g' -i Makeconfig } # For Glibc to support NPTL: -config_cache() +hvconfig_cache() { cat > ${LFS_TMP}/${PACKAGE}-build/config.cache << EOF libc_cv_forced_unwind=yes @@ -21,23 +41,16 @@ libc_cv_ssp=no EOF } -configure_pre() +hvbuild() { - case "${HVL_TARGET}" in - "x86") - CFLAGS="-march=$(cut -d- -f1 <<< ${CLFS_TARGET}) -mtune=native -g -O2" - ;; - "x86_64") - CFLAGS="-mtune=native -g -O2" - ;; - esac - - cd ${LFS_TMP}/${PACKAGE} - - decompress_package ${EGLIBC_PORTS} $(pwd) 1> /dev/null - - # Disable linking to libgcc_eh: - sed -e 's/-lgcc_eh//g' -i Makeconfig + ${HVMAKE} + ${HVMAKE} install inst_vardbdir=/tools/var/db +} - DEFAULT_CONFIGURE_PREFIX=/tools +hvconfig_post() +{ + unset BUILD_CC + unset CC + unset AR + unset RANLIB }