X-Git-Url: http://gitweb.hugovil.com/?a=blobdiff_plain;f=stage2%2Fpkg%2Feglibc;h=0d07767bb9d8c4c0701c46be4ecf89486fb639c3;hb=28a8892723b15670ebc1fba2a1d093bef4b85154;hp=a4ebe94860d3ee7b2310b1e46eeee599f36f5e09;hpb=3605ab38ca7604b1fe43c3bce5e4963730a85d39;p=hvlinux.git diff --git a/stage2/pkg/eglibc b/stage2/pkg/eglibc index a4ebe94..0d07767 100644 --- a/stage2/pkg/eglibc +++ b/stage2/pkg/eglibc @@ -2,30 +2,28 @@ hvconfig_pre() { - CFLAGS="-mtune=generic -g -O2" - - CONFIGURE_OPTS="\ + CONFIGURE_OPTS+=" \ --disable-profile \ --enable-add-ons \ --enable-kernel=$(get_pkg_ver ${KERNEL}) \ - --libexecdir=/usr/lib/eglibc \ - ${CONFIGURE_OPTS}" + --libexecdir=/usr/lib/eglibc" - case "${HVL_TARGET}" in - "x86") - CFLAGS="-march=$(cut -d- -f1 <<< ${CLFS_TARGET}) ${CFLAGS}" - ;; - esac + cd ${LFS_TMP}/${PACKAGE} + + # At the end of the installation, the build system will run a sanity test to + # make sure everything installed properly. This script will attempt to test + # for a library that is only used in the test suite and is never installed. + # Prevent the script from testing for this library with the following command: + sed -i 's/\(&& $name ne\) "db1"/ & \1 "nss_test1"/' scripts/test-installation.pl # 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: - cd ${LFS_TMP}/${PACKAGE} LINKER=$(readelf -l $(file /tools/lib/libc-* | cut -f1 -d:) | sed -n 's@.*interpret.*/tools\(.*\)]$@\1@p') sed -i "s|libs -o|libs -L/usr/lib -Wl,-dynamic-linker=${LINKER} -o|" \ - scripts/test-installation.pl + scripts/test-installation.pl unset LINKER cd ${LFS_TMP}/${PACKAGE}-build @@ -34,7 +32,7 @@ hvconfig_pre() "x86_64") # Tell EGLIBC to install its libraries into /lib: echo "slibdir=/lib" >> configparms - CONFIGURE_OPTS="${CONFIGURE_OPTS} --libdir=/usr/lib" + CONFIGURE_OPTS+=" --libdir=/usr/lib" ;; esac } @@ -52,8 +50,10 @@ hvbuild() # 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. - EGLIBC_VER_BASE=$(echo ${PACKAGE} | sed "s!eglibc-\([^-]*\)-.*!\1!g") - ln -svfT ld-${EGLIBC_VER_BASE}.so /lib/ld-linux.so.2 + local EGLIBC_VER=$(cat ${LFS_TMP}/${PACKAGE}/version.h | \ + grep "VERSION" | sed "s!.*VERSION\ \"\(.*\)\"!\1!") + + ln -svfT ld-${EGLIBC_VER}.so /lib/ld-linux.so.2 make install # Now we can remove this symlink.