34aee9c946
When compiling QEMU with Clang 17 on a s390x, the compilation fails: In file included from ../accel/tcg/cputlb.c:32: In file included from /root/qemu/include/exec/helper-proto-common.h:10: In file included from /root/qemu/include/qemu/atomic128.h:62: /root/qemu/host/include/generic/host/atomic128-ldst.h:68:15: error: __sync builtin operation MUST have natural alignment (consider using __ atomic). [-Werror,-Wsync-alignment] 68 | } while (!__sync_bool_compare_and_swap_16(ptr_align, old, new.i)); | ^ In file included from ../accel/tcg/cputlb.c:32: In file included from /root/qemu/include/exec/helper-proto-common.h:10: In file included from /root/qemu/include/qemu/atomic128.h:61: /root/qemu/host/include/generic/host/atomic128-cas.h:36:11: error: __sync builtin operation MUST have natural alignment (consider using __a tomic). [-Werror,-Wsync-alignment] 36 | r.i = __sync_val_compare_and_swap_16(ptr_align, c.i, n.i); | ^ 2 errors generated. It's arguably a bug in Clang since we already use __builtin_assume_aligned() to tell the compiler that the pointer is properly aligned. But according to https://github.com/llvm/llvm-project/issues/69146 it seems like the Clang folks don't see an easy fix on their side and recommend to use a type declared with __attribute__((aligned(16))) to work around this problem. Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1934 Message-ID: <20231108085954.313071-1-thuth@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Signed-off-by: Thomas Huth <thuth@redhat.com> |
||
---|---|---|
.. | ||
accel.h | ||
async-teardown.h | ||
atomic128.h | ||
atomic.h | ||
base64.h | ||
bcd.h | ||
bitmap.h | ||
bitops.h | ||
bswap.h | ||
buffer.h | ||
cacheflush.h | ||
cacheinfo.h | ||
clang-tsa.h | ||
co-shared-resource.h | ||
compiler.h | ||
config-file.h | ||
coroutine_int.h | ||
coroutine-core.h | ||
coroutine-tls.h | ||
coroutine.h | ||
cpu-float.h | ||
cpuid.h | ||
crc32c.h | ||
crc-ccitt.h | ||
ctype.h | ||
cutils.h | ||
datadir.h | ||
dbus.h | ||
defer-call.h | ||
drm.h | ||
envlist.h | ||
error-report.h | ||
event_notifier.h | ||
fifo8.h | ||
fifo32.h | ||
filemonitor.h | ||
futex.h | ||
guest-random.h | ||
hbitmap.h | ||
help_option.h | ||
help-texts.h | ||
host-utils.h | ||
hw-version.h | ||
id.h | ||
int128.h | ||
interval-tree.h | ||
iov.h | ||
iova-tree.h | ||
jhash.h | ||
job.h | ||
keyval.h | ||
lockable.h | ||
log-for-trace.h | ||
log.h | ||
madvise.h | ||
main-loop.h | ||
memalign.h | ||
memfd.h | ||
mmap-alloc.h | ||
module.h | ||
mprotect.h | ||
notify.h | ||
nvdimm-utils.h | ||
option_int.h | ||
option.h | ||
osdep.h | ||
path.h | ||
plugin-event.h | ||
plugin-memory.h | ||
plugin.h | ||
pmem.h | ||
processor.h | ||
progress_meter.h | ||
qdist.h | ||
qemu-plugin.h | ||
qemu-print.h | ||
qemu-progress.h | ||
qht.h | ||
qsp.h | ||
qtree.h | ||
queue.h | ||
range.h | ||
ratelimit.h | ||
rcu_queue.h | ||
rcu.h | ||
readline.h | ||
reserved-region.h | ||
selfmap.h | ||
seqlock.h | ||
sockets.h | ||
stats64.h | ||
sys_membarrier.h | ||
systemd.h | ||
thread-context.h | ||
thread-posix.h | ||
thread-win32.h | ||
thread.h | ||
throttle-options.h | ||
throttle.h | ||
timed-average.h | ||
timer.h | ||
transactions.h | ||
tsan.h | ||
typedefs.h | ||
unicode.h | ||
units.h | ||
uri.h | ||
userfaultfd.h | ||
uuid.h | ||
vfio-helpers.h | ||
vhost-user-server.h | ||
win_dump_defs.h | ||
xattr.h | ||
xxhash.h | ||
yank.h |