On 7/3/21 6:20 PM, Philippe Mathieu-Daudé wrote: > On 7/3/21 4:34 PM, Cole Robinson wrote: >> Hi, I'm hitting build errors with clang on i686 userspace on x86_64 >> kernel. Affects both qemu 6.0.0 and qemu.git, tested with fedora >> clang-12.0.1~rc3-1.fc35.i686. > >> /builddir/build/BUILD/qemu-6.0.0/include/qemu/stats64.h:58:21: warning: >> misaligned atomic operation may incur significant performance penalty; >> the expected alignment (8 bytes) exceeds the actual alignment (4 bytes) >> [-Watomic-alignment] >> uint64_t orig = qatomic_read__nocheck(&s->value); >> ^ >> /builddir/build/BUILD/qemu-6.0.0/include/qemu/atomic.h:129:5: note: >> expanded from macro 'qatomic_read__nocheck' >> __atomic_load_n(ptr, __ATOMIC_RELAXED) > > Ah I hit this one few months ago using Clang10 to build i386 guest > on mips64el host.
> Ah wait, there is also another one (which I reverted later): > > -- >8 -- > diff --git a/meson.build b/meson.build > index 372576f82c5..1a5da5ee56b 100644 > --- a/meson.build > +++ b/meson.build > @@ -161,6 +161,9 @@ > error('Multipath is supported only on Linux') > endif > > +if 'CONFIG_ATOMIC64' in config_host > + atomic = cc.find_library('atomic', required: config_host['ARCH'] in > ['i386', 'arm', 'riscv32']) > +endif > m = cc.find_library('m', required: false) > util = cc.find_library('util', required: false) > winmm = [] > @@ -1534,7 +1537,7 @@ > util_ss = util_ss.apply(config_all, strict: false) > libqemuutil = static_library('qemuutil', > sources: util_ss.sources() + > stub_ss.sources() + genh, > - dependencies: [util_ss.dependencies(), m, > glib, socket, malloc]) > + dependencies: [util_ss.dependencies(), > atomic, m, glib, socket, malloc]) > qemuutil = declare_dependency(link_with: libqemuutil, > sources: genh + version_res) > > --- > > No clue neither. Posting in case it ring a bell to someone. I suppose I dropped it after reading this thread: https://www.mail-archive.com/qemu-devel@nongnu.org/msg445404.html