All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC PATCH] configure: Fix atomic64 test for --enable-werror on macOS
@ 2020-07-16 13:11 Thomas Huth
  2020-07-16 14:07 ` no-reply
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Thomas Huth @ 2020-07-16 13:11 UTC (permalink / raw)
  To: peter.maydell, qemu-devel; +Cc: Paolo Bonzini, Richard Henderson

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]

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.
 Even though the compiler warns here, the program links apparently just
 fine afterwards and CONFIG_ATOMIC64=y gets set in the config-host.mak
 file on macOS, so the 64-bit atomic operations seem to be available...
 Any macOS users here who could shed some light on this?

 configure | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/configure b/configure
index e93836aaae..4d50a07b00 100755
--- a/configure
+++ b/configure
@@ -5939,7 +5939,8 @@ int main(void)
   return 0;
 }
 EOF
-if compile_prog "" "" ; then
+if compile_prog "-Wno-implicit-function-declaration -Wno-strict-prototypes" "";
+then
   atomic64=yes
 fi
 
-- 
2.18.1



^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2020-07-16 14:54 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
2020-07-16 14:25 ` Daniel P. Berrangé
2020-07-16 14:29   ` Thomas Huth
2020-07-16 14:53   ` Christian Schoenebeck

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.