From d105f701fd9921c706bcf9e0c8cca5cf838a7843 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 | 30 ++++++++++++++++++++++++++---- 1 file changed, 26 insertions(+), 4 deletions(-) diff --git a/base/glibc/glibc.conf b/base/glibc/glibc.conf index 9a73d79ed..b32d0be10 100644 --- a/base/glibc/glibc.conf +++ b/base/glibc/glibc.conf @@ -32,8 +32,32 @@ if atstage toolchain; then fi else var_append confopt " " "--with-headers=$root/usr/include" + + if [ "$SDECFG_MULTILIB" == 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 -eq $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 @@ -53,8 +77,8 @@ hook_add preconf 3 "pkg_glibc_preconf" # 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" + mkdir -p "objdir-$abi" + cd "objdir-$abi" } hook_add preconf 9 "pkg_glibc_objdir" @@ -256,8 +280,6 @@ if atstage toolchain; then makeinstopt="-k cross-compiling=yes install-headers" fi -[[ $libdir = *lib64 ]] && slibdir=lib64 || slibdir=lib - #if atstage cross; then # var_append patchfiles " " $confdir/no_path_in_glibcso.diff #fi