summaryrefslogtreecommitdiff
path: root/scripts/crosstool-NG.sh.in
diff options
context:
space:
mode:
authorAlexey Neyman <stilor@att.net>2016-11-29 00:55:22 (GMT)
committerAlexey Neyman <stilor@att.net>2016-12-02 23:03:15 (GMT)
commitcf86df688a8e7aeba28767ae0f841022a2e8347b (patch)
tree1a66218983063c9531b00724d19967cbe5ceed8a /scripts/crosstool-NG.sh.in
parent3f7fbd7beda5d840cd9a15189a94aaad4a802d37 (diff)
Add 'companion tools for host' step.
Signed-off-by: Alexey Neyman <stilor@att.net>
Diffstat (limited to 'scripts/crosstool-NG.sh.in')
-rw-r--r--scripts/crosstool-NG.sh.in11
1 files changed, 11 insertions, 0 deletions
diff --git a/scripts/crosstool-NG.sh.in b/scripts/crosstool-NG.sh.in
index bb72069..063162d 100644
--- a/scripts/crosstool-NG.sh.in
+++ b/scripts/crosstool-NG.sh.in
@@ -185,12 +185,23 @@ CT_STATE_DIR="${CT_WORK_DIR}/${CT_TARGET}/state"
# sub-dir. So we won't have to save/restore it, not even create it.
# In case of cross or native, host-complibs are used for build-complibs;
# in case of canadian or cross-native, host-complibs are specific
+# Note about BUILD_COMPTOOLS_DIR: if installing companion tools for "host" in
+# a native or simple cross, we can can use the same binaries we built for
+# "build". However, we need companion tools for "build" early - as other
+# components may depend on them - so we may skip building for "host" rather
+# than for "build" in that case.
case "${CT_TOOLCHAIN_TYPE}" in
native|cross)
CT_HOST_COMPLIBS_DIR="${CT_BUILDTOOLS_PREFIX_DIR}"
+ if [ -n "${CT_COMP_TOOLS_FOR_HOST}" ]; then
+ CT_BUILD_COMPTOOLS_DIR="${CT_PREFIX_DIR}"
+ else
+ CT_BUILD_COMPTOOLS_DIR="${CT_BUILDTOOLS_PREFIX_DIR}"
+ fi
;;
canadian|cross-native)
CT_HOST_COMPLIBS_DIR="${CT_BUILDTOOLS_PREFIX_DIR}/complibs-host"
+ CT_BUILD_COMPTOOLS_DIR="${CT_BUILDTOOLS_PREFIX_DIR}"
;;
esac