Module Name:    src
Committed By:   joerg
Date:           Mon May 30 13:47:02 UTC 2011

Modified Files:
        src/share/mk: bsd.README bsd.sys.mk

Log Message:
Add an alternative to NOGCCERROR for clang.


To generate a diff of this commit:
cvs rdiff -u -r1.282 -r1.283 src/share/mk/bsd.README
cvs rdiff -u -r1.201 -r1.202 src/share/mk/bsd.sys.mk

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/share/mk/bsd.README
diff -u src/share/mk/bsd.README:1.282 src/share/mk/bsd.README:1.283
--- src/share/mk/bsd.README:1.282	Fri May 20 16:02:23 2011
+++ src/share/mk/bsd.README	Mon May 30 13:47:01 2011
@@ -1,4 +1,4 @@
-#	$NetBSD: bsd.README,v 1.282 2011/05/20 16:02:23 plunky Exp $
+#	$NetBSD: bsd.README,v 1.283 2011/05/30 13:47:01 joerg Exp $
 #	@(#)bsd.README	8.2 (Berkeley) 4/2/94
 
 This is the README file for the make "include" files for the NetBSD
@@ -1623,6 +1623,9 @@
 			-Werror -Wa,--fatal-warnings
 		(The latter being for as(1).)
 
+NOCLANGERROR	If defined and clang is used as C compiler, -Werror is not
+		passed to it.
+
 WARNS		Crank up GCC warning options; the distinct levels are:
 			WARNS=1
 			WARNS=2

Index: src/share/mk/bsd.sys.mk
diff -u src/share/mk/bsd.sys.mk:1.201 src/share/mk/bsd.sys.mk:1.202
--- src/share/mk/bsd.sys.mk:1.201	Thu May 26 12:56:30 2011
+++ src/share/mk/bsd.sys.mk	Mon May 30 13:47:01 2011
@@ -1,4 +1,4 @@
-#	$NetBSD: bsd.sys.mk,v 1.201 2011/05/26 12:56:30 joerg Exp $
+#	$NetBSD: bsd.sys.mk,v 1.202 2011/05/30 13:47:01 joerg Exp $
 #
 # Build definitions used for NetBSD source tree builds.
 
@@ -65,7 +65,8 @@
 CWARNFLAGS+=	${CWARNFLAGS.${ACTIVE_CC}}
 
 CPPFLAGS+=	${AUDIT:D-D__AUDIT__}
-CFLAGS+=	${CWARNFLAGS} ${NOGCCERROR:D:U-Werror}
+_NOWERROR=	${defined(NOGCCERROR) || (${ACTIVE_CC} == "clang" && defined(NOCLANGERROR)):?yes:no}
+CFLAGS+=	${CWARNFLAGS} ${${_NOWERROR} == "no" :?-Werror:}
 LINTFLAGS+=	${DESTDIR:D-d ${DESTDIR}/usr/include}
 
 .if (${MACHINE_ARCH} == "alpha") || \

Reply via email to