diff --git a/base/glibc/glibc.conf b/base/glibc/glibc.conf index 1a21db16f..e0370d0ff 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 @@ -24,6 +34,8 @@ if atstage toolchain; then # MIPS injects -mabi - the host CC does not know about it for header gen var_append SYSCC_WRAPPER_REMOVE ' ' '-mabi*' var_append SYSCPP_WRAPPER_REMOVE ' ' '-mabi*' + + hook_add postmake 5 'pkg_glibc_postmake_headers' else var_append confopt " " "--with-headers=$root/usr/include" @@ -133,27 +145,10 @@ glibc_prepatch() { tar -v ${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