Module Name: src Committed By: joerg Date: Tue Sep 20 09:11:07 UTC 2011
Modified Files: src/share/mk: bsd.sys.mk Log Message: Decouple clang and gcc handling a bit. Add -Wmissing-noreturn for clang builds. GCC complains about about non-void functions not returning, which is quite a bit more bogus, so don't enable it for that. To generate a diff of this commit: cvs rdiff -u -r1.208 -r1.209 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.sys.mk diff -u src/share/mk/bsd.sys.mk:1.208 src/share/mk/bsd.sys.mk:1.209 --- src/share/mk/bsd.sys.mk:1.208 Tue Aug 23 05:22:25 2011 +++ src/share/mk/bsd.sys.mk Tue Sep 20 09:11:06 2011 @@ -1,4 +1,4 @@ -# $NetBSD: bsd.sys.mk,v 1.208 2011/08/23 05:22:25 christos Exp $ +# $NetBSD: bsd.sys.mk,v 1.209 2011/09/20 09:11:06 joerg Exp $ # # Build definitions used for NetBSD source tree builds. @@ -61,7 +61,9 @@ .endif .if ${WARNS} > 3 && defined(HAVE_GCC) CFLAGS+= -Wsign-compare -Wformat=2 -CFLAGS+= ${${ACTIVE_CC} == "clang":? -Wpointer-sign :} +.endif +.if ${WARNS} > 3 && defined(HAVE_LLVM) +CFLAGS+= ${${ACTIVE_CC} == "clang":? -Wpointer-sign -Wmissing-noreturn :} .endif .if (defined(HAVE_GCC) && ${HAVE_GCC} == 45 \ && (${MACHINE_ARCH} == "sh3eb" || ${MACHINE_ARCH} == "sh3el"))