1.1 --- a/scripts/build/libc/glibc-eglibc.sh-common Mon Jan 17 23:04:57 2011 +0100
1.2 +++ b/scripts/build/libc/glibc-eglibc.sh-common Sat Jan 22 22:37:25 2011 +0100
1.3 @@ -60,6 +60,28 @@
1.4 install_root=${CT_SYSROOT_DIR} \
1.5 install-bootstrap-headers=yes
1.6
1.7 + # For glibc, a few headers need to be manually installed
1.8 + if [ "${CT_LIBC}" = "glibc" ]; then
1.9 + # Two headers -- stubs.h and features.h -- aren't installed by install-headers,
1.10 + # so do them by hand. We can tolerate an empty stubs.h for the moment.
1.11 + # See e.g. http://gcc.gnu.org/ml/gcc/2002-01/msg00900.html
1.12 + mkdir -p "${CT_HEADERS_DIR}/gnu"
1.13 + CT_DoExecLog ALL touch "${CT_HEADERS_DIR}/gnu/stubs.h"
1.14 + CT_DoExecLog ALL cp -v "${CT_SRC_DIR}/glibc-${CT_LIBC_VERSION}/include/features.h" \
1.15 + "${CT_HEADERS_DIR}/features.h"
1.16 +
1.17 + # Building the bootstrap gcc requires either setting inhibit_libc, or
1.18 + # having a copy of stdio_lim.h... see
1.19 + # http://sources.redhat.com/ml/libc-alpha/2003-11/msg00045.html
1.20 + CT_DoExecLog ALL cp -v bits/stdio_lim.h "${CT_HEADERS_DIR}/bits/stdio_lim.h"
1.21 +
1.22 + # Following error building gcc-4.0.0's gcj:
1.23 + # error: bits/syscall.h: No such file or directory
1.24 + # solved by following copy; see http://sourceware.org/ml/crossgcc/2005-05/msg00168.html
1.25 + # but it breaks arm, see http://sourceware.org/ml/crossgcc/2006-01/msg00091.html
1.26 + [ "${CT_ARCH}" != "arm" ] && CT_DoExecLog ALL cp -v misc/syscall-list.h "${CT_HEADERS_DIR}/bits/syscall.h" || true
1.27 + fi
1.28 +
1.29 CT_DoLog EXTRA "Installing C library start files"
1.30
1.31 # there are a few object files needed to link shared libraries,