[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] configure: Move preadv check to meson.build

From: Philippe Mathieu-Daudé
Subject: Re: [PATCH] configure: Move preadv check to meson.build
Date: Wed, 27 Jan 2021 22:49:41 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.6.0

On 1/26/21 4:58 PM, Peter Maydell wrote:
> 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>
> ---
>  configure   | 16 ----------------
>  meson.build |  4 +++-
>  2 files changed, 3 insertions(+), 17 deletions(-)

Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>

reply via email to

[Prev in Thread] Current Thread [Next in Thread]