cookutils rev 408

cross: make compile more stable, some vars maybe be altered by packages so init_copile before each build
author Christophe Lincoln <pankso@slitaz.org>
date Sun May 13 23:45:59 2012 +0200 (2012-05-13)
parents 2e5c6cfad4ed
children d85e10cb82c7
files cross
line diff
     1.1 --- a/cross	Sun May 13 22:03:44 2012 +0200
     1.2 +++ b/cross	Sun May 13 23:45:59 2012 +0200
     1.3 @@ -75,6 +75,7 @@
     1.4  
     1.5  # 1. Binutils
     1.6  binutils() {
     1.7 +	init_compile
     1.8  	echo "Extracting: binutils-$BINUTILS_VERSION.tar.bz2"
     1.9  	tar xjf $SRC/binutils-$BINUTILS_VERSION.tar.bz2
    1.10  	: ${BINUTILS_ARGS=--enable-shared}
    1.11 @@ -91,6 +92,7 @@
    1.12  
    1.13  # 2. GCC static (first pass)
    1.14  gcc_static() {
    1.15 +	init_compile
    1.16  	echo "Extracting: gcc-$GCC_VERSION.tar.bz2"
    1.17  	tar xjf $SRC/gcc-$GCC_VERSION.tar.bz2
    1.18  	check_sysroot
    1.19 @@ -122,6 +124,7 @@
    1.20  
    1.21  # 3. Kernel headers use static GCC
    1.22  linux_headers() {
    1.23 +	init_compile
    1.24  	echo "Extracting: linux-$LINUX_VERSION.tar.bz2"
    1.25  	tar xjf $SRC/linux-$LINUX_VERSION.tar.bz2
    1.26  	check_sysroot
    1.27 @@ -134,6 +137,7 @@
    1.28  
    1.29  # 4. GNU Glibc
    1.30  glibc() {
    1.31 +	init_compile
    1.32  	echo "Extracting: glibc-$GLIBC_VERSION.tar.bz2"
    1.33  	tar xjf $SRC/glibc-$GLIBC_VERSION.tar.bz2
    1.34  	[ "$continue" ] || rm -rf glibc-build
    1.35 @@ -178,6 +182,7 @@
    1.36  
    1.37  # 5. GCC final
    1.38  gcc_final() {
    1.39 +	init_compile
    1.40  	if [ ! -d "gcc-$GCC_VERSION" ]; then
    1.41  		echo "Extracting: gcc-$GCC_VERSION.tar.bz2"
    1.42  		tar xjf $SRC/gcc-$GCC_VERSION.tar.bz2
    1.43 @@ -202,6 +207,7 @@
    1.44  # Build Busybox to we can create prebuilt tiny rootfs image and boot
    1.45  # from NFS ?
    1.46  cross_busybox() {
    1.47 +	init_compile
    1.48  	echo "Extracting: busybox-$BUSYBOX_VERSION.tar.bz2"
    1.49  	tar xjf $SRC/busybox-$BUSYBOX_VERSION.tar.bz2
    1.50  	cd busybox-$BUSYBOX_VERSION
    1.51 @@ -281,23 +287,16 @@
    1.52  		fi
    1.53  		less -E $log ;;
    1.54  	binutils)
    1.55 -		init_compile
    1.56 -		rm -f $logdir/binutils.log
    1.57  		binutils 2>&1 | tee $logdir/binutils.log ;;
    1.58  	gcc-static)
    1.59 -		init_compile
    1.60  		gcc_static 2>&1 | tee $logdir/gcc-static.log ;;
    1.61  	linux-headers)
    1.62 -		init_compile
    1.63  		linux_headers 2>&1 | tee $logdir/linux-headers.log ;;
    1.64  	glibc)
    1.65 -		init_compile
    1.66  		glibc 2>&1 | tee $logdir/glibc.log ;;
    1.67  	gcc-final)
    1.68 -		init_compile
    1.69  		gcc_final 2>&1 | tee $logdir/gcc-final.log ;;
    1.70  	busybox)
    1.71 -		init_compile
    1.72  		cross_busybox 2>&1 | tee $logdir/busybox.log ;;
    1.73  	compile)
    1.74  		# Compile the full toolchain.