diff options
Diffstat (limited to 'config/qemu/qemu-cross')
-rwxr-xr-x | config/qemu/qemu-cross | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/config/qemu/qemu-cross b/config/qemu/qemu-cross index 221bd5f36..4c7469190 100755 --- a/config/qemu/qemu-cross +++ b/config/qemu/qemu-cross @@ -35,10 +35,14 @@ done args[${#args[@]}]="${linker}" args[${#args[@]}]="--inhibit-cache" -if [ "$(realpath "${1}")" != "${linker}" ]; then - args[${#args[@]}]="$(realpath "${1}")" +case "${1}" in + /*) cmd="$(readlink -f "${1}")" ;; + *) cmd="$(readlink -f "${PWD}/${1}")" ;; +esac +if [ "${cmd}" != "${linker}" ]; then + args[${#args[@]}]="${cmd}" fi - shift +shift if [ "${PTXDIST_VERBOSE}" = 1 -a -n "${PTXDIST_FD_LOGFILE}" ]; then echo "qemu: ${args[@]} ${@}" >&${PTXDIST_FD_LOGFILE} fi |