]> Savannah Git Hosting - gnulib.git/commitdiff
manywarnings: Enable -Wthread-safety for clang.
authorBruno Haible <bruno@clisp.org>
Thu, 26 Sep 2024 01:48:11 +0000 (03:48 +0200)
committerBruno Haible <bruno@clisp.org>
Thu, 26 Sep 2024 01:48:11 +0000 (03:48 +0200)
* m4/manywarnings.m4 (gl_MANYWARN_ALL_GCC(C)): Enable -Wthread-safety
if supported.

ChangeLog
m4/manywarnings.m4

index a794c383ef285328dbce6ccec3aa81ddc126f0c0..366538e8b306a3b92f1927c7887f7f7e8f200209 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2024-09-25  Bruno Haible  <bruno@clisp.org>
+
+       manywarnings: Enable -Wthread-safety for clang.
+       * m4/manywarnings.m4 (gl_MANYWARN_ALL_GCC(C)): Enable -Wthread-safety
+       if supported.
+
 2024-09-25  Bruno Haible  <bruno@clisp.org>
 
        build-to-host.m4: Add one more convenience macro.
index 5b0baee20577feb8af1f5b6745e9bf0f1357dae0..3ccf405d2a5dcd378dbde7070048189038b098f6 100644 (file)
@@ -1,5 +1,5 @@
 # manywarnings.m4
-# serial 27
+# serial 28
 dnl Copyright (C) 2008-2024 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -185,6 +185,9 @@ AC_DEFUN([gl_MANYWARN_ALL_GCC(C)],
     esac
   fi
 
+  # These options are not supported by gcc, but are useful with clang.
+  AS_VAR_APPEND([$1], [' -Wthread-safety'])
+
   # Disable specific options as needed.
   if test "$gl_cv_cc_nomfi_needed" = yes; then
     AS_VAR_APPEND([$1], [' -Wno-missing-field-initializers'])