Никак не получается собрать glibc для своего toolchain.
Собираю так
TARGET=arm-qivb-linux-gnueabi
PREFIX=$PWD/$TARGET
SYSROOT=$PREFIX/sys-root
TARGET_SPECS="libc_cv_forced_unwind=yes libc_cv_c_cleanup=yes"
export PATH=$PREFIX/bin:$PATH
LINUX_VERSION=2.6-imx-rel_imx_2.6.35_10.12.01_RC4
BINUTILS_VERSION=2.21.53.0.1
GCC_VERSION=linaro-4.5-2011.08
GLIBC_VERSION=2.13
CUR_DIR=$PWD
SRC_DIR=$PWD/src
BUILD_DIR=$PWD/build
mkdir -p $SRC_DIR
mkdir -p $BUILD_DIR
#Linux Kernel Header
echo -n "Extract linux kernel... "
tar -xzf linux-$LINUX_VERSION.tar.gz -C $SRC_DIR
echo -n "Install kernel headers..."
mkdir -p $BUILD_DIR/linux-$LINUX_VERSION
cd $SRC_DIR/linux-$LINUX_VERSION
make -j4 O=$BUILD_DIR/linux-$LINUX_VERSION ARCH=arm INSTALL_HDR_PATH=$SYSROOT/usr headers_install
make -j4 O=$BUILD_DIR/linux-$LINUX_VERSION ARCH=arm INSTALL_HDR_PATH=$SYSROOT/usr headers_check
cd $CUR_DIR
#GNU binutils
echo "Extract binutils... "
tar -xjf binutils-$BINUTILS_VERSION.tar.bz2 -C $SRC_DIR
echo "Configure binutils... "
mkdir -p $BUILD_DIR/binutils-$BINUTILS_VERSION
cd $BUILD_DIR/binutils-$BINUTILS_VERSION
$SRC_DIR/binutils-$BINUTILS_VERSION/configure --prefix=$PREFIX \
--target=$TARGET \
--with-sysroot=$SYSROOT \
--disable-multilib \
--disable-werror \
--disable-nls
echo "Build binutils... "
make -j4
make install
cd $CUR_DIR
# Stage 1 GCC
echo -n "Extract gcc... "
tar -xjf gcc-$GCC_VERSION.tar.bz2 -C $SRC_DIR
echo -n "Configure static gcc..."
mkdir -p $BUILD_DIR/gcc-$GCC_VERSION
cd $BUILD_DIR/gcc-$GCC_VERSION
$SRC_DIR/gcc-$GCC_VERSION/configure --target=$TARGET \
--prefix=$PREFIX \
--with-local-prefix=$SYSROOT \
--with-sysroot=$SYSROOT \
--with-newlib \
--disable-multilib \
--disable-libmudflap \
--disable-shared \
--enable-threads=no \
--enable-__cxa_atexit \
--enable-target-optspace \
--disable-nls \
--enable-languages=c
echo -n "Build static gcc... "
make -j4 all-gcc
make install-gcc
cd $CUR_DIR
#GNU C Library
echo "Install glibs start files:"
mkdir -p $BUILD_DIR/glibc-$GLIBC_VERSION_1
cd $BUILD_DIR/glibc-$GLIBC_VERSION_1
echo -n " configure... "
BUILD_CC=gcc CC=${TARGET}-gcc AR=${TARGET}-ar RANLIB=${TARGET}-ranlib LDFLAGS="" \
$SRC_DIR/glibc-$GLIBC_VERSION/configure --prefix=/$PREFIX \
--build=i686-pc-linux-gnu \
--host=${TARGET} \
--without-cvs \
--disable-profile \
--disable-debug \
--without-gd \
--with-headers=$SYSROOT/usr/include \
--cache-file=config.cache \
--with-__thread \
--with-tls \
--enable-shared \
$TARGET_SPECS \
--enable-add-ons=nptl,ports \
--enable-kernel=2.6.35 \
--with-fp \
--with-binutils=$PREFIX/bin
Последний шаг заканчивается ошибкой
Цитата
checking for ld --version-script... no
*** WARNING: You should not compile GNU libc without versioning. Not using
*** versioning will introduce incompatibilities so that old binaries
*** will not run anymore.
*** For versioning you need recent binutils (binutils-2.8.1.0.23 or newer).
checking for .previous assembler directive... yes
checking for .protected and .hidden assembler directive... yes
checking whether __attribute__((visibility())) is supported... yes
checking for broken __attribute__((visibility()))... no
checking for broken __attribute__((alias()))... no
checking whether to put _rtld_local into .sdata section... no
checking for .preinit_array/.init_array/.fini_array support... no
configure: error: Need linker with .init_array/.fini_array support.
У кого есть опыт в этом деле, как собрать glibc своими руками?