From: Thomas Huth <thuth@redhat.com>
To: Christian Schoenebeck <qemu_oss@crudebyte.com>, qemu-devel@nongnu.org
Cc: peter.maydell@linaro.org, Richard Henderson <rth@twiddle.net>,
Paolo Bonzini <pbonzini@redhat.com>
Subject: Re: [RFC PATCH] configure: Fix atomic64 test for --enable-werror on macOS
Date: Thu, 16 Jul 2020 16:30:24 +0200 [thread overview]
Message-ID: <e79b4ae5-83fb-9953-edd2-fc118305cb2c@redhat.com> (raw)
In-Reply-To: <2922420.RJvhEBMbDd@silver>
On 16/07/2020 16.15, Christian Schoenebeck wrote:
> On Donnerstag, 16. Juli 2020 15:11:01 CEST Thomas Huth wrote:
>> When using --enable-werror for the macOS builders in the Cirrus-CI,
>> the atomic64 test is currently failing, and config.log shows a bunch
>> of error messages like this:
>>
>> config-temp/qemu-conf.c:6:7: error: implicit declaration of function
>> '__atomic_load_8' is invalid in C99
>> [-Werror,-Wimplicit-function-declaration] y = __atomic_load_8(&x, 0);
>> ^
>> config-temp/qemu-conf.c:6:7: error: this function declaration is not a
>> prototype [-Werror,-Wstrict-prototypes]
>
> Well, __atomic_*_8() functions do exist on macOS, but it does not look like
> they are supposed to be 'officially' used.
>
> You can compile sources with these functions, and yes they are linking fine
> despite the warning, but IMO not a good idea to use them, as AFAICS they are
> not defined by any public header file.
>
>> Suppress the warnings to make it pass.
>>
>> Signed-off-by: Thomas Huth <thuth@redhat.com>
>> ---
>> Not sure whether this is the best way to fix this issue ... thus marked
>> as RFC.
>
> Probably it is better to switch to their official C11 counterpart functions
> for this test, like e.g. __atomic_load() instead of __atomic_load_8(), etc.
> That's what the actual qemu code base is using actually anyway.
Thanks, that sounds like a good idea! I'll have a try when I've got some
spare minutes...
Thomas
next prev parent reply other threads:[~2020-07-16 14:32 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-16 13:11 [RFC PATCH] configure: Fix atomic64 test for --enable-werror on macOS Thomas Huth
2020-07-16 14:07 ` no-reply
2020-07-16 14:15 ` Christian Schoenebeck
2020-07-16 14:30 ` Thomas Huth [this message]
2020-07-16 14:25 ` Daniel P. Berrangé
2020-07-16 14:29 ` Thomas Huth
2020-07-16 14:53 ` Christian Schoenebeck
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=e79b4ae5-83fb-9953-edd2-fc118305cb2c@redhat.com \
--to=thuth@redhat.com \
--cc=pbonzini@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=qemu_oss@crudebyte.com \
--cc=rth@twiddle.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).