Don't use prefix/bin to install the buildtools.
Collect the build tools in a seperate folder in order to prevent accidental
calling our newly build tools.
Signed-off-by: Bart van der Meulen <bartvdrmeulen@gmail.com>
1.1 --- a/scripts/build/internals.sh Tue Jun 23 22:57:12 2009 +0200
1.2 +++ b/scripts/build/internals.sh Fri Jun 26 19:09:22 2009 +0200
1.3 @@ -9,9 +9,7 @@
1.4 CT_DoStep INFO "Cleaning-up the toolchain's directory"
1.5
1.6 CT_DoLog EXTRA "Removing access to the build system tools"
1.7 - find "${CT_PREFIX_DIR}/bin" -name "${CT_BUILD}-"'*' -exec rm -fv {} \; |CT_DoLog DEBUG
1.8 - find "${CT_PREFIX_DIR}/bin" -name "${CT_HOST}-"'*' -exec rm -fv {} \; |CT_DoLog DEBUG
1.9 - CT_DoExecLog DEBUG rm -fv "${CT_PREFIX_DIR}/bin/makeinfo"
1.10 + CT_DoExecLog DEBUG rm -rf "${CT_PREFIX_DIR}/buildtools"
1.11
1.12 if [ "${CT_BARE_METAL}" != "y" ]; then
1.13 CT_DoLog EXTRA "Installing the populate helper"
2.1 --- a/scripts/crosstool-NG.sh.in Tue Jun 23 22:57:12 2009 +0200
2.2 +++ b/scripts/crosstool-NG.sh.in Fri Jun 26 19:09:22 2009 +0200
2.3 @@ -349,7 +349,7 @@
2.4 # Now we have mangled our BUILD and HOST tuples, we must fake the new
2.5 # cross-tools for those mangled tuples.
2.6 CT_DoLog DEBUG "Making build system tools available"
2.7 - CT_DoExecLog ALL mkdir -p "${CT_PREFIX_DIR}/bin"
2.8 + CT_DoExecLog ALL mkdir -p "${CT_PREFIX_DIR}/buildtools"
2.9 for m in BUILD HOST; do
2.10 r="CT_REAL_${m}"
2.11 v="CT_${m}"
2.12 @@ -386,8 +386,8 @@
2.13 # bally needed
2.14 if [ -n "${where}" ]; then
2.15 CT_DoLog DEBUG " '${!v}-${tool}' -> '${where}'"
2.16 - printf "#${BANG}${CT_SHELL}\nexec '${where}' \"\${@}\"\n" >"${CT_PREFIX_DIR}/bin/${!v}-${tool}"
2.17 - CT_DoExecLog ALL chmod 700 "${CT_PREFIX_DIR}/bin/${!v}-${tool}"
2.18 + printf "#${BANG}${CT_SHELL}\nexec '${where}' \"\${@}\"\n" >"${CT_PREFIX_DIR}/buildtools/${!v}-${tool}"
2.19 + CT_DoExecLog ALL chmod 700 "${CT_PREFIX_DIR}/buildtools/${!v}-${tool}"
2.20 else
2.21 case "${tool}" in
2.22 # We'll at least need some of them...
2.23 @@ -417,7 +417,7 @@
2.24 # Of course, neither cross-native nor canadian can run on BUILD,
2.25 # so don't add those PATHs in this case...
2.26 case "${CT_TOOLCHAIN_TYPE}" in
2.27 - cross) export PATH="${CT_PREFIX_DIR}/bin:${CT_CC_CORE_SHARED_PREFIX_DIR}/bin:${CT_CC_CORE_STATIC_PREFIX_DIR}/bin:${PATH}";;
2.28 + cross) export PATH="${CT_PREFIX_DIR}/buildtools:${CT_PREFIX_DIR}/bin:${CT_CC_CORE_SHARED_PREFIX_DIR}/bin:${CT_CC_CORE_STATIC_PREFIX_DIR}/bin:${PATH}";;
2.29 *) ;;
2.30 esac
2.31
2.32 @@ -425,8 +425,8 @@
2.33 # Go ahead with those, by creating a wrapper that keeps partial files, and that
2.34 # never fails:
2.35 CT_DoLog DEBUG " 'makeinfo' -> '$(CT_Which makeinfo)'"
2.36 - printf "#${BANG}${CT_SHELL}\n$(CT_Which makeinfo) --force \"\${@}\"\ntrue\n" >"${CT_PREFIX_DIR}/bin/makeinfo"
2.37 - CT_DoExecLog ALL chmod 700 "${CT_PREFIX_DIR}/bin/makeinfo"
2.38 + printf "#${BANG}${CT_SHELL}\n$(CT_Which makeinfo) --force \"\${@}\"\ntrue\n" >"${CT_PREFIX_DIR}/buildtools/makeinfo"
2.39 + CT_DoExecLog ALL chmod 700 "${CT_PREFIX_DIR}/buildtools/makeinfo"
2.40
2.41 # Help gcc
2.42 CT_CFLAGS_FOR_HOST=
2.43 @@ -446,6 +446,7 @@
2.44 export PARALLELMFLAGS
2.45
2.46 CT_DoLog EXTRA "Installing user-supplied crosstool-NG configuration"
2.47 + CT_DoExecLog ALL mkdir -p "${CT_PREFIX_DIR}/bin"
2.48 CT_DoExecLog DEBUG install -m 0755 "${CT_LIB_DIR}/scripts/toolchain-config.in" "${CT_PREFIX_DIR}/bin/${CT_TARGET}-ct-ng.config"
2.49 CT_DoExecLog DEBUG sed -r -i -e 's,@@grep@@,"'"${grep}"'",;' "${CT_PREFIX_DIR}/bin/${CT_TARGET}-ct-ng.config"
2.50 bzip2 -c -9 .config >>"${CT_PREFIX_DIR}/bin/${CT_TARGET}-ct-ng.config"