# HG changeset patch # User Christophe Lincoln # Date 1337996058 -7200 # Node ID eba46d355d8cbafd6f858b357d505e5281c65877 # Parent 5bd627d11dc83619f9b20c2747cf94e139e12285 Let have a more complet cross-toolchain diff -r 5bd627d11dc8 -r eba46d355d8c cross --- a/cross Wed May 23 13:33:29 2012 +0200 +++ b/cross Sat May 26 03:34:18 2012 +0200 @@ -34,7 +34,6 @@ gcc-static Compile GCC static glibc Compile GNU Glibc gcc-final Compile final GCC - busybox Cross compile Busybox compile Compile everything at once clean Clean-up build environment clean-tools Clean: $PREFIX @@ -135,13 +134,14 @@ rm -rf binutils-$BINUTILS_VERSION echo "Extracting: $BINUTILS_TARBALL" tar xjf $SRC/$BINUTILS_TARBALL - : ${BINUTILS_ARGS=--enable-shared} echo "Configure: $BINUTILS_ARGS" check_sysroot cd binutils-$BINUTILS_VERSION ./configure \ --prefix=$PREFIX \ --target=$TARGET \ + --enable-plugins \ + --enable-threads \ --enable-targets=$BUILD_SYSTEM \ $BINUTILS_ARGS $sysroot make || exit 1 @@ -264,30 +264,18 @@ --enable-c99 \ --enable-long-long \ --enable-__cxa_atexit \ + --with-system-zlib \ + --enable-plugin \ + --disable-multilib \ + --disable-libssp \ --with-pkgversion="SliTaz" \ + --with-bugurl="https://bugs.slitaz.org/" \ $GCC_FINAL_ARGS $sysroot make || exit 1 make install && echo "cross: GCC final compiled on: $(date)" } -# Build Busybox to we can create prebuilt tiny rootfs image and boot -# from NFS ? -cross_busybox() { - init_compile - echo "Extracting: $BUSYBOX_TARBALL" - tar xjf $SRC/$BUSYBOX_TARBALL - cd busybox-$BUSYBOX_VERSION - # CROSS_COMPILE is exported via init_compile. - make defconfig - make || exit 1 - make install - chmod 4755 _install/bin/busybox - readelf -h _install/bin/busybox - echo "cross: busybox install path: $(pwd)/_install" - echo "cross: busybox compiled on: $(date)" -} - # # Commands # @@ -372,8 +360,6 @@ glibc 2>&1 | tee $logdir/glibc.log ;; gcc-final) gcc_final 2>&1 | tee $logdir/gcc-final.log ;; - busybox) - cross_busybox 2>&1 | tee $logdir/busybox.log ;; compile) # Compile the full toolchain. time=$(date +%s) @@ -402,12 +388,11 @@ # Remove crap :-) init_compile echo "Cleaning : $PREFIX ($(du -sh $PREFIX | awk '{print $1}'))" - for dir in info man locale + for file in share/info share/man lib/*-gdb.py do - echo -n "Removing : $dir" - rm -rf $PREFIX/share/$dir && status + echo -n "Removing : $file" + rm -rf $PREFIX/$file && status done - rm -f $PREFIX/lib/*-gdb.py echo -n "Stripping : shared libs and binaries" ${TARGET}-strip -s $PREFIX/lib/*.so* 2>/dev/null ${TARGET}-strip -s $PREFIX/bin/* 2>/dev/null diff -r 5bd627d11dc8 -r eba46d355d8c cross.conf --- a/cross.conf Wed May 23 13:33:29 2012 +0200 +++ b/cross.conf Sat May 26 03:34:18 2012 +0200 @@ -43,7 +43,7 @@ BINUTILS_ARGS="--enable-shared" GLIBC_ARGS="--enable-add-ons" GCC_STATIC_ARGS="--enable-languages=c" -GCC_FINAL_ARGS="--enable-languages=c,c++" +GCC_FINAL_ARGS="--enable-languages=c,c++,objc" # List of packages installed in chroot by cook or the Cooker setup. # When cross compiling we need some build system tools installed and