# HG changeset patch # User Christophe Lincoln # Date 1338389854 0 # Node ID 8ad3079622f9031cc7803a455ae2fb2b59e18fcd # Parent 7a130d01ba39f8f656a2b84c19348976565a6e89 cross x86_64: we need glibc headers to compile gcc-static diff -r 7a130d01ba39 -r 8ad3079622f9 cross --- a/cross Tue May 29 14:23:13 2012 +0000 +++ b/cross Wed May 30 14:57:34 2012 +0000 @@ -119,6 +119,23 @@ make ARCH=$ARCH headers_install INSTALL_HDR_PATH=$sysroot/usr } +# 2.1 Glibc headers needed to compile x86_64 gcc-static. +glibc_headers() { + init_compile + echo "Extracting: $GLIBC_TARBALL" + tar xjf $SRC/$GLIBC_TARBALL + rm -rf glibc-headers + mkdir glibc-headers && cd glibc-headers + ../glibc-$GLIBC_VERSION/configure \ + --prefix=/usr \ + --host=$TARGET \ + --with-headers=$sysroot/usr/include \ + --without-cvs \ + --disable-sanity-checks \ + --enable-kernel=2.6.32 && + make -k install-headers install_root=$sysroot +} + # 3. GCC static (first pass) gcc_static() { init_compile @@ -369,10 +386,12 @@ binutils) rm -f $logdir/binutils.log binutils 2>&1 | tee $logdir/binutils.log ;; + linux-headers) + linux_headers 2>&1 | tee $logdir/linux-headers.log ;; + glibc-headers) + glibc_headers 2>&1 | tee $logdir/glibc-headers.log ;; gcc-static) gcc_static 2>&1 | tee $logdir/gcc-static.log ;; - linux-headers) - linux_headers 2>&1 | tee $logdir/linux-headers.log ;; glibc) glibc 2>&1 | tee $logdir/glibc.log ;; eglibc) @@ -386,6 +405,9 @@ echo "Compile start: $(date)" | tee $logdir/compile.log download_src binutils 2>&1 | tee $logdir/binutils.log + case "$ARCH" in + x86_64) glibc_headers 2>&1 | tee $logdir/glibc-headers.log ;; + esac gcc_static 2>&1 | tee $logdir/gcc-static.log linux_headers 2>&1 | tee $logdir/linux-headers.log case "$ARCH" in