tazwok rev 545 4.3

Merge default.
author Christopher Rogers <slaxemulator@gmail.com>
date Sat Nov 26 12:55:25 2011 +0000 (2011-11-26)
parents 5dbe2cc5a2e1 ee954432359e
children 176f3c91b68a
files chroot-scripts/cook-toolchain examples/config.site examples/tazwok.conf tazwok
line diff
     1.1 --- a/.hgtags	Wed Jul 06 12:28:01 2011 +0000
     1.2 +++ b/.hgtags	Sat Nov 26 12:55:25 2011 +0000
     1.3 @@ -31,3 +31,4 @@
     1.4  1165e2c0ac23be43123fef2fc5b3b13ef11e2099 4.2.14
     1.5  40ed5424dbfcbd93a0e59376495f916552f57f34 4.2.15
     1.6  a771874e05d6b7b3e74c71fd6a67f7f6d511f4b9 4.2.16
     1.7 +3b78028d5730d46ed859fb945306e034a8e3dcee 4.2.17
     2.1 --- a/chroot-scripts/cook-toolchain	Wed Jul 06 12:28:01 2011 +0000
     2.2 +++ b/chroot-scripts/cook-toolchain	Sat Nov 26 12:55:25 2011 +0000
     2.3 @@ -6,6 +6,12 @@
     2.4  source /usr/lib/slitaz/libtaz
     2.5  source /etc/slitaz/tazwok.conf
     2.6  
     2.7 +LOCAL_REPOSITORY=$SLITAZ_DIR/${undigest:-$SLITAZ_VERSION}
     2.8 +if [ -f $LOCAL_REPOSITORY/tazwok.conf ]; then
     2.9 +	source $LOCAL_REPOSITORY/tazwok.conf
    2.10 +fi
    2.11 +WOK=$LOCAL_REPOSITORY/wok
    2.12 +
    2.13  # Report progress on webserver.
    2.14  log_step="$LOCAL_REPOSITORY/log/step"
    2.15  run_on_exit="$run_on_exit
    2.16 @@ -29,7 +35,7 @@
    2.17  report step "Configuring repositories"
    2.18  # Incoming packages as the only source for packages.
    2.19  rm -r /var/lib/tazpkg/undigest
    2.20 -tazpkg setup-mirror $SLITAZ_DIR/${undigest:-$SLITAZ_VERSION}/packages-incoming
    2.21 +tazpkg setup-mirror $LOCAL_REPOSITORY/packages-incoming
    2.22  tazpkg recharge
    2.23  
    2.24  report step "Setting up environnement"
    2.25 @@ -39,22 +45,18 @@
    2.26  LANG=POSIX
    2.27  LC_ALL=POSIX
    2.28  
    2.29 -# Set BUILD_HOST to something like $ARCH-tmp-linux-gnu to enable
    2.30 +# Set HOST_SYSTEM to something like $ARCH-tmp-linux-gnu to enable
    2.31  # the temporary toolchain.
    2.32 -BUILD_HOST=$(echo $BUILD_HOST | sed 's/\(.*\)-\(.*\)-linux-gnu/\1-tmp-linux-gnu/')
    2.33 +HOST_SYSTEM=$(echo $HOST_SYSTEM | sed 's/\(.*\)-\(.*\)-linux-gnu/\1-tmp-linux-gnu/')
    2.34  
    2.35  PATH=/tools/bin:/tools/usr/bin:/tools/sbin:/tools/usr/sbin:/bin:/usr/bin:/sbin:/usr/sbin
    2.36  CONFIG_SITE="/etc/config.site.tmptoolchain"
    2.37 -echo 'prefix=/tools' > /etc/config.site.tmptoolchain
    2.38 +echo "prefix=/tools" > /etc/config.site.tmptoolchain
    2.39  
    2.40  export LANG LC_ALL PATH PS1 MAKEFLAGS CONFIG_SITE
    2.41  unset CC CXX CPP CFLAGS CXXFLAGS LD_LIBRARY_PATH LD_PRELOAD DESTDIR
    2.42  
    2.43 -LOCAL_REPOSITORY=$SLITAZ_DIR/$SLITAZ_VERSION
    2.44 -[ "$undigest" ] && LOCAL_REPOSITORY=$SLITAZ_DIR/$undigest
    2.45 -WOK=$LOCAL_REPOSITORY/wok
    2.46 -
    2.47 -# Create the dir for the temporary toolchain and link in root of host 
    2.48 +# Create the dir for the temporary toolchain and link in root of build
    2.49  # system.
    2.50  rm -rf /tools
    2.51  mkdir /tools
    2.52 @@ -76,6 +78,7 @@
    2.53  	cd $WOK/$PACKAGE
    2.54  }
    2.55  
    2.56 +
    2.57  # Binutils and gcc need to be compiled twice.
    2.58  for PACKAGE in binutils gcc; do
    2.59  	rm $LOCAL_REPOSITORY/log/tmp-toolchain-$PACKAGE-firstpass.html 2>/dev/null
    2.60 @@ -85,7 +88,7 @@
    2.61  	report open-bloc
    2.62  	prepare_package
    2.63  	report step "Running compilation rules"
    2.64 -	precook_tmp_toolchain
    2.65 +	cook_cross_toolchain
    2.66  	report end-step || exit 1
    2.67  	report close-bloc
    2.68  	report end-sublog
     3.1 --- a/examples/config.site	Wed Jul 06 12:28:01 2011 +0000
     3.2 +++ b/examples/config.site	Sat Nov 26 12:55:25 2011 +0000
     3.3 @@ -61,7 +61,7 @@
     3.4  { [ "$build" = NONE ] || [ ! "$build" ] ; } && build=$default_build
     3.5  { [ "$host" = NONE ] || [ ! "$host" ] ; } && host=$default_host
     3.6  
     3.7 -# Print information about these variables.
     3.8 +# Print information about those variables.
     3.9  echo "prefix = $prefix
    3.10  libdir = $libdir
    3.11  datarootdir = $datarootdir
    3.12 @@ -75,5 +75,6 @@
    3.13  host = $host
    3.14  "
    3.15  
    3.16 -# config.site is used by tazwok to check that the config.site script has been used.
    3.17 +# /tmp/config.site is used by tazwok to check that the config.site
    3.18 +# script has been used.
    3.19  touch /tmp/config.site
     4.1 --- a/examples/tazwok.conf	Wed Jul 06 12:28:01 2011 +0000
     4.2 +++ b/examples/tazwok.conf	Sat Nov 26 12:55:25 2011 +0000
     4.3 @@ -28,7 +28,12 @@
     4.4  # USE_ONLINE_PKG="$MIRROR"
     4.5  
     4.6  # Default makeflags.
     4.7 -MAKEFLAGS="-j$((`grep processor /proc/cpuinfo | wc -l`+1))"
     4.8 +# This one make compilation use all cpu when possible, and have
     4.9 +# priority hover other processes.
    4.10 +# MAKEFLAGS="-j$((`grep processor /proc/cpuinfo | wc -l`+1))"
    4.11 +# This one makes use of all cpu but without priority, so if you
    4.12 +# run something else it can run smoothly even while compiling.
    4.13 +MAKEFLAGS="-j`grep processor /proc/cpuinfo | wc -l`"
    4.14  
    4.15  # Default architecture.
    4.16  ARCH="i486"
    4.17 @@ -36,12 +41,8 @@
    4.18  # Build and host. These options are for cross-compiling. If you specify
    4.19  # both options and BUILD_SYSTEM is different from HOST_SYSTEM, configure
    4.20  # will prepare to cross-compile from BUILD_SYSTEM to be used on HOST_SYSTEM.
    4.21 -BUILD_SYSTEM="$(uname -m)-slitaz-linux"
    4.22 -#BUILD_SYSTEM="$ARCH-slitaz-linux"
    4.23 -HOST_SYSTEM="$ARCH-slitaz-linux"
    4.24 -
    4.25 -# Default build host.
    4.26 -BUILD_HOST="$HOST_SYSTEM"
    4.27 +BUILD_SYSTEM="$ARCH-pc-linux-gnu"
    4.28 +HOST_SYSTEM="$ARCH-pc-linux-gnu"
    4.29  
    4.30  # Default compilation flags.
    4.31  # More details at :
     5.1 --- a/tazwok	Wed Jul 06 12:28:01 2011 +0000
     5.2 +++ b/tazwok	Sat Nov 26 12:55:25 2011 +0000
     5.3 @@ -212,6 +212,7 @@
     5.4  		check_dir $SOURCES_REPOSITORY
     5.5  		check_dir $INCOMING_REPOSITORY
     5.6  		check_dir $LOCAL_REPOSITORY/log
     5.7 +		check_dir $LOCAL_REPOSITORY/tmp
     5.8  		for file in $dep_db $wan_db $cookorder $commit $cooklist \
     5.9  			$broken $blocked $SOURCES_REPOSITORY/sources.list $lib_db
    5.10  		do
    5.11 @@ -520,7 +521,7 @@
    5.12  	[ "$WGET_URL" ] || return 0
    5.13  	[ "$WANTED" ] && return 0
    5.14  	report step "Checking for source tarball: $PACKAGE"
    5.15 -	local repack_src=$repack_src TARBALL=$TARBALL local nounpack=$nounpack
    5.16 +	local repack_src=$repack_src TARBALL=$TARBALL nounpack=$nounpack
    5.17  	look_for_cookopt !unpack && nounpack=yes
    5.18  	if [ "$repack_src" = yes ] && look_for_cookopt !repack_src; then
    5.19  			repack_src=no
    5.20 @@ -530,7 +531,7 @@
    5.21  	else
    5.22  		set_src_path
    5.23  	fi
    5.24 -	tmp_src=$tmp/tarball-$$
    5.25 +	tmp_src=$LOCAL_REPOSITORY/tmp/tarball-$$
    5.26  	if [ ! -f "$SOURCES_REPOSITORY/$TARBALL" ] && \
    5.27  		[ ! -f "$SOURCES_REPOSITORY/${SOURCE:-$PACKAGE}-${KBASEVER:-$VERSION}.tar.lzma" ] ; then
    5.28  		cd $SOURCES_REPOSITORY
    5.29 @@ -724,7 +725,7 @@
    5.30  		[ "$CONFIG_SITE" ] || CONFIG_SITE=/etc/config.site
    5.31  		export CFLAGS=$(echo "$CFLAGS" | tr -s ' ') \
    5.32  			CXXFLAGS=$(echo "$CXXFLAGS" | tr -s ' ') \
    5.33 -			MAKEFLAGS DESTDIR BUILD_HOST CONFIG_SITE default_prefix \
    5.34 +			MAKEFLAGS DESTDIR CONFIG_SITE default_prefix \
    5.35  			default_datarootdir default_datadir default_localedir \
    5.36  			default_infodir default_mandir default_build default_host \
    5.37  			BUILD_SYSTEM HOST_SYSTEM