qemu-devel
[Top][All Lists]
Advanced

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

Re: clang build error on i686


From: Philippe Mathieu-Daudé
Subject: Re: clang build error on i686
Date: Sat, 3 Jul 2021 18:27:07 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0

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



reply via email to

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