tazwok diff chroot-scripts/cook-toolchain @ rev 545
Merge default.
author | Christopher Rogers <slaxemulator@gmail.com> |
---|---|
date | Sat Nov 26 12:55:25 2011 +0000 (2011-11-26) |
parents | 7df2902ad4d7 44e24b12e9dd |
children | 176f3c91b68a |
line diff
1.1 --- a/chroot-scripts/cook-toolchain Wed May 04 13:01:48 2011 +0000 1.2 +++ b/chroot-scripts/cook-toolchain Sat Nov 26 12:55:25 2011 +0000 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 @@ -29,7 +35,7 @@ 1.17 report step "Configuring repositories" 1.18 # Incoming packages as the only source for packages. 1.19 rm -r /var/lib/tazpkg/undigest 1.20 -tazpkg setup-mirror $SLITAZ_DIR/${undigest:-$SLITAZ_VERSION}/packages-incoming 1.21 +tazpkg setup-mirror $LOCAL_REPOSITORY/packages-incoming 1.22 tazpkg recharge 1.23 1.24 report step "Setting up environnement" 1.25 @@ -39,22 +45,18 @@ 1.26 LANG=POSIX 1.27 LC_ALL=POSIX 1.28 1.29 -# Set BUILD_HOST to something like $ARCH-tmp-linux-gnu to enable 1.30 +# Set HOST_SYSTEM to something like $ARCH-tmp-linux-gnu to enable 1.31 # the temporary toolchain. 1.32 -BUILD_HOST=$(echo $BUILD_HOST | sed 's/\(.*\)-\(.*\)-linux-gnu/\1-tmp-linux-gnu/') 1.33 +HOST_SYSTEM=$(echo $HOST_SYSTEM | sed 's/\(.*\)-\(.*\)-linux-gnu/\1-tmp-linux-gnu/') 1.34 1.35 PATH=/tools/bin:/tools/usr/bin:/tools/sbin:/tools/usr/sbin:/bin:/usr/bin:/sbin:/usr/sbin 1.36 CONFIG_SITE="/etc/config.site.tmptoolchain" 1.37 -echo 'prefix=/tools' > /etc/config.site.tmptoolchain 1.38 +echo "prefix=/tools" > /etc/config.site.tmptoolchain 1.39 1.40 export LANG LC_ALL PATH PS1 MAKEFLAGS CONFIG_SITE 1.41 unset CC CXX CPP CFLAGS CXXFLAGS LD_LIBRARY_PATH LD_PRELOAD DESTDIR 1.42 1.43 -LOCAL_REPOSITORY=$SLITAZ_DIR/$SLITAZ_VERSION 1.44 -[ "$undigest" ] && LOCAL_REPOSITORY=$SLITAZ_DIR/$undigest 1.45 -WOK=$LOCAL_REPOSITORY/wok 1.46 - 1.47 -# Create the dir for the temporary toolchain and link in root of host 1.48 +# Create the dir for the temporary toolchain and link in root of build 1.49 # system. 1.50 rm -rf /tools 1.51 mkdir /tools 1.52 @@ -76,6 +78,7 @@ 1.53 cd $WOK/$PACKAGE 1.54 } 1.55 1.56 + 1.57 # Binutils and gcc need to be compiled twice. 1.58 for PACKAGE in binutils gcc; do 1.59 rm $LOCAL_REPOSITORY/log/tmp-toolchain-$PACKAGE-firstpass.html 2>/dev/null 1.60 @@ -85,7 +88,7 @@ 1.61 report open-bloc 1.62 prepare_package 1.63 report step "Running compilation rules" 1.64 - precook_tmp_toolchain 1.65 + cook_cross_toolchain 1.66 report end-step || exit 1 1.67 report close-bloc 1.68 report end-sublog