From b35d3f306d43e23a549e43c28c36a60b890db404 Mon Sep 17 00:00:00 2001 From: Christian Wiese Date: Mon, 11 Feb 2008 19:46:59 +0200 Subject: [PATCH] Improved glibc postmake handling moving toolchain related parts in an own function and removed obsolete creation of stubs-{32,64}.h --- base/glibc/glibc.conf | 29 ++++++++++++----------------- 1 file changed, 12 insertions(+), 17 deletions(-) diff --git a/base/glibc/glibc.conf b/base/glibc/glibc.conf index b32d0be10..3704aa79f 100644 --- a/base/glibc/glibc.conf +++ b/base/glibc/glibc.conf @@ -13,6 +13,16 @@ # GNU General Public License can be found in the file COPYING. # --- SDE-COPYRIGHT-NOTE-END --- +# copy/create some needed header files +pkg_glibc_postmake_headers() { + mkdir -p $includedir/{bits,gnu} + cp -v ../include/features.h $root$includedir + [ -e $root$includedir/bits/stdio_lim.h ] || + touch $root$includedir/bits/stdio_lim.h + [ -e $root$includedir/gnu/stubs.h ] || + touch $root$includedir/gnu/stubs.h +} + # overwrite prefix to not point to the tools, but the real root for the headers if atstage toolchain; then # hack due to sane variable not available and prefix is tools prefix @@ -30,6 +40,8 @@ if atstage toolchain; then echo_warning "Old gcc detected: Working around cpuid.h support" var_append SYSCC_WRAPPER_APPEND ' ' "-I$confdir/include-old-gcc" fi + + hook_add postmake 5 'pkg_glibc_postmake_headers' else var_append confopt " " "--with-headers=$root/usr/include" @@ -151,27 +163,10 @@ glibc_prepatch() { tar -v --dereference ${taropt} $tarball rm $tarname done - - mkdir -p $root$includedir/gnu/ - - if [ $pkg == glibc ]; then - touch $root$includedir/gnu/stubs.h - if [ $slibdir = lib64 ]; then - touch $root$includedir/gnu/stubs{-32,-64}.h - fi - fi } glibc_postmake() { - if atstage toolchain; then - cp -v ../include/features.h $root$includedir - mkdir -p $includedir/{bits,gnu} - [ -e $root$includedir/bits/stdio_lim.h ] || - touch $root$includedir/bits/stdio_lim.h - return - fi - ln -sf libbsd-compat.a $root/usr/$slibdir/libbsd.a # Misc. stuff