From 7d68e8f4d276fc648fdf5f0b3a8eab180eb9bb7d Mon Sep 17 00:00:00 2001 From: "Andrew J. Hesford" Date: Tue, 15 Dec 2020 00:28:00 -0500 Subject: [PATCH] build-style/waf3: rely on qemu build helper in cross builds --- common/build-style/waf3.sh | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/common/build-style/waf3.sh b/common/build-style/waf3.sh index c38bbc8c201..0941214e969 100644 --- a/common/build-style/waf3.sh +++ b/common/build-style/waf3.sh @@ -3,8 +3,16 @@ # do_configure() { : ${configure_script:=waf} + local cross_args - PYTHON=/usr/bin/python3 python3 ${configure_script} configure --prefix=/usr --libdir=/usr/lib ${configure_args} + if [[ $build_helper = *"qemu"* ]] && [ "$CROSS_BUILD" ]; then + # If the qemu build helper is specified, use it for cross builds + cross_args="--cross-compile --hostcc=${CC_FOR_BUILD} + --cross-execute=qemu-${XBPS_TARGET_QEMU_MACHINE}-static" + fi + + PYTHON=/usr/bin/python3 python3 ${configure_script} configure \ + --prefix=/usr --libdir=/usr/lib ${configure_args} ${cross_args} } do_build() {