1.1 --- a/scripts/build/libc/glibc.sh Tue Nov 17 23:41:49 2009 +0100
1.2 +++ b/scripts/build/libc/glibc.sh Tue Jan 12 21:09:30 2010 +0100
1.3 @@ -103,6 +103,7 @@
1.4 do_libc_headers() {
1.5 local cvs
1.6 local -a extra_config
1.7 + local arch4hdrs
1.8
1.9 CT_DoStep INFO "Installing C library headers"
1.10
1.11 @@ -113,6 +114,13 @@
1.12
1.13 CT_DoLog EXTRA "Configuring C library"
1.14
1.15 + # The x86 arch needs special care... Bizarelly enough... :-(
1.16 + case "${CT_KERNEL_ARCH}:${CT_ARCH_BITNESS}" in
1.17 + x86:32) arch4hdrs="i386";;
1.18 + x86:64) arch4hdrs="x86_64";;
1.19 + *) arch4hdrs="${CT_KERNEL_ARCH}";;
1.20 + esac
1.21 +
1.22 # The following three things have to be done to build glibc-2.3.x, but they don't hurt older versions.
1.23 # 1. override CC to keep glibc's configure from using $TARGET-gcc.
1.24 # 2. disable linuxthreads, which needs a real cross-compiler to generate tcb-offsets.h properly
1.25 @@ -230,9 +238,9 @@
1.26 # NOTE: for some archs, the pathes are different, but they are not
1.27 # supported by crosstool-NG right now. See original crosstool when they are.
1.28 pthread_h="${CT_SRC_DIR}/glibc-${cvs}${CT_LIBC_VERSION}/${CT_THREADS}/sysdeps/pthread/pthread.h"
1.29 - pthreadtypes_h="${CT_SRC_DIR}/glibc-${cvs}${CT_LIBC_VERSION}/nptl/sysdeps/unix/sysv/linux/${CT_KERNEL_ARCH}/bits/pthreadtypes.h"
1.30 + pthreadtypes_h="${CT_SRC_DIR}/glibc-${cvs}${CT_LIBC_VERSION}/nptl/sysdeps/unix/sysv/linux/${arch4hdrs}/bits/pthreadtypes.h"
1.31 if [ ! -f "${pthreadtypes_h}" ]; then
1.32 - pthreadtypes_h="${CT_SRC_DIR}/glibc-${cvs}${CT_LIBC_VERSION}/ports/sysdeps/unix/sysv/linux/${CT_KERNEL_ARCH}/nptl/bits/pthreadtypes.h"
1.33 + pthreadtypes_h="${CT_SRC_DIR}/glibc-${cvs}${CT_LIBC_VERSION}/ports/sysdeps/unix/sysv/linux/${arch4hdrs}/nptl/bits/pthreadtypes.h"
1.34 fi
1.35 ;;
1.36 linuxthreads)