From 018cf3de3feb33ea95f01e1a490ec6cc93a50928 Mon Sep 17 00:00:00 2001 From: Christian Wiese Date: Sun, 10 Feb 2008 00:51:23 +0200 Subject: [PATCH] Improved glibc to handle multilib in combination with the new multlib parse-config --- base/glibc/glibc.conf | 36 +++++++++++++++++++++++++++++++----- 1 file changed, 31 insertions(+), 5 deletions(-) diff --git a/base/glibc/glibc.conf b/base/glibc/glibc.conf index 08e7a1fb5..71c735cb9 100644 --- a/base/glibc/glibc.conf +++ b/base/glibc/glibc.conf @@ -32,8 +32,35 @@ if atstage toolchain; then fi else var_append confopt " " "--with-headers=$root/usr/include" + + if [ "${SDECFG_MULTILIB:-0}" = 1 ] ; then + # set the ABI for each buildloop + echo_status "Glibc Buildloop: $buildloop" + hook_add preconf 3 'multilib_abi_loop $buildloop' + else + abi="$SDECFG_ABI_DEFAULT" + fi + + if [ $buildloop -lt $buildloops ]; then + # as long as we did not reached the last loop we have to chdir + # back to the top-level source directory before we enter the + # next loop. + hook_add postmake 9 'cd .. ; pwd' + fi + + # set slibdir according to the ABI we build + hook_add preconf 4 'pkg_glibc_set_slibdir $abi' fi +# function to set slibdir depending on the ABI given as argument +pkg_glibc_set_slibdir() { + slibdir="lib$1" + echo_status "slibdir: $slibdir" +} + +# use at least "-O" when build without optimisation for debugging ... +var_insert GCC_WRAPPER_INSERT " " "-O" + # glibc does not like -ffast-math var_insert GCC_WRAPPER_REMOVE " " "-ffast-math" @@ -50,9 +77,10 @@ hook_add preconf 3 "pkg_glibc_preconf" # We have to use an 'objdir' directory for building glibc and make its # name unique by appending $arch_target to distinguish while building # a multilib capable glibc using buildloops. -pkg_glibc_objdir() { - mkdir -p "objdir-$arch_target" - cd "objdir-$arch_target" + +pkg_glibc_objdir(){ + mkdir -p "objdir-$abi" + cd "objdir-$abi" } hook_add preconf 9 "pkg_glibc_objdir" @@ -253,8 +281,6 @@ if atstage toolchain; then makeinstopt="-k cross-compiling=yes install-headers" fi -[[ $libdir = *lib64 ]] && slibdir=lib64 || slibdir=lib - hook_add prepatch 3 "glibc_prepatch" hook_add postmake 5 "glibc_postmake"