summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYann E. MORIN" <yann.morin.1998@anciens.enib.fr>2008-08-09 18:03:02 (GMT)
committerYann E. MORIN" <yann.morin.1998@anciens.enib.fr>2008-08-09 18:03:02 (GMT)
commitee225f2629d5059fd3960c5b930b3615fc1af9f3 (patch)
tree2f8b5ce9d63757cc61d7d26bbe83aadf6ec9eda1
parent64dd9107e4240e4c7ce3d1aae75d1e916732e2f6 (diff)
Merge #893 and #923 from trunk:
populate is not relocatable. /branches/1.2/scripts/crosstool.sh | 14 6 8 0 ++++++-------- /branches/1.2/tools/populate.in | 6 4 2 0 ++++-- 2 files changed, 10 insertions(+), 10 deletions(-)
-rwxr-xr-xscripts/crosstool.sh14
-rw-r--r--tools/populate.in6
2 files changed, 10 insertions, 10 deletions
diff --git a/scripts/crosstool.sh b/scripts/crosstool.sh
index a393d87..4ac5d39 100755
--- a/scripts/crosstool.sh
+++ b/scripts/crosstool.sh
@@ -524,9 +524,9 @@ if [ "${CT_ONLY_DOWNLOAD}" != "y" -a "${CT_ONLY_EXTRACT}" != "y" ]; then
# Install the /populator/
CT_DoLog EXTRA "Installing the populate helper"
- sed -r -e 's,@@CT_READELF@@,'"${CT_PREFIX_DIR}/bin/${CT_TARGET}-readelf"',g;' \
- -e 's,@@CT_SYSROOT_DIR@@,'"${CT_SYSROOT_DIR}"',g;' \
- "${CT_LIB_DIR}/tools/populate.in" >"${CT_PREFIX_DIR}/bin/${CT_TARGET}-populate"
+ sed -r -e 's|@@CT_TARGET@@|'"${CT_TARGET}"'|g;' \
+ "${CT_LIB_DIR}/tools/populate.in" \
+ >"${CT_PREFIX_DIR}/bin/${CT_TARGET}-populate"
chmod 755 "${CT_PREFIX_DIR}/bin/${CT_TARGET}-populate"
# Create the aliases to the target tools
@@ -535,15 +535,13 @@ if [ "${CT_ONLY_DOWNLOAD}" != "y" -a "${CT_ONLY_EXTRACT}" != "y" ]; then
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_DoLog DEBUG "Linking '${_t}' -> '${t}'"
- ln -sv "${t}" "${_t}" 2>&1 |CT_DoLog ALL
+ ln -sv "${t}" "${_t}" 2>&1
fi
if [ -n "${CT_TARGET_ALIAS_SED_EXPR}" ]; then
_t=$(echo "$t" |sed -r -e "${CT_TARGET_ALIAS_SED_EXPR}")
- CT_DoLog DEBUG "Linking '${_t}' -> '${t}'"
- ln -sv "${t}" "${_t}" 2>&1 |CT_DoLog ALL
+ ln -sv "${t}" "${_t}" 2>&1
fi
- done
+ done |CT_DoLog ALL
CT_Popd
CT_EndStep
diff --git a/tools/populate.in b/tools/populate.in
index 7c27f39..00c0c75 100644
--- a/tools/populate.in
+++ b/tools/populate.in
@@ -4,8 +4,10 @@
# (C) 2007 Yann E. MORIN
# Licensed under the GPL v2
-CT_READELF="@@CT_READELF@@"
-CT_SYSROOT_DIR="@@CT_SYSROOT_DIR@@"
+# Detect where the toolchain is:
+BIN_DIR="$(cd "$(dirname "$(readlink -fn "$0")")"; pwd)"
+CT_READELF="${BIN_DIR}/@@CT_TARGET@@-readelf"
+CT_SYSROOT_DIR="${BIN_DIR}/../@@CT_TARGET@@/sys-root"
myname=$(basename "$0")