summaryrefslogtreecommitdiff
path: root/tools/populate.in
diff options
context:
space:
mode:
Diffstat (limited to 'tools/populate.in')
-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")