Tue Jan 7 02:16:42 2014 UTC ()
Non-literal format strings should be an error by default for clang.


(joerg)
diff -r1.231 -r1.232 src/share/mk/bsd.sys.mk

cvs diff -r1.231 -r1.232 src/share/mk/bsd.sys.mk (expand / switch to unified diff)

--- src/share/mk/bsd.sys.mk 2013/12/16 21:34:16 1.231
+++ src/share/mk/bsd.sys.mk 2014/01/07 02:16:41 1.232
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1# $NetBSD: bsd.sys.mk,v 1.231 2013/12/16 21:34:16 matt Exp $ 1# $NetBSD: bsd.sys.mk,v 1.232 2014/01/07 02:16:41 joerg Exp $
2# 2#
3# Build definitions used for NetBSD source tree builds. 3# Build definitions used for NetBSD source tree builds.
4 4
5.if !defined(_BSD_SYS_MK_) 5.if !defined(_BSD_SYS_MK_)
6_BSD_SYS_MK_=1 6_BSD_SYS_MK_=1
7 7
8.if ${MKREPRO:Uno} == "yes" 8.if ${MKREPRO:Uno} == "yes"
9CPPFLAGS+= -Wp,-iremap,${NETBSDSRCDIR}:/usr/src 9CPPFLAGS+= -Wp,-iremap,${NETBSDSRCDIR}:/usr/src
10CPPFLAGS+= -Wp,-iremap,${DESTDIR}/:/ 10CPPFLAGS+= -Wp,-iremap,${DESTDIR}/:/
11CPPFLAGS+= -Wp,-iremap,${X11SRCDIR}:/usr/xsrc 11CPPFLAGS+= -Wp,-iremap,${X11SRCDIR}:/usr/xsrc
12.endif 12.endif
13 13
14# Enable c99 mode by default. 14# Enable c99 mode by default.
@@ -58,27 +58,26 @@ CXXFLAGS+= -Wabi @@ -58,27 +58,26 @@ CXXFLAGS+= -Wabi
58CXXFLAGS+= -Wold-style-cast 58CXXFLAGS+= -Wold-style-cast
59CXXFLAGS+= -Wctor-dtor-privacy -Wnon-virtual-dtor -Wreorder \ 59CXXFLAGS+= -Wctor-dtor-privacy -Wnon-virtual-dtor -Wreorder \
60 -Wno-deprecated -Woverloaded-virtual -Wsign-promo -Wsynth 60 -Wno-deprecated -Woverloaded-virtual -Wsign-promo -Wsynth
61CXXFLAGS+= ${${ACTIVE_CXX} == "gcc":? -Wno-non-template-friend -Wno-pmf-conversions :} 61CXXFLAGS+= ${${ACTIVE_CXX} == "gcc":? -Wno-non-template-friend -Wno-pmf-conversions :}
62.endif 62.endif
63.if ${WARNS} > 3 && (defined(HAVE_GCC) || defined(HAVE_LLVM)) 63.if ${WARNS} > 3 && (defined(HAVE_GCC) || defined(HAVE_LLVM))
64.if ${WARNS} > 4 64.if ${WARNS} > 4
65CFLAGS+= -Wold-style-definition 65CFLAGS+= -Wold-style-definition
66.endif 66.endif
67.if ${WARNS} > 5 && !(defined(HAVE_GCC) && ${HAVE_GCC} <= 45) 67.if ${WARNS} > 5 && !(defined(HAVE_GCC) && ${HAVE_GCC} <= 45)
68CFLAGS+= -Wconversion 68CFLAGS+= -Wconversion
69.endif 69.endif
70CFLAGS+= -Wsign-compare -Wformat=2 70CFLAGS+= -Wsign-compare -Wformat=2
71CFLAGS+= ${${ACTIVE_CC} == "clang":? -Wno-error=format-nonliteral :} 
72CFLAGS+= ${${ACTIVE_CC} == "gcc":? -Wno-format-zero-length :} 71CFLAGS+= ${${ACTIVE_CC} == "gcc":? -Wno-format-zero-length :}
73.endif 72.endif
74.if ${WARNS} > 3 && defined(HAVE_LLVM) 73.if ${WARNS} > 3 && defined(HAVE_LLVM)
75CFLAGS+= ${${ACTIVE_CC} == "clang":? -Wpointer-sign -Wmissing-noreturn :} 74CFLAGS+= ${${ACTIVE_CC} == "clang":? -Wpointer-sign -Wmissing-noreturn :}
76.endif 75.endif
77.if (defined(HAVE_GCC) && ${HAVE_GCC} >= 45 \ 76.if (defined(HAVE_GCC) && ${HAVE_GCC} >= 45 \
78 && (${MACHINE_ARCH} == "coldfire" || \ 77 && (${MACHINE_ARCH} == "coldfire" || \
79 ${MACHINE_ARCH} == "sh3eb" || \ 78 ${MACHINE_ARCH} == "sh3eb" || \
80 ${MACHINE_ARCH} == "sh3el" || \ 79 ${MACHINE_ARCH} == "sh3el" || \
81 ${MACHINE_ARCH} == "m68k" || \ 80 ${MACHINE_ARCH} == "m68k" || \
82 ${MACHINE_ARCH} == "m68000")) 81 ${MACHINE_ARCH} == "m68000"))
83# XXX GCC 4.5 for sh3 and m68k (which we compile with -Os) is extra noisy for 82# XXX GCC 4.5 for sh3 and m68k (which we compile with -Os) is extra noisy for
84# cases it should be better with 83# cases it should be better with