Mesa (main): meson: disable -Werror=thread-safety on FreeBSD

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Tue Oct 19 07:31:36 UTC 2021


Module: Mesa
Branch: main
Commit: 60b7c3a0f49241f95e5b6f8da5d60eaa7bbeaabb
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=60b7c3a0f49241f95e5b6f8da5d60eaa7bbeaabb

Author: Jan Beich <jbeich at FreeBSD.org>
Date:   Sat Feb 20 12:30:56 2021 +0000

meson: disable -Werror=thread-safety on FreeBSD

Annotated <pthread.h> exposes too many errors in Mesa that are
non-trivial to fix and keep working without FreeBSD CI.

Fixes: 0d5fe24c9b7d ("macros: Add thread-safety annotation macros")
Reviewed-by: Eric Engestrom <eric at engestrom.ch>
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9168>

---

 meson.build | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/meson.build b/meson.build
index cd58317494e..2947a033995 100644
--- a/meson.build
+++ b/meson.build
@@ -1131,7 +1131,6 @@ else
     '-Werror=incompatible-pointer-types',
     '-Werror=int-conversion',
     '-Wimplicit-fallthrough',
-    '-Werror=thread-safety',
     '-Wno-missing-field-initializers',
     '-Wno-format-truncation',
     '-fno-math-errno',
@@ -1143,6 +1142,10 @@ else
   if not (cc.get_id() == 'gcc' and host_machine.system() == 'windows')
     _trial += ['-Werror=format', '-Wformat-security']
   endif
+  # FreeBSD annotated <pthread.h> but Mesa isn't ready
+  if not (cc.get_id() == 'clang' and host_machine.system() == 'freebsd')
+    _trial += ['-Werror=thread-safety']
+  endif
   foreach a : _trial
     if cc.has_argument(a)
       c_args += a



More information about the mesa-commit mailing list