From 89ddac0a072b11725b76e5798f407fdd76e68927 Mon Sep 17 00:00:00 2001 From: Manuel Canales Esparcia Date: Sat, 5 Aug 2006 11:41:45 +0000 Subject: [PATCH] Ported r2879 from trunk. --- HLFS/master.sh | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/HLFS/master.sh b/HLFS/master.sh index caf5761..e3eb41c 100755 --- a/HLFS/master.sh +++ b/HLFS/master.sh @@ -16,14 +16,30 @@ process_toolchain() { # embryo,cocoon and butterfly need special handling echo "${tab_}${tab_}${GREEN}toolchain ${L_arrow}${toolchain}${R_arrow}" + # + # Safe method to remove existing toolchain dirs + pkg_tarball=$(get_package_tarball_name "binutils") + wrt_remove_existing_dirs "$pkg_tarball" + pkg_tarball=$(get_package_tarball_name "gcc-core") + wrt_remove_existing_dirs "$pkg_tarball" + # + # Manually remove the toolchain directories.. + tc_phase=`echo $toolchain | sed -e 's@[0-9]\{3\}-@@' -e 's@-toolchain@@'` +( +cat << EOF + @rm -rf \$(MOUNT_PT)\$(SRC)/${tc_phase}-toolchain && \\ + rm -rf \$(MOUNT_PT)\$(SRC)/${tc_phase}-build +EOF +) >> $MKFILE.tmp + case ${toolchain} in *butterfly*) - [[ "$TEST" != "0" ]] && wrt_test_log2 "${this_script}" ( cat << EOF @echo "export PKGDIR=\$(SRC)" > envars EOF ) >> $MKFILE.tmp + [[ "$TEST" != "0" ]] && wrt_test_log2 "${this_script}" wrt_run_as_chroot1 "$toolchain" "$this_script" ;; @@ -317,7 +333,7 @@ chapter6_Makefiles() { # sysroot or chroot build phase case $name in glibc ) [[ "$TEST" != "0" ]] && wrt_test_log2 "${this_script}" ;; - * ) [[ "$TEST" = "2" ]] && [[ "$TEST" = "3" ]] && wrt_test_log2 "${this_script}" + * ) [[ "$TEST" > "1" ]] && wrt_test_log2 "${this_script}" ;; esac # If using optimizations, write the instructions