svn commit: r270951 - in head: share/mk usr.sbin/auditdistd

Ed Schouten ed at FreeBSD.org
Mon Sep 1 20:18:10 UTC 2014


Author: ed
Date: Mon Sep  1 20:18:09 2014
New Revision: 270951
URL: http://svnweb.freebsd.org/changeset/base/270951

Log:
  Add -Wthread-safety to WARNS=6.
  
  While there, add a NO_WTHREAD_SAFETY flag that can be used to disable
  this specific warning flag. Disable it for auditdistd. We can easily
  patch up auditdistd to have the right annotations to build, but as
  auditdistd is intended to be portable across other operating systems,
  it's not worth the effort.
  
  Approved by:	brueffer@

Modified:
  head/share/mk/bsd.sys.mk
  head/usr.sbin/auditdistd/Makefile

Modified: head/share/mk/bsd.sys.mk
==============================================================================
--- head/share/mk/bsd.sys.mk	Mon Sep  1 19:56:28 2014	(r270950)
+++ head/share/mk/bsd.sys.mk	Mon Sep  1 20:18:09 2014	(r270951)
@@ -54,6 +54,9 @@ CWARNFLAGS+=	-Wchar-subscripts -Winline 
 .if !defined(NO_WMISSING_VARIABLE_DECLARATIONS)
 CWARNFLAGS.clang+=	-Wmissing-variable-declarations
 .endif
+.if !defined(NO_WTHREAD_SAFETY)
+CWARNFLAGS.clang+=	-Wthread-safety
+.endif
 .endif # WARNS >= 6
 .if ${WARNS} >= 2 && ${WARNS} <= 4
 # XXX Delete -Wuninitialized by default for now -- the compiler doesn't

Modified: head/usr.sbin/auditdistd/Makefile
==============================================================================
--- head/usr.sbin/auditdistd/Makefile	Mon Sep  1 19:56:28 2014	(r270950)
+++ head/usr.sbin/auditdistd/Makefile	Mon Sep  1 20:18:09 2014	(r270951)
@@ -30,4 +30,8 @@ YFLAGS+=-v
 
 CLEANFILES=parse.c parse.h parse.output
 
+# auditdistd cannot use FreeBSD specific lock annotation macros. Disable
+# thread safety analysis completely.
+NO_WTHREAD_SAFETY=
+
 .include <bsd.prog.mk>


More information about the svn-src-all mailing list