diff --git a/base/glibc/glibc.conf b/base/glibc/glibc.conf index dc483483d..e2c68f2e0 100644 --- a/base/glibc/glibc.conf +++ b/base/glibc/glibc.conf @@ -37,9 +37,13 @@ var_insert GCC_WRAPPER_REMOVE " " "-ffast-math" # Disable glibc internal debuging but build debuging and profile # code so we can use this glibc to debug other programs. -hook_add preconf 3 "mkdir -p objdir; cd objdir" -configprefix='CFLAGS="$CFLAGS -g -DNDEBUG=1"' -configscript="../configure" +pkg_glibc_preconf(){ + mkdir -p "$builddir/objdir-$buildloop" + cd "$builddir/objdir-$buildloop" + configprefix='CFLAGS="$CFLAGS -g -DNDEBUG=1"' + configscript="../$pkg-$ver/configure" +} +hook_add preconf 3 "pkg_glibc_preconf" var_append confopt " " "--with-gnu-binutils --build=${arch_build} --host=${arch_target}" @@ -112,7 +116,7 @@ glibc_prepatch() { glibc_postmake() { if atstage toolchain; then - cp -v ../include/features.h $root$includedir + cp -v $builddir/$pkg-$ver/include/features.h $root$includedir mkdir -p $includedir/{bits,gnu} [ -e $root$includedir/bits/stdio_lim.h ] || touch $root$includedir/bits/stdio_lim.h @@ -128,29 +132,28 @@ glibc_postmake() # install locales # eval $MAKE localedata/install-locales - cp ../localedata/SUPPORTED $root/usr/share/i18n/ + cp $builddir/$pkg-$ver/localedata/SUPPORTED $root/usr/share/i18n/ if [ "$SDECFG_PKG_GLIBC_TLS" != 1 ]; then # install linuxthread manpages # mkdir -p $root/usr/share/man/man3 if [ -f /usr/bin/perl ]; then - eval $MAKE -C ../linuxthreads/man \ + eval $MAKE -C $builddir/$pkg-$ver/linuxthreads/man \ MANDIR=$root/usr/share/man/man3 all install fi # copy linuxthreads documentation # - cp ../linuxthreads/ChangeLog $docdir/ChangeLog.threads - cp ../linuxthreads/Changes $docdir/Changes.threads - cp ../linuxthreads/README $docdir/README.threads - cp ../linuxthreads/FAQ.html $docdir/FAQ-threads.html - cp -r ../linuxthreads/Examples $docdir/examples.threads + for x in ChangeLog Changes README FAQ.html Examples; do + cp -a $builddir/$pkg-$ver/linuxthreads/$x \ + $docdir/$x.threads + done fi # copy crypt documentation # - cp ../crypt/README.ufc-crypt $docdir/README.crypt + cp $builddir/$pkg-$ver/crypt/README.ufc-crypt $docdir/README.crypt # NSCD Init script and config #