# HG changeset patch # User Christopher Rogers # Date 1322312125 0 # Node ID fcc1dc4dd1af83ffdd3ced3fefc941e51489dbbd # Parent 5dbe2cc5a2e10caefcb471f490c4dc020f6ba2b4# Parent ee954432359eb8d3d823f3d71893ea724c3071c9 Merge default. diff -r 5dbe2cc5a2e1 -r fcc1dc4dd1af .hgtags --- a/.hgtags Wed Jul 06 12:28:01 2011 +0000 +++ b/.hgtags Sat Nov 26 12:55:25 2011 +0000 @@ -31,3 +31,4 @@ 1165e2c0ac23be43123fef2fc5b3b13ef11e2099 4.2.14 40ed5424dbfcbd93a0e59376495f916552f57f34 4.2.15 a771874e05d6b7b3e74c71fd6a67f7f6d511f4b9 4.2.16 +3b78028d5730d46ed859fb945306e034a8e3dcee 4.2.17 diff -r 5dbe2cc5a2e1 -r fcc1dc4dd1af chroot-scripts/cook-toolchain --- a/chroot-scripts/cook-toolchain Wed Jul 06 12:28:01 2011 +0000 +++ b/chroot-scripts/cook-toolchain Sat Nov 26 12:55:25 2011 +0000 @@ -6,6 +6,12 @@ source /usr/lib/slitaz/libtaz source /etc/slitaz/tazwok.conf +LOCAL_REPOSITORY=$SLITAZ_DIR/${undigest:-$SLITAZ_VERSION} +if [ -f $LOCAL_REPOSITORY/tazwok.conf ]; then + source $LOCAL_REPOSITORY/tazwok.conf +fi +WOK=$LOCAL_REPOSITORY/wok + # Report progress on webserver. log_step="$LOCAL_REPOSITORY/log/step" run_on_exit="$run_on_exit @@ -29,7 +35,7 @@ report step "Configuring repositories" # Incoming packages as the only source for packages. rm -r /var/lib/tazpkg/undigest -tazpkg setup-mirror $SLITAZ_DIR/${undigest:-$SLITAZ_VERSION}/packages-incoming +tazpkg setup-mirror $LOCAL_REPOSITORY/packages-incoming tazpkg recharge report step "Setting up environnement" @@ -39,22 +45,18 @@ LANG=POSIX LC_ALL=POSIX -# Set BUILD_HOST to something like $ARCH-tmp-linux-gnu to enable +# Set HOST_SYSTEM to something like $ARCH-tmp-linux-gnu to enable # the temporary toolchain. -BUILD_HOST=$(echo $BUILD_HOST | sed 's/\(.*\)-\(.*\)-linux-gnu/\1-tmp-linux-gnu/') +HOST_SYSTEM=$(echo $HOST_SYSTEM | sed 's/\(.*\)-\(.*\)-linux-gnu/\1-tmp-linux-gnu/') PATH=/tools/bin:/tools/usr/bin:/tools/sbin:/tools/usr/sbin:/bin:/usr/bin:/sbin:/usr/sbin CONFIG_SITE="/etc/config.site.tmptoolchain" -echo 'prefix=/tools' > /etc/config.site.tmptoolchain +echo "prefix=/tools" > /etc/config.site.tmptoolchain export LANG LC_ALL PATH PS1 MAKEFLAGS CONFIG_SITE unset CC CXX CPP CFLAGS CXXFLAGS LD_LIBRARY_PATH LD_PRELOAD DESTDIR -LOCAL_REPOSITORY=$SLITAZ_DIR/$SLITAZ_VERSION -[ "$undigest" ] && LOCAL_REPOSITORY=$SLITAZ_DIR/$undigest -WOK=$LOCAL_REPOSITORY/wok - -# Create the dir for the temporary toolchain and link in root of host +# Create the dir for the temporary toolchain and link in root of build # system. rm -rf /tools mkdir /tools @@ -76,6 +78,7 @@ cd $WOK/$PACKAGE } + # Binutils and gcc need to be compiled twice. for PACKAGE in binutils gcc; do rm $LOCAL_REPOSITORY/log/tmp-toolchain-$PACKAGE-firstpass.html 2>/dev/null @@ -85,7 +88,7 @@ report open-bloc prepare_package report step "Running compilation rules" - precook_tmp_toolchain + cook_cross_toolchain report end-step || exit 1 report close-bloc report end-sublog diff -r 5dbe2cc5a2e1 -r fcc1dc4dd1af examples/config.site --- a/examples/config.site Wed Jul 06 12:28:01 2011 +0000 +++ b/examples/config.site Sat Nov 26 12:55:25 2011 +0000 @@ -61,7 +61,7 @@ { [ "$build" = NONE ] || [ ! "$build" ] ; } && build=$default_build { [ "$host" = NONE ] || [ ! "$host" ] ; } && host=$default_host -# Print information about these variables. +# Print information about those variables. echo "prefix = $prefix libdir = $libdir datarootdir = $datarootdir @@ -75,5 +75,6 @@ host = $host " -# config.site is used by tazwok to check that the config.site script has been used. +# /tmp/config.site is used by tazwok to check that the config.site +# script has been used. touch /tmp/config.site diff -r 5dbe2cc5a2e1 -r fcc1dc4dd1af examples/tazwok.conf --- a/examples/tazwok.conf Wed Jul 06 12:28:01 2011 +0000 +++ b/examples/tazwok.conf Sat Nov 26 12:55:25 2011 +0000 @@ -28,7 +28,12 @@ # USE_ONLINE_PKG="$MIRROR" # Default makeflags. -MAKEFLAGS="-j$((`grep processor /proc/cpuinfo | wc -l`+1))" +# This one make compilation use all cpu when possible, and have +# priority hover other processes. +# MAKEFLAGS="-j$((`grep processor /proc/cpuinfo | wc -l`+1))" +# This one makes use of all cpu but without priority, so if you +# run something else it can run smoothly even while compiling. +MAKEFLAGS="-j`grep processor /proc/cpuinfo | wc -l`" # Default architecture. ARCH="i486" @@ -36,12 +41,8 @@ # Build and host. These options are for cross-compiling. If you specify # both options and BUILD_SYSTEM is different from HOST_SYSTEM, configure # will prepare to cross-compile from BUILD_SYSTEM to be used on HOST_SYSTEM. -BUILD_SYSTEM="$(uname -m)-slitaz-linux" -#BUILD_SYSTEM="$ARCH-slitaz-linux" -HOST_SYSTEM="$ARCH-slitaz-linux" - -# Default build host. -BUILD_HOST="$HOST_SYSTEM" +BUILD_SYSTEM="$ARCH-pc-linux-gnu" +HOST_SYSTEM="$ARCH-pc-linux-gnu" # Default compilation flags. # More details at : diff -r 5dbe2cc5a2e1 -r fcc1dc4dd1af tazwok --- a/tazwok Wed Jul 06 12:28:01 2011 +0000 +++ b/tazwok Sat Nov 26 12:55:25 2011 +0000 @@ -212,6 +212,7 @@ check_dir $SOURCES_REPOSITORY check_dir $INCOMING_REPOSITORY check_dir $LOCAL_REPOSITORY/log + check_dir $LOCAL_REPOSITORY/tmp for file in $dep_db $wan_db $cookorder $commit $cooklist \ $broken $blocked $SOURCES_REPOSITORY/sources.list $lib_db do @@ -520,7 +521,7 @@ [ "$WGET_URL" ] || return 0 [ "$WANTED" ] && return 0 report step "Checking for source tarball: $PACKAGE" - local repack_src=$repack_src TARBALL=$TARBALL local nounpack=$nounpack + local repack_src=$repack_src TARBALL=$TARBALL nounpack=$nounpack look_for_cookopt !unpack && nounpack=yes if [ "$repack_src" = yes ] && look_for_cookopt !repack_src; then repack_src=no @@ -530,7 +531,7 @@ else set_src_path fi - tmp_src=$tmp/tarball-$$ + tmp_src=$LOCAL_REPOSITORY/tmp/tarball-$$ if [ ! -f "$SOURCES_REPOSITORY/$TARBALL" ] && \ [ ! -f "$SOURCES_REPOSITORY/${SOURCE:-$PACKAGE}-${KBASEVER:-$VERSION}.tar.lzma" ] ; then cd $SOURCES_REPOSITORY @@ -724,7 +725,7 @@ [ "$CONFIG_SITE" ] || CONFIG_SITE=/etc/config.site export CFLAGS=$(echo "$CFLAGS" | tr -s ' ') \ CXXFLAGS=$(echo "$CXXFLAGS" | tr -s ' ') \ - MAKEFLAGS DESTDIR BUILD_HOST CONFIG_SITE default_prefix \ + MAKEFLAGS DESTDIR CONFIG_SITE default_prefix \ default_datarootdir default_datadir default_localedir \ default_infodir default_mandir default_build default_host \ BUILD_SYSTEM HOST_SYSTEM