Module Name:    src
Committed By:   joerg
Date:           Thu Mar 15 02:00:52 UTC 2012

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

Log Message:
Decouple HAVE_LLVM from HAVE_GCC. For GCC, add -Wno-format-zero-length
when -Wformat is used.


To generate a diff of this commit:
cvs rdiff -u -r1.35 -r1.36 src/share/mk/bsd.kmodule.mk
cvs rdiff -u -r1.211 -r1.212 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.kmodule.mk
diff -u src/share/mk/bsd.kmodule.mk:1.35 src/share/mk/bsd.kmodule.mk:1.36
--- src/share/mk/bsd.kmodule.mk:1.35	Sun Feb 19 23:19:37 2012
+++ src/share/mk/bsd.kmodule.mk	Thu Mar 15 02:00:52 2012
@@ -1,4 +1,4 @@
-#	$NetBSD: bsd.kmodule.mk,v 1.35 2012/02/19 23:19:37 matt Exp $
+#	$NetBSD: bsd.kmodule.mk,v 1.36 2012/03/15 02:00:52 joerg Exp $
 
 # We are not building this with PIE
 MKPIE=no
@@ -18,7 +18,7 @@ CPPFLAGS+=	-isystem ${S}/../common/inclu
 CPPFLAGS+=	-D_KERNEL -D_LKM -D_MODULE -DSYSCTL_INCLUDE_DESCR
 
 # XXX until the kernel is fixed again...
-.if defined(HAVE_GCC) || defined(HAVE_PCC)
+.if defined(HAVE_GCC) || defined(HAVE_PCC) || defined(HAVE_LLVM)
 CFLAGS+=	-fno-strict-aliasing -Wno-pointer-sign
 .endif
 

Index: src/share/mk/bsd.sys.mk
diff -u src/share/mk/bsd.sys.mk:1.211 src/share/mk/bsd.sys.mk:1.212
--- src/share/mk/bsd.sys.mk:1.211	Sat Jan 28 21:32:14 2012
+++ src/share/mk/bsd.sys.mk	Thu Mar 15 02:00:52 2012
@@ -1,4 +1,4 @@
-#	$NetBSD: bsd.sys.mk,v 1.211 2012/01/28 21:32:14 christos Exp $
+#	$NetBSD: bsd.sys.mk,v 1.212 2012/03/15 02:00:52 joerg Exp $
 #
 # Build definitions used for NetBSD source tree builds.
 
@@ -13,7 +13,7 @@ CPPFLAGS+=	-Wp,-iremap,${DESTDIR}/:/
 # Enable c99 mode by default.
 # This has the side effect of complaining for missing prototypes
 # implicit type declarations and missing return statements.
-.if defined(HAVE_GCC)
+.if defined(HAVE_GCC) || defined(HAVE_LLVM)
 CFLAGS+=	-std=gnu99
 .endif
 
@@ -59,8 +59,9 @@ CXXFLAGS+=	-Wctor-dtor-privacy -Wnon-vir
 		-Wno-deprecated -Woverloaded-virtual -Wsign-promo -Wsynth
 CXXFLAGS+=	${${ACTIVE_CXX} == "gcc":? -Wno-non-template-friend -Wno-pmf-conversions :}
 .endif
-.if ${WARNS} > 3 && defined(HAVE_GCC)
+.if ${WARNS} > 3 && (defined(HAVE_GCC) || defined(HAVE_LLVM))
 CFLAGS+=	-Wsign-compare -Wformat=2
+CFLAGS+=	${${ACTIVE_CC} == "gcc":? -Wno-format-zero-length :}
 .endif
 .if ${WARNS} > 3 && defined(HAVE_LLVM)
 CFLAGS+=	${${ACTIVE_CC} == "clang":? -Wpointer-sign -Wmissing-noreturn :}

Reply via email to