cookutils rev 441

cross: sysroot method is now used (much better), eglibc replace glibc for ARM
author Christophe Lincoln <pankso@slitaz.org>
date Tue May 29 08:03:41 2012 +0000 (2012-05-29)
parents eba46d355d8c
children 1be327c53ee7
files cook.conf cross cross.conf
line diff
     1.1 --- a/cook.conf	Sat May 26 03:34:18 2012 +0200
     1.2 +++ b/cook.conf	Tue May 29 08:03:41 2012 +0000
     1.3 @@ -43,15 +43,12 @@
     1.4  BUILD_SYSTEM="$ARCH-slitaz-linux"
     1.5  HOST_SYSTEM="$ARCH-slitaz-linux"
     1.6  
     1.7 -# Cross compilation settings. Prefix is use by cook to export PATH so it
     1.8 -# can use the cross-tools in $CROSS_PREFIX/bin.
     1.9 -CROSS_PREFIX=/usr/cross/$ARCH
    1.10 -
    1.11 -# Sysroot is used by cross-tools to set the system. SliTaz standard is
    1.12 -# to point sysroot to the directory of the cross toolchain. The default
    1.13 -# is to use cross with: --prefix=/usr/cross/$ARCH and no --with-sysroot=
    1.14 -# Example: SYSROOT="/usr/$HOST_SYSTEM"
    1.15 -SYSROOT=""
    1.16 +# SliTaz use the sysroot method, this tells GCC to consider dir as the root
    1.17 +# of a tree that contains a (subset of) the root filesystem of the target
    1.18 +# operating system. Target system headers, libraries and run-time object
    1.19 +# files will be searched in there. Cook will use the tools and sysroot in
    1.20 +# the CROSS_TREE for cross compiling. Example: CROSS_TREE="/cross/$ARCH"
    1.21 +CROSS_TREE=""
    1.22  
    1.23  # SliTaz optimisation flags - Wide compatibility & optimized for ARCH.
    1.24  #
    1.25 @@ -60,6 +57,7 @@
    1.26  #
    1.27  # ARM:  don't use -0s but -02
    1.28  # ARM: -mcpu=name [arm9|xscale|...] or -march=name [armv4|armv6|...]
    1.29 +# x86_64: CFLAGS="-march=nocona -Os -pipe"
    1.30  #
    1.31  #MAKEFLAGS="-j$(($(grep processor /proc/cpuinfo | wc -l)+1))"
    1.32  MAKEFLAGS="-j$(grep processor /proc/cpuinfo | wc -l)"
     2.1 --- a/cross	Sat May 26 03:34:18 2012 +0200
     2.2 +++ b/cross	Tue May 29 08:03:41 2012 +0000
     2.3 @@ -13,8 +13,9 @@
     2.4  # Handle --config=/path/to/cross.conf
     2.5  [ "$config" ] && . $config
     2.6  source=$WORK/source
     2.7 +tools=$WORK/tools
     2.8 +sysroot=$WORK/sysroot
     2.9  logdir=$WORK/log
    2.10 -install=$WORK/install
    2.11  
    2.12  # Help and usage.
    2.13  usage() {
    2.14 @@ -36,7 +37,7 @@
    2.15    gcc-final       Compile final GCC
    2.16    compile         Compile everything at once
    2.17    clean           Clean-up build environment
    2.18 -  clean-tools     Clean: $PREFIX
    2.19 +  clean-tools     Clean: $tools
    2.20    gen-prebuilt    Create an prebuilt toolchain archive
    2.21  
    2.22  EOT
    2.23 @@ -52,8 +53,8 @@
    2.24  Move this $ARCH cross compilation toolchain to /usr/cross then add tools
    2.25  to your PATH environment and test the toolchain:
    2.26  
    2.27 -	# mv $ARCH /usr/cross
    2.28 -	# export PATH=\$PATH:/usr/cross/$ARCH/bin
    2.29 +	# mv $ARCH /cross
    2.30 +	# export PATH=\$PATH:/cross/$ARCH/tools/bin
    2.31  
    2.32  	# echo 'int main() { return 0; }' > test.c
    2.33  	# $TARGET-gcc -v -o test.out test.c
    2.34 @@ -67,10 +68,13 @@
    2.35  
    2.36  # Make sure we have all directories.
    2.37  init_compile() {
    2.38 +	unset CFLAGS CXXFLAGS
    2.39  	export LC_ALL=POSIX LANG=POSIX
    2.40 -	[ "$SYSROOT" ] || export PATH=$PATH:$PREFIX/bin
    2.41 +	export PATH=$PATH:$tools/bin
    2.42  	export CROSS_COMPILE=${TARGET}-
    2.43 -	mkdir -p $source $logdir $install
    2.44 +	mkdir -p $source $logdir $sysroot $tools
    2.45 +	echo "Tools prefix   : --prefix=$tools "
    2.46 +	echo "Target sysroot : --with-sysroot=$sysroot"
    2.47  	cd $source
    2.48  }
    2.49  
    2.50 @@ -81,51 +85,6 @@
    2.51  	[ -f "$LINUX_TARBALL" ] || wget $LINUX_WGET
    2.52  	[ -f "$GLIBC_TARBALL" ] || wget $GLIBC_WGET
    2.53  	[ -f "$GCC_TARBALL" ] || wget $GCC_WGET
    2.54 -	[ -f "$BUSYBOX_TARBALL" ] || wget $BUSYBOX_WGET
    2.55 -}
    2.56 -
    2.57 -# Use sysroot or not ?
    2.58 -check_sysroot() {
    2.59 -	if [ "$SYSROOT" ]; then
    2.60 -		PREFIX=/usr
    2.61 -		HDR_PATH=$SYSROOT/usr
    2.62 -		sysroot="--with-sysroot=$SYSROOT"
    2.63 -		echo "Configure: $sysroot"
    2.64 -	else
    2.65 -		HDR_PATH=$PREFIX/usr
    2.66 -	fi
    2.67 -}
    2.68 -
    2.69 -# Work around to fix GCC include search path
    2.70 -#
    2.71 -# GCC include search path is: $PREFIX/$TARGET/include, so make sure it
    2.72 -# is a symlink to default: $PREFIX/usr/include
    2.73 -#
    2.74 -# Glibc install headers in: $PREFIX/include, move them to usr/include
    2.75 -# if needed. After when we cross compile packages with cook we have
    2.76 -# to install build dependencies using --root=$CROSS_PREFIX and so
    2.77 -# default include dir is: $PREFIX/usr/include ($PREFIX is the root
    2.78 -# of our cross environment.
    2.79 -#
    2.80 -check_include() {
    2.81 -	cd $PREFIX
    2.82 -	echo "Checking: $PREFIX"
    2.83 -	if ! readlink include >/dev/null; then
    2.84 -		echo "Creating symlink: usr/include include"
    2.85 -		cp -a include usr && rm -rf include
    2.86 -		ln -s usr/include include
    2.87 -	fi
    2.88 -	cd $PREFIX/$TARGET
    2.89 -	echo "Checking: $PREFIX/$TARGET"
    2.90 -	if ! readlink include >/dev/null; then
    2.91 -		echo "Creating symlink: ../usr/include include"
    2.92 -		cp -a include ../usr && rm -rf include
    2.93 -		ln -s ../usr/include include
    2.94 -	fi
    2.95 -	if ! readlink lib >/dev/null; then
    2.96 -		echo "Creating symlink: ../lib lib"
    2.97 -		rm -rf lib && ln -s ../lib lib
    2.98 -	fi
    2.99  }
   2.100  
   2.101  # 1. Binutils
   2.102 @@ -135,31 +94,29 @@
   2.103  	echo "Extracting: $BINUTILS_TARBALL"
   2.104  	tar xjf $SRC/$BINUTILS_TARBALL
   2.105  	echo "Configure: $BINUTILS_ARGS"
   2.106 -	check_sysroot
   2.107  	cd binutils-$BINUTILS_VERSION
   2.108  	./configure \
   2.109 -		--prefix=$PREFIX \
   2.110 +		--prefix=$tools \
   2.111  		--target=$TARGET \
   2.112  		--enable-plugins \
   2.113  		--enable-threads \
   2.114  		--enable-targets=$BUILD_SYSTEM \
   2.115 -		$BINUTILS_ARGS $sysroot
   2.116 +		--with-sysroot=$sysroot \
   2.117 +		$BINUTILS_ARGS
   2.118  	make || exit 1
   2.119  	make install
   2.120  	echo "cross: binutils compiled on: $(date)"
   2.121  }
   2.122  
   2.123  # 2. Kernel headers could use CROSS_COMPILE but gcc is not yet build.
   2.124 -# NOTE: Compile GCC static first then linux-headers ?
   2.125  linux_headers() {
   2.126  	init_compile
   2.127  	echo "Extracting: $LINUX_TARBALL"
   2.128  	tar xjf $SRC/$LINUX_TARBALL
   2.129 -	check_sysroot
   2.130  	cd linux-$LINUX_VERSION
   2.131  	make mrproper
   2.132  	make ARCH=$ARCH headers_check
   2.133 -	make ARCH=$ARCH headers_install INSTALL_HDR_PATH=$HDR_PATH
   2.134 +	make ARCH=$ARCH headers_install INSTALL_HDR_PATH=$sysroot/usr
   2.135  }
   2.136  
   2.137  # 3. GCC static (first pass)
   2.138 @@ -168,32 +125,33 @@
   2.139  	echo "Extracting: $GCC_TARBALL"
   2.140  	tar xjf $SRC/$GCC_TARBALL
   2.141  	echo "Configure: $GCC_STATIC_ARGS"
   2.142 -	check_sysroot
   2.143  	# Arch fixes and work around
   2.144  	case "$ARCH" in
   2.145  		x86_64)
   2.146  			# GCC wants Glib headers in cross environment (not tested
   2.147  			# with sysroot) Should we install glibc-headers before ?
   2.148 -			[ "$SYSROOT" ] || \
   2.149 -				ln -s /usr/include $PREFIX/$TARGET/include ;;
   2.150 +			echo "Try with eglibc or install glibc-headers first"
   2.151 +			#rm -f $tools/$TARGET/include
   2.152 +			#ln -s /usr/include $tools/$TARGET/include
   2.153 +			;;
   2.154  	esac
   2.155  	rm -rf gcc-static
   2.156  	mkdir gcc-static && cd gcc-static
   2.157  	../gcc-$GCC_VERSION/configure \
   2.158 -		--prefix=$PREFIX \
   2.159 -		--libexec=$PREFIX/lib \
   2.160 +		--prefix=$tools \
   2.161 +		--libexec=$tools/lib \
   2.162  		--target=$TARGET \
   2.163  		--disable-shared \
   2.164  		--disable-threads \
   2.165 +		--disable-libgomp \
   2.166 +		--disable-libmudflap \
   2.167 +		--disable-libssp \
   2.168  		--without-headers \
   2.169  		--with-newlib \
   2.170 -		$GCC_STATIC_ARGS $sysroot
   2.171 +		--with-sysroot=$sysroot \
   2.172 +		$GCC_STATIC_ARGS
   2.173  	make all-gcc all-target-libgcc || exit 1
   2.174  	make install-gcc install-target-libgcc
   2.175 -	cd $PREFIX/lib/gcc/$TARGET/$GCC_VERSION
   2.176 -	echo "Creating symlink for static libgcc: libgcc_eh.a"
   2.177 -	rm -f libgcc_eh.a
   2.178 -	ln -s libgcc.a libgcc_eh.a
   2.179  	echo "cross: gcc-static compiled on: $(date)"
   2.180  }
   2.181  
   2.182 @@ -203,7 +161,6 @@
   2.183  	echo "Extracting: $GLIBC_TARBALL"
   2.184  	tar xjf $SRC/$GLIBC_TARBALL
   2.185  	echo "Configure: $GLIBC_ARGS"
   2.186 -	[ "$continue" ] || rm -rf glibc-build
   2.187  	# Some arch may need glibc-ports and custom CFLAGS
   2.188  	case "$ARCH" in
   2.189  		arm)
   2.190 @@ -218,33 +175,86 @@
   2.191  		x86_64)
   2.192  			ccflags="-m64" ;;
   2.193  	esac
   2.194 +	# Disable linking to libgcc_eh
   2.195 +	cd glibc-$GLIBC_VERSION
   2.196 +	cp Makeconfig Makeconfig.orig
   2.197 +	sed -e 's/-lgcc_eh//g' Makeconfig.orig > Makeconfig
   2.198 +	cd ..
   2.199  	echo "CFLAGS: $CFLAGS"
   2.200 +	rm -rf glibc-build
   2.201  	mkdir -p glibc-build && cd glibc-build
   2.202  	BUILD_CC="gcc" \
   2.203  	CC="${TARGET}-gcc $ccflags" \
   2.204 +	AR="${TARGET}-ar" \
   2.205 +	RANLIB="${TARGET}-ranlib" \
   2.206  	libc_cv_forced_unwind=yes \
   2.207  	libc_cv_c_cleanup=yes \
   2.208  	../glibc-$GLIBC_VERSION/configure \
   2.209 -		--prefix=$PREFIX \
   2.210 -		--libexec=$PREFIX/lib/glibc \
   2.211 +		--prefix=/usr \
   2.212 +		--libexec=/usr/lib/glibc \
   2.213  		--host=$TARGET \
   2.214 -		--with-headers=$PREFIX/usr/include \
   2.215 -		--with-binutils=$PREFIX/bin \
   2.216 +		--with-headers=$sysroot/usr/include \
   2.217 +		--with-binutils=$tools/bin \
   2.218  		--enable-kernel=2.6.32 \
   2.219  		$GLIBC_ARGS
   2.220  	make || exit 1
   2.221 -	make install
   2.222 +	make install_root=$sysroot install
   2.223  	# Work around to let GCC find Glibc headers.
   2.224 -	if [ "$SYSROOT" ]; then
   2.225 -		cd $SYSROOT
   2.226 -		ln -s usr/include sys-include
   2.227 -	else
   2.228 -		check_include
   2.229 -	fi
   2.230 -	unset CFLAGS
   2.231 +	#cd $sysroot
   2.232 +	#ln -s usr/include sys-include
   2.233  	echo "cross: glibc compiled on: $(date)"
   2.234  }
   2.235  
   2.236 +# 4. Eglibc: always use --prefix=/usr
   2.237 +eglibc() {
   2.238 +	init_compile
   2.239 +	rm -rf eglibc-build eglibc-$EGLIBC_VERSION
   2.240 +	echo "Extracting: $EGLIBC_TARBALL"
   2.241 +	tar xjf $SRC/$EGLIBC_TARBALL
   2.242 +	# Some arch may need glibc-ports and custom CFLAGS
   2.243 +	case "$ARCH" in
   2.244 +		arm)
   2.245 +			export CFLAGS="-march=armv6 -O2"
   2.246 +			if [ ! -d "$source/eglibc-ports-$EGLIBC_VERSION" ]; then
   2.247 +				echo "Cloning $EGLIBC_WGET/ports"
   2.248 +				svn co $EGLIBC_WGET/ports eglibc-ports-$EGLIBC_VERSION >/dev/null
   2.249 +			fi
   2.250 +			cp -a eglibc-ports-$EGLIBC_VERSION eglibc-$EGLIBC_VERSION/ports ;;
   2.251 +		x86_64)
   2.252 +			ccflags="-m64" ;;
   2.253 +	esac
   2.254 +	# Disable linking to libgcc_eh
   2.255 +	cd eglibc-$EGLIBC_VERSION
   2.256 +	cp Makeconfig Makeconfig.orig
   2.257 +	sed -e 's/-lgcc_eh//g' Makeconfig.orig > Makeconfig
   2.258 +	cd ..
   2.259 +	mkdir -p eglibc-build && cd eglibc-build
   2.260 +	# config.cache
   2.261 +	cat > config.cache << EOT
   2.262 +libc_cv_forced_unwind=yes
   2.263 +libc_cv_c_cleanup=yes
   2.264 +libc_cv_gnu89_inline=yes
   2.265 +EOT
   2.266 +	BUILD_CC="gcc" \
   2.267 +	CC="${TARGET}-gcc $ccflags" \
   2.268 +	AR="${TARGET}-ar" \
   2.269 +	RANLIB="${TARGET}-ranlib" \
   2.270 +	../eglibc-$EGLIBC_VERSION/configure \
   2.271 +		--prefix=/usr \
   2.272 +		--libexec=/usr/lib/eglibc \
   2.273 +		--host=$TARGET \
   2.274 +		--with-headers=$sysroot/usr/include \
   2.275 +		--with-binutils=$tools/bin \
   2.276 +		--enable-kernel=2.6.32 \
   2.277 +		--with-__thread \
   2.278 +		--without-gd \
   2.279 +		--without-cvs \
   2.280 +		--cache-file=config.cache \
   2.281 +		$EGLIBC_ARGS
   2.282 +	make || exit 1
   2.283 +	make install_root=$sysroot install
   2.284 +}
   2.285 +
   2.286  # 5. GCC final
   2.287  gcc_final() {
   2.288  	init_compile
   2.289 @@ -253,12 +263,12 @@
   2.290  		tar xjf $SRC/$GCC_TARBALL
   2.291  	fi
   2.292  	echo "Configure: $GCC_FINAL_ARGS"
   2.293 -	check_sysroot
   2.294 -	[ "$continue" ] || rm -rf gcc-build
   2.295 +	rm -rf gcc-build
   2.296  	mkdir -p gcc-build && cd gcc-build
   2.297 +	AR=ar \
   2.298  	../gcc-$GCC_VERSION/configure \
   2.299 -		--prefix=$PREFIX \
   2.300 -		--libexec=$PREFIX/lib \
   2.301 +		--prefix=$tools \
   2.302 +		--libexec=$tools/lib \
   2.303  		--target=$TARGET \
   2.304  		--enable-shared \
   2.305  		--enable-c99 \
   2.306 @@ -268,11 +278,14 @@
   2.307  		--enable-plugin \
   2.308  		--disable-multilib \
   2.309  		--disable-libssp \
   2.310 +		--disable-checking \
   2.311 +		--disable-werror \
   2.312  		--with-pkgversion="SliTaz" \
   2.313  		--with-bugurl="https://bugs.slitaz.org/" \
   2.314  		$GCC_FINAL_ARGS $sysroot
   2.315 -	make || exit 1
   2.316 -	make install &&
   2.317 +	make AS_FOR_TARGET="${TARGET}-as" \
   2.318 +		LD_FOR_TARGET="${TARGET}-ld" || exit 1
   2.319 +	make install
   2.320  	echo "cross: GCC final compiled on: $(date)"
   2.321  }
   2.322  
   2.323 @@ -293,19 +306,16 @@
   2.324  Target arch     : $ARCH
   2.325  C Compiler      : $CC
   2.326  Build directory : $WORK
   2.327 +Tools prefix    : $tools/bin
   2.328 +Arch sysroot    : $sysroot
   2.329  EOT
   2.330 -		if [ "$SYSROOT" ]; then
   2.331 -			PREFIX=/usr
   2.332 -			echo "Arch sysroot    : $SYSROOT"
   2.333 -		else
   2.334 -			echo "Additional path : $PREFIX/bin"
   2.335 -		fi
   2.336  		separator && echo ""
   2.337  		echo "GCC version" && separator
   2.338 -		if [ -x "$PREFIX/bin/$CC" ]; then
   2.339 +		if [ -x "$tools/bin/$CC" ]; then
   2.340  			$CC -v
   2.341  		else
   2.342  			echo "No C compiler. To build a toolchain run: cross compile"
   2.343 +			echo "Missing: $tools/bin/$CC"
   2.344  		fi
   2.345  		separator && echo "" ;;
   2.346  	testsuite)
   2.347 @@ -333,13 +343,7 @@
   2.348  				fi
   2.349  			fi
   2.350  		done
   2.351 -		# See: check_include()
   2.352 -		if [ "$SYSROOT" ]; then
   2.353 -			echo "Using: --with-sysroot=$SYSROOT"
   2.354 -			echo "WARNING: not well tested and buggy"
   2.355 -			exit 0
   2.356 -		fi
   2.357 -		check_include ;;
   2.358 +		echo "Using: --with-sysroot=$sysroot" ;;
   2.359  	download)
   2.360  		download_src ;;
   2.361  	show-log)
   2.362 @@ -358,6 +362,8 @@
   2.363  		linux_headers 2>&1 | tee $logdir/linux-headers.log ;;
   2.364  	glibc)
   2.365  		glibc 2>&1 | tee $logdir/glibc.log ;;
   2.366 +	eglibc)
   2.367 +		eglibc 2>&1 | tee $logdir/eglibc.log ;;
   2.368  	gcc-final)
   2.369  		gcc_final 2>&1 | tee $logdir/gcc-final.log ;;
   2.370  	compile)
   2.371 @@ -369,7 +375,10 @@
   2.372  		binutils 2>&1 | tee $logdir/binutils.log
   2.373  		gcc_static 2>&1 | tee $logdir/gcc-static.log
   2.374  		linux_headers 2>&1 | tee $logdir/linux-headers.log
   2.375 -		glibc 2>&1 | tee $logdir/glibc.log
   2.376 +		case "$ARCH" in
   2.377 +			arm) eglibc 2>&1 | tee $logdir/eglibc.log ;;
   2.378 +			x86_64) glibc 2>&1 | tee $logdir/glibc.log ;;
   2.379 +		esac
   2.380  		gcc_final 2>&1 | tee $logdir/gcc-final.log
   2.381  		echo ""
   2.382  		echo "Compile end  : $(date)" | tee -a $logdir/compile.log
   2.383 @@ -381,50 +390,42 @@
   2.384  		echo "" ;;
   2.385  	clean)
   2.386  		echo -n "Removing all source files..."
   2.387 -		rm -rf $WORK/source/* && status
   2.388 -		[ "$log" ] && rm -f $WORK/log/*.log
   2.389 -		echo "To clean chroot: rm -rf $PREFIX" ;;
   2.390 +		rm -rf $WORK/source && status
   2.391 +		[ "$log" ] && rm -f $WORK/log/*.log ;;
   2.392  	clean-tools)
   2.393  		# Remove crap :-)
   2.394  		init_compile
   2.395 -		echo "Cleaning   : $PREFIX ($(du -sh $PREFIX | awk '{print $1}'))"
   2.396 -		for file in share/info share/man lib/*-gdb.py
   2.397 +		echo "Cleaning   : $tools ($(du -sh $tools | awk '{print $1}'))"
   2.398 +		for file in share/info share/man share/local lib/*-gdb.py
   2.399  		do
   2.400  			echo -n "Removing   : $file"
   2.401 -			rm -rf $PREFIX/$file && status
   2.402 +			rm -rf $tools/$file && status
   2.403  		done
   2.404  		echo -n "Stripping  : shared libs and binaries"
   2.405 -		${TARGET}-strip -s $PREFIX/lib/*.so* 2>/dev/null
   2.406 -		${TARGET}-strip -s $PREFIX/bin/* 2>/dev/null
   2.407 -		${TARGET}-strip -s $PREFIX/${TARGET}/bin/* 2>/dev/null
   2.408 -		${TARGET}-strip -s $PREFIX/$TARGET/lib/gcc/$TARGET/*/cc1*
   2.409 -		${TARGET}-strip -s $PREFIX/$TARGET/lib/gcc/$TARGET/*/lto*
   2.410 +		${TARGET}-strip -s $sysroot/lib/*.so* 2>/dev/null
   2.411 +		strip -s $tools/bin/* 2>/dev/null
   2.412  		sleep 1 && status
   2.413 -		echo -n "Tools size : " && du -sh $PREFIX | awk '{print $1}' ;;
   2.414 -	gen-rootfs)
   2.415 -		echo "Use arm packages: basefile, boot-scripts, busybox and glibc-base"
   2.416 -		echo "Install them in a rootfs: tazpkg *-arm.tazpkg --root=/my/rootfs" ;;
   2.417 +		echo -n "Tools size : " && du -sh $tools | awk '{print $1}' ;;
   2.418  	gen-prebuilt)
   2.419  		# Create a prebuilt cross toolchain tarball.
   2.420  		init_compile
   2.421  		date=$(date "+%Y%m%d")
   2.422  		package="slitaz-cross-$ARCH-toolchain-$date"
   2.423  		tarball="$package.tar.bz2"
   2.424 -		cd /usr/cross
   2.425 +		cd /cross
   2.426  		mkdir $package || exit 1
   2.427  		echo ""
   2.428  		echo -n "Copying $ARCH to: $package"
   2.429  		cp -a $ARCH $package
   2.430 -		rm -rf $package/share $package/etc
   2.431 +		rm -rf $package/source $package/log
   2.432  		status
   2.433  		prebuilt_readme
   2.434  		echo -n "Creating prebuilt $ARCH toolchain tarball..."
   2.435  		tar cjf $tarball $package
   2.436  		status
   2.437 -		mv -f $tarball $WORK
   2.438  		rm -rf $package
   2.439 -		size=$(du -sh $WORK/$tarball | awk '{print $1}')
   2.440 -		echo "Tarball path: $WORK/$tarball"
   2.441 +		size=$(du -sh $tarball | awk '{print $1}')
   2.442 +		echo "Tarball path: $(pwd)/$tarball"
   2.443  		echo "Tarball size: $size"
   2.444  		echo "" ;;
   2.445  	*)
     3.1 --- a/cross.conf	Sat May 26 03:34:18 2012 +0200
     3.2 +++ b/cross.conf	Tue May 29 08:03:41 2012 +0000
     3.3 @@ -5,35 +5,29 @@
     3.4  ARCH=arm
     3.5  BUILD_SYSTEM=i486-slitaz-linux
     3.6  TARGET=$ARCH-slitaz-linux-gnueabi
     3.7 -WORK=/home/slitaz/cross
     3.8 +WORK=/cross/$ARCH
     3.9  SRC=/home/slitaz/src
    3.10 -PREFIX=/usr/cross/$ARCH
    3.11 -
    3.12 -# Sysroot settings. If sysroot is used PREFIX will be set to /usr.
    3.13 -# SliTaz set sysroot to point to the directory of the cross toolchain
    3.14 -# Example: SYSROOT="/usr/$TARGET"
    3.15 -SYSROOT=""
    3.16  
    3.17  # Cross-tools versions
    3.18  BINUTILS_VERSION="2.22"
    3.19  LINUX_VERSION="3.2.14"
    3.20  GLIBC_VERSION="2.13"
    3.21 +EGLIBC_VERSION="2.15"
    3.22  GCC_VERSION="4.6.3"
    3.23 -BUSYBOX_VERSION="1.20.0"
    3.24  
    3.25  # Cross-tools tarballs
    3.26  BINUTILS_TARBALL="binutils-$BINUTILS_VERSION.tar.bz2"
    3.27  LINUX_TARBALL="linux-$LINUX_VERSION.tar.bz2"
    3.28  GLIBC_TARBALL="glibc-$GLIBC_VERSION.tar.bz2"
    3.29 +EGLIBC_TARBALL="eglibc-$EGLIBC_VERSION.tar.bz2"
    3.30  GCC_TARBALL="gcc-$GCC_VERSION.tar.bz2"
    3.31 -BUSYBOX_TARBALL="busybox-$BUSYBOX_VERSION.tar.bz2"
    3.32  
    3.33  # Cross tools urls
    3.34  BINUTILS_WGET="http://ftp.gnu.org/gnu/binutils/$BINUTILS_TARBALL"
    3.35  LINUX_WGET="http://www.kernel.org/pub/linux/kernel/v3.x/$LINUX_TARBALL"
    3.36  GLIBC_WGET="http://ftp.gnu.org/gnu/libc/$GLIBC_TARBALL"
    3.37 +EGLIBC_WGET="svn://svn.eglibc.org/branches/eglibc-2_15"
    3.38  GCC_WGET="http://ftp.gnu.org/gnu/gcc/gcc-$GCC_VERSION/$GCC_TARBALL"
    3.39 -BUSYBOX_WGET="http://busybox.net/downloads/$BUSYBOX_TARBALL"
    3.40  
    3.41  # Peer package configure arguments
    3.42  #
    3.43 @@ -42,8 +36,9 @@
    3.44  #
    3.45  BINUTILS_ARGS="--enable-shared"
    3.46  GLIBC_ARGS="--enable-add-ons"
    3.47 +EGLIBC_ARGS="--enable-add-ons --with-tls"
    3.48  GCC_STATIC_ARGS="--enable-languages=c"
    3.49 -GCC_FINAL_ARGS="--enable-languages=c,c++,objc"
    3.50 +GCC_FINAL_ARGS="--enable-languages=c,c++"
    3.51  
    3.52  # List of packages installed in chroot by cook or the Cooker setup.
    3.53  # When cross compiling we need some build system tools installed and