void-packages/common/build-helper/qemu.sh
Érico Rolim 813d893710 common/build-helper/qemu.sh: add vtargetrun function.
It's a function to call the qemu executable for the target arch, or a
noop if the build isn't a cross build.
2020-07-28 04:24:40 +00:00

15 lines
295 B
Bash

if [ "$CROSS_BUILD" ]; then
export QEMU_LD_PREFIX=${XBPS_CROSS_BASE}
if [[ $hostmakedepends != *"qemu-user-static"* ]]; then
hostmakedepends+=" qemu-user-static"
fi
fi
vtargetrun() {
if [ "$CROSS_BUILD" ]; then
"/usr/bin/qemu-${XBPS_TARGET_QEMU_MACHINE}-static" "$@"
else
"$@"
fi
}