summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjoerg <joerg@NetBSD.org>2011-05-26 12:56:24 +0000
committerjoerg <joerg@NetBSD.org>2011-05-26 12:56:24 +0000
commitab8637a85feb0cb8ca3a317f983e590da158196e (patch)
tree35cf9a1b0b4b71986db94446a9f440e88c42d36b
parent0423d5d67fa30a04769b199f3056cdc98141ba1b (diff)
Default to -Wno-sign-compare -Wno-pointer-sign for clang.
Push -Wno-array-bounds down to the cases that depend on it. Selectively disable warnings for 3rd party software or non-trivial issues to be reviewed later to get clang -Werror to build most of the tree.
-rw-r--r--bin/ksh/Makefile4
-rw-r--r--bin/sh/Makefile4
-rw-r--r--crypto/external/bsd/heimdal/lib/libkrb5/Makefile4
-rw-r--r--crypto/external/bsd/openssl/lib/libcrypto/Makefile3
-rw-r--r--crypto/external/bsd/openssl/lib/libssl/Makefile3
-rw-r--r--external/apache2/mDNSResponder/usr.sbin/mdnsd/Makefile4
-rw-r--r--external/bsd/am-utils/bin/amd/Makefile4
-rw-r--r--external/bsd/am-utils/bin/fsinfo/Makefile4
-rw-r--r--external/bsd/bind/Makefile.inc4
-rw-r--r--external/bsd/libpcap/lib/Makefile5
-rw-r--r--external/bsd/ntp/Makefile.inc6
-rw-r--r--external/bsd/openldap/bin/ldapexop/Makefile4
-rw-r--r--external/bsd/openldap/lib/libldap/Makefile4
-rw-r--r--external/bsd/openldap/lib/libldap_r/Makefile3
-rw-r--r--external/bsd/pkg_install/sbin/pkg_info/Makefile4
-rw-r--r--external/bsd/tcpdump/bin/Makefile4
-rw-r--r--external/gpl2/lvm2/lib/libdevmapper/Makefile4
-rw-r--r--external/gpl2/lvm2/lib/liblvm/Makefile4
-rw-r--r--external/gpl2/lvm2/sbin/dmsetup/Makefile3
-rw-r--r--external/gpl2/lvm2/sbin/lvm/Makefile3
-rw-r--r--external/gpl2/xcvs/Makefile.inc5
-rw-r--r--external/historical/nawk/bin/Makefile3
-rw-r--r--external/ibm-public/postfix/Makefile.inc3
-rw-r--r--external/public-domain/xz/Makefile.inc4
-rw-r--r--external/zlib/pigz/bin/pigz/Makefile4
-rw-r--r--gnu/lib/libstdc++-v3_4/Makefile5
-rw-r--r--gnu/lib/libsupc++4/Makefile4
-rw-r--r--gnu/usr.bin/diffutils/diff/Makefile4
-rw-r--r--gnu/usr.bin/diffutils/diff3/Makefile4
-rw-r--r--gnu/usr.bin/diffutils/lib/Makefile4
-rw-r--r--gnu/usr.bin/gdb6/Makefile.inc7
-rw-r--r--gnu/usr.bin/gettext/Makefile.inc4
-rw-r--r--gnu/usr.bin/gettext/libgrep/Makefile6
-rw-r--r--gnu/usr.bin/gettext/libnlspr/Makefile4
-rw-r--r--gnu/usr.bin/gettext/xgettext/Makefile4
-rw-r--r--gnu/usr.bin/gkermit/Makefile4
-rw-r--r--gnu/usr.bin/grep/grep/Makefile4
-rw-r--r--gnu/usr.bin/grep/lib/Makefile4
-rw-r--r--gnu/usr.bin/groff/Makefile.inc4
-rw-r--r--gnu/usr.bin/groff/src/devices/grohtml/Makefile4
-rw-r--r--gnu/usr.bin/groff/src/roff/troff/Makefile4
-rw-r--r--gnu/usr.bin/groff/src/utils/hpftodit/Makefile4
-rw-r--r--gnu/usr.bin/rcs/co/Makefile4
-rw-r--r--gnu/usr.bin/rcs/lib/Makefile4
-rw-r--r--gnu/usr.bin/texinfo/Makefile.inc4
-rw-r--r--gnu/usr.bin/texinfo/makeinfo/Makefile4
-rw-r--r--lib/libc/db/Makefile.inc4
-rw-r--r--lib/libpam/modules/pam_krb5/Makefile4
-rw-r--r--lib/libpam/modules/pam_ksu/Makefile4
-rw-r--r--lib/libperfuse/Makefile4
-rw-r--r--regress/lib/libc/int_fmtio/Makefile4
-rw-r--r--regress/sys/kern/sleeping/Makefile4
-rw-r--r--sbin/routed/rtquery/Makefile4
-rw-r--r--share/mk/bsd.sys.mk7
-rw-r--r--sys/arch/i386/stand/lib/Makefile.inc4
-rw-r--r--sys/conf/Makefile.kern.inc5
-rw-r--r--sys/lib/libsa/Makefile.inc4
-rw-r--r--sys/modules/ffs/Makefile4
-rw-r--r--sys/modules/layerfs/Makefile4
-rw-r--r--sys/modules/nilfs/Makefile4
-rw-r--r--sys/modules/null/Makefile4
-rw-r--r--sys/modules/overlay/Makefile4
-rw-r--r--sys/modules/udf/Makefile5
-rw-r--r--sys/modules/umap/Makefile4
-rw-r--r--sys/rump/fs/lib/liblayervfs/Makefile4
-rw-r--r--sys/rump/fs/lib/libnilfs/Makefile4
-rw-r--r--sys/rump/fs/lib/libnull/Makefile4
-rw-r--r--sys/rump/fs/lib/libudf/Makefile4
-rw-r--r--sys/rump/fs/lib/libumap/Makefile4
-rw-r--r--tests/crypto/libcrypto/Makefile.inc4
-rw-r--r--tests/include/Makefile4
-rw-r--r--tests/lib/libcurses/director/Makefile2
-rw-r--r--tests/lib/libcurses/slave/Makefile4
-rw-r--r--usr.bin/midiplay/Makefile4
-rw-r--r--usr.bin/mkubootimage/Makefile4
-rw-r--r--usr.bin/netstat/Makefile4
-rw-r--r--usr.bin/nvi/build/Makefile4
-rw-r--r--usr.bin/pmap/Makefile4
-rw-r--r--usr.bin/telnet/Makefile3
-rw-r--r--usr.bin/vmstat/Makefile4
-rw-r--r--usr.sbin/crash/Makefile4
-rw-r--r--usr.sbin/dhcp/Makefile.inc5
-rw-r--r--usr.sbin/ipf/Makefile.inc4
-rw-r--r--usr.sbin/mrouted/Makefile4
-rw-r--r--usr.sbin/ndbootd/Makefile4
-rw-r--r--usr.sbin/perfused/Makefile4
-rw-r--r--usr.sbin/pf/Makefile.inc3
-rw-r--r--usr.sbin/pppd/pppd/Makefile4
-rw-r--r--usr.sbin/sup/Makefile.inc4
89 files changed, 270 insertions, 91 deletions
diff --git a/bin/ksh/Makefile b/bin/ksh/Makefile
index 1f576fef0ce..1648a2b6ed3 100644
--- a/bin/ksh/Makefile
+++ b/bin/ksh/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.26 2009/02/14 08:31:13 lukem Exp $
+# $NetBSD: Makefile,v 1.27 2011/05/26 12:56:24 joerg Exp $
WARNS=3
@@ -47,4 +47,6 @@ ksh.1: ksh.Man mkman
${HOST_SH} $(.CURDIR)/mkman ksh $(.CURDIR)/ksh.Man >ksh.1.tmp \
&& mv ksh.1.tmp ksh.1
+CWARNFLAGS.clang+= -Wno-format-security
+
.include <bsd.prog.mk>
diff --git a/bin/sh/Makefile b/bin/sh/Makefile
index 946a015da95..e2ad074afb9 100644
--- a/bin/sh/Makefile
+++ b/bin/sh/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.94 2010/08/30 06:26:59 christos Exp $
+# $NetBSD: Makefile,v 1.95 2011/05/26 12:56:24 joerg Exp $
# @(#)Makefile 8.4 (Berkeley) 5/5/95
.include <bsd.own.mk>
@@ -82,5 +82,7 @@ NBCOMPATLIB= -L${COMPATOBJDIR} -lnbcompat
SUBDIR+=USD.doc
.endif
+CWARNFLAGS.clang+= -Wno-uninitialized
+
.include <bsd.prog.mk>
.include <bsd.subdir.mk>
diff --git a/crypto/external/bsd/heimdal/lib/libkrb5/Makefile b/crypto/external/bsd/heimdal/lib/libkrb5/Makefile
index 64ddaeac50f..dcf65336c06 100644
--- a/crypto/external/bsd/heimdal/lib/libkrb5/Makefile
+++ b/crypto/external/bsd/heimdal/lib/libkrb5/Makefile
@@ -1,9 +1,11 @@
-# $NetBSD: Makefile,v 1.4 2011/05/25 19:21:18 he Exp $
+# $NetBSD: Makefile,v 1.5 2011/05/26 12:56:24 joerg Exp $
USE_FORT?= yes # network protocol library
NOLINT= # defined
+CWARNFLAGS.clang= -Wno-conversion -Wno-tautological-compare
+
.include <bsd.own.mk>
.include <${.CURDIR}/../../Makefile.inc>
diff --git a/crypto/external/bsd/openssl/lib/libcrypto/Makefile b/crypto/external/bsd/openssl/lib/libcrypto/Makefile
index ac581b951ea..1f1ba96f69f 100644
--- a/crypto/external/bsd/openssl/lib/libcrypto/Makefile
+++ b/crypto/external/bsd/openssl/lib/libcrypto/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.2 2010/07/06 05:59:50 mrg Exp $
+# $NetBSD: Makefile,v 1.3 2011/05/26 12:56:25 joerg Exp $
# RCSid:
# Id: Makefile,v 1.33 1998/11/11 11:53:53 sjg Exp
@@ -27,6 +27,7 @@ USE_FIPS= no
# XXX There's a bit of work to do before we can enable warnings.
WARNS=0
+CWARNFLAGS.clang+= -Wno-empty-body -Wno-unused-value -Wno-parentheses
CPPFLAGS+= -Dlib${LIB} -I. -I${OPENSSLSRC}/crypto -I${OPENSSLSRC} -I${OPENSSLSRC}/crypto/asn1 -I${OPENSSLSRC}/crypto/evp
diff --git a/crypto/external/bsd/openssl/lib/libssl/Makefile b/crypto/external/bsd/openssl/lib/libssl/Makefile
index da01dd62a93..33ac3de3cce 100644
--- a/crypto/external/bsd/openssl/lib/libssl/Makefile
+++ b/crypto/external/bsd/openssl/lib/libssl/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.2 2010/07/06 05:59:51 mrg Exp $
+# $NetBSD: Makefile,v 1.3 2011/05/26 12:56:25 joerg Exp $
# RCSid:
# Id: Makefile,v 1.33 1998/11/11 11:53:53 sjg Exp
@@ -22,6 +22,7 @@ USE_FORT?=yes # cryptographic software and network library
# XXX There's a bit of work to do before we can enable warnings.
WARNS=0
+CWARNFLAGS.clang+= -Wno-unused-value
LIB= ssl
CPPFLAGS+= -Dlib${LIB} -I${OPENSSLSRC} -I${OPENSSLSRC}/crypto
diff --git a/external/apache2/mDNSResponder/usr.sbin/mdnsd/Makefile b/external/apache2/mDNSResponder/usr.sbin/mdnsd/Makefile
index 3dd6aac66c6..98b18ea44ec 100644
--- a/external/apache2/mDNSResponder/usr.sbin/mdnsd/Makefile
+++ b/external/apache2/mDNSResponder/usr.sbin/mdnsd/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.6 2011/02/27 13:05:38 plunky Exp $
+# $NetBSD: Makefile,v 1.7 2011/05/26 12:56:25 joerg Exp $
PROG= mdnsd
@@ -16,4 +16,6 @@ COPTS.uds_daemon.c += -Wno-stack-protector
MAN= mdnsd.8
+CWARNFLAGS.clang+= -Wno-unused-value
+
.include <bsd.prog.mk>
diff --git a/external/bsd/am-utils/bin/amd/Makefile b/external/bsd/am-utils/bin/amd/Makefile
index b8d93a342da..4f7c7b564a2 100644
--- a/external/bsd/am-utils/bin/amd/Makefile
+++ b/external/bsd/am-utils/bin/amd/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.5 2010/02/08 07:56:38 plunky Exp $
+# $NetBSD: Makefile,v 1.6 2011/05/26 12:56:25 joerg Exp $
.include "${.CURDIR}/../Makefile.inc"
@@ -63,6 +63,8 @@ YPREFIX.sun_map_parse.y = sun_map_
LPREFIX.sun_map_tok.l = sun_map_
CPPFLAGS.sun_map_tok.c += -Dyylval=sun_map_lval -Dyyerror=sun_map_error
+CWARNFLAGS.clang+= -Wno-unneeded-internal-declaration
+
YPREFIX.conf_parse.y = conf_
LPREFIX.conf_tok.l = conf_
CPPFLAGS.conf_tok.c += -Dyylval=conf_lval -Dyyerror=conf_error
diff --git a/external/bsd/am-utils/bin/fsinfo/Makefile b/external/bsd/am-utils/bin/fsinfo/Makefile
index 8199af8f2b8..73fdfe47e00 100644
--- a/external/bsd/am-utils/bin/fsinfo/Makefile
+++ b/external/bsd/am-utils/bin/fsinfo/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.3 2009/10/29 14:43:27 christos Exp $
+# $NetBSD: Makefile,v 1.4 2011/05/26 12:56:25 joerg Exp $
.include "${.CURDIR}/../Makefile.inc"
@@ -18,6 +18,8 @@ CPPFLAGS.fsi_lex.c += -Dyylval=fsi_yylval -Dyyerror=fsi_yyerror
CPPFLAGS.fsi_util.c += -Dyyerror=fsi_yyerror -Dyyparse=fsi_yyparse
CPPFLAGS.fsinfo.c += -Dyyparse=fsi_yyparse
+CWARNFLAGS.clang+= -Wno-unneeded-internal-declaration
+
FSINFOOBJDIR!=cd ${.CURDIR} && ${PRINTOBJDIR}
CPPFLAGS+= -I${DIST} -I${FSINFOOBJDIR}
diff --git a/external/bsd/bind/Makefile.inc b/external/bsd/bind/Makefile.inc
index 2a2f755e2d4..ea7f020b69f 100644
--- a/external/bsd/bind/Makefile.inc
+++ b/external/bsd/bind/Makefile.inc
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.inc,v 1.10 2011/05/02 19:04:54 christos Exp $
+# $NetBSD: Makefile.inc,v 1.11 2011/05/26 12:56:25 joerg Exp $
.if !defined(BIND9_MAKEFILE_INC)
BIND9_MAKEFILE_INC=yes
@@ -9,6 +9,8 @@ USE_FORT?= yes # network client/server
WARNS?= 1
+CWARNFLAGS.clang+= -Wno-unused-value -Wno-parentheses
+
.include <bsd.own.mk>
.if ${MKCRYPTO} == "no"
diff --git a/external/bsd/libpcap/lib/Makefile b/external/bsd/libpcap/lib/Makefile
index 59d5d7667d1..051a351841c 100644
--- a/external/bsd/libpcap/lib/Makefile
+++ b/external/bsd/libpcap/lib/Makefile
@@ -1,9 +1,12 @@
-# $NetBSD: Makefile,v 1.2 2010/12/05 03:03:27 christos Exp $
+# $NetBSD: Makefile,v 1.3 2011/05/26 12:56:25 joerg Exp $
.include <bsd.own.mk>
USE_FORT?= yes # network protocol library
+CWARNFLAGS.clang+= -Wno-format-extra-args \
+ -Wno-unneeded-internal-declaration
+
.SUFFIXES: .3 .3pcap
__sed: .USE
diff --git a/external/bsd/ntp/Makefile.inc b/external/bsd/ntp/Makefile.inc
index 6f5f93f9782..f1c2e92d38a 100644
--- a/external/bsd/ntp/Makefile.inc
+++ b/external/bsd/ntp/Makefile.inc
@@ -1,10 +1,14 @@
-# $NetBSD: Makefile.inc,v 1.5 2010/12/04 23:08:32 christos Exp $
+# $NetBSD: Makefile.inc,v 1.6 2011/05/26 12:56:25 joerg Exp $
.if !defined(NTP_MAKEFILE_INC)
NTP_MAKEFILE_INC=yes
USE_FORT?= yes # network client/server
+CWARNFLAGS.clang+= -Wno-unneeded-internal-declaration \
+ -Wno-format-security -Wno-array-bounds \
+ -Wno-parentheses -Wno-constant-logical-operand
+
WARNS?= 5
.include <bsd.own.mk>
diff --git a/external/bsd/openldap/bin/ldapexop/Makefile b/external/bsd/openldap/bin/ldapexop/Makefile
index 48155b858ba..f4ad9e66ba8 100644
--- a/external/bsd/openldap/bin/ldapexop/Makefile
+++ b/external/bsd/openldap/bin/ldapexop/Makefile
@@ -1,5 +1,7 @@
-# $NetBSD: Makefile,v 1.2 2010/03/08 05:24:33 lukem Exp $
+# $NetBSD: Makefile,v 1.3 2011/05/26 12:56:26 joerg Exp $
PROG= ldapexop
+CWARNFLAGS.clang+= -Wno-format-extra-args
+
.include <bsd.prog.mk>
diff --git a/external/bsd/openldap/lib/libldap/Makefile b/external/bsd/openldap/lib/libldap/Makefile
index 3b3f556308e..52d296ef30e 100644
--- a/external/bsd/openldap/lib/libldap/Makefile
+++ b/external/bsd/openldap/lib/libldap/Makefile
@@ -1,7 +1,9 @@
-# $NetBSD: Makefile,v 1.2 2008/05/27 08:58:26 lukem Exp $
+# $NetBSD: Makefile,v 1.3 2011/05/26 12:56:26 joerg Exp $
USE_FORT?= yes
+CWARNFLAGS.clang= -Wno-format-extra-args
+
.include "../libldap/Makefile.libldap"
LIB= ldap
diff --git a/external/bsd/openldap/lib/libldap_r/Makefile b/external/bsd/openldap/lib/libldap_r/Makefile
index 74d4acec04c..fad7cafcdef 100644
--- a/external/bsd/openldap/lib/libldap_r/Makefile
+++ b/external/bsd/openldap/lib/libldap_r/Makefile
@@ -1,6 +1,7 @@
-# $NetBSD: Makefile,v 1.3 2008/10/27 07:26:29 mrg Exp $
+# $NetBSD: Makefile,v 1.4 2011/05/26 12:56:26 joerg Exp $
USE_FORT?= yes
+CWARNFLAGS.clang= -Wno-format-extra-args
.include "../libldap/Makefile.libldap"
diff --git a/external/bsd/pkg_install/sbin/pkg_info/Makefile b/external/bsd/pkg_install/sbin/pkg_info/Makefile
index dcf89bfc283..1addc2f6b10 100644
--- a/external/bsd/pkg_install/sbin/pkg_info/Makefile
+++ b/external/bsd/pkg_install/sbin/pkg_info/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.2 2009/02/02 20:47:21 joerg Exp $
+# $NetBSD: Makefile,v 1.3 2011/05/26 12:56:26 joerg Exp $
# Original from FreeBSD, no rcs id
PROG= pkg_info
@@ -8,4 +8,6 @@ SRCS= main.c perform.c show.c
.PATH: ${DIST}/info
+CWARNFLAGS.clang+= -Wno-format-security
+
.include <bsd.prog.mk>
diff --git a/external/bsd/tcpdump/bin/Makefile b/external/bsd/tcpdump/bin/Makefile
index c6c1f456249..600764f1d51 100644
--- a/external/bsd/tcpdump/bin/Makefile
+++ b/external/bsd/tcpdump/bin/Makefile
@@ -1,7 +1,9 @@
-# $NetBSD: Makefile,v 1.4 2010/12/17 09:54:28 jruoho Exp $
+# $NetBSD: Makefile,v 1.5 2011/05/26 12:56:26 joerg Exp $
WARNS?= 1 # XXX: need to cleanup later
+CWARNFLAGS.clang+= -Wno-constant-logical-operand
+
.include <bsd.own.mk>
USE_FORT?= yes # network client
diff --git a/external/gpl2/lvm2/lib/libdevmapper/Makefile b/external/gpl2/lvm2/lib/libdevmapper/Makefile
index c31b1abd2b6..b32dbd038d0 100644
--- a/external/gpl2/lvm2/lib/libdevmapper/Makefile
+++ b/external/gpl2/lvm2/lib/libdevmapper/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.7 2011/03/04 22:48:29 matt Exp $
+# $NetBSD: Makefile,v 1.8 2011/05/26 12:56:26 joerg Exp $
USE_SHLIBDIR= yes
USE_FORT?= no
@@ -8,6 +8,8 @@ NOLINT= #defined
LIB= devmapper
+CWARNFLAGS.clang+= -Wno-comment -Wno-parentheses -Wno-switch
+
CPPFLAGS+= -I${LIBDEVMAPPER_DISTDIR} \
-I${LIBDEVMAPPER_DISTDIR}/misc \
-I${LIBDEVMAPPER_DISTDIR}/mm \
diff --git a/external/gpl2/lvm2/lib/liblvm/Makefile b/external/gpl2/lvm2/lib/liblvm/Makefile
index 86d1962ab16..66a3d2b9bbd 100644
--- a/external/gpl2/lvm2/lib/liblvm/Makefile
+++ b/external/gpl2/lvm2/lib/liblvm/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.4 2009/12/02 01:54:20 haad Exp $
+# $NetBSD: Makefile,v 1.5 2011/05/26 12:56:26 joerg Exp $
LIBISPRIVATE= yes
@@ -9,6 +9,8 @@ NOLINT= #defined
LIB= lvm
+CWARNFLAGS+= -Wno-parentheses
+
CPPFLAGS+= -I${LVM2_DISTDIR}/lib -I${LVM2_DISTDIR}/include \
-I.
diff --git a/external/gpl2/lvm2/sbin/dmsetup/Makefile b/external/gpl2/lvm2/sbin/dmsetup/Makefile
index 92d0b8b44f2..1a5aa155630 100644
--- a/external/gpl2/lvm2/sbin/dmsetup/Makefile
+++ b/external/gpl2/lvm2/sbin/dmsetup/Makefile
@@ -1,7 +1,8 @@
-# $NetBSD: Makefile,v 1.7 2011/03/04 22:48:29 matt Exp $
+# $NetBSD: Makefile,v 1.8 2011/05/26 12:56:26 joerg Exp $
USE_FORT?= no
NOLINT= #defined
+CWARNFLAGS.clang+= -Wno-parentheses -Wno-unused-value
.include "../../lvm2tools.mk"
diff --git a/external/gpl2/lvm2/sbin/lvm/Makefile b/external/gpl2/lvm2/sbin/lvm/Makefile
index 4d74d2276cd..e52f1c04cb1 100644
--- a/external/gpl2/lvm2/sbin/lvm/Makefile
+++ b/external/gpl2/lvm2/sbin/lvm/Makefile
@@ -1,7 +1,8 @@
-# $NetBSD: Makefile,v 1.9 2011/03/04 22:48:29 matt Exp $
+# $NetBSD: Makefile,v 1.10 2011/05/26 12:56:26 joerg Exp $
USE_FORT?= no
NOLINT= #defined
+CWARNFLAGS.clang+= -Wno-parentheses
.include "../../lvm2tools.mk"
diff --git a/external/gpl2/xcvs/Makefile.inc b/external/gpl2/xcvs/Makefile.inc
index 6f7afac73ec..b03e3ef3daf 100644
--- a/external/gpl2/xcvs/Makefile.inc
+++ b/external/gpl2/xcvs/Makefile.inc
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.inc,v 1.1 2009/04/08 16:27:51 christos Exp $
+# $NetBSD: Makefile.inc,v 1.2 2011/05/26 12:56:27 joerg Exp $
.include <bsd.own.mk>
@@ -6,6 +6,9 @@ USE_FORT?= yes # network client/server
WARNS?= 0
+CWARNFLAGS.clang+= -Wno-tautological-compare -Wno-parentheses \
+ -Wno-format-security -Wno-format
+
BINDIR?= /usr/bin
IDIST= ${NETBSDSRCDIR}/external/gpl2/xcvs/dist
diff --git a/external/historical/nawk/bin/Makefile b/external/historical/nawk/bin/Makefile
index d10ae02972d..0332197fc78 100644
--- a/external/historical/nawk/bin/Makefile
+++ b/external/historical/nawk/bin/Makefile
@@ -1,6 +1,7 @@
-# $NetBSD: Makefile,v 1.4 2010/12/13 06:30:44 mrg Exp $
+# $NetBSD: Makefile,v 1.5 2011/05/26 12:56:27 joerg Exp $
WARNS?= 4
+CWARNFLAGS.clang+= -Wno-array-bounds -Wno-self-assign
.include <bsd.own.mk>
diff --git a/external/ibm-public/postfix/Makefile.inc b/external/ibm-public/postfix/Makefile.inc
index 52f3c977d3b..110c21472c5 100644
--- a/external/ibm-public/postfix/Makefile.inc
+++ b/external/ibm-public/postfix/Makefile.inc
@@ -1,8 +1,9 @@
-# $NetBSD: Makefile.inc,v 1.11 2011/04/29 15:21:44 tron Exp $
+# $NetBSD: Makefile.inc,v 1.12 2011/05/26 12:56:27 joerg Exp $
.include <bsd.own.mk>
USE_FORT?= yes # network client and server
+CWARNFLAGS.clang+= -Wno-comment -Wno-empty-body -Wno-format-extra-args
WARNS?= 0
diff --git a/external/public-domain/xz/Makefile.inc b/external/public-domain/xz/Makefile.inc
index 009d75f3ba2..dfae7802e1c 100644
--- a/external/public-domain/xz/Makefile.inc
+++ b/external/public-domain/xz/Makefile.inc
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.inc,v 1.1 2010/11/02 16:34:36 joerg Exp $
+# $NetBSD: Makefile.inc,v 1.2 2011/05/26 12:56:27 joerg Exp $
XZHOMEPAGE= http://tukaani.org/xz/
XZVERSION= 5.0.0
@@ -13,3 +13,5 @@ CPPFLAGS+= -DHAVE_CONFIG_H
CFLAGS+= -std=c99
WARNS= 2
+
+CWARNFLAGS.clang+= -Wno-format-security \ No newline at end of file
diff --git a/external/zlib/pigz/bin/pigz/Makefile b/external/zlib/pigz/bin/pigz/Makefile
index 3c909d02710..e9cc2a8ab32 100644
--- a/external/zlib/pigz/bin/pigz/Makefile
+++ b/external/zlib/pigz/bin/pigz/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.6 2010/11/09 00:11:37 lukem Exp $
+# $NetBSD: Makefile,v 1.7 2011/05/26 12:56:27 joerg Exp $
.include <bsd.own.mk>
@@ -6,6 +6,8 @@ BINDIR= /usr/bin
USE_FORT?= yes # data-driven bugs?
+CWARNFLAGS.clang+= -Wno-format
+
PROG= pigz
SRCS= pigz.c yarn.c
MAN= pigz.1
diff --git a/gnu/lib/libstdc++-v3_4/Makefile b/gnu/lib/libstdc++-v3_4/Makefile
index 61711bde28e..5a894c1b86e 100644
--- a/gnu/lib/libstdc++-v3_4/Makefile
+++ b/gnu/lib/libstdc++-v3_4/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.6 2010/07/06 05:59:51 mrg Exp $
+# $NetBSD: Makefile,v 1.7 2011/05/26 12:56:27 joerg Exp $
REQUIRETOOLS= yes
NOLINT= # defined
@@ -10,6 +10,9 @@ LDADD= -lgcc_s
LIBDPLIBS+= m ${.CURDIR}/../../../lib/libm
+CWARNFLAGS.clang+= -Wno-logical-op-parentheses \
+ -Wno-deprecated-writable-strings -Wno-parentheses
+
.if exists(${.CURDIR}/arch/${MACHINE_ARCH}/defs.mk) && ${MKGCC} != "no"
.include "${.CURDIR}/arch/${MACHINE_ARCH}/defs.mk"
diff --git a/gnu/lib/libsupc++4/Makefile b/gnu/lib/libsupc++4/Makefile
index 2c1d16b392b..c352b0f0526 100644
--- a/gnu/lib/libsupc++4/Makefile
+++ b/gnu/lib/libsupc++4/Makefile
@@ -1,10 +1,12 @@
-# $NetBSD: Makefile,v 1.4 2010/07/06 05:59:51 mrg Exp $
+# $NetBSD: Makefile,v 1.5 2011/05/26 12:56:27 joerg Exp $
REQUIRETOOLS= yes
NOLINT= # defined
NOPIC= # defined
NOPROFILE= # defined
+CWARNFLAGS.clang+= -Wno-parentheses
+
.include <bsd.own.mk>
LIB= supc++
diff --git a/gnu/usr.bin/diffutils/diff/Makefile b/gnu/usr.bin/diffutils/diff/Makefile
index 63c758d650b..edf0b7a68e4 100644
--- a/gnu/usr.bin/diffutils/diff/Makefile
+++ b/gnu/usr.bin/diffutils/diff/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.2 2006/11/10 17:36:08 christos Exp $
+# $NetBSD: Makefile,v 1.3 2011/05/26 12:56:27 joerg Exp $
.include "${.CURDIR}/../Makefile.inc"
@@ -17,5 +17,7 @@ TEXINFO= diff.texi
COPTS.ifdef.c = -Wno-stack-protector
+CWARNFLAGS.clang+= -Wno-unused-value
+
.include <bsd.info.mk>
.include <bsd.prog.mk>
diff --git a/gnu/usr.bin/diffutils/diff3/Makefile b/gnu/usr.bin/diffutils/diff3/Makefile
index 0a0bf153b33..d891e25b378 100644
--- a/gnu/usr.bin/diffutils/diff3/Makefile
+++ b/gnu/usr.bin/diffutils/diff3/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.1.1.1 2003/01/26 00:40:40 wiz Exp $
+# $NetBSD: Makefile,v 1.2 2011/05/26 12:56:27 joerg Exp $
.include "${.CURDIR}/../Makefile.inc"
@@ -11,4 +11,6 @@ SRCS= diff3.c version.c
DPADD+= ${LIBDIFFUTILS}
LDADD+= ${LIBDIFFUTILS}
+CWARNFLAGS.clang+= -Wno-unused-value
+
.include <bsd.prog.mk>
diff --git a/gnu/usr.bin/diffutils/lib/Makefile b/gnu/usr.bin/diffutils/lib/Makefile
index cdaf4906181..de8e7421c17 100644
--- a/gnu/usr.bin/diffutils/lib/Makefile
+++ b/gnu/usr.bin/diffutils/lib/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.3 2008/05/03 14:48:30 lukem Exp $
+# $NetBSD: Makefile,v 1.4 2011/05/26 12:56:28 joerg Exp $
LIBISPRIVATE= yes
@@ -14,4 +14,6 @@ SRCS= basename.c c-stack.c cmpbuf.c error.c exclude.c exitfail.c \
hard-locale.c imaxtostr.c offtostr.c prepargs.c posixver.c quotesys.c \
regex.c setmode.c strftime.c umaxtostr.c xmalloc.c xstrtoumax.c
+CWARNFLAGS.clang+= -Wno-unused-value -Wno-tautological-compare
+
.include <bsd.lib.mk>
diff --git a/gnu/usr.bin/gdb6/Makefile.inc b/gnu/usr.bin/gdb6/Makefile.inc
index 9703b50cfb5..26a269a8326 100644
--- a/gnu/usr.bin/gdb6/Makefile.inc
+++ b/gnu/usr.bin/gdb6/Makefile.inc
@@ -1,4 +1,9 @@
-# $NetBSD: Makefile.inc,v 1.1 2006/05/15 16:31:37 nathanw Exp $
+# $NetBSD: Makefile.inc,v 1.2 2011/05/26 12:56:28 joerg Exp $
USE_LIBEDIT=no
USE_TUI=yes
+WARNS?= 0
+
+CWARNFLAGS.clang+= -Wno-unused-value -Wno-conversion -Wno-array-bounds \
+ -Wno-switch-enum -Wno-parentheses -Wno-comment \
+ -Wno-tautological-compare -Wno-format-extra-args
diff --git a/gnu/usr.bin/gettext/Makefile.inc b/gnu/usr.bin/gettext/Makefile.inc
index 99d1559ea31..60af79ef8d7 100644
--- a/gnu/usr.bin/gettext/Makefile.inc
+++ b/gnu/usr.bin/gettext/Makefile.inc
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.inc,v 1.6 2005/04/29 15:05:01 christos Exp $
+# $NetBSD: Makefile.inc,v 1.7 2011/05/26 12:56:28 joerg Exp $
.include <bsd.own.mk>
@@ -8,3 +8,5 @@ CPPFLAGS+= -DHAVE_CONFIG_H -I${.CURDIR} -I${.CURDIR}/../include \
-I${DIST}/gettext/gettext-tools/lib -DLOCALEDIR=\"/usr/share/locale\"
BINDIR?= /usr/bin
+
+CWARNFLAGS.clang+= -Wno-format-security
diff --git a/gnu/usr.bin/gettext/libgrep/Makefile b/gnu/usr.bin/gettext/libgrep/Makefile
index acc2c0a4190..33f271beede 100644
--- a/gnu/usr.bin/gettext/libgrep/Makefile
+++ b/gnu/usr.bin/gettext/libgrep/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.6 2008/05/03 14:48:30 lukem Exp $
+# $NetBSD: Makefile,v 1.7 2011/05/26 12:56:28 joerg Exp $
LIBISPRIVATE= yes
@@ -23,4 +23,8 @@ CPPFLAGS+= -I${DIST}/gettext/gettext-tools/libgrep
COPTS.regex.c = -Wno-stack-protector
+WARNS?= 0 # pointer sign issues
+
+CWARNFLAGS.clang+= -Wno-unused-value
+
.include <bsd.lib.mk>
diff --git a/gnu/usr.bin/gettext/libnlspr/Makefile b/gnu/usr.bin/gettext/libnlspr/Makefile
index bb8896420aa..28b9809248b 100644
--- a/gnu/usr.bin/gettext/libnlspr/Makefile
+++ b/gnu/usr.bin/gettext/libnlspr/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.8 2008/05/03 14:48:30 lukem Exp $
+# $NetBSD: Makefile,v 1.9 2011/05/26 12:56:28 joerg Exp $
LIBISPRIVATE= yes
@@ -88,6 +88,8 @@ COPTS.write-mo.c = -Wno-stack-protector
COPTS.write-po.c = -Wno-stack-protector
COPTS.write-tcl.c = -Wno-stack-protector
+CWARNFLAGS.clang+= -Wno-tautological-compare
+
.include <bsd.lib.mk>
# Override <sys.mk> double suffix rules to prevent *.y being yacced to *.[ch]
diff --git a/gnu/usr.bin/gettext/xgettext/Makefile b/gnu/usr.bin/gettext/xgettext/Makefile
index 6dc95d684ab..6ed8056e37a 100644
--- a/gnu/usr.bin/gettext/xgettext/Makefile
+++ b/gnu/usr.bin/gettext/xgettext/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.4 2006/11/10 17:36:09 christos Exp $
+# $NetBSD: Makefile,v 1.5 2011/05/26 12:56:28 joerg Exp $
PROG= xgettext
SRCS= \
@@ -26,6 +26,8 @@ x-ycp.c
COPTS.xgettext.c = -Wno-stack-protector
+CWARNFLAGS.clang+= -Wno-empty-body
+
.include <bsd.prog.mk>
.include "${.CURDIR}/../Makefile.inc.prog"
diff --git a/gnu/usr.bin/gkermit/Makefile b/gnu/usr.bin/gkermit/Makefile
index f73e56ea88b..2fe55dc9f43 100644
--- a/gnu/usr.bin/gkermit/Makefile
+++ b/gnu/usr.bin/gkermit/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.2 2007/05/28 12:06:17 tls Exp $
+# $NetBSD: Makefile,v 1.3 2011/05/26 12:56:28 joerg Exp $
.include <bsd.own.mk>
@@ -18,6 +18,8 @@ BUILDSYMLINKS+= gkermit.nr gkermit.1
CPPFLAGS+= -DPOSIX
CPPFLAGS+= -I${DIST}
+CWARNFLAGS.clang+= -Wno-unused-value
+
.PATH: ${DIST}
.include <bsd.prog.mk>
diff --git a/gnu/usr.bin/grep/grep/Makefile b/gnu/usr.bin/grep/grep/Makefile
index 9032bf67bd4..e4ef12fb5a9 100644
--- a/gnu/usr.bin/grep/grep/Makefile
+++ b/gnu/usr.bin/grep/grep/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.6 2009/02/25 20:36:44 sketch Exp $
+# $NetBSD: Makefile,v 1.7 2011/05/26 12:56:28 joerg Exp $
.include "${.CURDIR}/../Makefile.inc"
@@ -8,6 +8,8 @@ DIST= ${IDIST}/src
PROG= grep
SRCS= grep.c dfa.c kwset.c search.c grepmat.c
+CWARNFLAGS.clang+= -Wno-format-security -Wno-tautological-compare
+
.ifndef HOSTPROG
DPADD+= ${LIBGREPUTILS} ${LIBINTL}
LDADD+= ${LIBGREPUTILS} -lintl
diff --git a/gnu/usr.bin/grep/lib/Makefile b/gnu/usr.bin/grep/lib/Makefile
index 7c468d7d7e5..ab1b07bf894 100644
--- a/gnu/usr.bin/grep/lib/Makefile
+++ b/gnu/usr.bin/grep/lib/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.4 2008/05/03 14:48:30 lukem Exp $
+# $NetBSD: Makefile,v 1.5 2011/05/26 12:56:28 joerg Exp $
LIBISPRIVATE= yes
@@ -16,4 +16,6 @@ SRCS= closeout.c error.c exclude.c hard-locale.c isdir.c \
COPTS.hard-locale.c = -Wno-stack-protector
COPTS.regex.c = -Wno-stack-protector
+CWARNFLAGS.clang+= -Wno-unused-value
+
.include <bsd.lib.mk>
diff --git a/gnu/usr.bin/groff/Makefile.inc b/gnu/usr.bin/groff/Makefile.inc
index 50d5631717f..cb155df78ce 100644
--- a/gnu/usr.bin/groff/Makefile.inc
+++ b/gnu/usr.bin/groff/Makefile.inc
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.inc,v 1.19 2011/01/12 23:03:55 joerg Exp $
+# $NetBSD: Makefile.inc,v 1.20 2011/05/26 12:56:29 joerg Exp $
# $FreeBSD: src/gnu/usr.bin/groff/Makefile.inc,v 2.7 2003/05/01 13:22:18 ru Exp $
@@ -93,6 +93,8 @@ CXXFLAGS+= -fno-rtti -fno-exceptions
# We only need -lsupc++
USE_LIBSTDCXX= no
+CWARNFLAGS.clang+= -Wno-unused-value
+
.ifdef GROFFYSRCS
YFLAGS+= -d
diff --git a/gnu/usr.bin/groff/src/devices/grohtml/Makefile b/gnu/usr.bin/groff/src/devices/grohtml/Makefile
index 6ff8e4a6588..873622686a6 100644
--- a/gnu/usr.bin/groff/src/devices/grohtml/Makefile
+++ b/gnu/usr.bin/groff/src/devices/grohtml/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.6 2010/12/16 22:54:19 joerg Exp $
+# $NetBSD: Makefile,v 1.7 2011/05/26 12:56:29 joerg Exp $
# $FreeBSD: src/gnu/usr.bin/groff/src/devices/grohtml/Makefile,v 1.5 2003/05/01 13:22:18 ru Exp $
@@ -9,4 +9,6 @@ MAN= grohtml.1
SRCS= post-html.cpp html-table.cpp html-text.cpp output.cpp
CLEANFILES= ${MAN}
+CWARNFLAGS.clang+= -Wno-format-security
+
.include <bsd.prog.mk>
diff --git a/gnu/usr.bin/groff/src/roff/troff/Makefile b/gnu/usr.bin/groff/src/roff/troff/Makefile
index bbdcf7b1fd1..7f6a088de85 100644
--- a/gnu/usr.bin/groff/src/roff/troff/Makefile
+++ b/gnu/usr.bin/groff/src/roff/troff/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.11 2010/12/16 22:54:22 joerg Exp $
+# $NetBSD: Makefile,v 1.12 2011/05/26 12:56:29 joerg Exp $
# $FreeBSD: src/gnu/usr.bin/groff/src/roff/troff/Makefile,v 1.4 2003/05/01 13:22:20 ru Exp $
@@ -10,6 +10,8 @@ SRCS= dictionary.cpp div.cpp env.cpp input.cpp \
CLEANFILES= majorminor.cpp ${MAN}
USETBL=
+CWARNFLAGS.clang+= -Wno-format-security
+
.include <bsd.prog.mk>
majorminor.cpp: ${GROFF_DIST}/VERSION ${GROFF_DIST}/REVISION
diff --git a/gnu/usr.bin/groff/src/utils/hpftodit/Makefile b/gnu/usr.bin/groff/src/utils/hpftodit/Makefile
index 5227d284166..9a2746475a5 100644
--- a/gnu/usr.bin/groff/src/utils/hpftodit/Makefile
+++ b/gnu/usr.bin/groff/src/utils/hpftodit/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.6 2010/12/16 22:54:22 joerg Exp $
+# $NetBSD: Makefile,v 1.7 2011/05/26 12:56:29 joerg Exp $
# $FreeBSD: src/gnu/usr.bin/groff/src/utils/hpftodit/Makefile,v 1.4 2003/05/01 13:22:20 ru Exp $
@@ -8,4 +8,6 @@ PROG= hpftodit
SRCS= hpftodit.cpp hpuni.cpp
CLEANFILES= ${MAN}
+CWARNFLAGS.clang+= -Wno-format-security
+
.include <bsd.prog.mk>
diff --git a/gnu/usr.bin/rcs/co/Makefile b/gnu/usr.bin/rcs/co/Makefile
index 60f81860197..75e9ed3dba1 100644
--- a/gnu/usr.bin/rcs/co/Makefile
+++ b/gnu/usr.bin/rcs/co/Makefile
@@ -1,5 +1,7 @@
-# $NetBSD: Makefile,v 1.6 1997/10/18 04:42:06 lukem Exp $
+# $NetBSD: Makefile,v 1.7 2011/05/26 12:56:29 joerg Exp $
PROG= co
+CWARNFLAGS.clang+= -Wno-format-extra-args
+
.include <bsd.prog.mk>
diff --git a/gnu/usr.bin/rcs/lib/Makefile b/gnu/usr.bin/rcs/lib/Makefile
index 65194f2f0c5..3d5932114cf 100644
--- a/gnu/usr.bin/rcs/lib/Makefile
+++ b/gnu/usr.bin/rcs/lib/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.22 2008/05/03 14:48:30 lukem Exp $
+# $NetBSD: Makefile,v 1.23 2011/05/26 12:56:29 joerg Exp $
LIBISPRIVATE= yes
@@ -19,4 +19,6 @@ SRCS= maketime.c merger.c partime.c rcsedit.c rcsfcmp.c rcsfnms.c rcsgen.c \
rcskeep.c rcskeys.c rcslex.c rcsmap.c rcsrev.c rcssyn.c rcstime.c \
rcsutil.c version.c
+CWARNFLAGS.clang+= -Wno-format-security
+
.include <bsd.lib.mk>
diff --git a/gnu/usr.bin/texinfo/Makefile.inc b/gnu/usr.bin/texinfo/Makefile.inc
index 938e7e163de..6771bd9a606 100644
--- a/gnu/usr.bin/texinfo/Makefile.inc
+++ b/gnu/usr.bin/texinfo/Makefile.inc
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.inc,v 1.9 2008/09/02 14:46:53 christos Exp $
+# $NetBSD: Makefile.inc,v 1.10 2011/05/26 12:56:29 joerg Exp $
.if !defined(__MAKEFILE_INC_INCLUDED__)
__MAKEFILE_INC_INCLUDED__=1
@@ -11,6 +11,8 @@ IDIST= ${DIST}/texinfo
CPPFLAGS+= -I${.CURDIR}/../common -I${IDIST}/lib \
-DLOCALEDIR=\"/usr/share/locale\" -DHAVE_CONFIG_H
+CWARNFLAGS.clang+= -Wno-format-security
+
.if !defined(MAKEDOC)
DPADD+= ${LIBCOMMONDIR}/libcommon.a
LDADD+= -L${LIBCOMMONDIR} -lcommon
diff --git a/gnu/usr.bin/texinfo/makeinfo/Makefile b/gnu/usr.bin/texinfo/makeinfo/Makefile
index fe1d8d36040..94e81e906dc 100644
--- a/gnu/usr.bin/texinfo/makeinfo/Makefile
+++ b/gnu/usr.bin/texinfo/makeinfo/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.6 2004/07/12 23:45:26 wiz Exp $
+# $NetBSD: Makefile,v 1.7 2011/05/26 12:56:29 joerg Exp $
PROG= makeinfo
SRCS= cmds.c defun.c files.c float.c footnote.c \
@@ -8,6 +8,8 @@ SRCS= cmds.c defun.c files.c float.c footnote.c \
CPPFLAGS+= -I${IDIST}/makeinfo
+WARNS?= 0 # pointer sign issues
+
.include <bsd.prog.mk>
.PATH: ${IDIST}/makeinfo ${IDIST}/doc
diff --git a/lib/libc/db/Makefile.inc b/lib/libc/db/Makefile.inc
index 224719d6547..26a60b2f3b2 100644
--- a/lib/libc/db/Makefile.inc
+++ b/lib/libc/db/Makefile.inc
@@ -1,8 +1,10 @@
-# $NetBSD: Makefile.inc,v 1.6 1997/10/22 23:14:11 lukem Exp $
+# $NetBSD: Makefile.inc,v 1.7 2011/05/26 12:56:29 joerg Exp $
# @(#)Makefile.inc 8.2 (Berkeley) 2/21/94
#
CPPFLAGS+=-D__DBINTERFACE_PRIVATE
+CWARNFLAGS.clang+= -Wno-array-bounds
+
.include "${.CURDIR}/db/btree/Makefile.inc"
.include "${.CURDIR}/db/db/Makefile.inc"
.include "${.CURDIR}/db/hash/Makefile.inc"
diff --git a/lib/libpam/modules/pam_krb5/Makefile b/lib/libpam/modules/pam_krb5/Makefile
index 5572f7743df..b933e0d72fd 100644
--- a/lib/libpam/modules/pam_krb5/Makefile
+++ b/lib/libpam/modules/pam_krb5/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.10 2011/04/15 18:05:45 elric Exp $
+# $NetBSD: Makefile,v 1.11 2011/05/26 12:56:30 joerg Exp $
# Copyright 2001 FreeBSD, Inc.
# All rights reserved.
#
@@ -37,4 +37,6 @@ LIBDPLIBS+= \
crypt ${.CURDIR}/../../../libcrypt \
crypto ${NETBSDSRCDIR}/crypto/external/bsd/openssl/lib/libcrypto
+CWARNFLAGS.clang= -Wno-format-security
+
.include "${.CURDIR}/../mod.mk"
diff --git a/lib/libpam/modules/pam_ksu/Makefile b/lib/libpam/modules/pam_ksu/Makefile
index 09b06d280d4..7e025267fc6 100644
--- a/lib/libpam/modules/pam_ksu/Makefile
+++ b/lib/libpam/modules/pam_ksu/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.10 2011/04/15 18:05:45 elric Exp $
+# $NetBSD: Makefile,v 1.11 2011/05/26 12:56:30 joerg Exp $
# Copyright 2002 FreeBSD, Inc.
# All rights reserved.
#
@@ -37,4 +37,6 @@ LIBDPLIBS+= \
crypt ${.CURDIR}/../../../libcrypt \
crypto ${NETBSDSRCDIR}/crypto/external/bsd/openssl/lib/libcrypto
+CWARNFLAGS.clang= -Wno-format-security
+
.include "${.CURDIR}/../mod.mk"
diff --git a/lib/libperfuse/Makefile b/lib/libperfuse/Makefile
index 6141d1d51b6..85cb73955f6 100644
--- a/lib/libperfuse/Makefile
+++ b/lib/libperfuse/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.3 2011/05/09 08:51:18 manu Exp $
+# $NetBSD: Makefile,v 1.4 2011/05/26 12:56:30 joerg Exp $
LIB= perfuse
LIBDPLIBS+= puffs ${.CURDIR}/../libpuffs
@@ -7,6 +7,8 @@ LIBDPLIBS+= puffs ${.CURDIR}/../libpuffs
PERFUSE_OPT_DEBUG_FLAGS= -g -DPERFUSE_DEBUG
.endif
+CWARNFLAGS.clang+= -Wno-format-security
+
CFLAGS+= ${PERFUSE_OPT_DEBUG_FLAGS}
CPPFLAGS+= -I${.CURDIR}
CPPFLAGS+= -I${NETBSDSRCDIR}/lib/libpuffs
diff --git a/regress/lib/libc/int_fmtio/Makefile b/regress/lib/libc/int_fmtio/Makefile
index edf10aa57f2..5d3bc11b01f 100644
--- a/regress/lib/libc/int_fmtio/Makefile
+++ b/regress/lib/libc/int_fmtio/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.3 2002/09/18 05:41:39 lukem Exp $
+# $NetBSD: Makefile,v 1.4 2011/05/26 12:56:30 joerg Exp $
NOMAN= # defined
@@ -8,4 +8,6 @@ WARNS= 2 # need this!
regress: ${PROG}
./${PROG}
+CWARNFLAGS.clang+= -Wno-uninitialized
+
.include <bsd.prog.mk>
diff --git a/regress/sys/kern/sleeping/Makefile b/regress/sys/kern/sleeping/Makefile
index 66c24d5feab..dc7e8a4396d 100644
--- a/regress/sys/kern/sleeping/Makefile
+++ b/regress/sys/kern/sleeping/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.2 2006/09/09 12:20:07 tsutsui Exp $
+# $NetBSD: Makefile,v 1.3 2011/05/26 12:56:30 joerg Exp $
NOMAN= # defined
@@ -7,4 +7,6 @@ PROG= sleeptest
regress: ${PROG}
./sleeptest
+CWARNFLAGS.clang+= -Wno-format
+
.include <bsd.prog.mk>
diff --git a/sbin/routed/rtquery/Makefile b/sbin/routed/rtquery/Makefile
index de871d31e1e..5d9e2c60d18 100644
--- a/sbin/routed/rtquery/Makefile
+++ b/sbin/routed/rtquery/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.7 2002/04/23 08:19:15 msaitoh Exp $
+# $NetBSD: Makefile,v 1.8 2011/05/26 12:56:30 joerg Exp $
# from: @(#)Makefile 8.1 (Berkeley) 6/5/93
.include <bsd.own.mk>
@@ -11,5 +11,7 @@ LDSTATIC?=
.endif
#COPTS= -g -DDEBUG -Wall
+CWARNFLAGS.clang+= -Wno-array-bounds
+
.include "../../Makefile.inc"
.include <bsd.prog.mk>
diff --git a/share/mk/bsd.sys.mk b/share/mk/bsd.sys.mk
index f1484a36724..0bb15849bf4 100644
--- a/share/mk/bsd.sys.mk
+++ b/share/mk/bsd.sys.mk
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.sys.mk,v 1.200 2011/05/25 15:02:25 joerg Exp $
+# $NetBSD: bsd.sys.mk,v 1.201 2011/05/26 12:56:30 joerg Exp $
#
# Build definitions used for NetBSD source tree builds.
@@ -18,9 +18,9 @@ CFLAGS+= -std=gnu99
.endif
.if defined(WARNS)
+CFLAGS+= ${${ACTIVE_CC} == "clang":? -Wno-sign-compare -Wno-pointer-sign :}
.if ${WARNS} > 0
CFLAGS+= -Wall -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith
-CFLAGS+= ${${ACTIVE_CC} == "clang":? -Wno-array-bounds :}
#CFLAGS+= -Wmissing-declarations -Wredundant-decls -Wnested-externs
# Add -Wno-sign-compare. -Wsign-compare is included in -Wall as of GCC 3.3,
# but our sources aren't up for it yet. Also, add -Wno-traditional because
@@ -48,6 +48,8 @@ CFLAGS+= -Wreturn-type -Wswitch -Wshadow
.if ${WARNS} > 2
CFLAGS+= -Wcast-qual -Wwrite-strings
CFLAGS+= -Wextra -Wno-unused-parameter
+# Readd -Wno-sign-compare to override -Wextra with clang
+CFLAGS+= -Wno-sign-compare
CXXFLAGS+= -Wabi
CXXFLAGS+= -Wold-style-cast
CXXFLAGS+= -Wctor-dtor-privacy -Wnon-virtual-dtor -Wreorder \
@@ -56,6 +58,7 @@ CXXFLAGS+= ${${ACTIVE_CXX} == "gcc":? -Wno-non-template-friend -Wno-pmf-conversi
.endif
.if ${WARNS} > 3 && defined(HAVE_GCC) && ${HAVE_GCC} >= 3
CFLAGS+= -Wsign-compare
+CFLAGS+= ${${ACTIVE_CC} == "clang":? -Wpointer-sign :}
.endif
.endif
diff --git a/sys/arch/i386/stand/lib/Makefile.inc b/sys/arch/i386/stand/lib/Makefile.inc
index 1ead2e9e944..754a3852535 100644
--- a/sys/arch/i386/stand/lib/Makefile.inc
+++ b/sys/arch/i386/stand/lib/Makefile.inc
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.inc,v 1.13 2005/12/11 12:17:48 christos Exp $
+# $NetBSD: Makefile.inc,v 1.14 2011/05/26 12:56:30 joerg Exp $
#
# Configuration variables (default values are below):
#
@@ -19,6 +19,8 @@ I386DST?= ${.OBJDIR}/lib/i386
#I386DIR= $S/arch/i386/stand/lib
I386LIB= ${I386DST}/libi386.a
+CWARNFLAGS.clang+= -Wno-tautological-compare
+
I386MAKE= \
cd ${I386DIR} && MAKEOBJDIRPREFIX= && unset MAKEOBJDIRPREFIX && \
MAKEOBJDIR=${I386DST} ${MAKE} \
diff --git a/sys/conf/Makefile.kern.inc b/sys/conf/Makefile.kern.inc
index bc122f168f3..80494203b27 100644
--- a/sys/conf/Makefile.kern.inc
+++ b/sys/conf/Makefile.kern.inc
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.kern.inc,v 1.136 2011/05/23 13:55:55 joerg Exp $
+# $NetBSD: Makefile.kern.inc,v 1.137 2011/05/26 12:56:30 joerg Exp $
#
# This file contains common `MI' targets and definitions and it is included
# at the bottom of each `MD' ${MACHINE}/conf/Makefile.${MACHINE}.
@@ -83,6 +83,9 @@ CWARNFLAGS+= -Wextra -Wno-unused-parameter
CWARNFLAGS+= -Wno-sign-compare
.endif
+CWARNFLAGS.clang+= -Wno-unknown-pragmas -Wno-conversion \
+ -Wno-self-assign -Wno-array-bounds
+
CFLAGS+= -ffreestanding -fno-zero-initialized-in-bss
CFLAGS+= ${DEBUG} ${COPTS}
AFLAGS+= -D_LOCORE -Wa,--fatal-warnings
diff --git a/sys/lib/libsa/Makefile.inc b/sys/lib/libsa/Makefile.inc
index 2deeb2aa01a..de37c63d18d 100644
--- a/sys/lib/libsa/Makefile.inc
+++ b/sys/lib/libsa/Makefile.inc
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.inc,v 1.19 2006/01/26 14:05:49 christos Exp $
+# $NetBSD: Makefile.inc,v 1.20 2011/05/26 12:56:31 joerg Exp $
#
# Configuration variables (default values are below):
#
@@ -21,6 +21,8 @@ SADST?= ${.OBJDIR}/lib/sa
SA_AS?= library
SADOTDIR?= ../../.
+CWARNFLAGS.clang+= -Wno-format-extra-args
+
SADIR= ${S:S@^.@${SADOTDIR}@:Q}/lib/libsa
.if (${SA_AS} == "obj")
SALIB= ${SADST}/libsa.o
diff --git a/sys/modules/ffs/Makefile b/sys/modules/ffs/Makefile
index f258d679730..0004fcf44ec 100644
--- a/sys/modules/ffs/Makefile
+++ b/sys/modules/ffs/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.6 2011/03/13 18:23:30 bouyer Exp $
+# $NetBSD: Makefile,v 1.7 2011/05/26 12:56:31 joerg Exp $
.include "../Makefile.inc"
@@ -7,6 +7,8 @@
KMOD= ffs
CPPFLAGS+= -DUFS_DIRHASH -DFFS_EI -DWAPBL -DAPPLE_UFS -DQUOTA -DQUOTA2
+CWARNFLAGS.clang= -Wno-conversion
+
.PATH: ${S}/ufs/ufs
SRCS= ufs_bmap.c ufs_dirhash.c ufs_extattr.c ufs_ihash.c ufs_inode.c \
ufs_lookup.c ufs_quota.c ufs_quota1.c ufs_quota2.c ufs_vfsops.c \
diff --git a/sys/modules/layerfs/Makefile b/sys/modules/layerfs/Makefile
index 9df81407e55..b18cbbbc790 100644
--- a/sys/modules/layerfs/Makefile
+++ b/sys/modules/layerfs/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.1 2008/12/05 13:05:37 ad Exp $
+# $NetBSD: Makefile,v 1.2 2011/05/26 12:56:31 joerg Exp $
.include "../Makefile.inc"
@@ -7,4 +7,6 @@
KMOD= layerfs
SRCS= layer_subr.c layer_vfsops.c layer_vnops.c
+CWARNFLAGS.clang= -Wno-conversion
+
.include <bsd.kmodule.mk>
diff --git a/sys/modules/nilfs/Makefile b/sys/modules/nilfs/Makefile
index 2e1c7c907f6..1318188f66f 100644
--- a/sys/modules/nilfs/Makefile
+++ b/sys/modules/nilfs/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.1 2009/07/18 16:31:43 reinoud Exp $
+# $NetBSD: Makefile,v 1.2 2011/05/26 12:56:31 joerg Exp $
.include "../Makefile.inc"
@@ -7,4 +7,6 @@
KMOD= nilfs
SRCS= nilfs_vfsops.c nilfs_vnops.c nilfs_subr.c
+CWARNFLAGS.clang= -Wno-self-assign
+
.include <bsd.kmodule.mk>
diff --git a/sys/modules/null/Makefile b/sys/modules/null/Makefile
index 9486a359624..6952af26ffc 100644
--- a/sys/modules/null/Makefile
+++ b/sys/modules/null/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.1 2008/11/24 11:26:49 ad Exp $
+# $NetBSD: Makefile,v 1.2 2011/05/26 12:56:31 joerg Exp $
.include "../Makefile.inc"
@@ -7,4 +7,6 @@
KMOD= null
SRCS= null_vfsops.c null_vnops.c
+CWARNFLAGS.clang= -Wno-conversion
+
.include <bsd.kmodule.mk>
diff --git a/sys/modules/overlay/Makefile b/sys/modules/overlay/Makefile
index 4fbd8a13177..64059adbab8 100644
--- a/sys/modules/overlay/Makefile
+++ b/sys/modules/overlay/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.1 2008/06/28 16:11:36 rumble Exp $
+# $NetBSD: Makefile,v 1.2 2011/05/26 12:56:31 joerg Exp $
.include "../Makefile.inc"
@@ -7,4 +7,6 @@
KMOD= overlay
SRCS= overlay_vfsops.c overlay_vnops.c
+CWARNFLAGS.clang= -Wno-conversion
+
.include <bsd.kmodule.mk>
diff --git a/sys/modules/udf/Makefile b/sys/modules/udf/Makefile
index 0891185ea35..8d322be1d99 100644
--- a/sys/modules/udf/Makefile
+++ b/sys/modules/udf/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.1 2008/06/28 16:11:36 rumble Exp $
+# $NetBSD: Makefile,v 1.2 2011/05/26 12:56:31 joerg Exp $
.include "../Makefile.inc"
@@ -8,6 +8,7 @@ KMOD= udf
SRCS= udf_allocation.c udf_osta.c udf_readwrite.c udf_strat_bootstrap.c \
udf_strat_direct.c udf_strat_rmw.c udf_strat_sequential.c udf_subr.c \
udf_vnops.c udf_vfsops.c
-
+
+CWARNFLAGS.clang= -Wno-self-assign
.include <bsd.kmodule.mk>
diff --git a/sys/modules/umap/Makefile b/sys/modules/umap/Makefile
index 42c27cad205..7a67f538fcc 100644
--- a/sys/modules/umap/Makefile
+++ b/sys/modules/umap/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.1 2008/11/24 11:26:49 ad Exp $
+# $NetBSD: Makefile,v 1.2 2011/05/26 12:56:31 joerg Exp $
.include "../Makefile.inc"
@@ -7,4 +7,6 @@
KMOD= umap
SRCS= umap_vfsops.c umap_vnops.c umap_subr.c
+CWARNFLAGS.clang= -Wno-conversion
+
.include <bsd.kmodule.mk>
diff --git a/sys/rump/fs/lib/liblayervfs/Makefile b/sys/rump/fs/lib/liblayervfs/Makefile
index d892c37c914..9b829a4ce62 100644
--- a/sys/rump/fs/lib/liblayervfs/Makefile
+++ b/sys/rump/fs/lib/liblayervfs/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.1 2010/03/29 18:12:23 pooka Exp $
+# $NetBSD: Makefile,v 1.2 2011/05/26 12:56:32 joerg Exp $
#
.PATH: ${.CURDIR}/../../../../miscfs/genfs
@@ -7,5 +7,7 @@ LIB= rumpvfs_layerfs
SRCS= layer_subr.c layer_vfsops.c layer_vnops.c
+CWARNFLAGS.clang+= -Wno-conversion
+
.include <bsd.lib.mk>
.include <bsd.klinks.mk>
diff --git a/sys/rump/fs/lib/libnilfs/Makefile b/sys/rump/fs/lib/libnilfs/Makefile
index e0d8aa9986d..3c7203cec39 100644
--- a/sys/rump/fs/lib/libnilfs/Makefile
+++ b/sys/rump/fs/lib/libnilfs/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.2 2010/02/16 20:42:46 pooka Exp $
+# $NetBSD: Makefile,v 1.3 2011/05/26 12:56:32 joerg Exp $
#
.PATH: ${.CURDIR}/../../../../fs/nilfs
@@ -7,5 +7,7 @@ LIB= rumpfs_nilfs
SRCS= nilfs_subr.c nilfs_vfsops.c nilfs_vnops.c
+CWARNFLAGS.clang+= -Wno-self-assign
+
.include <bsd.lib.mk>
.include <bsd.klinks.mk>
diff --git a/sys/rump/fs/lib/libnull/Makefile b/sys/rump/fs/lib/libnull/Makefile
index e436591a494..2fa48c7aab6 100644
--- a/sys/rump/fs/lib/libnull/Makefile
+++ b/sys/rump/fs/lib/libnull/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.1 2010/12/05 16:11:16 pooka Exp $
+# $NetBSD: Makefile,v 1.2 2011/05/26 12:56:32 joerg Exp $
#
.PATH: ${.CURDIR}/../../../../miscfs/nullfs
@@ -7,5 +7,7 @@ LIB= rumpfs_null
SRCS= null_vfsops.c null_vnops.c
+CWARNFLAGS.clang+= -Wno-conversion
+
.include <bsd.lib.mk>
.include <bsd.klinks.mk>
diff --git a/sys/rump/fs/lib/libudf/Makefile b/sys/rump/fs/lib/libudf/Makefile
index 34a5432b7fe..37b5ef83896 100644
--- a/sys/rump/fs/lib/libudf/Makefile
+++ b/sys/rump/fs/lib/libudf/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.6 2010/02/16 20:42:46 pooka Exp $
+# $NetBSD: Makefile,v 1.7 2011/05/26 12:56:32 joerg Exp $
#
.PATH: ${.CURDIR}/../../../../fs/udf
@@ -9,5 +9,7 @@ SRCS= udf_osta.c udf_vfsops.c udf_vnops.c udf_subr.c \
udf_allocation.c udf_readwrite.c udf_strat_bootstrap.c \
udf_strat_direct.c udf_strat_sequential.c udf_strat_rmw.c
+CWARNFLAGS.clang+= -Wno-self-assign
+
.include <bsd.lib.mk>
.include <bsd.klinks.mk>
diff --git a/sys/rump/fs/lib/libumap/Makefile b/sys/rump/fs/lib/libumap/Makefile
index 5de78d87823..165fd71b23e 100644
--- a/sys/rump/fs/lib/libumap/Makefile
+++ b/sys/rump/fs/lib/libumap/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.1 2010/12/05 16:11:17 pooka Exp $
+# $NetBSD: Makefile,v 1.2 2011/05/26 12:56:32 joerg Exp $
#
.PATH: ${.CURDIR}/../../../../miscfs/umapfs
@@ -7,5 +7,7 @@ LIB= rumpfs_umap
SRCS= umap_subr.c umap_vfsops.c umap_vnops.c
+CWARNFLAGS.clang+= -Wno-conversion
+
.include <bsd.lib.mk>
.include <bsd.klinks.mk>
diff --git a/tests/crypto/libcrypto/Makefile.inc b/tests/crypto/libcrypto/Makefile.inc
index ef2aa23f04a..ebd7572cb01 100644
--- a/tests/crypto/libcrypto/Makefile.inc
+++ b/tests/crypto/libcrypto/Makefile.inc
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.inc,v 1.4 2010/11/03 16:10:19 christos Exp $
+# $NetBSD: Makefile.inc,v 1.5 2011/05/26 12:56:32 joerg Exp $
.include <bsd.own.mk>
# Not yet
@@ -17,6 +17,8 @@ BINDIR= ${TESTSDIR}
DPADD+= ${LIBCRYPTO} ${LIBCRYPT}
LDADD+= -lcrypto -lcrypt
+CWARNFLAGS.clang+= -Wno-format
+
CPPFLAGS+= -DOPENSSL_FIPS
CPPFLAGS+= -I${OPENSSLSRC} -I${OPENSSLSRC}/crypto
CRYPTODIST= ${NETBSDSRCDIR}/crypto
diff --git a/tests/include/Makefile b/tests/include/Makefile
index a1d9248279c..2c1b44b82d4 100644
--- a/tests/include/Makefile
+++ b/tests/include/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.9 2011/05/05 05:39:10 jruoho Exp $
+# $NetBSD: Makefile,v 1.10 2011/05/26 12:56:32 joerg Exp $
NOMAN= # defined
@@ -24,4 +24,6 @@ FILES+= d_bitstring_64.out
FILES+= d_bitstring_67.out
FILES+= d_bitstring_8.out
+CWARNFLAGS.clang+= -Wno-uninitialized
+
.include <bsd.test.mk>
diff --git a/tests/lib/libcurses/director/Makefile b/tests/lib/libcurses/director/Makefile
index b4dc34edacf..fd597fcae6d 100644
--- a/tests/lib/libcurses/director/Makefile
+++ b/tests/lib/libcurses/director/Makefile
@@ -17,4 +17,6 @@ LDFLAGS+= -g
DPADD+= ${LIBL}
LDADD+= -ll -lutil -lc
+CWARNFLAGS.clang+= -Wno-format -Wno-conversion
+
.include <bsd.test.mk>
diff --git a/tests/lib/libcurses/slave/Makefile b/tests/lib/libcurses/slave/Makefile
index 8d27d590387..d216b7b98d1 100644
--- a/tests/lib/libcurses/slave/Makefile
+++ b/tests/lib/libcurses/slave/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.2 2011/04/13 09:46:38 he Exp $
+# $NetBSD: Makefile,v 1.3 2011/05/26 12:56:32 joerg Exp $
#
.include <bsd.own.mk>
@@ -14,4 +14,6 @@ SRCS= slave.c commands.c curses_commands.c
CPPFLAGS+= -g -I${.CURDIR} -I. -I${.CURDIR}/../director
LDADD+= -lcurses -lterminfo
+CWARNFLAGS.clang+= -Wno-format
+
.include <bsd.test.mk>
diff --git a/usr.bin/midiplay/Makefile b/usr.bin/midiplay/Makefile
index 9e77ad1662f..588e740cada 100644
--- a/usr.bin/midiplay/Makefile
+++ b/usr.bin/midiplay/Makefile
@@ -1,6 +1,8 @@
-# $NetBSD: Makefile,v 1.1 1998/08/12 21:39:11 augustss Exp $
+# $NetBSD: Makefile,v 1.2 2011/05/26 12:56:33 joerg Exp $
# @(#)Makefile 8.1 (Berkeley) 6/6/93
PROG= midiplay
+CWARNFLAGS+= -Wno-format-extra-args -Wno-initializer-overrides
+
.include <bsd.prog.mk>
diff --git a/usr.bin/mkubootimage/Makefile b/usr.bin/mkubootimage/Makefile
index d19eb2fdaef..e63440bab93 100644
--- a/usr.bin/mkubootimage/Makefile
+++ b/usr.bin/mkubootimage/Makefile
@@ -1,7 +1,9 @@
-# $NetBSD: Makefile,v 1.1 2010/06/18 18:55:48 jmcneill Exp $
+# $NetBSD: Makefile,v 1.2 2011/05/26 12:56:33 joerg Exp $
PROG= mkubootimage
SRCS= mkubootimage.c crc32.c
NOMAN= # defined
+CWARNFLAGS.clang+= -Wno-conversion
+
.include <bsd.prog.mk>
diff --git a/usr.bin/netstat/Makefile b/usr.bin/netstat/Makefile
index 80def5a5eb1..4178f372798 100644
--- a/usr.bin/netstat/Makefile
+++ b/usr.bin/netstat/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.34 2011/05/03 18:28:46 dyoung Exp $
+# $NetBSD: Makefile,v 1.35 2011/05/26 12:56:33 joerg Exp $
# from: @(#)Makefile 8.1 (Berkeley) 6/12/93
.include <bsd.own.mk>
@@ -17,6 +17,8 @@ DPADD= ${LIBKVM}
CPPFLAGS+= -DIPSEC
CPPFLAGS+= -I${NETBSDSRCDIR}/sys/dist/pf
+CWARNFLAGS.clang+= -Wno-format
+
.PATH: ${.CURDIR}/../../lib/libc/gen
.PATH: ${.CURDIR}/../../lib/libc/net
CPPFLAGS+= -DRUMP_ACTION
diff --git a/usr.bin/nvi/build/Makefile b/usr.bin/nvi/build/Makefile
index 02af536fab1..843681d2bc0 100644
--- a/usr.bin/nvi/build/Makefile
+++ b/usr.bin/nvi/build/Makefile
@@ -1,9 +1,11 @@
-# $NetBSD: Makefile,v 1.13 2010/02/06 23:45:26 he Exp $
+# $NetBSD: Makefile,v 1.14 2011/05/26 12:56:33 joerg Exp $
.include <bsd.own.mk>
USE_WIDECHAR?=yes
+CWARNFLAGS.clang+= -Wno-uninitialized -Wno-format-security
+
CPPFLAGS+=-I${DIST}/include -I${.CURDIR} -I. -DGTAGS
#DBG=-g
diff --git a/usr.bin/pmap/Makefile b/usr.bin/pmap/Makefile
index f801c40de04..3219eeef8b7 100644
--- a/usr.bin/pmap/Makefile
+++ b/usr.bin/pmap/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.4 2008/01/02 17:23:31 yamt Exp $
+# $NetBSD: Makefile,v 1.5 2011/05/26 12:56:33 joerg Exp $
USE_FORT?= yes # setgid
PROG= pmap
@@ -8,4 +8,6 @@ BINMODE= 2555
LDADD= -lkvm
DPADD= ${LIBKVM}
+CWARNFLAGS.clang+= -Wno-format-extra-args
+
.include <bsd.prog.mk>
diff --git a/usr.bin/telnet/Makefile b/usr.bin/telnet/Makefile
index b615d2d0955..cb5374cece2 100644
--- a/usr.bin/telnet/Makefile
+++ b/usr.bin/telnet/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.45 2011/04/24 21:42:06 elric Exp $
+# $NetBSD: Makefile,v 1.46 2011/05/26 12:56:33 joerg Exp $
#
# Copyright (c) 1990 The Regents of the University of California.
# All rights reserved.
@@ -35,6 +35,7 @@
#
WARNS?= 1 # XXX -Wshadow etc. fix asap
+CWARNFLAGS.clang+= -Wno-tautological-compare -Wno-format-security
.include <bsd.own.mk>
diff --git a/usr.bin/vmstat/Makefile b/usr.bin/vmstat/Makefile
index 506842f27a2..92845676180 100644
--- a/usr.bin/vmstat/Makefile
+++ b/usr.bin/vmstat/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.28 2010/12/20 04:25:03 christos Exp $
+# $NetBSD: Makefile,v 1.29 2011/05/26 12:56:33 joerg Exp $
# @(#)Makefile 8.1 (Berkeley) 6/6/93
.include <bsd.own.mk>
@@ -13,4 +13,6 @@ LDADD= -lkvm
BINGRP= kmem
BINMODE=2555
+CWARNFLAGS.clang+= -Wno-format-extra-args
+
.include <bsd.prog.mk>
diff --git a/usr.sbin/crash/Makefile b/usr.sbin/crash/Makefile
index 73164cfcc63..e873c288e62 100644
--- a/usr.sbin/crash/Makefile
+++ b/usr.sbin/crash/Makefile
@@ -1,9 +1,11 @@
-# $NetBSD: Makefile,v 1.11 2011/04/30 16:57:58 christos Exp $
+# $NetBSD: Makefile,v 1.12 2011/05/26 12:56:33 joerg Exp $
PROG= crash
MAN= crash.8
RUMPKERNEL= yes # XXX: Avoid -mcmodel=kernel
+CWARNFLAGS.clang+= -Wno-format
+
LDADD+= -lutil -lkvm -ledit -lterminfo -T${.CURDIR}/ldscript.crash
DPADD+= ${LIBUTIL} ${LIBKVM} ${LIBEDIT} ${LIBTERMINFO}
diff --git a/usr.sbin/dhcp/Makefile.inc b/usr.sbin/dhcp/Makefile.inc
index d72869485ec..a30cfd72bb3 100644
--- a/usr.sbin/dhcp/Makefile.inc
+++ b/usr.sbin/dhcp/Makefile.inc
@@ -1,10 +1,13 @@
-# $NetBSD: Makefile.inc,v 1.23 2009/04/22 15:23:02 lukem Exp $
+# $NetBSD: Makefile.inc,v 1.24 2011/05/26 12:56:33 joerg Exp $
WARNS?= 1 # XXX -Wshadow -Wcast-qual -Wsign-compare
.include <bsd.own.mk>
USE_FORT?= yes # network client/server
+CWARNFLAGS.clang+= -Wno-tautological-compare -Wno-array-bounds \
+ -Wno-conversion -Wno-constant-logical-operand \
+ -Wno-format-security
DIST= ${NETBSDSRCDIR}/dist/dhcp
.PATH: ${DIST}/${DHCPSRCDIR}
diff --git a/usr.sbin/ipf/Makefile.inc b/usr.sbin/ipf/Makefile.inc
index 128087a9d86..2e43f04fa6d 100644
--- a/usr.sbin/ipf/Makefile.inc
+++ b/usr.sbin/ipf/Makefile.inc
@@ -1,6 +1,8 @@
-# $NetBSD: Makefile.inc,v 1.19 2009/04/22 15:23:03 lukem Exp $
+# $NetBSD: Makefile.inc,v 1.20 2011/05/26 12:56:34 joerg Exp $
WARNS?= 1 # XXX -Wcast-qual -Wshadow
+CWARNFLAGS.clang+= -Wno-format -Wno-tautological-compare \
+ -Wno-self-assign
.include <bsd.own.mk>
diff --git a/usr.sbin/mrouted/Makefile b/usr.sbin/mrouted/Makefile
index e26b8b97974..4869d739983 100644
--- a/usr.sbin/mrouted/Makefile
+++ b/usr.sbin/mrouted/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.14 2007/05/28 12:06:38 tls Exp $
+# $NetBSD: Makefile,v 1.15 2011/05/26 12:56:34 joerg Exp $
# from: Id: Makefile,v 1.5 1993/06/24 05:11:16 deering Exp
.include <bsd.own.mk>
@@ -14,4 +14,6 @@ LDADD+= -lutil
DPADD+= ${LIBUTIL}
CPPFLAGS+= -I${.CURDIR}
+CWARNFLAGS.clang+= -Wno-format-extra-args
+
.include <bsd.prog.mk>
diff --git a/usr.sbin/ndbootd/Makefile b/usr.sbin/ndbootd/Makefile
index 4a39b39722c..f29d655f122 100644
--- a/usr.sbin/ndbootd/Makefile
+++ b/usr.sbin/ndbootd/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.6 2009/04/22 15:23:05 lukem Exp $
+# $NetBSD: Makefile,v 1.7 2011/05/26 12:56:34 joerg Exp $
WARNS?= 1 # XXX -Wsign-compare -Wshadow
@@ -14,5 +14,7 @@ CPPFLAGS+=-DHAVE_CONFIG_H -I${.CURDIR}
COPTS.ndbootd.c+= -fno-tree-ter -fno-tree-lrs
.endif
+CWARNFLAGS.clang+= -Wno-tautological-compare
+
.include <bsd.own.mk>
.include <bsd.prog.mk>
diff --git a/usr.sbin/perfused/Makefile b/usr.sbin/perfused/Makefile
index d1efc0af147..62fbc111931 100644
--- a/usr.sbin/perfused/Makefile
+++ b/usr.sbin/perfused/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.2 2011/05/09 08:51:18 manu Exp $
+# $NetBSD: Makefile,v 1.3 2011/05/26 12:56:34 joerg Exp $
PROG= perfused
@@ -14,4 +14,6 @@ WARNS= 4
LDADD+= -lperfuse -lpuffs
DPADD+= ${LIBPUFFS}
+CWARNFLAGS.clang+= -Wno-format-security
+
.include <bsd.prog.mk>
diff --git a/usr.sbin/pf/Makefile.inc b/usr.sbin/pf/Makefile.inc
index 9aff85310c0..700e2cdae2e 100644
--- a/usr.sbin/pf/Makefile.inc
+++ b/usr.sbin/pf/Makefile.inc
@@ -1,6 +1,7 @@
-# $NetBSD: Makefile.inc,v 1.7 2009/04/23 05:25:06 lukem Exp $
+# $NetBSD: Makefile.inc,v 1.8 2011/05/26 12:56:34 joerg Exp $
WARNS?= 1 # XXX -Wshadow -Wcast-qual -Wsign-compare
+CWARNFLAGS.clang+= -Wno-tautological-compare
CPPFLAGS+= -include ${.CURDIR}/../compat_openbsd.h
diff --git a/usr.sbin/pppd/pppd/Makefile b/usr.sbin/pppd/pppd/Makefile
index 506141edf5f..be19859c58e 100644
--- a/usr.sbin/pppd/pppd/Makefile
+++ b/usr.sbin/pppd/pppd/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.39 2008/08/29 00:02:25 gmcgarry Exp $
+# $NetBSD: Makefile,v 1.40 2011/05/26 12:56:34 joerg Exp $
.include <bsd.own.mk>
@@ -39,4 +39,6 @@ COPTS.${f}.c+= -Wno-pointer-sign
.endfor
.endif
+CWARNFLAGS.clang+= -Wno-tautological-compare
+
.include <bsd.prog.mk>
diff --git a/usr.sbin/sup/Makefile.inc b/usr.sbin/sup/Makefile.inc
index 0b620ab5a50..188b2dd60dd 100644
--- a/usr.sbin/sup/Makefile.inc
+++ b/usr.sbin/sup/Makefile.inc
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.inc,v 1.12 2009/04/22 15:23:08 lukem Exp $
+# $NetBSD: Makefile.inc,v 1.13 2011/05/26 12:56:35 joerg Exp $
WARNS?= 1 # XXX -Wshadow -Wcast-qual -Wsign-compare
@@ -11,7 +11,7 @@ CPPFLAGS+=-UCMUCS -UCMU -UMACH -DVAR_TMP -DHAS_DAEMON -DHAS_POSIX_DIR \
CPPFLAGS+=-I${.CURDIR}/../source -I${.CURDIR}/../lib -I${.CURDIR}/../sys
CPPFLAGS+=-DEE_XXX
-CWARNFLAGS+=-Wextra
+CWARNFLAGS+=-Wextra -Wno-sign-compare
LIBSUPDIR != cd ${.CURDIR}/../lib && ${PRINTOBJDIR}
LIBSUP= ${LIBSUPDIR}/libsup.a