configure: Disable thread-safety warnings on macOS
authorThomas Huth <thuth@redhat.com>
Wed, 1 Mar 2023 11:34:25 +0000 (12:34 +0100)
committerPeter Maydell <peter.maydell@linaro.org>
Sat, 4 Mar 2023 14:03:46 +0000 (14:03 +0000)
The enablement of -Wthread-safety broke compilation on macOS (if
-Werror is enabled, like in our CI). Disable it there by default
until the problems are resolved.

Signed-off-by: Thomas Huth <thuth@redhat.com>
Acked-by: Kevin Wolf <kwolf@redhat.com>
Message-id: 20230301113425.286946-1-thuth@redhat.com
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
configure

index 50a0b80b276979716ea93e4c260f7a0092123fef..219ff13748a34457f867af45270ef461152decb2 100755 (executable)
--- a/configure
+++ b/configure
@@ -1230,7 +1230,10 @@ add_to warn_flags -Wendif-labels
 add_to warn_flags -Wexpansion-to-defined
 add_to warn_flags -Wimplicit-fallthrough=2
 add_to warn_flags -Wmissing-format-attribute
-add_to warn_flags -Wthread-safety
+
+if test "$targetos" != "darwin"; then
+    add_to warn_flags -Wthread-safety
+fi
 
 nowarn_flags=
 add_to nowarn_flags -Wno-initializer-overrides