summaryrefslogtreecommitdiff
path: root/scripts/build
diff options
context:
space:
mode:
authorAlexey Neyman <stilor@att.net>2017-03-12 23:56:19 (GMT)
committerAlexey Neyman <stilor@att.net>2017-03-12 23:56:19 (GMT)
commit8600f3ce56f67a2a0d7b4a14eb9e8b1f0ec49dec (patch)
treea6a194e0c2a6a47b4ed6fc12efd31346e3b5289a /scripts/build
parentcba19622002d9d01d6f99d2e477d0322b92cd916 (diff)
Move tools alias creation to a common function
... and in addition to final toolchain aliasing, use it when configuring multilibs for glibc/musl. Note that uClibc does not need it, it is explicitly selecting the tools using CROSS_PREFIX. Signed-off-by: Alexey Neyman <stilor@att.net>
Diffstat (limited to 'scripts/build')
-rw-r--r--scripts/build/internals.sh21
-rw-r--r--scripts/build/libc/glibc.sh2
-rw-r--r--scripts/build/libc/musl.sh2
3 files changed, 6 insertions, 19 deletions
diff --git a/scripts/build/internals.sh b/scripts/build/internals.sh
index 95fb72b..7d91d78 100644
--- a/scripts/build/internals.sh
+++ b/scripts/build/internals.sh
@@ -103,25 +103,8 @@ do_finish() {
# Create the aliases to the target tools
CT_DoLog EXTRA "Creating toolchain aliases"
- CT_Pushd "${CT_PREFIX_DIR}/bin"
- for t in "${CT_TARGET}-"*; do
- if [ -n "${CT_TARGET_ALIAS}" ]; then
- _t=$(echo "$t" |sed -r -e 's/^'"${CT_TARGET}"'-/'"${CT_TARGET_ALIAS}"'-/;')
- CT_DoExecLog ALL ln -sfv "${t}" "${_t}"
- fi
- if [ -n "${CT_TARGET_ALIAS_SED_EXPR}" ]; then
- _t=$(echo "$t" |sed -r -e "${CT_TARGET_ALIAS_SED_EXPR}")
- if [ "${_t}" = "${t}" ]; then
- CT_DoLog WARN "The sed expression '${CT_TARGET_ALIAS_SED_EXPR}' has no effect on '${t}'"
- else
- CT_DoExecLog ALL ln -sfv "${t}" "${_t}"
- fi
- fi
- done
- CT_Popd
-
- CT_DoLog EXTRA "Removing access to the build system tools"
- CT_DoExecLog DEBUG rm -rf "${CT_PREFIX_DIR}/buildtools"
+ CT_SymlinkTools "${CT_PREFIX_DIR}/bin" "${CT_PREFIX_DIR}/bin" \
+ "${CT_TARGET_ALIAS}" "${CT_TARGET_ALIAS_SED_EXPR}"
# Remove the generated documentation files
if [ "${CT_REMOVE_DOCS}" = "y" ]; then
diff --git a/scripts/build/libc/glibc.sh b/scripts/build/libc/glibc.sh
index 569183a..a630633 100644
--- a/scripts/build/libc/glibc.sh
+++ b/scripts/build/libc/glibc.sh
@@ -297,6 +297,8 @@ do_libc_backend_once() {
# or even after they get installed...
echo "ac_cv_path_BASH_SHELL=/bin/bash" >>config.cache
+ CT_SymlinkToolsMultilib
+
# Configure with --prefix the way we want it on the target...
# There are a whole lot of settings here. You'll probably want
# to read up on what they all mean, and customize a bit, possibly
diff --git a/scripts/build/libc/musl.sh b/scripts/build/libc/musl.sh
index 4ccb84c..3d6fe04 100644
--- a/scripts/build/libc/musl.sh
+++ b/scripts/build/libc/musl.sh
@@ -102,6 +102,8 @@ do_libc_backend_once() {
extra_config+=( "--includedir=/usr/include/${hdr_install_subdir}" )
fi
+ CT_SymlinkToolsMultilib
+
# NOTE: musl handles the build/host/target a little bit differently
# then one would expect:
# build : not used