Browse Source

Improved glibc to handle multilib in combination with the new multlib parse-config

user/amery/janus
Christian Wiese 17 years ago
committed by Alejandro Mery
parent
commit
018cf3de3f
1 changed files with 31 additions and 5 deletions
  1. +31
    -5
      base/glibc/glibc.conf

+ 31
- 5
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"

Loading…
Cancel
Save