summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorYann E. MORIN" <yann.morin.1998@anciens.enib.fr>2008-08-04 08:44:54 (GMT)
committerYann E. MORIN" <yann.morin.1998@anciens.enib.fr>2008-08-04 08:44:54 (GMT)
commit379ea09dbacbe4535cd40fede2eb93c588cfbb1e (patch)
treebe04c0b46257bd67e9b0e2d841fde177510e78a9 /tools
parent4eeadf87e2e338544d1311c702d850bfadfb6632 (diff)
Michael ABBOTT reported that populate is not relocatable.
Fix this by determining both the cross-readelf and the sys-root at runtime, not at build time. /trunk/configure | 1 1 0 0 + /trunk/scripts/crosstool.sh | 14 6 8 0 ++++++-------- /trunk/tools/populate.in | 6 4 2 0 ++++-- 3 files changed, 11 insertions(+), 10 deletions(-)
Diffstat (limited to 'tools')
-rw-r--r--tools/populate.in6
1 files changed, 4 insertions, 2 deletions
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")