From 9b296e99bc75f274c18dd09c616e13a190f04361 Mon Sep 17 00:00:00 2001 From: joerg Date: Tue, 20 Sep 2011 09:11:06 +0000 Subject: [PATCH] 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. --- share/mk/bsd.sys.mk | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/share/mk/bsd.sys.mk b/share/mk/bsd.sys.mk index 074c8763f3a9..90f260ba7053 100644 --- a/share/mk/bsd.sys.mk +++ b/share/mk/bsd.sys.mk @@ -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 @@ CXXFLAGS+= ${${ACTIVE_CXX} == "gcc":? -Wno-non-template-friend -Wno-pmf-conversi .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"))