summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorBernhard Walle <bernhard@bwalle.de>2014-07-22 17:22:11 +0200
committerMichael Olbrich <m.olbrich@pengutronix.de>2014-07-29 10:39:50 +0200
commit48eb472ca87567e31c82ac099e64b1eb836f6ac0 (patch)
treeb75bf31fbf1f0af90d48a50e585e9f51b5e32149 /bin
parentedc7cdef9e74fd3b583fb3d9c00b2a4331d4dd31 (diff)
downloadptxdist-48eb472ca87567e31c82ac099e64b1eb836f6ac0.tar.gz
ptxdist-48eb472ca87567e31c82ac099e64b1eb836f6ac0.tar.xz
ptxdist: Create symlinks for toolchain-related tools
This patch adds symlinks in the toolchain wrapper dir for toolchain-related tools like as, nm, etc. Currently, that symlinks are only created for tools for which ptxdist provides the wrapper mechanism. The primary use case is our internal build system (application that resides in local_src) that expects all programs to be at the same location (because some very complicated magic...). Apart from that, I think the solution to have all tools at the same place is cleaner and the patch is very small. So it would be nice if it could be accepted. Signed-off-by: Bernhard Walle <bernhard@bwalle.de> Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
Diffstat (limited to 'bin')
-rwxr-xr-xbin/ptxdist9
1 files changed, 9 insertions, 0 deletions
diff --git a/bin/ptxdist b/bin/ptxdist
index 45b3540d6..d9758e3dd 100755
--- a/bin/ptxdist
+++ b/bin/ptxdist
@@ -610,6 +610,12 @@ check_compiler() {
}
done
+ for tool in ar as cpp nm objcopy objdump ranlib readelf size strip ; do
+ tool_abs="$(which "${tool}" 2>/dev/null)"
+ ptxd_replace_link "${tool_abs}" "${wrapper_dir}/${tool}" || \
+ ptxd_bailout "Unable to create host ${tool} wrapper link"
+ done
+
if ptxd_get_ptxconf PTXCONF_BUILD_TOOLCHAIN >/dev/null; then
PATH="${wrapper_dir}:${PATH}"
return
@@ -712,6 +718,9 @@ check_compiler() {
ptxd_replace_link "$(which ${compiler_prefix}${cc})" "${wrapper_dir}/real/${compiler_prefix}${cc}" &&
ptxd_replace_link "${SCRIPTSDIR}/wrapper/${cc}-wrapper" "${wrapper_dir}/${compiler_prefix}${cc}"
done &&
+ for tool in ar as cpp nm objcopy objdump ranlib readelf size strip ; do
+ ptxd_replace_link "$(which ${compiler_prefix}${tool})" "${wrapper_dir}/${compiler_prefix}${tool}"
+ done &&
PATH="${wrapper_dir}:${PATH}" &&
if [ -n "${PTXDIST_ICECC}" ]; then
local icecc_dir="${sysroot_host}/lib/icecc"