On 07/01/21 10:10, Philippe Mathieu-Daudé wrote:
libblock.fa(block_io.c.o): In function `stat64_max':
include/qemu/stats64.h:58: undefined reference to `__atomic_load_8'
include/qemu/stats64.h:60: undefined reference to
`__atomic_compare_exchange_8'
libblock.fa(block_qapi.c.o): In function `stat64_get':
include/qemu/stats64.h:40: undefined reference to `__atomic_load_8'
libqemuutil.a(util_qsp.c.o): In function `qatomic_set_u64':
include/qemu/atomic.h:478: undefined reference to `__atomic_store_8'
libqemuutil.a(util_qsp.c.o): In function `qatomic_read_u64':
include/qemu/atomic.h:468: undefined reference to `__atomic_load_8'
clang: error: linker command failed with exit code 1 (use -v to see
invocation)

Issue previously reported on the list here:
https://www.mail-archive.com/qemu-devel@nongnu.org/msg770128.html

Looks like 64-bit atomics are available without sanitizers, but fall back to libatomic with sanitizers (tsan probably?).

So CONFIG_ATOMIC64 is not detected properly in configure, because -fsanitize=* flags are added (at "end of CC checks" around line 5000) after the atomic64 test (around 400 lines before that).

I'm not sure what breaks if -fsanitize flags are added earlier.

Paolo


Reply via email to