cookutils rev 440

Let have a more complet cross-toolchain
author Christophe Lincoln <pankso@slitaz.org>
date Sat May 26 03:34:18 2012 +0200 (2012-05-26)
parents 5bd627d11dc8
children f2202b3af38a
files cross cross.conf
line diff
     1.1 --- a/cross	Wed May 23 13:33:29 2012 +0200
     1.2 +++ b/cross	Sat May 26 03:34:18 2012 +0200
     1.3 @@ -34,7 +34,6 @@
     1.4    gcc-static      Compile GCC static
     1.5    glibc           Compile GNU Glibc
     1.6    gcc-final       Compile final GCC
     1.7 -  busybox         Cross compile Busybox
     1.8    compile         Compile everything at once
     1.9    clean           Clean-up build environment
    1.10    clean-tools     Clean: $PREFIX
    1.11 @@ -135,13 +134,14 @@
    1.12  	rm -rf binutils-$BINUTILS_VERSION
    1.13  	echo "Extracting: $BINUTILS_TARBALL"
    1.14  	tar xjf $SRC/$BINUTILS_TARBALL
    1.15 -	: ${BINUTILS_ARGS=--enable-shared}
    1.16  	echo "Configure: $BINUTILS_ARGS"
    1.17  	check_sysroot
    1.18  	cd binutils-$BINUTILS_VERSION
    1.19  	./configure \
    1.20  		--prefix=$PREFIX \
    1.21  		--target=$TARGET \
    1.22 +		--enable-plugins \
    1.23 +		--enable-threads \
    1.24  		--enable-targets=$BUILD_SYSTEM \
    1.25  		$BINUTILS_ARGS $sysroot
    1.26  	make || exit 1
    1.27 @@ -264,30 +264,18 @@
    1.28  		--enable-c99 \
    1.29  		--enable-long-long \
    1.30  		--enable-__cxa_atexit \
    1.31 +		--with-system-zlib \
    1.32 +		--enable-plugin \
    1.33 +		--disable-multilib \
    1.34 +		--disable-libssp \
    1.35  		--with-pkgversion="SliTaz" \
    1.36 +		--with-bugurl="https://bugs.slitaz.org/" \
    1.37  		$GCC_FINAL_ARGS $sysroot
    1.38  	make || exit 1
    1.39  	make install &&
    1.40  	echo "cross: GCC final compiled on: $(date)"
    1.41  }
    1.42  
    1.43 -# Build Busybox to we can create prebuilt tiny rootfs image and boot
    1.44 -# from NFS ?
    1.45 -cross_busybox() {
    1.46 -	init_compile
    1.47 -	echo "Extracting: $BUSYBOX_TARBALL"
    1.48 -	tar xjf $SRC/$BUSYBOX_TARBALL
    1.49 -	cd busybox-$BUSYBOX_VERSION
    1.50 -	# CROSS_COMPILE is exported via init_compile.
    1.51 -	make defconfig
    1.52 -	make || exit 1
    1.53 -	make install
    1.54 -	chmod 4755 _install/bin/busybox
    1.55 -	readelf -h _install/bin/busybox
    1.56 -	echo "cross: busybox install path: $(pwd)/_install"
    1.57 -	echo "cross: busybox compiled on: $(date)"
    1.58 -}
    1.59 -
    1.60  #
    1.61  # Commands
    1.62  #
    1.63 @@ -372,8 +360,6 @@
    1.64  		glibc 2>&1 | tee $logdir/glibc.log ;;
    1.65  	gcc-final)
    1.66  		gcc_final 2>&1 | tee $logdir/gcc-final.log ;;
    1.67 -	busybox)
    1.68 -		cross_busybox 2>&1 | tee $logdir/busybox.log ;;
    1.69  	compile)
    1.70  		# Compile the full toolchain.
    1.71  		time=$(date +%s)
    1.72 @@ -402,12 +388,11 @@
    1.73  		# Remove crap :-)
    1.74  		init_compile
    1.75  		echo "Cleaning   : $PREFIX ($(du -sh $PREFIX | awk '{print $1}'))"
    1.76 -		for dir in info man locale
    1.77 +		for file in share/info share/man lib/*-gdb.py
    1.78  		do
    1.79 -			echo -n "Removing   : $dir"
    1.80 -			rm -rf $PREFIX/share/$dir && status
    1.81 +			echo -n "Removing   : $file"
    1.82 +			rm -rf $PREFIX/$file && status
    1.83  		done
    1.84 -		rm -f $PREFIX/lib/*-gdb.py
    1.85  		echo -n "Stripping  : shared libs and binaries"
    1.86  		${TARGET}-strip -s $PREFIX/lib/*.so* 2>/dev/null
    1.87  		${TARGET}-strip -s $PREFIX/bin/* 2>/dev/null
     2.1 --- a/cross.conf	Wed May 23 13:33:29 2012 +0200
     2.2 +++ b/cross.conf	Sat May 26 03:34:18 2012 +0200
     2.3 @@ -43,7 +43,7 @@
     2.4  BINUTILS_ARGS="--enable-shared"
     2.5  GLIBC_ARGS="--enable-add-ons"
     2.6  GCC_STATIC_ARGS="--enable-languages=c"
     2.7 -GCC_FINAL_ARGS="--enable-languages=c,c++"
     2.8 +GCC_FINAL_ARGS="--enable-languages=c,c++,objc"
     2.9  
    2.10  # List of packages installed in chroot by cook or the Cooker setup.
    2.11  # When cross compiling we need some build system tools installed and