Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 1 Sep 2014 20:18:09 +0000 (UTC)
From:      Ed Schouten <ed@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r270951 - in head: share/mk usr.sbin/auditdistd
Message-ID:  <201409012018.s81KI9lc039510@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201409012018.s81KI9lc039510>