From 379ea09dbacbe4535cd40fede2eb93c588cfbb1e Mon Sep 17 00:00:00 2001 From: "Yann E. MORIN\"" Date: Mon, 4 Aug 2008 08:44:54 +0000 Subject: 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(-) --- tools/populate.in | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'tools') diff --git a/tools/populate.in b/tools/populate.in index 7c27f391..00c0c754 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") -- cgit v1.2.3