aboutsummaryrefslogtreecommitdiff
path: root/configure
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2021-01-26 15:58:46 +0000
committerPeter Maydell <peter.maydell@linaro.org>2021-01-29 10:47:28 +0000
commit2b9f74efcc0f5db6ddd133560cfe063fe891fde1 (patch)
tree303c674943eb44bfebe7689e0d564262acae6e98 /configure
parenta9dd161ff2f54446f0b0547447d8196699aca3e1 (diff)
configure: Move preadv check to meson.build
Move the preadv availability check to meson.build. This is what we want to be doing for host-OS-feature-checks anyway, but it also fixes a problem with building for macOS with the most recent XCode SDK on a Catalina host. On that configuration, 'preadv()' is provided as a weak symbol, so that programs can be built with optional support for it and make a runtime availability check to see whether the preadv() they have is a working one or one which they must not call because it will runtime-assert. QEMU's configure test passes (unless you're building with --enable-werror) because the test program using preadv() compiles, but then QEMU crashes at runtime when preadv() is called, with errors like: dyld: lazy symbol binding failed: Symbol not found: _preadv Referenced from: /Users/pm215/src/qemu/./build/x86/tests/test-replication Expected in: /usr/lib/libSystem.B.dylib dyld: Symbol not found: _preadv Referenced from: /Users/pm215/src/qemu/./build/x86/tests/test-replication Expected in: /usr/lib/libSystem.B.dylib Meson's own function availability check has a special case for macOS which adds '-Wl,-no_weak_imports' to the compiler flags, which forces the test to require the real function, not the macOS-version-too-old stub. So this commit fixes the bug where macOS builds on Catalina currently require --disable-werror. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Acked-by: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Message-id: 20210126155846.17109-1-peter.maydell@linaro.org
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure16
1 files changed, 0 insertions, 16 deletions
diff --git a/configure b/configure
index 87de49e2c2..8549c7b5eb 100755
--- a/configure
+++ b/configure
@@ -3532,19 +3532,6 @@ if compile_prog "" "" ; then
fi
##########################################
-# preadv probe
-cat > $TMPC <<EOF
-#include <sys/types.h>
-#include <sys/uio.h>
-#include <unistd.h>
-int main(void) { return preadv(0, 0, 0, 0); }
-EOF
-preadv=no
-if compile_prog "" "" ; then
- preadv=yes
-fi
-
-##########################################
# fdt probe
case "$fdt" in
@@ -5748,9 +5735,6 @@ fi
if test "$iovec" = "yes" ; then
echo "CONFIG_IOVEC=y" >> $config_host_mak
fi
-if test "$preadv" = "yes" ; then
- echo "CONFIG_PREADV=y" >> $config_host_mak
-fi
if test "$membarrier" = "yes" ; then
echo "CONFIG_MEMBARRIER=y" >> $config_host_mak
fi