tazwok diff chroot-scripts/cook-toolchain @ rev 542
Fixes: minor compatibility fixes & a change in extract_tarball which make it quicker and more reliable.
author | Antoine Bodin <gokhlayeh@slitaz.org> |
---|---|
date | Sat Nov 26 16:54:57 2011 +0100 (2011-11-26) |
parents | 70c7cb6c0956 |
children | fcc1dc4dd1af 713a5580cf9a |
line diff
1.1 --- a/chroot-scripts/cook-toolchain Sat Apr 30 21:13:12 2011 +0000 1.2 +++ b/chroot-scripts/cook-toolchain Sat Nov 26 16:54:57 2011 +0100 1.3 @@ -6,6 +6,12 @@ 1.4 source /usr/lib/slitaz/libtaz 1.5 source /etc/slitaz/tazwok.conf 1.6 1.7 +LOCAL_REPOSITORY=$SLITAZ_DIR/${undigest:-$SLITAZ_VERSION} 1.8 +if [ -f $LOCAL_REPOSITORY/tazwok.conf ]; then 1.9 + source $LOCAL_REPOSITORY/tazwok.conf 1.10 +fi 1.11 +WOK=$LOCAL_REPOSITORY/wok 1.12 + 1.13 # Report progress on webserver. 1.14 log_step="$LOCAL_REPOSITORY/log/step" 1.15 run_on_exit="$run_on_exit 1.16 @@ -18,10 +24,10 @@ 1.17 report step "Cooking temporary toolchain" 1.18 report open-bloc 1.19 1.20 -report step "Configuring repositories" 1.21 +report step "Configuring packages repositories" 1.22 # Incoming packages as the only source for packages. 1.23 rm -r /var/lib/tazpkg/undigest 1.24 -tazpkg setup-mirror $SLITAZ_DIR/${undigest:-$SLITAZ_VERSION}/packages-incoming 1.25 +tazpkg setup-mirror $LOCAL_REPOSITORY/packages-incoming 1.26 tazpkg recharge 1.27 1.28 report step "Refreshing SliTaz tools" 1.29 @@ -39,22 +45,18 @@ 1.30 LANG=POSIX 1.31 LC_ALL=POSIX 1.32 1.33 -# Set BUILD_HOST to something like $ARCH-tmp-linux-gnu to enable 1.34 +# Set HOST_SYSTEM to something like $ARCH-tmp-linux-gnu to enable 1.35 # the temporary toolchain. 1.36 -BUILD_HOST=$(echo $BUILD_HOST | sed 's/\(.*\)-\(.*\)-linux-gnu/\1-tmp-linux-gnu/') 1.37 +HOST_SYSTEM=$(echo $HOST_SYSTEM | sed 's/\(.*\)-\(.*\)-linux-gnu/\1-tmp-linux-gnu/') 1.38 1.39 PATH=/tools/bin:/tools/usr/bin:/tools/sbin:/tools/usr/sbin:/bin:/usr/bin:/sbin:/usr/sbin 1.40 CONFIG_SITE="/etc/config.site.tmptoolchain" 1.41 -echo 'prefix=/tools' > /etc/config.site.tmptoolchain 1.42 +echo "prefix=/tools" > /etc/config.site.tmptoolchain 1.43 1.44 export LANG LC_ALL PATH PS1 MAKEFLAGS CONFIG_SITE 1.45 unset CC CXX CPP CFLAGS CXXFLAGS LD_LIBRARY_PATH LD_PRELOAD DESTDIR 1.46 1.47 -LOCAL_REPOSITORY=$SLITAZ_DIR/$SLITAZ_VERSION 1.48 -[ "$undigest" ] && LOCAL_REPOSITORY=$SLITAZ_DIR/$undigest 1.49 -WOK=$LOCAL_REPOSITORY/wok 1.50 - 1.51 -# Create the dir for the temporary toolchain and link in root of host 1.52 +# Create the dir for the temporary toolchain and link in root of build 1.53 # system. 1.54 rm -rf /tools 1.55 mkdir /tools 1.56 @@ -76,6 +78,7 @@ 1.57 cd $WOK/$PACKAGE 1.58 } 1.59 1.60 + 1.61 # Binutils and gcc need to be compiled twice. 1.62 for PACKAGE in binutils gcc; do 1.63 rm $LOCAL_REPOSITORY/log/tmp-toolchain-$PACKAGE-firstpass.html 2>/dev/null 1.64 @@ -85,7 +88,7 @@ 1.65 report open-bloc 1.66 prepare_package 1.67 report step "Running compilation rules" 1.68 - precook_tmp_toolchain 1.69 + cook_cross_toolchain 1.70 report end-step || exit 1 1.71 report close-bloc 1.72 report end-sublog