From de11d876419df3570c2418468613aebcebafe6ae Mon Sep 17 00:00:00 2001 From: mrg Date: Sun, 13 Oct 2019 07:28:04 +0000 Subject: [PATCH] introduce some common variables for use in GCC warning disables: GCC_NO_FORMAT_TRUNCATION -Wno-format-truncation (GCC 7/8) GCC_NO_STRINGOP_TRUNCATION -Wno-stringop-truncation (GCC 8) GCC_NO_STRINGOP_OVERFLOW -Wno-stringop-overflow (GCC 8) GCC_NO_CAST_FUNCTION_TYPE -Wno-cast-function-type (GCC 8) use these to turn off warnings for most GCC-8 complaints. many of these are false positives, most of the real bugs are already commited, or are yet to come. we plan to introduce versions of (some?) of these that use the "-Wno-error=" form, which still displays the warnings but does not make it an error, and all of the above will be re-considered as either being "fix me" (warning still displayed) or "warning is wrong." --- bin/pax/Makefile | 4 +++- .../bsd/netpgp/bin/netpgpverify/Makefile | 4 +++- .../external/bsd/netpgp/lib/netpgp/Makefile | 4 +++- .../external/bsd/netpgp/lib/verify/Makefile | 7 +++--- .../bsd/openssh/bin/ssh-agent/Makefile | 4 +++- .../bsd/openssh/bin/ssh-keygen/Makefile | 4 +++- crypto/external/bsd/openssh/bin/ssh/Makefile | 4 +++- crypto/external/bsd/openssh/bin/sshd/Makefile | 9 ++++--- crypto/external/bsd/openssh/lib/Makefile | 5 +++- external/bsd/am-utils/bin/amd/Makefile | 3 ++- external/bsd/fetch/lib/Makefile | 6 ++--- external/bsd/flex/bin/Makefile | 5 +++- external/bsd/ipf/Makefile.inc | 4 +++- external/bsd/ipf/bin/ipftest/Makefile | 4 +++- external/bsd/iscsi/lib/Makefile | 4 +++- .../bsd/libarchive/lib/libarchive/Makefile | 5 +++- external/bsd/libpcap/lib/Makefile | 9 ++++--- .../bsd/llvm/lib/libLLVMAnalysis/Makefile | 3 ++- .../bsd/llvm/lib/libLLVMRuntimeDyld/Makefile | 3 ++- external/bsd/mdocml/bin/mandoc/Makefile | 4 +++- external/bsd/ntp/bin/ntpd/Makefile | 7 +++++- external/bsd/ntp/bin/ntpq/Makefile | 4 +++- external/bsd/ntp/bin/sntp/Makefile | 4 +++- external/bsd/ntp/lib/libntp/Makefile | 4 +++- external/bsd/pdisk/bin/Makefile | 11 +++++---- external/bsd/ppp/usr.sbin/pppd/Makefile | 4 +++- external/bsd/ppp/usr.sbin/pppstats/Makefile | 4 +++- external/bsd/tmux/usr.bin/tmux/Makefile | 7 ++---- external/bsd/top/bin/Makefile | 5 +++- external/cddl/osnet/lib/libdtrace/Makefile | 10 ++++---- external/gpl2/groff/bin/troff/Makefile | 4 +++- external/gpl2/xcvs/bin/xcvs/Makefile | 10 +++++++- external/gpl3/gcc/lib/libiberty/Makefile | 4 +++- external/mit/xorg/bin/xconsole/Makefile | 4 +++- external/mit/xorg/bin/xmh/Makefile | 4 +++- external/mit/xorg/lib/libX11/Makefile.ximcp | 14 ++++++----- .../mit/xorg/lib/libX11/Makefile.xlibi18n | 4 +++- external/mit/xorg/lib/libXvMCW/Makefile | 4 +++- external/mit/xorg/lib/libxkbfile/Makefile | 4 +++- .../server/drivers/xf86-video-sis/Makefile | 4 ++-- .../bind/bin/dnssec/dnssec-verify/Makefile | 4 +++- external/mpl/dhcp/bin/relay/Makefile | 4 +++- external/mpl/dhcp/lib/common/Makefile | 5 +++- external/zlib/pigz/bin/pigz/Makefile | 6 ++++- games/hack/Makefile | 5 +++- games/hunt/hunt/Makefile | 4 +++- games/rogue/Makefile | 4 +++- games/tetris/Makefile | 4 +++- lib/libc/citrus/Makefile.inc | 6 ++++- lib/libc/net/Makefile.inc | 8 +++---- lib/libc/resolv/Makefile.inc | 6 ++--- lib/libc/rpc/Makefile.inc | 24 +++++++++---------- lib/libedit/Makefile | 6 ++++- lib/libisns/Makefile | 4 +++- lib/libpam/modules/pam_lastlog/Makefile | 6 ++--- lib/librump/Makefile | 7 +++++- lib/librumpclient/Makefile | 4 +++- lib/librumpres/Makefile | 4 +++- lib/librumpuser/Makefile | 4 +++- lib/libutil/Makefile | 8 +++---- libexec/ftpd/Makefile | 5 +++- libexec/rpc.rquotad/Makefile | 4 +++- libexec/rpc.rstatd/Makefile | 4 +++- libexec/rpc.rusersd/Makefile | 5 ++-- libexec/rpc.rwalld/Makefile | 4 +++- libexec/rpc.sprayd/Makefile | 5 ++-- sbin/disklabel/Makefile | 5 +++- sbin/dump/Makefile | 3 ++- sbin/dump_lfs/Makefile | 4 +++- sbin/fdisk/Makefile | 4 +++- sbin/init/Makefile | 4 +++- sbin/iscsictl/Makefile | 3 +++ sbin/pppoectl/Makefile | 4 +++- sbin/raidctl/Makefile | 4 +++- sbin/restore/Makefile | 5 +++- sbin/rndctl/Makefile | 4 +++- sbin/route/Makefile | 4 +++- sbin/routed/Makefile | 4 +++- sbin/umount/Makefile | 4 +++- share/mk/bsd.own.mk | 11 ++++++++- sys/modules/coredump/Makefile | 4 +++- sys/modules/filemon/Makefile | 4 +++- sys/modules/ptrace_common/Makefile | 4 +++- sys/rump/librump/rumpkern/Makefile.rumpkern | 8 ++++++- sys/rump/net/lib/libnet/Makefile | 4 +++- tests/fs/common/Makefile | 8 ++++++- tests/fs/nfs/nfsservice/Makefile | 8 ++++++- tests/lib/libc/rpc/Makefile | 4 +++- tests/lib/libc/ssp/Makefile | 6 ++--- tests/lib/libevent/Makefile | 4 +++- usr.bin/btpin/Makefile | 4 +++- usr.bin/config/Makefile | 4 +++- usr.bin/crunch/crunchgen/Makefile | 4 +++- usr.bin/cvslatest/Makefile | 4 +++- usr.bin/fstat/Makefile | 4 +++- usr.bin/hexdump/Makefile | 4 +++- usr.bin/login/Makefile | 4 +++- usr.bin/mail/Makefile | 5 ++-- usr.bin/make/Makefile | 10 ++++---- usr.bin/man/Makefile | 4 +++- usr.bin/mklocale/Makefile | 3 ++- usr.bin/msgs/Makefile | 4 +++- usr.bin/netstat/Makefile | 6 ++++- usr.bin/quota/Makefile | 4 +++- usr.bin/rdist/Makefile | 6 ++--- usr.bin/rpcgen/Makefile | 4 +++- usr.bin/rpcinfo/Makefile | 4 +++- usr.bin/rup/Makefile | 4 +++- usr.bin/rusers/Makefile | 4 +++- usr.bin/rwall/Makefile | 4 +++- usr.bin/showmount/Makefile | 4 +++- usr.bin/sort/Makefile | 4 +++- usr.bin/systat/Makefile | 8 +++---- usr.bin/telnet/Makefile | 4 +++- usr.bin/unifdef/Makefile | 4 +++- usr.bin/utoppya/Makefile | 4 +++- usr.bin/wall/Makefile | 4 +++- usr.sbin/acpitools/amldb/Makefile | 4 +++- usr.sbin/altq/libaltq/Makefile | 4 +++- usr.sbin/altq/tbrconfig/Makefile | 4 +++- usr.sbin/apm/Makefile | 4 +++- usr.sbin/apmd/Makefile | 4 +++- usr.sbin/btpand/Makefile | 4 +++- usr.sbin/catman/Makefile | 4 ++-- usr.sbin/cnwctl/Makefile | 4 +++- usr.sbin/crash/Makefile | 4 +++- usr.sbin/edquota/Makefile | 4 +++- usr.sbin/eshconfig/Makefile | 4 +++- usr.sbin/ifwatchd/Makefile | 4 +++- usr.sbin/ipwctl/Makefile | 4 +++- usr.sbin/iwictl/Makefile | 4 +++- usr.sbin/makefs/Makefile | 8 ++++++- usr.sbin/mopd/common/Makefile | 4 +++- usr.sbin/mopd/mopd/Makefile | 4 ++-- usr.sbin/mountd/Makefile | 4 +++- usr.sbin/mrouted/Makefile | 5 +++- usr.sbin/perfused/Makefile | 3 ++- usr.sbin/rarpd/Makefile | 4 +++- usr.sbin/rbootd/Makefile | 4 +++- usr.sbin/repquota/Makefile | 4 +++- usr.sbin/route6d/Makefile | 4 +++- usr.sbin/rpc.bootparamd/Makefile | 4 +++- usr.sbin/rpc.lockd/Makefile | 6 ++++- usr.sbin/rpc.pcnfsd/Makefile | 6 ++++- usr.sbin/rpc.statd/Makefile | 7 +++++- usr.sbin/rpc.yppasswdd/Makefile | 4 +++- usr.sbin/rpcbind/Makefile | 7 +++++- usr.sbin/rtadvd/Makefile | 5 +++- usr.sbin/rwhod/Makefile | 4 +++- usr.sbin/sliplogin/Makefile | 4 +++- usr.sbin/spray/Makefile | 4 +++- usr.sbin/sup/lib/Makefile | 4 +++- usr.sbin/sup/sup/Makefile | 4 +++- usr.sbin/sup/supfilesrv/Makefile | 4 +++- usr.sbin/sup/supscan/Makefile | 4 +++- usr.sbin/sysinst/Makefile.inc | 6 ++--- usr.sbin/syslogd/Makefile | 6 ++--- usr.sbin/wiconfig/Makefile | 4 +++- usr.sbin/ypbind/Makefile | 4 +++- usr.sbin/ypserv/yppush/Makefile | 5 +++- usr.sbin/ypserv/ypserv/Makefile | 4 +++- usr.sbin/ypserv/ypxfr/Makefile | 4 +++- usr.sbin/ypset/Makefile | 4 +++- 163 files changed, 563 insertions(+), 241 deletions(-) diff --git a/bin/pax/Makefile b/bin/pax/Makefile index 934168afe419..efd00d5d0e5a 100644 --- a/bin/pax/Makefile +++ b/bin/pax/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.40 2019/08/15 21:05:16 uwe Exp $ +# $NetBSD: Makefile,v 1.41 2019/10/13 07:28:04 mrg Exp $ # @(#)Makefile 8.1 (Berkeley) 5/31/93 .include @@ -50,4 +50,6 @@ LDADD+= -lrmt DPADD+= ${LIBRMT} .endif +COPTS.tar.c+= ${GCC_NO_STRINGOP_TRUNCATION} + .include diff --git a/crypto/external/bsd/netpgp/bin/netpgpverify/Makefile b/crypto/external/bsd/netpgp/bin/netpgpverify/Makefile index 8a99f7badc02..7e7bfc6dded4 100644 --- a/crypto/external/bsd/netpgp/bin/netpgpverify/Makefile +++ b/crypto/external/bsd/netpgp/bin/netpgpverify/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.17 2019/09/29 23:44:58 mrg Exp $ +# $NetBSD: Makefile,v 1.18 2019/10/13 07:28:04 mrg Exp $ PROG=netpgpverify BINDIR= /usr/bin @@ -32,6 +32,8 @@ EXTDIST=${.CURDIR}/../../dist COPTS+= -Wno-error=implicit-fallthrough .endif +COPTS.libverify.c+= ${GCC_NO_FORMAT_TRUNCATION} + .include t tst: ${PROG} diff --git a/crypto/external/bsd/netpgp/lib/netpgp/Makefile b/crypto/external/bsd/netpgp/lib/netpgp/Makefile index b1c849ee9660..6b5566d50906 100644 --- a/crypto/external/bsd/netpgp/lib/netpgp/Makefile +++ b/crypto/external/bsd/netpgp/lib/netpgp/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.3 2018/02/04 03:19:52 christos Exp $ +# $NetBSD: Makefile,v 1.4 2019/10/13 07:28:05 mrg Exp $ .include @@ -26,4 +26,6 @@ LIBDPLIBS+= crypto ${OPENSSL}/lib/libcrypto LIBDPLIBS+= z ${NETBSDSRCDIR}/lib/libz LIBDPLIBS+= bz2 ${NETBSDSRCDIR}/lib/libbz2 +COPTS.crypto.c+= ${GCC_NO_STRINGOP_OVERFLOW} + .include diff --git a/crypto/external/bsd/netpgp/lib/verify/Makefile b/crypto/external/bsd/netpgp/lib/verify/Makefile index a5883564ce55..28e7b203bd6e 100644 --- a/crypto/external/bsd/netpgp/lib/verify/Makefile +++ b/crypto/external/bsd/netpgp/lib/verify/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.11 2019/09/29 23:44:58 mrg Exp $ +# $NetBSD: Makefile,v 1.12 2019/10/13 07:28:05 mrg Exp $ LIB=netpgpverify SRCS+=b64.c @@ -27,8 +27,7 @@ INCSDIR=/usr/include/netpgp .include -.if defined(HAVE_GCC) && ${HAVE_GCC} >= 7 && ${ACTIVE_CC} == "gcc" -COPTS+= -Wno-error=implicit-fallthrough -.endif +COPTS+= ${${ACTIVE_CC} == "gcc":? -Wno-implicit-fallthrough :} +COPTS.libverify.c+= ${GCC_NO_FORMAT_TRUNCATION} .include diff --git a/crypto/external/bsd/openssh/bin/ssh-agent/Makefile b/crypto/external/bsd/openssh/bin/ssh-agent/Makefile index 91b9290831f6..c4fab0364fd8 100644 --- a/crypto/external/bsd/openssh/bin/ssh-agent/Makefile +++ b/crypto/external/bsd/openssh/bin/ssh-agent/Makefile @@ -1,8 +1,10 @@ -# $NetBSD: Makefile,v 1.2 2010/11/21 19:19:22 adam Exp $ +# $NetBSD: Makefile,v 1.3 2019/10/13 07:28:05 mrg Exp $ BINDIR=/usr/bin PROG= ssh-agent SRCS= ssh-agent.c ssh-pkcs11-client.c +COPTS.ssh-agent.c+= ${GCC_NO_FORMAT_TRUNCATION} + .include diff --git a/crypto/external/bsd/openssh/bin/ssh-keygen/Makefile b/crypto/external/bsd/openssh/bin/ssh-keygen/Makefile index 03c8ed145f02..abf032c19aa8 100644 --- a/crypto/external/bsd/openssh/bin/ssh-keygen/Makefile +++ b/crypto/external/bsd/openssh/bin/ssh-keygen/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.5 2019/10/12 18:32:21 christos Exp $ +# $NetBSD: Makefile,v 1.6 2019/10/13 07:28:05 mrg Exp $ BINDIR= /usr/bin @@ -7,4 +7,6 @@ SRCS= ssh-keygen.c moduli.c sshsig.c COPTS.ssh-keygen.c= -Wno-pointer-sign +COPTS.ssh-keygen.c+= ${GCC_NO_FORMAT_TRUNCATION} + .include diff --git a/crypto/external/bsd/openssh/bin/ssh/Makefile b/crypto/external/bsd/openssh/bin/ssh/Makefile index 499eea0ea5b8..1891cf064585 100644 --- a/crypto/external/bsd/openssh/bin/ssh/Makefile +++ b/crypto/external/bsd/openssh/bin/ssh/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.14 2018/04/06 18:58:59 christos Exp $ +# $NetBSD: Makefile,v 1.15 2019/10/13 07:28:05 mrg Exp $ .include @@ -23,4 +23,6 @@ LDADD+= -lgssapi -lheimntlm ${LIBKRB5_LDADD} DPADD+= ${LIBGSSAPI} ${LIBHEIMNTLM} ${LIBKRB5_DPADD} .endif +COPTS.sshconnect.c+= ${GCC_NO_FORMAT_TRUNCATION} + .include diff --git a/crypto/external/bsd/openssh/bin/sshd/Makefile b/crypto/external/bsd/openssh/bin/sshd/Makefile index e2af1ebc69c7..06d7140ff782 100644 --- a/crypto/external/bsd/openssh/bin/sshd/Makefile +++ b/crypto/external/bsd/openssh/bin/sshd/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.18 2019/10/12 18:32:21 christos Exp $ +# $NetBSD: Makefile,v 1.19 2019/10/13 07:28:05 mrg Exp $ .include @@ -58,8 +58,6 @@ LDADD+= -lldap -lssl -llber DPADD+= ${LIBLDAP} ${LIBSSL} ${LIBLBER} .endif -.include - LDADD+= -lcrypt -lutil DPADD+= ${LIBCRYPT} ${LIBUTIL} @@ -72,3 +70,8 @@ CPPFLAGS+=-DSMALL LDADD+= -lblacklist DPADD+= ${LIBBLACKLIST} .endif + +COPTS.sshlogin.c+= ${GCC_NO_STRINGOP_TRUNCATION} +COPTS.ldapauth.c+= ${GCC_NO_STRINGOP_TRUNCATION} ${GCC_NO_STRINGOP_OVERFLOW} + +.include diff --git a/crypto/external/bsd/openssh/lib/Makefile b/crypto/external/bsd/openssh/lib/Makefile index 7cdfbf4cd6e8..9c7e4e7204b6 100644 --- a/crypto/external/bsd/openssh/lib/Makefile +++ b/crypto/external/bsd/openssh/lib/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.28 2019/10/12 18:32:22 christos Exp $ +# $NetBSD: Makefile,v 1.29 2019/10/13 07:28:05 mrg Exp $ .include @@ -120,4 +120,7 @@ COPTS.poly1305.c+= -O0 COPTS.umac.c+= -O0 .endif +COPTS.hostfile.c+= ${GCC_NO_FORMAT_TRUNCATION} +COPTS.sshkey.c+= ${GCC_NO_FORMAT_TRUNCATION} + .include diff --git a/external/bsd/am-utils/bin/amd/Makefile b/external/bsd/am-utils/bin/amd/Makefile index 1f897b5f9152..f0e4381a7742 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.12 2017/05/21 15:28:38 riastradh Exp $ +# $NetBSD: Makefile,v 1.13 2019/10/13 07:28:05 mrg Exp $ .include "${.CURDIR}/../Makefile.inc" @@ -73,5 +73,6 @@ build_version.h: get_args.c echo '#define BUILD_HOST "'unknown'"' >> ${.TARGET} echo '#define BUILD_DATE "'unknown'"' >> ${.TARGET} +COPTS.sun_map.c+= ${GCC_NO_STRINGOP_TRUNCATION} .include diff --git a/external/bsd/fetch/lib/Makefile b/external/bsd/fetch/lib/Makefile index c0ef962f10db..48a79881b40b 100644 --- a/external/bsd/fetch/lib/Makefile +++ b/external/bsd/fetch/lib/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.14 2019/10/10 02:30:43 kre Exp $ +# $NetBSD: Makefile,v 1.15 2019/10/13 07:28:05 mrg Exp $ LIB= fetch SRCS= fetch.c common.c ftp.c http.c file.c @@ -36,8 +36,6 @@ httperr.h: ${LIBFETCHDIR}/http.errors ${LIBFETCHDIR}/errlist.sh CFLAGS+= -Wno-macro-redefined # _REENTRANT redefined .endif -.if defined(HAVE_GCC) && ${HAVE_GCC} >= 8 && ${ACTIVE_CC} == "gcc" -COPTS.http.c += -Wno-error=stringop-truncation -.endif +COPTS.http.c+= ${GCC_NO_STRINGOP_TRUNCATION} .include diff --git a/external/bsd/flex/bin/Makefile b/external/bsd/flex/bin/Makefile index cfb32978c700..861e285c5925 100644 --- a/external/bsd/flex/bin/Makefile +++ b/external/bsd/flex/bin/Makefile @@ -1,5 +1,5 @@ # from: @(#)Makefile 5.4 (Berkeley) 6/24/90 -# $NetBSD: Makefile,v 1.14 2019/09/29 23:44:58 mrg Exp $ +# $NetBSD: Makefile,v 1.15 2019/10/13 07:28:06 mrg Exp $ # # By default, flex will be configured to generate 8-bit scanners only if the # -8 flag is given. If you want it to always generate 8-bit scanners, add @@ -78,4 +78,7 @@ COPTS.scan.c+= -O1 . endif .endif +COPTS.filter.c+= ${GCC_NO_FORMAT_TRUNCATION} +COPTS.misc.c+= ${GCC_NO_FORMAT_TRUNCATION} + .include diff --git a/external/bsd/ipf/Makefile.inc b/external/bsd/ipf/Makefile.inc index 061153102b7a..cf0c0574b50e 100644 --- a/external/bsd/ipf/Makefile.inc +++ b/external/bsd/ipf/Makefile.inc @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.inc,v 1.3 2017/01/11 12:19:43 joerg Exp $ +# $NetBSD: Makefile.inc,v 1.4 2019/10/13 07:28:06 mrg Exp $ WARNS?= 1 # XXX -Wcast-qual -Wshadow CWARNFLAGS.clang+= -Wno-format -Wno-tautological-compare \ @@ -32,6 +32,8 @@ LDADD+= -L${IPFOBJDIR} -lipf -lkvm CLEANFILES+= y.tab.c y.tab.h +COPTS+= ${GCC_NO_STRINGOP_TRUNCATION} + .PATH: ${UDIST} \ ${UDIST}/lib \ ${UDIST}/tools \ diff --git a/external/bsd/ipf/bin/ipftest/Makefile b/external/bsd/ipf/bin/ipftest/Makefile index 1427b3fdb717..7a28120e210b 100644 --- a/external/bsd/ipf/bin/ipftest/Makefile +++ b/external/bsd/ipf/bin/ipftest/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.6 2019/09/29 23:44:58 mrg Exp $ +# $NetBSD: Makefile,v 1.7 2019/10/13 07:28:06 mrg Exp $ .include @@ -109,4 +109,6 @@ COPTS.ipf_y.c+= -O1 . endif .endif +COPTS.fil.c+= ${GCC_NO_STRINGOP_OVERFLOW} + .include diff --git a/external/bsd/iscsi/lib/Makefile b/external/bsd/iscsi/lib/Makefile index 439123882515..767962c55671 100644 --- a/external/bsd/iscsi/lib/Makefile +++ b/external/bsd/iscsi/lib/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.4 2012/01/01 01:19:20 wrstuden Exp $ +# $NetBSD: Makefile,v 1.5 2019/10/13 07:28:06 mrg Exp $ .include @@ -23,4 +23,6 @@ ISCSIDIST= ${.CURDIR}/../dist LIBDPLIBS+= pthread ${.CURDIR}/../../../../lib/libpthread +COPTS.target.c+= ${GCC_NO_FORMAT_TRUNCATION} + .include diff --git a/external/bsd/libarchive/lib/libarchive/Makefile b/external/bsd/libarchive/lib/libarchive/Makefile index 67999864af11..394d5169b991 100644 --- a/external/bsd/libarchive/lib/libarchive/Makefile +++ b/external/bsd/libarchive/lib/libarchive/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.10 2019/07/24 14:07:17 joerg Exp $ +# $NetBSD: Makefile,v 1.11 2019/10/13 07:28:06 mrg Exp $ .include @@ -455,4 +455,7 @@ COPTS.archive_read_support_format_7zip.c += -Wno-error=implicit-fallthrough COPTS.archive_read_support_format_mtree.c += -Wno-error=implicit-fallthrough .endif +COPTS.target.c+= ${GCC_NO_STRINGOP_TRUNCATION} +COPTS.archive_write_set_format_iso9660.c+= ${GCC_NO_STRINGOP_TRUNCATION} + .include diff --git a/external/bsd/libpcap/lib/Makefile b/external/bsd/libpcap/lib/Makefile index d733d1a32eff..711d752717f8 100644 --- a/external/bsd/libpcap/lib/Makefile +++ b/external/bsd/libpcap/lib/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.25 2019/10/01 16:02:12 christos Exp $ +# $NetBSD: Makefile,v 1.26 2019/10/13 07:28:06 mrg Exp $ USE_SHLIBDIR=yes .include @@ -165,10 +165,9 @@ CLEANFILES+= tokdefs.h scanner.h COPTS.bpf_image.c+= -Wno-format-nonliteral -.if defined(HAVE_GCC) && ${HAVE_GCC} >= 7 && ${ACTIVE_CC} == "gcc" -COPTS.pcap.c+= -Wno-error=format-truncation -COPTS.gencode.c+= -Wno-error=implicit-fallthrough -.endif +COPTS.gencode.c+= ${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} >= 7:? -Wno-error=implicit-fallthrough :} +COPTS.pcap.c+= ${GCC_NO_FORMAT_TRUNCATION} +COPTS.pcap-bpf.c+= ${GCC_NO_STRINGOP_TRUNCATION} CWARNFLAGS.clang+= -Wno-format-extra-args \ -Wno-unneeded-internal-declaration diff --git a/external/bsd/llvm/lib/libLLVMAnalysis/Makefile b/external/bsd/llvm/lib/libLLVMAnalysis/Makefile index 7fbed66e5bfb..97489d2aebf6 100644 --- a/external/bsd/llvm/lib/libLLVMAnalysis/Makefile +++ b/external/bsd/llvm/lib/libLLVMAnalysis/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.25 2018/07/17 18:55:27 joerg Exp $ +# $NetBSD: Makefile,v 1.26 2019/10/13 07:28:06 mrg Exp $ LIB= LLVMAnalysis @@ -99,4 +99,5 @@ SRCS+= AliasAnalysis.cpp \ .include .else .include +COPTS.ValueTracking.cpp+= ${GCC_NO_STRINGOP_OVERFLOW} .endif diff --git a/external/bsd/llvm/lib/libLLVMRuntimeDyld/Makefile b/external/bsd/llvm/lib/libLLVMRuntimeDyld/Makefile index c1b635c55df2..eaa966e48230 100644 --- a/external/bsd/llvm/lib/libLLVMRuntimeDyld/Makefile +++ b/external/bsd/llvm/lib/libLLVMRuntimeDyld/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.10 2019/03/10 12:14:06 mrg Exp $ +# $NetBSD: Makefile,v 1.11 2019/10/13 07:28:06 mrg Exp $ LIB= LLVMRuntimeDyld @@ -21,4 +21,5 @@ SRCS+= RuntimeDyldELFMips.cpp .include .else .include +COPTS.RuntimeDyldChecker.cpp+= ${GCC_NO_STRINGOP_OVERFLOW} .endif diff --git a/external/bsd/mdocml/bin/mandoc/Makefile b/external/bsd/mdocml/bin/mandoc/Makefile index 35f4d3f2b12b..2958ecf51ebb 100644 --- a/external/bsd/mdocml/bin/mandoc/Makefile +++ b/external/bsd/mdocml/bin/mandoc/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.18 2019/03/11 17:59:28 christos Exp $ +# $NetBSD: Makefile,v 1.19 2019/10/13 07:28:06 mrg Exp $ .include @@ -46,4 +46,6 @@ SRCS+= ${SRCS.libmandoc} compat_strtonum.c compat_reallocarray.c COPTS.man_term.c+= -Wno-error=array-bounds +COPTS.tbl_term.c+= ${GCC_NO_FORMAT_TRUNCATION} + .include diff --git a/external/bsd/ntp/bin/ntpd/Makefile b/external/bsd/ntp/bin/ntpd/Makefile index 52e211e6fe7e..82a73755923c 100644 --- a/external/bsd/ntp/bin/ntpd/Makefile +++ b/external/bsd/ntp/bin/ntpd/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.23 2019/10/04 09:47:27 mrg Exp $ +# $NetBSD: Makefile,v 1.24 2019/10/13 07:28:07 mrg Exp $ .include @@ -93,5 +93,10 @@ COPTS.ntp_control.c+= -Wno-error=maybe-uninitialized .endif COPTS.ntp_loopfilter.c+= ${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} == 8:? -Wno-error=restrict :} +COPTS.ntp_loopfilter.c+= ${GCC_NO_FORMAT_TRUNCATION} +COPTS.ntp_crypto.c+= ${GCC_NO_FORMAT_TRUNCATION} +COPTS.refclock_parse.c+= ${GCC_NO_FORMAT_TRUNCATION} +COPTS.refclock_leitch.c+= ${GCC_NO_FORMAT_TRUNCATION} +COPTS.refclock_neoclock4x.c+= ${GCC_NO_FORMAT_TRUNCATION} .include diff --git a/external/bsd/ntp/bin/ntpq/Makefile b/external/bsd/ntp/bin/ntpq/Makefile index b4109200e061..9819dd7fb4a6 100644 --- a/external/bsd/ntp/bin/ntpq/Makefile +++ b/external/bsd/ntp/bin/ntpq/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.7 2013/12/28 03:19:43 christos Exp $ +# $NetBSD: Makefile,v 1.8 2019/10/13 07:28:07 mrg Exp $ .include @@ -21,4 +21,6 @@ CPPFLAGS+=-I${IDIST}/include -I${IDIST}/sntp/libopts .PATH: ${DIST} +COPTS.ntpq.c+= ${GCC_NO_STRINGOP_TRUNCATION} + .include diff --git a/external/bsd/ntp/bin/sntp/Makefile b/external/bsd/ntp/bin/sntp/Makefile index d3641e42c80d..5a6ecd3d803a 100644 --- a/external/bsd/ntp/bin/sntp/Makefile +++ b/external/bsd/ntp/bin/sntp/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.6 2013/12/28 03:19:43 christos Exp $ +# $NetBSD: Makefile,v 1.7 2019/10/13 07:28:07 mrg Exp $ USE_FORT?= yes # network client/server @@ -31,4 +31,6 @@ CPPFLAGS+= -DSAVENAME=\"/var/db/sntp.state\" LDADD+= -L${LIBISC} -liscntp -levent -lm DPADD+= ${LIBM} ${LIBEVENT} +COPTS.utilities.c+= ${GCC_NO_FORMAT_TRUNCATION} + .include diff --git a/external/bsd/ntp/lib/libntp/Makefile b/external/bsd/ntp/lib/libntp/Makefile index 2efa814ded5c..72bea06e3480 100644 --- a/external/bsd/ntp/lib/libntp/Makefile +++ b/external/bsd/ntp/lib/libntp/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.20 2018/02/02 01:02:40 mrg Exp $ +# $NetBSD: Makefile,v 1.21 2019/10/13 07:28:07 mrg Exp $ LIBISPRIVATE=yes @@ -99,4 +99,6 @@ CPPFLAGS.ntp_calendar.c += -DMKREPRO_DATE=\"${MKREPRO_DATE:Q}\" CPPFLAGS.ntp_calendar.c += -DMKREPRO_TIME=\"${MKREPRO_TIME:Q}\" .endif +COPTS.timetoa.c+= ${GCC_NO_FORMAT_TRUNCATION} + .include diff --git a/external/bsd/pdisk/bin/Makefile b/external/bsd/pdisk/bin/Makefile index ecfc5bf7fa0b..8c42dcb50ba9 100644 --- a/external/bsd/pdisk/bin/Makefile +++ b/external/bsd/pdisk/bin/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.3 2019/09/29 23:44:59 mrg Exp $ +# $NetBSD: Makefile,v 1.4 2019/10/13 07:28:07 mrg Exp $ .include WARNS=5 @@ -21,9 +21,12 @@ CPPFLAGS+= -I${SRCDIR} CPPFLAGS+= -D__unix__ .if defined(HAVE_GCC) && ${HAVE_GCC} >= 7 && ${ACTIVE_CC} == "gcc" -COPTS.file_media.c+= -Wno-error=implicit-fallthrough -COPTS.pathname.c+= -Wno-error=implicit-fallthrough -COPTS.pdisk.c+= -Wno-error=implicit-fallthrough +COPTS.file_media.c+= -Wno-implicit-fallthrough +COPTS.pathname.c+= -Wno-implicit-fallthrough +COPTS.pdisk.c+= -Wno-implicit-fallthrough .endif +COPTS.partition_map.c+= ${GCC_NO_STRINGOP_TRUNCATION} +COPTS.pdisk.c+= ${GCC_NO_STRINGOP_TRUNCATION} + .include diff --git a/external/bsd/ppp/usr.sbin/pppd/Makefile b/external/bsd/ppp/usr.sbin/pppd/Makefile index 4bf60f6714a0..4ec1a71f2ea6 100644 --- a/external/bsd/ppp/usr.sbin/pppd/Makefile +++ b/external/bsd/ppp/usr.sbin/pppd/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.1 2013/11/28 22:33:43 christos Exp $ +# $NetBSD: Makefile,v 1.2 2019/10/13 07:28:07 mrg Exp $ .include "../Makefile.inc" @@ -39,4 +39,6 @@ COPTS.${f}.c+= -Wno-pointer-sign CWARNFLAGS.clang+= -Wno-tautological-compare +COPTS.session.c+= ${GCC_NO_STRINGOP_TRUNCATION} + .include diff --git a/external/bsd/ppp/usr.sbin/pppstats/Makefile b/external/bsd/ppp/usr.sbin/pppstats/Makefile index 2d362294ed18..e8e108e4493f 100644 --- a/external/bsd/ppp/usr.sbin/pppstats/Makefile +++ b/external/bsd/ppp/usr.sbin/pppstats/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.1 2013/11/28 22:33:43 christos Exp $ +# $NetBSD: Makefile,v 1.2 2019/10/13 07:28:07 mrg Exp $ .include "../Makefile.inc" @@ -9,4 +9,6 @@ MAN= pppstats.8 LINKS= ${BINDIR}/pppstats ${BINDIR}/slstats MLINKS= pppstats.8 slstats.8 +COPTS.pppstats.c+= ${GCC_NO_STRINGOP_TRUNCATION} + .include diff --git a/external/bsd/tmux/usr.bin/tmux/Makefile b/external/bsd/tmux/usr.bin/tmux/Makefile index c527e240bde0..00bc68d7e2ff 100644 --- a/external/bsd/tmux/usr.bin/tmux/Makefile +++ b/external/bsd/tmux/usr.bin/tmux/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.21 2019/01/05 21:44:40 christos Exp $ +# $NetBSD: Makefile,v 1.22 2019/10/13 07:28:07 mrg Exp $ .include @@ -224,9 +224,6 @@ LDADD+= -levent -lterminfo -lutil -lm DPADD+= ${LIBEVENT} ${LIBTERMINFO} ${LIBUTIL} COPTS.format.c += -Wno-format-nonliteral -#COPTS.cmd-display-message.c += -Wno-format-nonliteral -#COPTS.cmd-pipe-pane.c += -Wno-format-nonliteral -#COPTS.server-client.c += -Wno-format-nonliteral -#COPTS.status.c += -Wno-format-nonliteral +COPTS.utempter.c+= ${GCC_NO_STRINGOP_TRUNCATION} .include diff --git a/external/bsd/top/bin/Makefile b/external/bsd/top/bin/Makefile index 5b9a2a7e7e9b..f6c34dfac5b5 100644 --- a/external/bsd/top/bin/Makefile +++ b/external/bsd/top/bin/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.10 2016/01/23 21:22:45 christos Exp $ +# $NetBSD: Makefile,v 1.11 2019/10/13 07:28:07 mrg Exp $ .include @@ -38,4 +38,7 @@ config.h: config.h.in ${TOOL_SED} -e s/@MACHINE@/${MACHINE}/ < $? > $@ COPTS.display.c = -Wno-format-nonliteral + +COPTS.commands.c+= ${GCC_NO_CAST_FUNCTION_TYPE} + .include diff --git a/external/cddl/osnet/lib/libdtrace/Makefile b/external/cddl/osnet/lib/libdtrace/Makefile index 3df60449093a..9cb2dedd77d5 100644 --- a/external/cddl/osnet/lib/libdtrace/Makefile +++ b/external/cddl/osnet/lib/libdtrace/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.23 2019/10/10 02:35:45 kre Exp $ +# $NetBSD: Makefile,v 1.24 2019/10/13 07:28:08 mrg Exp $ # $FreeBSD: head/cddl/lib/libdtrace/Makefile 314654 2017-03-04 11:30:04Z ngie $ @@ -85,10 +85,8 @@ COPTS.dt_printf.c += -Wno-stack-protector COPTS.dt_program.c += -Wno-stack-protector COPTS.dt_provider.c += -Wno-stack-protector COPTS.dt_subr.c += -Wno-stack-protector -.if defined(HAVE_GCC) && ${HAVE_GCC} >= 8 && ${ACTIVE_CC} == "gcc" -COPTS.dt_lex.c += -Wno-error=stringop-truncation -COPTS.dt_pid.c += -Wno-error=stringop-truncation -.endif +COPTS.dt_lex.c += ${GCC_NO_STRINGOP_TRUNCATION} +COPTS.dt_pid.c += ${GCC_NO_STRINGOP_TRUNCATION} COPTS.dt_consume.c += -Wno-parentheses COPTS.dt_consume.c += ${${ACTIVE_CC} == "gcc" :? -Wno-maybe-uninitialized :} @@ -109,7 +107,7 @@ CPPFLAGS+= -I${OPENSOLARIS_SYS_DISTDIR}/uts/sparc CPPFLAGS+= -I${OPENSOLARIS_SYS_DISTDIR}/uts/arm .PATH: ${.CURDIR}/../../dist/lib/libdtrace/arm .endif -COPTS.dt_link.c += ${${ACTIVE_CC} == "gcc" :? -Wno-format-truncation :} +COPTS.dt_link.c += ${GCC_NO_STRINGOP_TRUNCATION} LFLAGS+=-l diff --git a/external/gpl2/groff/bin/troff/Makefile b/external/gpl2/groff/bin/troff/Makefile index cd637760c495..46022684ba9b 100644 --- a/external/gpl2/groff/bin/troff/Makefile +++ b/external/gpl2/groff/bin/troff/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.2 2016/01/14 02:30:18 christos Exp $ +# $NetBSD: Makefile,v 1.3 2019/10/13 07:28:08 mrg Exp $ # $FreeBSD: src/gnu/usr.bin/groff/src/roff/troff/Makefile,v 1.4 2003/05/01 13:22:20 ru Exp $ @@ -15,6 +15,8 @@ USETBL= CWARNFLAGS.clang+= -Wno-format-security +COPTS.input.cpp+= ${GCC_NO_STRINGOP_OVERFLOW} + .include majorminor.cpp: ${GROFF_DIST}/VERSION ${GROFF_DIST}/REVISION diff --git a/external/gpl2/xcvs/bin/xcvs/Makefile b/external/gpl2/xcvs/bin/xcvs/Makefile index ac7e294671ff..37538604e8c1 100644 --- a/external/gpl2/xcvs/bin/xcvs/Makefile +++ b/external/gpl2/xcvs/bin/xcvs/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.6 2018/02/25 00:16:48 mrg Exp $ +# $NetBSD: Makefile,v 1.7 2019/10/13 07:28:08 mrg Exp $ .include "${.CURDIR}/../../Makefile.inc" PROG= xcvs @@ -33,4 +33,12 @@ SRCS+= gssapi-client.c DPADD+= ${LIBCRYPT} ${LIBZ} LDADD+= -lcrypt -lz +COPTS.commit.c+= ${GCC_NO_STRINGOP_OVERFLOW} +COPTS.logmsg.c+= ${GCC_NO_STRINGOP_OVERFLOW} +COPTS.ls.c+= ${GCC_NO_STRINGOP_OVERFLOW} +COPTS.input.c+= ${GCC_NO_STRINGOP_OVERFLOW} +COPTS.tag.c+= ${GCC_NO_STRINGOP_OVERFLOW} +COPTS.subr.c+= ${GCC_NO_STRINGOP_OVERFLOW} +COPTS.filesubr.c+= ${GCC_NO_STRINGOP_OVERFLOW} + .include diff --git a/external/gpl3/gcc/lib/libiberty/Makefile b/external/gpl3/gcc/lib/libiberty/Makefile index 387fecbe0341..980a27836e4d 100644 --- a/external/gpl3/gcc/lib/libiberty/Makefile +++ b/external/gpl3/gcc/lib/libiberty/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.8 2016/04/20 17:18:52 christos Exp $ +# $NetBSD: Makefile,v 1.9 2019/10/13 07:28:08 mrg Exp $ LIBISPRIVATE= yes @@ -29,4 +29,6 @@ CWARNFLAGS.clang+= -Wno-unused-value .PATH: ${DIST}/libiberty +COPTS.dyn-string.c+= ${GCC_NO_STRINGOP_TRUNCATION} + .include diff --git a/external/mit/xorg/bin/xconsole/Makefile b/external/mit/xorg/bin/xconsole/Makefile index f1ad38b24abf..0ab9343e47e6 100644 --- a/external/mit/xorg/bin/xconsole/Makefile +++ b/external/mit/xorg/bin/xconsole/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.4 2014/03/17 09:24:11 mrg Exp $ +# $NetBSD: Makefile,v 1.5 2019/10/13 07:28:08 mrg Exp $ .include @@ -15,5 +15,7 @@ DPADD+= ${LIBUTIL} ${LIBXAW} ${LIBXMU} ${LIBXT} ${LIBSM} ${LIBICE} \ CPPFLAGS+=-DHAS_OPENPTY -DHAVE_UTIL_H +COPTS.xconsole.c+= ${GCC_NO_STRINGOP_OVERFLOW} + .include .include diff --git a/external/mit/xorg/bin/xmh/Makefile b/external/mit/xorg/bin/xmh/Makefile index a5a478420d0b..a8a2bedb1094 100644 --- a/external/mit/xorg/bin/xmh/Makefile +++ b/external/mit/xorg/bin/xmh/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.7 2015/07/19 23:15:06 mrg Exp $ +# $NetBSD: Makefile,v 1.8 2019/10/13 07:28:08 mrg Exp $ .include @@ -23,5 +23,7 @@ DPADD+= ${LIBXAW} ${LIBXMU} ${LIBXT} ${LIBSM} ${LIBICE} \ CWARNFLAGS.clang+= -Wno-format +COPTS+= ${GCC_NO_STRINGOP_OVERFLOW} + .include .include diff --git a/external/mit/xorg/lib/libX11/Makefile.ximcp b/external/mit/xorg/lib/libX11/Makefile.ximcp index a25cec7208e9..e36399191be8 100644 --- a/external/mit/xorg/lib/libX11/Makefile.ximcp +++ b/external/mit/xorg/lib/libX11/Makefile.ximcp @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.ximcp,v 1.4 2016/06/13 20:03:07 ryoon Exp $ +# $NetBSD: Makefile.ximcp,v 1.5 2019/10/13 07:28:08 mrg Exp $ .PATH: ${X11SRCDIR.X11}/modules/im/ximcp SRCS.ximcp= \ @@ -39,8 +39,10 @@ CPPFLAGS+= \ -DTRANS_CLIENT \ -DHASXDMAUTH -CPPFLAGS.imDefLkup.c= -Wno-error -CPPFLAGS.imRm.c= -Wno-error -CPPFLAGS.imTrans.c= -Wno-error -CPPFLAGS.imLcLkup.c= -Wno-stack-protector -CPPFLAGS.imInsClbk.c= -Wno-unused-value +COPTS.imDefLkup.c= -Wno-error +COPTS.imRm.c= -Wno-error +COPTS.imTrans.c= -Wno-error +COPTS.imLcLkup.c= -Wno-stack-protector +COPTS.imInsClbk.c= -Wno-unused-value + +COPTS.imDefIm.c= ${GCC_NO_STRINGOP_OVERFLOW} diff --git a/external/mit/xorg/lib/libX11/Makefile.xlibi18n b/external/mit/xorg/lib/libX11/Makefile.xlibi18n index 278d3ae5d580..22f374d04efa 100644 --- a/external/mit/xorg/lib/libX11/Makefile.xlibi18n +++ b/external/mit/xorg/lib/libX11/Makefile.xlibi18n @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.xlibi18n,v 1.2 2016/06/02 22:41:26 mrg Exp $ +# $NetBSD: Makefile.xlibi18n,v 1.3 2019/10/13 07:28:08 mrg Exp $ .PATH: ${X11SRCDIR.X11}/modules/lc/gen SRCS.xlibi18n= lcGenConv.c @@ -10,3 +10,5 @@ CPPFLAGS+= \ CPPFLAGS+= \ ${XLOCALE.DEFINES} \ -DHASXDMAUTH + +COPTS.lcGenConv.c+= ${GCC_NO_STRINGOP_OVERFLOW} diff --git a/external/mit/xorg/lib/libXvMCW/Makefile b/external/mit/xorg/lib/libXvMCW/Makefile index 7365d316c479..d464842602e8 100644 --- a/external/mit/xorg/lib/libXvMCW/Makefile +++ b/external/mit/xorg/lib/libXvMCW/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.2 2013/06/06 06:18:15 mrg Exp $ +# $NetBSD: Makefile,v 1.3 2019/10/13 07:28:08 mrg Exp $ .include @@ -17,5 +17,7 @@ CPPFLAGS+= -I${X11SRCDIR.XvMC}/include LIBDPLIBS= Xext ${.CURDIR}/../libXext \ X11 ${.CURDIR}/../libX11/dynamic +COPTS.XvMCWrapper.c= ${GCC_NO_STRINGOP_OVERFLOW} + .include .include diff --git a/external/mit/xorg/lib/libxkbfile/Makefile b/external/mit/xorg/lib/libxkbfile/Makefile index 451506f4c800..b9e116394ed6 100644 --- a/external/mit/xorg/lib/libxkbfile/Makefile +++ b/external/mit/xorg/lib/libxkbfile/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.4 2018/12/25 08:59:06 maya Exp $ +# $NetBSD: Makefile,v 1.5 2019/10/13 07:28:09 mrg Exp $ .include @@ -19,5 +19,7 @@ LIBDPLIBS= X11 ${.CURDIR}/../libX11/dynamic PKGCONFIG= xkbfile +COPTS.xkbatom.c= ${GCC_NO_STRINGOP_OVERFLOW} + .include .include diff --git a/external/mit/xorg/server/drivers/xf86-video-sis/Makefile b/external/mit/xorg/server/drivers/xf86-video-sis/Makefile index e0d97b70467a..9d01f9cf506f 100644 --- a/external/mit/xorg/server/drivers/xf86-video-sis/Makefile +++ b/external/mit/xorg/server/drivers/xf86-video-sis/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.17 2018/12/31 12:13:50 mrg Exp $ +# $NetBSD: Makefile,v 1.18 2019/10/13 07:28:09 mrg Exp $ DRIVER= xf86-video-sis DRIVER_NAME= sis_drv @@ -24,7 +24,7 @@ CWARNFLAGS.clang+= -Wno-parentheses # XXX COPTS.sis_driver.c+= ${${ACTIVE_CC} == "gcc":? -Wno-error=discarded-qualifiers :} -COPTS.sis_utility.c+= ${${ACTIVE_CC} == "gcc":? -Wno-error=discarded-qualifiers :} +COPTS.sis_utility.c+= ${${ACTIVE_CC} == "gcc":? -Wno-error=discarded-qualifiers :} ${GCC_NO_STRINGOP_OVERFLOW} COPTS.initextx.c+= ${${ACTIVE_CC} == "gcc":? -Wno-error=discarded-qualifiers :} COPTS.sis_driver.c+= ${${ACTIVE_CC} == "clang":? -Wno-error=incompatible-pointer-types-discards-qualifiers :} COPTS.sis_utility.c+= ${${ACTIVE_CC} == "clang":? -Wno-error=incompatible-pointer-types-discards-qualifiers :} diff --git a/external/mpl/bind/bin/dnssec/dnssec-verify/Makefile b/external/mpl/bind/bin/dnssec/dnssec-verify/Makefile index f2731e5b9b1a..402d0ebb7d08 100644 --- a/external/mpl/bind/bin/dnssec/dnssec-verify/Makefile +++ b/external/mpl/bind/bin/dnssec/dnssec-verify/Makefile @@ -1,7 +1,9 @@ -# $NetBSD: Makefile,v 1.1 2018/08/12 13:02:25 christos Exp $ +# $NetBSD: Makefile,v 1.2 2019/10/13 07:28:09 mrg Exp $ BASE= ${.CURDIR:T} .include "${.CURDIR}/../Makefile.inc" +COPTS.discover.c+= ${GCC_NO_STRINGOP_TRUNCATION} + .include diff --git a/external/mpl/dhcp/bin/relay/Makefile b/external/mpl/dhcp/bin/relay/Makefile index 636ef1a781e8..71ff354b84a8 100644 --- a/external/mpl/dhcp/bin/relay/Makefile +++ b/external/mpl/dhcp/bin/relay/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.1 2018/04/07 22:31:37 christos Exp $ +# $NetBSD: Makefile,v 1.2 2019/10/13 07:28:09 mrg Exp $ SRCS = dhcrelay.c PROG = dhcrelay @@ -6,4 +6,6 @@ MAN = dhcrelay.8 DHCPSRCDIR= relay +COPTS.dhcrelay.c+= ${GCC_NO_STRINGOP_TRUNCATION} + .include diff --git a/external/mpl/dhcp/lib/common/Makefile b/external/mpl/dhcp/lib/common/Makefile index d2f4d480d68b..bb853d21aa12 100644 --- a/external/mpl/dhcp/lib/common/Makefile +++ b/external/mpl/dhcp/lib/common/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.1 2018/04/07 22:31:37 christos Exp $ +# $NetBSD: Makefile,v 1.2 2019/10/13 07:28:09 mrg Exp $ LIBISPRIVATE= yes @@ -11,4 +11,7 @@ MAN = dhcp-options.5 dhcp-eval.5 DHCPSRCDIR= common +COPTS.discover.c+= ${GCC_NO_STRINGOP_TRUNCATION} +COPTS.parse.c+= ${GCC_NO_FORMAT_TRUNCATION} ${GCC_NO_CAST_FUNCTION_TYPE} + .include diff --git a/external/zlib/pigz/bin/pigz/Makefile b/external/zlib/pigz/bin/pigz/Makefile index 1802a4603af1..1f745dad91f0 100644 --- a/external/zlib/pigz/bin/pigz/Makefile +++ b/external/zlib/pigz/bin/pigz/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.10 2019/02/26 07:31:49 rin Exp $ +# $NetBSD: Makefile,v 1.11 2019/10/13 07:28:09 mrg Exp $ .include @@ -58,3 +58,7 @@ DIST= ${NETBSDSRCDIR}/external/zlib/pigz/dist GZIPDIST= ${NETBSDSRCDIR}/usr.bin/gzip .PATH: ${GZIPDIST} .endif + +.if !defined(HOSTPROG) +COPTS.pigz.c+= ${GCC_NO_STRINGOP_OVERFLOW} +.endif diff --git a/games/hack/Makefile b/games/hack/Makefile index 66794662cf7b..97a9a5b08900 100644 --- a/games/hack/Makefile +++ b/games/hack/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.45 2011/08/24 17:39:32 plunky Exp $ +# $NetBSD: Makefile,v 1.46 2019/10/13 07:28:09 mrg Exp $ # @(#)Makefile 8.2 (Berkeley) 4/27/95 .include @@ -54,4 +54,7 @@ clobber: ${_MKMSG_REMOVE} "${DESTDIR}/var/games/hackdir/bones*" rm -f ${DESTDIR}/var/games/hackdir/bones* +COPTS.hack.objnam.c+= ${GCC_NO_STRINGOP_TRUNCATION} ${GCC_NO_STRINGOP_OVERFLOW} +COPTS.hack.pager.c+= ${GCC_NO_STRINGOP_TRUNCATION} + .include diff --git a/games/hunt/hunt/Makefile b/games/hunt/hunt/Makefile index 602b31fd93ec..e7584aa1fdd1 100644 --- a/games/hunt/hunt/Makefile +++ b/games/hunt/hunt/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.9 2014/03/30 02:26:09 dholland Exp $ +# $NetBSD: Makefile,v 1.10 2019/10/13 07:28:09 mrg Exp $ PROG= hunt SRCS= connect.c hunt.c otto.c playit.c server.c @@ -9,4 +9,6 @@ HIDEGAME=hidegame CPPFLAGS+=-I${.CURDIR}/../include +COPTS.hunt.c+= ${GCC_NO_STRINGOP_TRUNCATION} + .include diff --git a/games/rogue/Makefile b/games/rogue/Makefile index 800b192f54ef..e46f5173fd1f 100644 --- a/games/rogue/Makefile +++ b/games/rogue/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.20 2018/06/11 14:18:16 kamil Exp $ +# $NetBSD: Makefile,v 1.21 2019/10/13 07:28:09 mrg Exp $ # @(#)Makefile 8.1 (Berkeley) 5/31/93 PROG= rogue @@ -14,5 +14,7 @@ MAN= rogue.6 SUBDIR.roff+=USD.doc +COPTS.score.c+= ${GCC_NO_FORMAT_TRUNCATION} + .include .include diff --git a/games/tetris/Makefile b/games/tetris/Makefile index 25a3639a6a83..c0ccc6045a97 100644 --- a/games/tetris/Makefile +++ b/games/tetris/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.7 2010/02/03 15:34:39 roy Exp $ +# $NetBSD: Makefile,v 1.8 2019/10/13 07:28:10 mrg Exp $ # @(#)Makefile 8.1 (Berkeley) 5/31/93 PROG= tetris @@ -9,4 +9,6 @@ LDADD= -lterminfo HIDEGAME=hidegame SETGIDGAME=yes +COPTS.tetris.c+= ${GCC_NO_FORMAT_TRUNCATION} + .include diff --git a/lib/libc/citrus/Makefile.inc b/lib/libc/citrus/Makefile.inc index abab17511f1a..ba563037ded0 100644 --- a/lib/libc/citrus/Makefile.inc +++ b/lib/libc/citrus/Makefile.inc @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.inc,v 1.8 2010/05/30 08:28:53 tnozaki Exp $ +# $NetBSD: Makefile.inc,v 1.9 2019/10/13 07:28:10 mrg Exp $ # sources .PATH: ${ARCHDIR}/citrus ${.CURDIR}/citrus @@ -23,3 +23,7 @@ CPPFLAGS.citrus_lc_monetary.c+= -I${LIBCDIR}/locale CPPFLAGS.citrus_lc_numeric.c+= -I${LIBCDIR}/locale CPPFLAGS.citrus_lc_time.c+= -I${LIBCDIR}/locale CPPFLAGS.citrus_lc_messages.c+= -I${LIBCDIR}/locale + +COPTS.citrus_iconv.c+= ${GCC_NO_FORMAT_TRUNCATION} +COPTS.citrus_csmapper.c+= ${GCC_NO_FORMAT_TRUNCATION} + diff --git a/lib/libc/net/Makefile.inc b/lib/libc/net/Makefile.inc index b45305b9cf8c..103793fd29d2 100644 --- a/lib/libc/net/Makefile.inc +++ b/lib/libc/net/Makefile.inc @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.inc,v 1.90 2019/10/10 08:37:16 kre Exp $ +# $NetBSD: Makefile.inc,v 1.91 2019/10/13 07:28:10 mrg Exp $ # @(#)Makefile.inc 8.2 (Berkeley) 9/5/93 # net sources @@ -30,10 +30,6 @@ LPREFIX=_nsyy YPREFIX=_nsyy YHEADER=1 -.if defined(HAVE_GCC) && ${HAVE_GCC} >= 8 && ${ACTIVE_CC} == "gcc" -COPTS.getaddrinfo.c += -Wno-error=stringop-overflow -.endif - CLEANFILES+=nsparser.c nslexer.c nsparser.h nslexer.c: nslexer.l nsparser.h @@ -154,3 +150,5 @@ MLINKS+=getaddrinfo.3 freeaddrinfo.3 \ MAN+= sctp_bindx.3 sctp_connectx.3 sctp_freepaddrs.3 sctp_getaddrlen.3 \ sctp_getassocid.3 sctp_getpaddrs.3 sctp_opt_info.3 sctp_peeloff.3 \ sctp_recvmsg.3 sctp_send.3 sctp_sendmsg.3 + +COPTS.getaddrinfo.c+= ${GCC_NO_STRINGOP_OVERFLOW} diff --git a/lib/libc/resolv/Makefile.inc b/lib/libc/resolv/Makefile.inc index 5c6ac34fa046..fdb77d55f232 100644 --- a/lib/libc/resolv/Makefile.inc +++ b/lib/libc/resolv/Makefile.inc @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.inc,v 1.7 2019/10/10 08:37:16 kre Exp $ +# $NetBSD: Makefile.inc,v 1.8 2019/10/13 07:28:10 mrg Exp $ # net sources .PATH: ${.CURDIR}/resolv @@ -10,6 +10,4 @@ SRCS+= h_errno.c herror.c res_comp.c res_data.c res_debug.c \ # For COMPAT__RES SRCS+= res_compat.c -.if defined(HAVE_GCC) && ${HAVE_GCC} >= 8 && ${ACTIVE_CC} == "gcc" -COPTS.res_query.c += -Wno-error=stringop-overflow -.endif +COPTS.res_query.c+= ${GCC_NO_STRINGOP_OVERFLOW} diff --git a/lib/libc/rpc/Makefile.inc b/lib/libc/rpc/Makefile.inc index 693c022ba5d5..65e62c62ce7c 100644 --- a/lib/libc/rpc/Makefile.inc +++ b/lib/libc/rpc/Makefile.inc @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.inc,v 1.25 2019/10/10 08:37:16 kre Exp $ +# $NetBSD: Makefile.inc,v 1.26 2019/10/13 07:28:10 mrg Exp $ # librpc sources .PATH: ${.CURDIR}/rpc @@ -18,18 +18,6 @@ SRCS+= auth_none.c auth_unix.c authunix_prot.c bindresvport.c \ CPPFLAGS+= -DPORTMAP -.if defined(HAVE_GCC) && ${HAVE_GCC} >= 8 && ${ACTIVE_CC} == "gcc" -COPTS.clnt_bcast.c += -Wno-error=cast-function-type -COPTS.clnt_generic.c += -Wno-error=cast-function-type -COPTS.clnt_vc.c += -Wno-error=cast-function-type -COPTS.pmap_getmaps.c += -Wno-error=cast-function-type -COPTS.rpc_generic.c += -Wno-error=cast-function-type -COPTS.rpcb_clnt.c += -Wno-error=cast-function-type -COPTS.svc_simple.c += -Wno-error=cast-function-type -COPTS.xdr_sizeof.c += -Wno-error=cast-function-type -COPTS.getrpcent.c += -Wno-error=stringop-truncation -.endif - MAN+= bindresvport.3 getnetconfig.3 getnetpath.3 getrpcent.3 getrpcport.3 \ rpc.3 rpc_soc.3 rpc_clnt_auth.3 rpc_clnt_calls.3 rpc_clnt_create.3 \ rpc_svc_calls.3 rpc_svc_create.3 rpc_svc_err.3 rpc_svc_reg.3 \ @@ -179,3 +167,13 @@ MLINKS+= bindresvport.3 bindresvport_sa.3 \ xdr.3 xdr_vector.3 \ xdr.3 xdr_void.3 \ xdr.3 xdr_wrapstring.3 + +COPTS.clnt_bcast.c+= ${GCC_NO_CAST_FUNCTION_TYPE} +COPTS.clnt_generic.c+= ${GCC_NO_CAST_FUNCTION_TYPE} +COPTS.clnt_vc.c+= ${GCC_NO_CAST_FUNCTION_TYPE} +COPTS.rpcb_clnt.c+= ${GCC_NO_CAST_FUNCTION_TYPE} +COPTS.xdr_sizeof.c+= ${GCC_NO_CAST_FUNCTION_TYPE} +COPTS.svc_simple.c+= ${GCC_NO_CAST_FUNCTION_TYPE} +COPTS.pmap_getmaps.c+= ${GCC_NO_CAST_FUNCTION_TYPE} +COPTS.rpc_generic.c+= ${GCC_NO_CAST_FUNCTION_TYPE} +COPTS.getrpcent.c+= ${GCC_NO_STRINGOP_TRUNCATION} diff --git a/lib/libedit/Makefile b/lib/libedit/Makefile index 8a02211504a8..105a6a92e0ee 100644 --- a/lib/libedit/Makefile +++ b/lib/libedit/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.65 2017/06/30 20:26:52 kre Exp $ +# $NetBSD: Makefile,v 1.66 2019/10/13 07:28:10 mrg Exp $ # @(#)Makefile 8.1 (Berkeley) 6/4/93 USE_SHLIBDIR= yes @@ -137,3 +137,7 @@ COPTS.literal.c+= -Wno-sign-conversion COPTS.tokenizer.c+= -Wno-cast-qual COPTS.tokenizern.c+= -Wno-cast-qual .endif + +COPTS.history.c+= ${GCC_NO_STRINGOP_OVERFLOW} +COPTS.historyn.c+= ${GCC_NO_STRINGOP_OVERFLOW} +COPTS.readline.c+= ${GCC_NO_STRINGOP_TRUNCATION} ${GCC_NO_STRINGOP_OVERFLOW} diff --git a/lib/libisns/Makefile b/lib/libisns/Makefile index 82a9646d84c2..d28ef637d456 100644 --- a/lib/libisns/Makefile +++ b/lib/libisns/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.5 2013/09/11 23:04:10 joerg Exp $ +# $NetBSD: Makefile,v 1.6 2019/10/13 07:28:10 mrg Exp $ .include @@ -15,4 +15,6 @@ WARNS?= 5 LIBDPLIBS+= pthread ${.CURDIR}/../libpthread +COPTS.isns.c+= ${GCC_NO_STRINGOP_TRUNCATION} + .include diff --git a/lib/libpam/modules/pam_lastlog/Makefile b/lib/libpam/modules/pam_lastlog/Makefile index 633e521771f9..24d0a9a19734 100644 --- a/lib/libpam/modules/pam_lastlog/Makefile +++ b/lib/libpam/modules/pam_lastlog/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.10 2019/10/10 02:39:07 kre Exp $ +# $NetBSD: Makefile,v 1.11 2019/10/13 07:28:10 mrg Exp $ # Copyright 2001 Mark R V Murray # All rights reserved. # @@ -35,6 +35,4 @@ LIBDPLIBS+= util ${.CURDIR}/../../../libutil .include "${.CURDIR}/../mod.mk" -.if defined(HAVE_GCC) && ${HAVE_GCC} >= 8 && ${ACTIVE_CC} == "gcc" -COPTS.pam_lastlog.c += -Wno-stringop-truncation -.endif +COPTS.pam_lastlog.c+= ${GCC_NO_STRINGOP_TRUNCATION} diff --git a/lib/librump/Makefile b/lib/librump/Makefile index 306265d12da9..ebf5415b9053 100644 --- a/lib/librump/Makefile +++ b/lib/librump/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.5 2014/11/09 17:39:37 pooka Exp $ +# $NetBSD: Makefile,v 1.6 2019/10/13 07:28:10 mrg Exp $ # RUMPTOP= ${.CURDIR}/../../sys/rump @@ -7,4 +7,9 @@ LIBDPLIBS+= rumpuser ${.CURDIR}/../librumpuser WARNS= 3 # XXX: kernel isn't ready for -Wsign-compare +COPTS.kern_hook.c+= ${GCC_NO_CAST_FUNCTION_TYPE} +COPTS.rump.c+= ${GCC_NO_CAST_FUNCTION_TYPE} +COPTS.subr_pool.c+= ${GCC_NO_CAST_FUNCTION_TYPE} +COPTS.subr_vmem.c+= ${GCC_NO_CAST_FUNCTION_TYPE} + .include "${RUMPTOP}/librump/rumpkern/Makefile.rumpkern" diff --git a/lib/librumpclient/Makefile b/lib/librumpclient/Makefile index 6b99fd5f30fa..6f9ba31423e4 100644 --- a/lib/librumpclient/Makefile +++ b/lib/librumpclient/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.14 2017/05/11 04:33:14 sevan Exp $ +# $NetBSD: Makefile,v 1.15 2019/10/13 07:28:11 mrg Exp $ # .PATH: ${.CURDIR}/../../sys/rump/librump/rumpkern @@ -33,4 +33,6 @@ COPTS.rump_syscalls.c+= -fno-strict-aliasing @ln -s ${NETBSDSRCDIR}/sys/sys srcsys .endif +COPTS.rumpclient.c+= ${GCC_NO_CAST_FUNCTION_TYPE} + .include diff --git a/lib/librumpres/Makefile b/lib/librumpres/Makefile index 3dc3680031e2..bc36468ca638 100644 --- a/lib/librumpres/Makefile +++ b/lib/librumpres/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.1 2017/10/10 19:28:33 christos Exp $ +# $NetBSD: Makefile,v 1.2 2019/10/13 07:28:11 mrg Exp $ USE_FORT?= yes USE_SHLIBDIR= yes @@ -22,4 +22,6 @@ SRCS+= if_indextoname.c if_nametoindex.c #SRCS+= gethnamaddr.c sethostent.c CPPFLAGS+= -DRUMP_ACTION +COPTS.getaddrinfo.c+= ${GCC_NO_STRINGOP_OVERFLOW} + .include diff --git a/lib/librumpuser/Makefile b/lib/librumpuser/Makefile index 2be052c5f343..4dc1aafafb30 100644 --- a/lib/librumpuser/Makefile +++ b/lib/librumpuser/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.27 2017/05/11 04:33:14 sevan Exp $ +# $NetBSD: Makefile,v 1.28 2019/10/13 07:28:11 mrg Exp $ # .include @@ -54,4 +54,6 @@ INCS= rumpuser_component.h rumpuser_port.h CPPFLAGS+= -D_REENTRANT +COPTS.rumpuser_sp.c+= ${GCC_NO_CAST_FUNCTION_TYPE} + .include diff --git a/lib/libutil/Makefile b/lib/libutil/Makefile index 47758f2cea09..1c2aad0f4823 100644 --- a/lib/libutil/Makefile +++ b/lib/libutil/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.84 2019/10/08 18:50:34 christos Exp $ +# $NetBSD: Makefile,v 1.85 2019/10/13 07:28:11 mrg Exp $ # @(#)Makefile 8.1 (Berkeley) 6/4/93 USE_SHLIBDIR= yes @@ -39,10 +39,8 @@ CPPFLAGS.sockaddr_snprintf.c+=-DHAVE_UTIL_H CPPFLAGS.sockaddr_snprintf.c+=-DHAVE_NETATALK_AT_H CPPFLAGS.sockaddr_snprintf.c+=-DHAVE_NET_IF_DL_H -.if ${ACTIVE_CC} == "gcc" -COPTS.logwtmp.c += -Wno-stringop-truncation -COPTS.logwtmpx.c += -Wno-stringop-truncation -.endif +COPTS.logwtmp.c+= ${GCC_NO_STRINGOP_TRUNCATION} +COPTS.logwtmpx.c+= ${GCC_NO_STRINGOP_TRUNCATION} YPREFIX=__pd .PATH: ${NETBSDSRCDIR}/lib/libc/gen diff --git a/libexec/ftpd/Makefile b/libexec/ftpd/Makefile index a067fbad1d7c..f38e5db0997b 100644 --- a/libexec/ftpd/Makefile +++ b/libexec/ftpd/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.65 2018/02/25 00:16:48 mrg Exp $ +# $NetBSD: Makefile,v 1.66 2019/10/13 07:28:11 mrg Exp $ # @(#)Makefile 8.2 (Berkeley) 4/4/94 .include @@ -52,4 +52,7 @@ ftpd.o ftpcmd.o: version.h # #.endif +COPTS.ftpd.c+= ${GCC_NO_STRINGOP_TRUNCATION} ${GCC_NO_FORMAT_TRUNCATION} +COPTS.logwtmp.c+= ${GCC_NO_STRINGOP_TRUNCATION} + .include diff --git a/libexec/rpc.rquotad/Makefile b/libexec/rpc.rquotad/Makefile index 19df99b1d0bb..7b0049b433bf 100644 --- a/libexec/rpc.rquotad/Makefile +++ b/libexec/rpc.rquotad/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.9 2012/02/01 17:53:01 dholland Exp $ +# $NetBSD: Makefile,v 1.10 2019/10/13 07:28:11 mrg Exp $ .include PROG = rpc.rquotad @@ -9,4 +9,6 @@ MLINKS = rpc.rquotad.8 rquotad.8 DPADD= ${LIBQUOTA} ${LIBRPCSVC} LDADD= -lquota -lrpcsvc +COPTS.rquotad.c+= ${GCC_NO_CAST_FUNCTION_TYPE} + .include diff --git a/libexec/rpc.rstatd/Makefile b/libexec/rpc.rstatd/Makefile index fdfcaba5322c..e0f1c6a15af2 100644 --- a/libexec/rpc.rstatd/Makefile +++ b/libexec/rpc.rstatd/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.22 2016/01/23 21:22:47 christos Exp $ +# $NetBSD: Makefile,v 1.23 2019/10/13 07:28:11 mrg Exp $ .include @@ -13,4 +13,6 @@ MLINKS= rpc.rstatd.8 rstatd.8 DPADD= ${LIBRPCSVC} LDADD= -lrpcsvc +COPTS.rstat_proc.c+= ${GCC_NO_CAST_FUNCTION_TYPE} + .include diff --git a/libexec/rpc.rusersd/Makefile b/libexec/rpc.rusersd/Makefile index c525305d4269..dacd1a6c21b3 100644 --- a/libexec/rpc.rusersd/Makefile +++ b/libexec/rpc.rusersd/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.19 2018/02/28 23:45:56 snj Exp $ +# $NetBSD: Makefile,v 1.20 2019/10/13 07:28:11 mrg Exp $ .include @@ -15,5 +15,6 @@ CPPFLAGS+=-I${NETBSDSRCDIR}/usr.bin/who -DSUPPORT_UTMPX -DSUPPORT_UTMP DPADD+= ${LIBRPCSVC} LDADD+= -lrpcsvc -.include +COPTS.rusers_proc.c+= ${GCC_NO_STRINGOP_TRUNCATION} ${GCC_NO_STRINGOP_OVERFLOW} ${GCC_NO_CAST_FUNCTION_TYPE} +.include diff --git a/libexec/rpc.rwalld/Makefile b/libexec/rpc.rwalld/Makefile index 42000b133a12..9e8e08897672 100644 --- a/libexec/rpc.rwalld/Makefile +++ b/libexec/rpc.rwalld/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.10 1997/10/08 09:07:33 mrg Exp $ +# $NetBSD: Makefile,v 1.11 2019/10/13 07:28:11 mrg Exp $ PROG = rpc.rwalld SRCS = rwalld.c @@ -8,4 +8,6 @@ MLINKS= rpc.rwalld.8 rwalld.8 DPADD= ${LIBRPCSVC} LDADD= -lrpcsvc +COPTS.rwalld.c+= ${GCC_NO_CAST_FUNCTION_TYPE} + .include diff --git a/libexec/rpc.sprayd/Makefile b/libexec/rpc.sprayd/Makefile index edc353fd1731..753b1b57ba16 100644 --- a/libexec/rpc.sprayd/Makefile +++ b/libexec/rpc.sprayd/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.6 1997/10/08 09:07:35 mrg Exp $ +# $NetBSD: Makefile,v 1.7 2019/10/13 07:28:12 mrg Exp $ PROG = rpc.sprayd SRCS = sprayd.c @@ -8,5 +8,6 @@ MLINKS= rpc.sprayd.8 sprayd.8 DPADD= ${LIBRPCSVC} LDADD= -lrpcsvc -.include +COPTS.sprayd.c+= ${GCC_NO_STRINGOP_TRUNCATION} ${GCC_NO_CAST_FUNCTION_TYPE} +.include diff --git a/sbin/disklabel/Makefile b/sbin/disklabel/Makefile index e7c85c026f35..68b04f85c07b 100644 --- a/sbin/disklabel/Makefile +++ b/sbin/disklabel/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.73 2018/01/24 09:04:42 skrll Exp $ +# $NetBSD: Makefile,v 1.74 2019/10/13 07:28:12 mrg Exp $ # @(#)Makefile 8.2 (Berkeley) 3/17/94 PROG= disklabel @@ -30,4 +30,7 @@ CPPFLAGS+= -DALPHA_BOOTBLOCK_CKSUM CPPFLAGS+= -DVAX_ALTLABELS .endif +COPTS.main.c+= ${GCC_NO_STRINGOP_TRUNCATION} +COPTS.interact.c+= ${GCC_NO_STRINGOP_TRUNCATION} + .include diff --git a/sbin/dump/Makefile b/sbin/dump/Makefile index 11de73160080..d26e64b4cec0 100644 --- a/sbin/dump/Makefile +++ b/sbin/dump/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.39 2012/08/10 12:20:11 joerg Exp $ +# $NetBSD: Makefile,v 1.40 2019/10/13 07:28:12 mrg Exp $ # @(#)Makefile 8.1 (Berkeley) 6/5/93 # dump.h header file @@ -38,5 +38,6 @@ LDADD+= -lutil .PATH: ${NETBSDSRCDIR}/sys/ufs/ffs COPTS.ffs_inode.c+= -Wno-pointer-sign +COPTS.traverse.c+= ${GCC_NO_FORMAT_TRUNCATION} .include diff --git a/sbin/dump_lfs/Makefile b/sbin/dump_lfs/Makefile index 4eec2564e7ac..5668be47c1d2 100644 --- a/sbin/dump_lfs/Makefile +++ b/sbin/dump_lfs/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.16 2013/06/15 12:29:02 christos Exp $ +# $NetBSD: Makefile,v 1.17 2019/10/13 07:28:12 mrg Exp $ # @(#)Makefile 8.1 (Berkeley) 6/5/93 # lfs_inode.c LFS filestore-specific routines @@ -30,4 +30,6 @@ COPTS.lfs_inode.c+= -fno-tree-ter .PATH: ${NETBSDSRCDIR}/sbin/dump ${NETBSDSRCDIR}/sys/ufs/lfs \ ${NETBSDSRCDIR}/sys/ufs/ffs +COPTS.traverse.c+= ${GCC_NO_FORMAT_TRUNCATION} + .include diff --git a/sbin/fdisk/Makefile b/sbin/fdisk/Makefile index 3b3df9cc4986..c68d3c26ea9d 100644 --- a/sbin/fdisk/Makefile +++ b/sbin/fdisk/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.42 2012/05/05 16:03:55 tsutsui Exp $ +# $NetBSD: Makefile,v 1.43 2019/10/13 07:28:12 mrg Exp $ PROG= fdisk SRCS= fdisk.c @@ -20,6 +20,8 @@ CPPFLAGS+= -D_PATH_DEFDISK='"/dev/rsd0d"' CPPFLAGS+= -D_PATH_DEFDISK='"/dev/rwd0c"' .endif +COPTS.fdisk.c+= ${GCC_NO_STRINGOP_TRUNCATION} + .include .if (${HOSTPROG:U} == "") diff --git a/sbin/init/Makefile b/sbin/init/Makefile index 602b5e07a30b..8fdac948cbea 100644 --- a/sbin/init/Makefile +++ b/sbin/init/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.39 2013/07/15 00:18:03 khorben Exp $ +# $NetBSD: Makefile,v 1.40 2019/10/13 07:28:12 mrg Exp $ # @(#)Makefile 8.1 (Berkeley) 7/19/93 PROG= init @@ -17,4 +17,6 @@ DPADD+= ${LIBCRYPT} LDADD+= -lcrypt .endif +COPTS.init.c+= ${GCC_NO_FORMAT_TRUNCATION} ${GCC_NO_STRINGOP_TRUNCATION} ${GCC_NO_CAST_FUNCTION_TYPE} + .include diff --git a/sbin/iscsictl/Makefile b/sbin/iscsictl/Makefile index ef05c75c5d44..1718c7c72302 100644 --- a/sbin/iscsictl/Makefile +++ b/sbin/iscsictl/Makefile @@ -13,4 +13,7 @@ CPPFLAGS+= -I${.CURDIR}/../iscsid MAN= iscsictl.8 +COPTS.iscsic_main.c+= ${GCC_NO_FORMAT_TRUNCATION} +COPTS.iscsic_driverif.c+= ${GCC_NO_FORMAT_TRUNCATION} + .include diff --git a/sbin/pppoectl/Makefile b/sbin/pppoectl/Makefile index af5f1d262712..5da75465ec95 100644 --- a/sbin/pppoectl/Makefile +++ b/sbin/pppoectl/Makefile @@ -1,8 +1,10 @@ -# $NetBSD: Makefile,v 1.4 2018/09/23 07:24:19 maxv Exp $ +# $NetBSD: Makefile,v 1.5 2019/10/13 07:28:12 mrg Exp $ PROG= pppoectl MAN= pppoectl.8 USE_FORT?= yes # network client +COPTS.pppoectl.c+= ${GCC_NO_STRINGOP_TRUNCATION} + .include diff --git a/sbin/raidctl/Makefile b/sbin/raidctl/Makefile index f3e419ff66e2..713d7e2e2bad 100644 --- a/sbin/raidctl/Makefile +++ b/sbin/raidctl/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.16 2010/12/15 18:37:55 pooka Exp $ +# $NetBSD: Makefile,v 1.17 2019/10/13 07:28:12 mrg Exp $ RUMPPRG=raidctl SRCS= rf_configure.c raidctl.c @@ -7,4 +7,6 @@ MAN= raidctl.8 DPADD= ${LIBUTIL} LDADD= -lutil +COPTS.raidctl.c+= ${GCC_NO_STRINGOP_TRUNCATION} + .include diff --git a/sbin/restore/Makefile b/sbin/restore/Makefile index 6a4bd1098c48..f2617d87f40c 100644 --- a/sbin/restore/Makefile +++ b/sbin/restore/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.26 2011/08/06 20:46:42 dholland Exp $ +# $NetBSD: Makefile,v 1.27 2019/10/13 07:28:13 mrg Exp $ # @(#)Makefile 8.1 (Berkeley) 6/5/93 .include @@ -12,4 +12,7 @@ MAN= restore.8 MLINKS+=restore.8 rrestore.8 .PATH: ${NETBSDSRCDIR}/sbin/dump +COPTS.interactive.c+= ${GCC_NO_STRINGOP_TRUNCATION} +COPTS.dirs.c+= ${GCC_NO_STRINGOP_TRUNCATION} + .include diff --git a/sbin/rndctl/Makefile b/sbin/rndctl/Makefile index 4af1a459f811..cd6004c03aba 100644 --- a/sbin/rndctl/Makefile +++ b/sbin/rndctl/Makefile @@ -1,6 +1,8 @@ -# $NetBSD: Makefile,v 1.2 1997/10/13 14:16:16 mycroft Exp $ +# $NetBSD: Makefile,v 1.3 2019/10/13 07:28:13 mrg Exp $ PROG= rndctl MAN= rndctl.8 +COPTS.rndctl.c+= ${GCC_NO_STRINGOP_TRUNCATION} + .include diff --git a/sbin/route/Makefile b/sbin/route/Makefile index 3f70415f0b39..238310982251 100644 --- a/sbin/route/Makefile +++ b/sbin/route/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.31 2017/12/13 17:42:44 christos Exp $ +# $NetBSD: Makefile,v 1.32 2019/10/13 07:28:13 mrg Exp $ # @(#)Makefile 8.1 (Berkeley) 6/5/93 .include @@ -29,4 +29,6 @@ DPADD+=${LIBUTIL} # keywords.c keywords.h : keywords.sh # ${HOST_SH} keywords.sh +COPTS.rtutil.c+= ${GCC_NO_FORMAT_TRUNCATION} + .include diff --git a/sbin/routed/Makefile b/sbin/routed/Makefile index ae8b18984f5f..3f30b0df2035 100644 --- a/sbin/routed/Makefile +++ b/sbin/routed/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.25 2011/08/25 16:12:37 joerg Exp $ +# $NetBSD: Makefile,v 1.26 2019/10/13 07:28:13 mrg Exp $ # from: @(#)Makefile 8.1 (Berkeley) 6/19/93 USE_FORT?= yes # network client/server @@ -17,5 +17,7 @@ MLINKS= routed.8 rdisc.8 COPTS.main.c = -Wno-format-nonliteral COPTS.trace.c = -Wno-format-nonliteral +COPTS.if.c+= ${GCC_NO_STRINGOP_TRUNCATION} + .include .include diff --git a/sbin/umount/Makefile b/sbin/umount/Makefile index 12e9c3a8b019..1492b6a9d424 100644 --- a/sbin/umount/Makefile +++ b/sbin/umount/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.18 2013/07/01 15:16:33 christos Exp $ +# $NetBSD: Makefile,v 1.19 2019/10/13 07:28:13 mrg Exp $ # @(#)Makefile 8.4 (Berkeley) 6/22/95 .include @@ -16,4 +16,6 @@ CPPFLAGS+= -I${MOUNT} SRCS+= vfslist.c .endif +COPTS.umount.c+= ${GCC_NO_CAST_FUNCTION_TYPE} + .include diff --git a/share/mk/bsd.own.mk b/share/mk/bsd.own.mk index cb6fa00970b0..e6cd3793bb83 100644 --- a/share/mk/bsd.own.mk +++ b/share/mk/bsd.own.mk @@ -1,4 +1,4 @@ -# $NetBSD: bsd.own.mk,v 1.1154 2019/10/09 13:13:10 jhigh Exp $ +# $NetBSD: bsd.own.mk,v 1.1155 2019/10/13 07:28:13 mrg Exp $ # This needs to be before bsd.init.mk .if defined(BSD_MK_COMPAT_FILE) @@ -805,6 +805,15 @@ NOPROFILE= # defined .endif .endif +# +# GCC warnings with simple disables. Use these with eg +# COPTS.foo.c+= ${GCC_NO_STRINGOP_TRUNCATION}. +# +GCC_NO_FORMAT_TRUNCATION= ${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} >= 7:? -Wno-format-truncation :} +GCC_NO_STRINGOP_TRUNCATION= ${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} >= 8:? -Wno-stringop-truncation :} +GCC_NO_STRINGOP_OVERFLOW= ${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} >= 8:? -Wno-stringop-overflow :} +GCC_NO_CAST_FUNCTION_TYPE= ${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} >= 8:? -Wno-cast-function-type :} + # # The ia64 port is incomplete. # diff --git a/sys/modules/coredump/Makefile b/sys/modules/coredump/Makefile index 30e2d3f760c3..932da6a5adab 100644 --- a/sys/modules/coredump/Makefile +++ b/sys/modules/coredump/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.4 2019/02/17 04:05:46 rin Exp $ +# $NetBSD: Makefile,v 1.5 2019/10/13 07:28:13 mrg Exp $ .include "../Makefile.inc" @@ -25,4 +25,6 @@ SRCS+= core_machdep.c WARNS= 3 +COPTS.kern_core.c+= ${GCC_NO_CAST_FUNCTION_TYPE} + .include diff --git a/sys/modules/filemon/Makefile b/sys/modules/filemon/Makefile index ef6ca482e923..19511079f498 100644 --- a/sys/modules/filemon/Makefile +++ b/sys/modules/filemon/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.2 2015/08/20 11:05:01 christos Exp $ +# $NetBSD: Makefile,v 1.3 2019/10/13 07:28:13 mrg Exp $ .include "../Makefile.inc" @@ -9,4 +9,6 @@ IOCONF= filemon.ioconf SRCS = filemon.c filemon_wrapper.c NOMAN = no +COPTS.filemon_wrapper.c+= ${GCC_NO_CAST_FUNCTION_TYPE} + .include diff --git a/sys/modules/ptrace_common/Makefile b/sys/modules/ptrace_common/Makefile index 210f4b81ffc0..611eeb1cfce9 100644 --- a/sys/modules/ptrace_common/Makefile +++ b/sys/modules/ptrace_common/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.2 2019/02/17 04:05:56 rin Exp $ +# $NetBSD: Makefile,v 1.3 2019/10/13 07:28:13 mrg Exp $ # .include "../Makefile.inc" @@ -11,4 +11,6 @@ SRCS= sys_ptrace_common.c WARNS= 3 +COPTS.sys_ptrace_common.c+= ${GCC_NO_CAST_FUNCTION_TYPE} + .include diff --git a/sys/rump/librump/rumpkern/Makefile.rumpkern b/sys/rump/librump/rumpkern/Makefile.rumpkern index d058b624e8a5..eb8cd6d8d3ca 100644 --- a/sys/rump/librump/rumpkern/Makefile.rumpkern +++ b/sys/rump/librump/rumpkern/Makefile.rumpkern @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.rumpkern,v 1.176 2019/09/02 20:09:30 riastradh Exp $ +# $NetBSD: Makefile.rumpkern,v 1.177 2019/10/13 07:28:14 mrg Exp $ # IOCONFDIR:= ${.PARSEDIR} @@ -234,5 +234,11 @@ SRCS+= atomic_cas_generic.c #SRCS+= rump_atomic_cas_up.c .endif +COPTS.if_ethersubr.c+= ${GCC_NO_CAST_FUNCTION_TYPE} +COPTS.kern_hook.c+= ${GCC_NO_CAST_FUNCTION_TYPE} +COPTS.subr_vmem.c+= ${GCC_NO_CAST_FUNCTION_TYPE} +COPTS.subr_pool.c+= ${GCC_NO_CAST_FUNCTION_TYPE} +COPTS.rump.c+= ${GCC_NO_CAST_FUNCTION_TYPE} + .include .include diff --git a/sys/rump/net/lib/libnet/Makefile b/sys/rump/net/lib/libnet/Makefile index d78c3608d491..45edcb7aff00 100644 --- a/sys/rump/net/lib/libnet/Makefile +++ b/sys/rump/net/lib/libnet/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.31 2018/12/12 01:40:20 rin Exp $ +# $NetBSD: Makefile,v 1.32 2019/10/13 07:28:14 mrg Exp $ # @@ -27,6 +27,8 @@ SRCS+= rtsock_50.c uipc_syscalls_50.c SRCS+= rtsock_70.c uipc_usrreq_70.c .endif +COPTS.if_ethersubr.c+= ${GCC_NO_CAST_FUNCTION_TYPE} + .include "${.CURDIR}/../libnetinet/Makefile.inc" .include "${.CURDIR}/../libnetinet6/Makefile.inc" .include "${.CURDIR}/../libnetmpls/Makefile.inc" diff --git a/tests/fs/common/Makefile b/tests/fs/common/Makefile index 43f5e5cddac7..f603f8e9ca5a 100644 --- a/tests/fs/common/Makefile +++ b/tests/fs/common/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.12 2014/03/04 21:06:47 joerg Exp $ +# $NetBSD: Makefile,v 1.13 2019/10/13 07:28:14 mrg Exp $ # .include @@ -40,5 +40,11 @@ CPPFLAGS+= -DMOUNT_NOMAIN -DMOUNTNFS_RETRYRPC=1 CPPFLAGS+= -DUSE_RUMP -DLFS_CLEANER_AS_LIB CWARNFLAGS.clang+= -Wno-error=absolute-value +COPTS.fstest_nfs.c+= ${GCC_NO_FORMAT_TRUNCATION} +COPTS.clnt_bcast.c+= ${GCC_NO_CAST_FUNCTION_TYPE} +COPTS.clnt_generic.c+= ${GCC_NO_CAST_FUNCTION_TYPE} +COPTS.clnt_vc.c+= ${GCC_NO_CAST_FUNCTION_TYPE} +COPTS.rpcb_clnt.c+= ${GCC_NO_CAST_FUNCTION_TYPE} +COPTS.rpc_generic.c+= ${GCC_NO_CAST_FUNCTION_TYPE} .include diff --git a/tests/fs/nfs/nfsservice/Makefile b/tests/fs/nfs/nfsservice/Makefile index 5784f453dcc5..bfb30d526c55 100644 --- a/tests/fs/nfs/nfsservice/Makefile +++ b/tests/fs/nfs/nfsservice/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.13 2019/08/15 08:23:45 kamil Exp $ +# $NetBSD: Makefile,v 1.14 2019/10/13 07:28:14 mrg Exp $ # NOMAN= 1 @@ -50,4 +50,10 @@ DPADD+= ${LIBWRAP} ${LIBUTIL} SANITIZER_RENAME_SYMBOL+= __getmntinfo13 +COPTS.pmap_svc.c+= ${GCC_NO_CAST_FUNCTION_TYPE} +COPTS.rpcb_svc.c+= ${GCC_NO_CAST_FUNCTION_TYPE} +COPTS.rpcb_svc_4.c+= ${GCC_NO_CAST_FUNCTION_TYPE} +COPTS.rpcb_svc_com.c+= ${GCC_NO_CAST_FUNCTION_TYPE} +COPTS.mountd.c+= ${GCC_NO_CAST_FUNCTION_TYPE} + .include diff --git a/tests/lib/libc/rpc/Makefile b/tests/lib/libc/rpc/Makefile index e32a7d97504b..32fcbd0f3aa6 100644 --- a/tests/lib/libc/rpc/Makefile +++ b/tests/lib/libc/rpc/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.2 2013/02/26 17:06:55 christos Exp $ +# $NetBSD: Makefile,v 1.3 2019/10/13 07:28:14 mrg Exp $ MKMAN= no @@ -18,6 +18,8 @@ CPPFLAGS+= -I. RPC_INCS= ${RPCSRCS:.x=.h} RPC_XDRFILES= ${RPCSRCS:.x=_xdr.c} +COPTS.t_rpc.c+= ${GCC_NO_CAST_FUNCTION_TYPE} + .include .include diff --git a/tests/lib/libc/ssp/Makefile b/tests/lib/libc/ssp/Makefile index 0f3acf70aad8..4bbf91a5caef 100644 --- a/tests/lib/libc/ssp/Makefile +++ b/tests/lib/libc/ssp/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.9 2019/09/29 23:45:01 mrg Exp $ +# $NetBSD: Makefile,v 1.10 2019/10/13 07:28:14 mrg Exp $ NOMAN= # defined @@ -48,9 +48,7 @@ PROGS+= h_strncpy PROGS+= h_vsnprintf PROGS+= h_vsprintf -.if defined(HAVE_GCC) && ${HAVE_GCC} >= 7 && ${ACTIVE_CC} == "gcc" # Test exercises truncation -COPTS.h_snprintf.c+= -Wno-error=format-truncation -.endif +COPTS.h_snprintf.c+= ${GCC_NO_FORMAT_TRUNCATION} .include diff --git a/tests/lib/libevent/Makefile b/tests/lib/libevent/Makefile index 6ed1a271b436..92beffd7d5f0 100644 --- a/tests/lib/libevent/Makefile +++ b/tests/lib/libevent/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.4 2017/05/21 15:28:42 riastradh Exp $ +# $NetBSD: Makefile,v 1.5 2019/10/13 07:28:14 mrg Exp $ TESTSDIR= ${TESTSBASE}/lib/libevent @@ -26,4 +26,6 @@ CPPFLAGS+= -DLIBEVENT_CRYPTO DPADD+= ${LIBEVENT} ${LIBEVENT_PTHREADS} ${LIBZ} ${LIBPTHREAD} LDADD+= -levent_pthreads -levent -lz -lpthread +COPTS.regress_rpc.c+= ${GCC_NO_CAST_FUNCTION_TYPE} + .include diff --git a/usr.bin/btpin/Makefile b/usr.bin/btpin/Makefile index 4d6f8726df6f..ba14f9ac8223 100644 --- a/usr.bin/btpin/Makefile +++ b/usr.bin/btpin/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.2 2006/09/26 19:18:19 plunky Exp $ +# $NetBSD: Makefile,v 1.3 2019/10/13 07:28:14 mrg Exp $ PROG= btpin SRCS= btpin.c @@ -7,4 +7,6 @@ MAN= btpin.1 DPADD+= ${LIBBLUETOOTH} LDADD+= -lbluetooth +COPTS.btpin.c+= ${GCC_NO_STRINGOP_TRUNCATION} + .include diff --git a/usr.bin/config/Makefile b/usr.bin/config/Makefile index 429921eeb6d2..640594211d9b 100644 --- a/usr.bin/config/Makefile +++ b/usr.bin/config/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.10 2014/10/29 19:10:49 christos Exp $ +# $NetBSD: Makefile,v 1.11 2019/10/13 07:28:14 mrg Exp $ # from: @(#)Makefile 8.2 (Berkeley) 4/19/94 .include @@ -20,6 +20,8 @@ CPPFLAGS+= -I${NETBSDSRCDIR}/usr.bin/cksum .ifndef HOSTPROG LDADD+=-lutil DPADD+=${LIBUTIL} +COPTS.mkheaders.c+= ${GCC_NO_FORMAT_TRUNCATION} +COPTS.sem.c+= ${GCC_NO_FORMAT_TRUNCATION} .endif CWARNFLAGS+=-Wno-format-y2k diff --git a/usr.bin/crunch/crunchgen/Makefile b/usr.bin/crunch/crunchgen/Makefile index 1eca0b761aa6..866ab4fd0b97 100644 --- a/usr.bin/crunch/crunchgen/Makefile +++ b/usr.bin/crunch/crunchgen/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.15 2006/08/29 12:50:49 christos Exp $ +# $NetBSD: Makefile,v 1.16 2019/10/13 07:28:15 mrg Exp $ PROG= crunchgen SRCS= crunchgen.c crunched_skel.c @@ -21,6 +21,8 @@ DPADD+=${LIBUTIL} CPPFLAGS+= -DNEW_TOOLCHAIN .endif +COPTS.crunchgen.c+= ${GCC_NO_FORMAT_TRUNCATION} + .else # Host tool -- We can also pay attention to EXTERNAL_TOOLCHAIN. diff --git a/usr.bin/cvslatest/Makefile b/usr.bin/cvslatest/Makefile index a7d49f11b554..6a808675b718 100644 --- a/usr.bin/cvslatest/Makefile +++ b/usr.bin/cvslatest/Makefile @@ -1,6 +1,8 @@ -# $NetBSD: Makefile,v 1.3 2019/03/09 16:18:37 christos Exp $ +# $NetBSD: Makefile,v 1.4 2019/10/13 07:28:15 mrg Exp $ WARNS=6 PROG= cvslatest +COPTS.cvslatest.c+= ${GCC_NO_FORMAT_TRUNCATION} + .include diff --git a/usr.bin/fstat/Makefile b/usr.bin/fstat/Makefile index db2df9eac44f..98ef9cac6ee6 100644 --- a/usr.bin/fstat/Makefile +++ b/usr.bin/fstat/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.25 2016/12/23 10:19:57 mrg Exp $ +# $NetBSD: Makefile,v 1.26 2019/10/13 07:28:15 mrg Exp $ # from: @(#)Makefile 8.1 (Berkeley) 6/6/93 .include @@ -23,4 +23,6 @@ DPADD+=${LIBUTIL} .include "../../compat/exec.mk" +COPTS.fstat.c+= ${GCC_NO_FORMAT_TRUNCATION} + .include diff --git a/usr.bin/hexdump/Makefile b/usr.bin/hexdump/Makefile index b0ee808079a5..def9d8a9bf74 100644 --- a/usr.bin/hexdump/Makefile +++ b/usr.bin/hexdump/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.14 2011/08/14 13:45:34 christos Exp $ +# $NetBSD: Makefile,v 1.15 2019/10/13 07:28:15 mrg Exp $ # from: @(#)Makefile 8.1 (Berkeley) 6/6/93 PROG= hexdump @@ -15,4 +15,6 @@ LINKS= ${BINDIR}/hexdump ${BINDIR}/od COPTS.conv.c += -Wno-format-nonliteral COPTS.display.c += -Wno-format-nonliteral +COPTS.parse.c+= ${GCC_NO_STRINGOP_TRUNCATION} + .include diff --git a/usr.bin/login/Makefile b/usr.bin/login/Makefile index cbce5f45935e..b671c0efb677 100644 --- a/usr.bin/login/Makefile +++ b/usr.bin/login/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.57 2018/02/25 00:16:49 mrg Exp $ +# $NetBSD: Makefile,v 1.58 2019/10/13 07:28:15 mrg Exp $ # @(#)Makefile 8.1 (Berkeley) 7/19/93 .include @@ -45,5 +45,7 @@ copyrightstr.c: ${NETBSDSRCDIR}/sys/conf/copyright END { print "\"\\n\";" }\ ' ${.ALLSRC} > ${.TARGET} +COPTS.parse.c+= ${GCC_NO_STRINGOP_TRUNCATION} +COPTS.common.c+= ${GCC_NO_STRINGOP_TRUNCATION} .include diff --git a/usr.bin/mail/Makefile b/usr.bin/mail/Makefile index dd388ec008b6..a5ef39e9e574 100644 --- a/usr.bin/mail/Makefile +++ b/usr.bin/mail/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.38 2018/06/10 17:55:11 christos Exp $ +# $NetBSD: Makefile,v 1.39 2019/10/13 07:28:15 mrg Exp $ # @(#)Makefile 8.3 (Berkeley) 4/20/95 .include @@ -76,7 +76,8 @@ SUBDIR.roff+= USD.doc CONFIGFILES= mail.rc FILESDIR_mail.rc= /etc -COPTS.format.c += -Wno-format-nonliteral +COPTS.format.c+= -Wno-format-nonliteral +COPTS.fio.c+= ${GCC_NO_FORMAT_TRUNCATION} .include .include diff --git a/usr.bin/make/Makefile b/usr.bin/make/Makefile index 76da29aa40e6..d3b9df94dd8b 100644 --- a/usr.bin/make/Makefile +++ b/usr.bin/make/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.62 2019/09/29 23:45:01 mrg Exp $ +# $NetBSD: Makefile,v 1.63 2019/10/13 07:28:15 mrg Exp $ # @(#)Makefile 5.2 (Berkeley) 12/28/90 PROG= make @@ -46,9 +46,11 @@ LDADD+=-lutil DPADD+=${LIBUTIL} .endif -.if defined(HAVE_GCC) && ${HAVE_GCC} >= 7 && ${ACTIVE_CC} == "gcc" -COPTS.arch.c += -Wno-error=format-truncation -.endif +COPTS.arch.c+= ${GCC_NO_FORMAT_TRUNCATION} +COPTS.dir.c+= ${GCC_NO_FORMAT_TRUNCATION} +COPTS.main.c+= ${GCC_NO_FORMAT_TRUNCATION} ${GCC_NO_STRINGOP_TRUNCATION} +COPTS.meta.c+= ${GCC_NO_FORMAT_TRUNCATION} +COPTS.parse.c+= ${GCC_NO_FORMAT_TRUNCATION} # A simple unit-test driver to help catch regressions accept test: diff --git a/usr.bin/man/Makefile b/usr.bin/man/Makefile index 10fecab16545..9dba3f24afa8 100644 --- a/usr.bin/man/Makefile +++ b/usr.bin/man/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.15 2014/02/17 03:10:12 uwe Exp $ +# $NetBSD: Makefile,v 1.16 2019/10/13 07:28:15 mrg Exp $ # @(#)Makefile 8.1 (Berkeley) 6/6/93 WARNS?= 6 @@ -10,4 +10,6 @@ MAN= man.1 man.conf.5 DPADD+= ${LIBUTIL} LDADD+= -lutil +COPTS.man.c+= ${GCC_NO_FORMAT_TRUNCATION} + .include diff --git a/usr.bin/mklocale/Makefile b/usr.bin/mklocale/Makefile index bb85e6eeed03..eed1fa011754 100644 --- a/usr.bin/mklocale/Makefile +++ b/usr.bin/mklocale/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.16 2009/04/14 22:15:24 lukem Exp $ +# $NetBSD: Makefile,v 1.17 2019/10/13 07:28:15 mrg Exp $ WARNS?= 2 # XXX -Wextra -Wsign-compare issues @@ -22,4 +22,5 @@ YHEADER= 1 .ifndef HOSTPROG .include +COPTS.man.c+= ${GCC_NO_FORMAT_TRUNCATION} .endif diff --git a/usr.bin/msgs/Makefile b/usr.bin/msgs/Makefile index ea8cb8eb1c12..cd4d97c8537f 100644 --- a/usr.bin/msgs/Makefile +++ b/usr.bin/msgs/Makefile @@ -1,8 +1,10 @@ -# $NetBSD: Makefile,v 1.10 2010/02/03 15:34:45 roy Exp $ +# $NetBSD: Makefile,v 1.11 2019/10/13 07:28:16 mrg Exp $ # @(#)Makefile 8.2 (Berkeley) 4/28/95 PROG= msgs DPADD= ${LIBTERMINFO} LDADD= -lterminfo +COPTS.msgs.c+= ${GCC_NO_FORMAT_TRUNCATION} ${GCC_NO_STRINGOP_TRUNCATION} + .include diff --git a/usr.bin/netstat/Makefile b/usr.bin/netstat/Makefile index b985edee68c0..d1e5a4f4731c 100644 --- a/usr.bin/netstat/Makefile +++ b/usr.bin/netstat/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.46 2019/08/18 04:14:40 kamil Exp $ +# $NetBSD: Makefile,v 1.47 2019/10/13 07:28:16 mrg Exp $ # from: @(#)Makefile 8.1 (Berkeley) 6/12/93 .include @@ -38,4 +38,8 @@ CPPFLAGS+= -DINET6 .include "../../compat/exec.mk" +COPTS.atalk.c+= ${GCC_NO_FORMAT_TRUNCATION} +COPTS.inet6.c+= ${GCC_NO_STRINGOP_TRUNCATION} +COPTS.rtutil.c+= ${GCC_NO_FORMAT_TRUNCATION} + .include diff --git a/usr.bin/quota/Makefile b/usr.bin/quota/Makefile index bd3844bbd087..0667adc12efe 100644 --- a/usr.bin/quota/Makefile +++ b/usr.bin/quota/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.13 2013/08/11 06:09:29 dholland Exp $ +# $NetBSD: Makefile,v 1.14 2019/10/13 07:28:16 mrg Exp $ # from: @(#)Makefile 8.1 (Berkeley) 6/6/93 .include @@ -9,4 +9,6 @@ CPPFLAGS+= -I${NETBSDSRCDIR}/usr.bin/quota DPADD= ${LIBQUOTA} ${LIBRPCSVC} LDADD= -lquota -lrpcsvc +COPTS.printquota.c+= ${GCC_NO_STRINGOP_TRUNCATION} + .include diff --git a/usr.bin/rdist/Makefile b/usr.bin/rdist/Makefile index fe431cbbd7b2..4b2228a0544c 100644 --- a/usr.bin/rdist/Makefile +++ b/usr.bin/rdist/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.13 2019/09/29 23:45:01 mrg Exp $ +# $NetBSD: Makefile,v 1.14 2019/10/13 07:28:16 mrg Exp $ # from: @(#)Makefile 8.3 (Berkeley) 7/19/93 USE_FORT?= yes # network client/server @@ -9,8 +9,6 @@ SRCS= docmd.c expand.c gram.y lookup.c main.c server.c .include -.if defined(HAVE_GCC) && ${HAVE_GCC} >= 7 && ${ACTIVE_CC} == "gcc" -COPTS.server.c += -Wno-error=format-truncation -.endif +COPTS.server.c+= ${GCC_NO_FORMAT_TRUNCATION} .include diff --git a/usr.bin/rpcgen/Makefile b/usr.bin/rpcgen/Makefile index cd0576760fdb..bda9fde0da83 100644 --- a/usr.bin/rpcgen/Makefile +++ b/usr.bin/rpcgen/Makefile @@ -1,7 +1,9 @@ -# $NetBSD: Makefile,v 1.13 2013/08/11 08:03:10 dholland Exp $ +# $NetBSD: Makefile,v 1.14 2019/10/13 07:28:16 mrg Exp $ PROG= rpcgen SRCS= rpc_clntout.c rpc_cout.c rpc_hout.c rpc_main.c rpc_parse.c rpc_scan.c \ rpc_svcout.c rpc_util.c rpc_sample.c rpc_tblout.c +COPTS.rpc_cout.c+= ${GCC_NO_STRINGOP_OVERFLOW} + .include diff --git a/usr.bin/rpcinfo/Makefile b/usr.bin/rpcinfo/Makefile index 7c30d61effe2..3f49bd33260f 100644 --- a/usr.bin/rpcinfo/Makefile +++ b/usr.bin/rpcinfo/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.15 2013/08/21 21:05:29 dholland Exp $ +# $NetBSD: Makefile,v 1.16 2019/10/13 07:28:16 mrg Exp $ # from: @(#)Makefile 5.2 (Berkeley) 5/11/90 .include @@ -17,4 +17,6 @@ CPPFLAGS+= -DINET6 .PATH: ${LIBCRPCDIR} +COPTS.rpcinfo.c+= ${GCC_NO_CAST_FUNCTION_TYPE} + .include diff --git a/usr.bin/rup/Makefile b/usr.bin/rup/Makefile index 8893f9c4a8bc..be8ea03330d7 100644 --- a/usr.bin/rup/Makefile +++ b/usr.bin/rup/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.8 2009/04/14 22:15:25 lukem Exp $ +# $NetBSD: Makefile,v 1.9 2019/10/13 07:28:16 mrg Exp $ USE_FORT?= yes # network client @@ -7,4 +7,6 @@ PROG= rup DPADD= ${LIBRPCSVC} LDADD= -lrpcsvc +COPTS.rup.c+= ${GCC_NO_CAST_FUNCTION_TYPE} + .include diff --git a/usr.bin/rusers/Makefile b/usr.bin/rusers/Makefile index c62ce28e5b64..5d87073a115d 100644 --- a/usr.bin/rusers/Makefile +++ b/usr.bin/rusers/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.11 2007/05/28 12:06:30 tls Exp $ +# $NetBSD: Makefile,v 1.12 2019/10/13 07:28:16 mrg Exp $ USE_FORT?= yes # network client @@ -7,4 +7,6 @@ PROG = rusers DPADD= ${LIBRPCSVC} LDADD= -lrpcsvc +COPTS.rusers.c+= ${GCC_NO_CAST_FUNCTION_TYPE} + .include diff --git a/usr.bin/rwall/Makefile b/usr.bin/rwall/Makefile index df027ba289c1..0eb0ffe9e8cf 100644 --- a/usr.bin/rwall/Makefile +++ b/usr.bin/rwall/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.10 2009/04/14 22:15:25 lukem Exp $ +# $NetBSD: Makefile,v 1.11 2019/10/13 07:28:16 mrg Exp $ USE_FORT?= yes # network client @@ -7,4 +7,6 @@ PROG = rwall DPADD= ${LIBRPCSVC} LDADD= -lrpcsvc +COPTS.rwall.c+= ${GCC_NO_CAST_FUNCTION_TYPE} + .include diff --git a/usr.bin/showmount/Makefile b/usr.bin/showmount/Makefile index eed62192d649..914478b6097d 100644 --- a/usr.bin/showmount/Makefile +++ b/usr.bin/showmount/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.7 2007/05/28 12:06:31 tls Exp $ +# $NetBSD: Makefile,v 1.8 2019/10/13 07:28:17 mrg Exp $ # @(#)Makefile 8.1 (Berkeley) 6/6/93 USE_FORT?= yes # network client @@ -6,4 +6,6 @@ USE_FORT?= yes # network client PROG= showmount MAN= showmount.8 +COPTS.showmount.c+= ${GCC_NO_STRINGOP_OVERFLOW} ${GCC_NO_CAST_FUNCTION_TYPE} + .include diff --git a/usr.bin/sort/Makefile b/usr.bin/sort/Makefile index fd177c57f4e9..505bcfbe1602 100644 --- a/usr.bin/sort/Makefile +++ b/usr.bin/sort/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.8 2009/09/10 22:02:40 dsl Exp $ +# $NetBSD: Makefile,v 1.9 2019/10/13 07:28:17 mrg Exp $ # from: @(#)Makefile 8.1 (Berkeley) 6/6/93 PROG= sort @@ -8,4 +8,6 @@ SRCS+= radix_sort.c LDADD+=-lutil DPADD+=${LIBUTIL} +COPTS.init.c+= ${GCC_NO_FORMAT_TRUNCATION} + .include diff --git a/usr.bin/systat/Makefile b/usr.bin/systat/Makefile index d8aad6e3cfd1..2a0025a1506e 100644 --- a/usr.bin/systat/Makefile +++ b/usr.bin/systat/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.42 2019/09/29 23:45:01 mrg Exp $ +# $NetBSD: Makefile,v 1.43 2019/10/13 07:28:17 mrg Exp $ # @(#)Makefile 8.1 (Berkeley) 6/6/93 .include @@ -29,8 +29,8 @@ SRCS+= ip6.c .include "../../compat/exec.mk" -.if defined(HAVE_GCC) && ${HAVE_GCC} >= 7 && ${ACTIVE_CC} == "gcc" -COPTS.df.c += -Wno-error=format-truncation -.endif +COPTS.df.c+= ${GCC_NO_FORMAT_TRUNCATION} +COPTS.ifstat.c+= ${GCC_NO_STRINGOP_TRUNCATION} +COPTS.ps.c+= ${GCC_NO_STRINGOP_TRUNCATION} ${GCC_NO_FORMAT_TRUNCATION} .include diff --git a/usr.bin/telnet/Makefile b/usr.bin/telnet/Makefile index b536323b3ee4..c36737e86cf5 100644 --- a/usr.bin/telnet/Makefile +++ b/usr.bin/telnet/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.58 2019/09/29 23:45:01 mrg Exp $ +# $NetBSD: Makefile,v 1.59 2019/10/13 07:28:17 mrg Exp $ # # Copyright (c) 1990 The Regents of the University of California. # All rights reserved. @@ -82,4 +82,6 @@ COPTS.${f}.c+= -Wno-pointer-sign COPTS.telnet.c+= -Wno-error=implicit-fallthrough .endif +COPTS.sys_bsd.c+= ${GCC_NO_CAST_FUNCTION_TYPE} + .include diff --git a/usr.bin/unifdef/Makefile b/usr.bin/unifdef/Makefile index 0551e2d1c516..0bc2ebfc078b 100644 --- a/usr.bin/unifdef/Makefile +++ b/usr.bin/unifdef/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.6 2003/08/01 11:51:14 lukem Exp $ +# $NetBSD: Makefile,v 1.7 2019/10/13 07:28:17 mrg Exp $ # @(#)Makefile 8.1 (Berkeley) 6/6/93 PROG= unifdef @@ -7,4 +7,6 @@ SCRIPTS=unifdefall.sh MLINKS= unifdef.1 unifdefall.1 +COPTS.unifdef.c+= ${GCC_NO_STRINGOP_TRUNCATION} + .include diff --git a/usr.bin/utoppya/Makefile b/usr.bin/utoppya/Makefile index 334c3690a24c..b3fc6d7fc82e 100644 --- a/usr.bin/utoppya/Makefile +++ b/usr.bin/utoppya/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.1 2006/04/03 08:15:48 scw Exp $ +# $NetBSD: Makefile,v 1.2 2019/10/13 07:28:17 mrg Exp $ .include @@ -9,4 +9,6 @@ CPPFLAGS+=-I${NETBSDSRCDIR}/usr.bin/ftp -DSTANDALONE_PROGRESS .PATH: ${NETBSDSRCDIR}/usr.bin/ftp +COPTS.utoppya.c+= ${GCC_NO_STRINGOP_TRUNCATION} + .include diff --git a/usr.bin/wall/Makefile b/usr.bin/wall/Makefile index 89b23d5dd93b..5be64d6f8aba 100644 --- a/usr.bin/wall/Makefile +++ b/usr.bin/wall/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.11 2015/11/21 14:59:51 christos Exp $ +# $NetBSD: Makefile,v 1.12 2019/10/13 07:28:17 mrg Exp $ # @(#)Makefile 8.1 (Berkeley) 6/6/93 .include @@ -16,4 +16,6 @@ LDADD+=-lutil CPPFLAGS+=-I${NETBSDSRCDIR}/usr.bin/who -DSUPPORT_UTMPX -DSUPPORT_UTMP CPPFLAGS+=-I${NETBSDSRCDIR}/usr.bin/write +COPTS.wall.c+= ${GCC_NO_FORMAT_TRUNCATION} + .include diff --git a/usr.sbin/acpitools/amldb/Makefile b/usr.sbin/acpitools/amldb/Makefile index 88e91a7bcef5..c7e9e36a2cfa 100644 --- a/usr.sbin/acpitools/amldb/Makefile +++ b/usr.sbin/acpitools/amldb/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.5 2018/10/14 13:36:32 jmcneill Exp $ +# $NetBSD: Makefile,v 1.6 2019/10/13 07:28:17 mrg Exp $ # Id: Makefile,v 1.5 2000/07/14 18:16:30 iwasaki Exp # $FreeBSD: src/usr.sbin/acpi/amldb/Makefile,v 1.7 2001/10/22 17:25:32 iwasaki Exp $ @@ -13,5 +13,7 @@ CPPFLAGS+= -I${.CURDIR} -D_KERNTYPES MAN= amldb.8 +COPTS.aml_name.c+= ${GCC_NO_STRINGOP_TRUNCATION} + .include .PATH: ${.CURDIR}/../aml diff --git a/usr.sbin/altq/libaltq/Makefile b/usr.sbin/altq/libaltq/Makefile index 83d4a1d72815..9f34a13ccafb 100644 --- a/usr.sbin/altq/libaltq/Makefile +++ b/usr.sbin/altq/libaltq/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.12 2011/08/16 12:49:13 christos Exp $ +# $NetBSD: Makefile,v 1.13 2019/10/13 07:28:17 mrg Exp $ LIBISPRIVATE= yes @@ -15,4 +15,6 @@ CPPFLAGS+= -DALTQ CPPFLAGS+= -DINET6 .endif +COPTS+= ${GCC_NO_STRINGOP_TRUNCATION} + .include diff --git a/usr.sbin/altq/tbrconfig/Makefile b/usr.sbin/altq/tbrconfig/Makefile index 9e3728bcb69a..00b28b74728a 100644 --- a/usr.sbin/altq/tbrconfig/Makefile +++ b/usr.sbin/altq/tbrconfig/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.4 2002/08/27 14:46:19 lukem Exp $ +# $NetBSD: Makefile,v 1.5 2019/10/13 07:28:17 mrg Exp $ .include # for MKDYNAMICROOT definition @@ -12,4 +12,6 @@ LDSTATIC?=-static CPPFLAGS+= -DALTQ -I${.CURDIR}/../libaltq +COPTS.tbrconfig.c+= ${GCC_NO_STRINGOP_TRUNCATION} + .include diff --git a/usr.sbin/apm/Makefile b/usr.sbin/apm/Makefile index d877997571dc..53d587b9ff23 100644 --- a/usr.sbin/apm/Makefile +++ b/usr.sbin/apm/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.18 2013/05/02 03:56:42 matt Exp $ +# $NetBSD: Makefile,v 1.19 2019/10/13 07:28:18 mrg Exp $ .include @@ -18,4 +18,6 @@ LINKS= ${BINDIR}/apm ${BINDIR}/zzz MAN= apm.8 MLINKS= apm.8 zzz.8 +COPTS.apm.c+= ${GCC_NO_STRINGOP_TRUNCATION} + .include diff --git a/usr.sbin/apmd/Makefile b/usr.sbin/apmd/Makefile index e477d7db6ff1..e15935d37368 100644 --- a/usr.sbin/apmd/Makefile +++ b/usr.sbin/apmd/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.16 2013/05/02 03:56:42 matt Exp $ +# $NetBSD: Makefile,v 1.17 2019/10/13 07:28:18 mrg Exp $ .include @@ -17,4 +17,6 @@ MAN= apmd.8 LDADD+= -lutil DPADD+= ${LIBUTIL} +COPTS.apmd.c+= ${GCC_NO_STRINGOP_TRUNCATION} + .include diff --git a/usr.sbin/btpand/Makefile b/usr.sbin/btpand/Makefile index ea0cfda4e96b..8eb8d49b55e2 100644 --- a/usr.sbin/btpand/Makefile +++ b/usr.sbin/btpand/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.5 2009/05/12 21:50:38 plunky Exp $ +# $NetBSD: Makefile,v 1.6 2019/10/13 07:28:18 mrg Exp $ # PROG= btpand @@ -8,4 +8,6 @@ SRCS= btpand.c bnep.c channel.c client.c packet.c server.c tap.c DPADD+= ${LIBBLUETOOTH} ${LIBEVENT} ${LIBUTIL} LDADD+= -lbluetooth -levent -lutil +COPTS.tap.c+= ${GCC_NO_STRINGOP_TRUNCATION} + .include diff --git a/usr.sbin/catman/Makefile b/usr.sbin/catman/Makefile index 652580744641..6d1dc0844ba1 100644 --- a/usr.sbin/catman/Makefile +++ b/usr.sbin/catman/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.9 2011/08/16 08:04:17 christos Exp $ +# $NetBSD: Makefile,v 1.10 2019/10/13 07:28:18 mrg Exp $ .include @@ -9,6 +9,6 @@ MAN= catman.8 .PATH: ${NETBSDSRCDIR}/usr.bin/man CPPFLAGS+= -I${NETBSDSRCDIR}/usr.bin/man -COPTS.catman.c += -Wno-format-nonliteral +COPTS.catman.c+= -Wno-format-nonliteral ${GCC_NO_FORMAT_TRUNCATION} .include diff --git a/usr.sbin/cnwctl/Makefile b/usr.sbin/cnwctl/Makefile index 88f98a57a8ae..f085355e50b8 100644 --- a/usr.sbin/cnwctl/Makefile +++ b/usr.sbin/cnwctl/Makefile @@ -1,6 +1,8 @@ -# $NetBSD: Makefile,v 1.2 1999/11/29 12:55:07 itojun Exp $ +# $NetBSD: Makefile,v 1.3 2019/10/13 07:28:18 mrg Exp $ # PAO2 Id: Makefile,v 1.1.1.1 1997/12/11 14:46:06 itojun Exp PROG= cnwctl MAN= cnwctl.8 +COPTS.cnwctl.c+= ${GCC_NO_STRINGOP_TRUNCATION} + .include diff --git a/usr.sbin/crash/Makefile b/usr.sbin/crash/Makefile index a07e370bf301..552827bd4e91 100644 --- a/usr.sbin/crash/Makefile +++ b/usr.sbin/crash/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.41 2018/09/15 19:47:48 jakllsch Exp $ +# $NetBSD: Makefile,v 1.42 2019/10/13 07:28:18 mrg Exp $ PROG= crash MAN= crash.8 @@ -115,5 +115,7 @@ COPTS.kern_timeout.c += -Wno-stack-protector .include "../../compat/exec.mk" +COPTS.db_command.c+= ${GCC_NO_CAST_FUNCTION_TYPE} + .include .include diff --git a/usr.sbin/edquota/Makefile b/usr.sbin/edquota/Makefile index 94272068d6f8..66e0747a1363 100644 --- a/usr.sbin/edquota/Makefile +++ b/usr.sbin/edquota/Makefile @@ -1,5 +1,5 @@ # from: @(#)Makefile 8.1 (Berkeley) 6/6/93 -# $NetBSD: Makefile,v 1.11 2012/02/01 17:53:01 dholland Exp $ +# $NetBSD: Makefile,v 1.12 2019/10/13 07:28:18 mrg Exp $ .include @@ -15,4 +15,6 @@ LDADD= -lquota -lrpcsvc .PATH: ${NETBSDSRCDIR}/usr.bin/quota SRCS+= printquota.c +COPTS.printquota.c+= ${GCC_NO_STRINGOP_TRUNCATION} + .include diff --git a/usr.sbin/eshconfig/Makefile b/usr.sbin/eshconfig/Makefile index 79ed6d6f4eea..e911d7be5660 100644 --- a/usr.sbin/eshconfig/Makefile +++ b/usr.sbin/eshconfig/Makefile @@ -1,6 +1,8 @@ -# $NetBSD: Makefile,v 1.1 1998/05/16 18:55:17 kml Exp $ +# $NetBSD: Makefile,v 1.2 2019/10/13 07:28:18 mrg Exp $ PROG= eshconfig MAN= eshconfig.8 +COPTS.eshconfig.c+= ${GCC_NO_STRINGOP_TRUNCATION} + .include diff --git a/usr.sbin/ifwatchd/Makefile b/usr.sbin/ifwatchd/Makefile index ed373277da03..9327b1339fe1 100644 --- a/usr.sbin/ifwatchd/Makefile +++ b/usr.sbin/ifwatchd/Makefile @@ -1,6 +1,8 @@ -# $NetBSD: Makefile,v 1.1 2001/11/19 09:43:03 martin Exp $ +# $NetBSD: Makefile,v 1.2 2019/10/13 07:28:18 mrg Exp $ PROG=ifwatchd MAN=ifwatchd.8 +COPTS.ifwatchd.c+= ${GCC_NO_STRINGOP_TRUNCATION} + .include diff --git a/usr.sbin/ipwctl/Makefile b/usr.sbin/ipwctl/Makefile index 9cd3430ba9c5..22f8228ccd5b 100644 --- a/usr.sbin/ipwctl/Makefile +++ b/usr.sbin/ipwctl/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.7 2009/04/22 15:23:04 lukem Exp $ +# $NetBSD: Makefile,v 1.8 2019/10/13 07:28:19 mrg Exp $ .if ${MACHINE_ARCH} == "i386" PROG= ipwctl @@ -6,4 +6,6 @@ PROG= ipwctl MAN= ipwctl.8 +COPTS.ipwctl.c+= ${GCC_NO_STRINGOP_TRUNCATION} + .include diff --git a/usr.sbin/iwictl/Makefile b/usr.sbin/iwictl/Makefile index 4b890e50ed2f..000a70a2cca7 100644 --- a/usr.sbin/iwictl/Makefile +++ b/usr.sbin/iwictl/Makefile @@ -1,6 +1,8 @@ -# $NetBSD: Makefile,v 1.5 2009/04/22 15:23:04 lukem Exp $ +# $NetBSD: Makefile,v 1.6 2019/10/13 07:28:19 mrg Exp $ PROG = iwictl MAN = iwictl.8 +COPTS.iwictl.c+= ${GCC_NO_STRINGOP_TRUNCATION} + .include diff --git a/usr.sbin/makefs/Makefile b/usr.sbin/makefs/Makefile index 7522fc979da8..143b5b72bebc 100644 --- a/usr.sbin/makefs/Makefile +++ b/usr.sbin/makefs/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.36 2013/08/05 14:41:57 reinoud Exp $ +# $NetBSD: Makefile,v 1.37 2019/10/13 07:28:19 mrg Exp $ # WARNS?= 5 @@ -31,6 +31,12 @@ CPPFLAGS+= -I${.CURDIR} -I${MKNODSRC} -I${MTREESRC} -DMAKEFS .if !defined(HOSTPROG) DPADD+= ${LIBUTIL} LDADD+= -lutil + +COPTS.cd9660.c+= ${GCC_NO_STRINGOP_TRUNCATION} ${GCC_NO_FORMAT_TRUNCATION} +COPTS.cd9660_conversion.c+= ${GCC_NO_FORMAT_TRUNCATION} +COPTS.udf.c+= ${GCC_NO_STRINGOP_TRUNCATION} +COPTS.v7fs_estimate.c+= ${GCC_NO_STRINGOP_TRUNCATION} +COPTS.v7fs_populate.c+= ${GCC_NO_STRINGOP_TRUNCATION} ${GCC_NO_FORMAT_TRUNCATION} .endif .include diff --git a/usr.sbin/mopd/common/Makefile b/usr.sbin/mopd/common/Makefile index 1e5aac877c29..15314435e3a8 100644 --- a/usr.sbin/mopd/common/Makefile +++ b/usr.sbin/mopd/common/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.20 2014/07/27 04:38:03 dholland Exp $ +# $NetBSD: Makefile,v 1.21 2019/10/13 07:28:19 mrg Exp $ LIBISPRIVATE= yes @@ -21,3 +21,5 @@ version.c: VERSION .include COPTS.print.c+= -Wno-pointer-sign + +COPTS.pf.c+= ${GCC_NO_STRINGOP_TRUNCATION} diff --git a/usr.sbin/mopd/mopd/Makefile b/usr.sbin/mopd/mopd/Makefile index caf04bc9dd2f..ca9799c2fda3 100644 --- a/usr.sbin/mopd/mopd/Makefile +++ b/usr.sbin/mopd/mopd/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.12 2012/08/10 12:10:29 joerg Exp $ +# $NetBSD: Makefile,v 1.13 2019/10/13 07:28:19 mrg Exp $ PROG= mopd SRCS= mopd.c process.c @@ -9,4 +9,4 @@ DPADD+= ${LIBUTIL} .include -COPTS.process.c+= -Wno-pointer-sign +COPTS.process.c+= -Wno-pointer-sign ${GCC_NO_FORMAT_TRUNCATION} diff --git a/usr.sbin/mountd/Makefile b/usr.sbin/mountd/Makefile index 69d75f87fe72..f285190a4728 100644 --- a/usr.sbin/mountd/Makefile +++ b/usr.sbin/mountd/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.19 2015/12/23 16:19:49 christos Exp $ +# $NetBSD: Makefile,v 1.20 2019/10/13 07:28:19 mrg Exp $ # @(#)Makefile 8.3 (Berkeley) 1/25/94 USE_FORT?= yes # network server @@ -15,4 +15,6 @@ DPADD+= ${LIBIPSEC} ${LIBUTIL} .include +COPTS.mountd.c+= ${GCC_NO_CAST_FUNCTION_TYPE} + .PATH: ${INETDDIR} diff --git a/usr.sbin/mrouted/Makefile b/usr.sbin/mrouted/Makefile index 4869d7399837..fb8669a7627b 100644 --- a/usr.sbin/mrouted/Makefile +++ b/usr.sbin/mrouted/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.15 2011/05/26 12:56:34 joerg Exp $ +# $NetBSD: Makefile,v 1.16 2019/10/13 07:28:19 mrg Exp $ # from: Id: Makefile,v 1.5 1993/06/24 05:11:16 deering Exp .include @@ -16,4 +16,7 @@ CPPFLAGS+= -I${.CURDIR} CWARNFLAGS.clang+= -Wno-format-extra-args +COPTS.cfparse.c+= ${GCC_NO_STRINGOP_TRUNCATION} +COPTS.vif.c+= ${GCC_NO_STRINGOP_TRUNCATION} + .include diff --git a/usr.sbin/perfused/Makefile b/usr.sbin/perfused/Makefile index f727fc011536..9858c647128a 100644 --- a/usr.sbin/perfused/Makefile +++ b/usr.sbin/perfused/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.6 2016/01/23 21:22:50 christos Exp $ +# $NetBSD: Makefile,v 1.7 2019/10/13 07:28:19 mrg Exp $ PROG= perfused @@ -14,5 +14,6 @@ LDADD+= -lperfuse -lpuffs DPADD+= ${LIBPUFFS} CWARNFLAGS.clang+= -Wno-format-security +COPTS.perfused.c+= ${GCC_NO_FORMAT_TRUNCATION} .include diff --git a/usr.sbin/rarpd/Makefile b/usr.sbin/rarpd/Makefile index 12be557d300e..dc2b04dfcdb4 100644 --- a/usr.sbin/rarpd/Makefile +++ b/usr.sbin/rarpd/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.14 2012/08/10 12:10:29 joerg Exp $ +# $NetBSD: Makefile,v 1.15 2019/10/13 07:28:19 mrg Exp $ USE_FORT?= yes # network server @@ -16,4 +16,6 @@ DPADD+= ${LIBUTIL} .include +COPTS.rarpd.c+= ${GCC_NO_STRINGOP_TRUNCATION} + COPTS.mkarp.c+= -Wno-pointer-sign diff --git a/usr.sbin/rbootd/Makefile b/usr.sbin/rbootd/Makefile index 09466715f130..0aa28edee717 100644 --- a/usr.sbin/rbootd/Makefile +++ b/usr.sbin/rbootd/Makefile @@ -1,5 +1,5 @@ # from: @(#)Makefile 8.1 (Berkeley) 6/4/93 -# $NetBSD: Makefile,v 1.14 2012/08/10 12:10:29 joerg Exp $ +# $NetBSD: Makefile,v 1.15 2019/10/13 07:28:20 mrg Exp $ USE_FORT?= yes # network server @@ -16,4 +16,6 @@ DPADD+= ${LIBUTIL} COPTS.utils.c+= -fno-strict-aliasing .endif +COPTS.bpf.c+= ${GCC_NO_STRINGOP_TRUNCATION} + .include diff --git a/usr.sbin/repquota/Makefile b/usr.sbin/repquota/Makefile index 8188d0d9e3d2..3b1c2f5493ab 100644 --- a/usr.sbin/repquota/Makefile +++ b/usr.sbin/repquota/Makefile @@ -1,5 +1,5 @@ # from: @(#)Makefile 8.1 (Berkeley) 6/6/93 -# $NetBSD: Makefile,v 1.10 2012/02/13 01:35:09 dholland Exp $ +# $NetBSD: Makefile,v 1.11 2019/10/13 07:28:20 mrg Exp $ WARNS ?= 4 .include @@ -17,4 +17,6 @@ LDADD= -lquota -lrpcsvc .PATH: ${NETBSDSRCDIR}/usr.bin/quota SRCS+= printquota.c +COPTS.printquota.c+= ${GCC_NO_STRINGOP_TRUNCATION} + .include diff --git a/usr.sbin/route6d/Makefile b/usr.sbin/route6d/Makefile index 4734c7d755e5..5f97403738a3 100644 --- a/usr.sbin/route6d/Makefile +++ b/usr.sbin/route6d/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.7 2007/05/28 12:06:39 tls Exp $ +# $NetBSD: Makefile,v 1.8 2019/10/13 07:28:20 mrg Exp $ USE_FORT?= yes # network server @@ -10,4 +10,6 @@ CPPFLAGS+=-DINET6 LDADD+= -lutil DPADD+= ${LIBUTIL} +COPTS.route6d.c+= ${GCC_NO_STRINGOP_TRUNCATION} + .include diff --git a/usr.sbin/rpc.bootparamd/Makefile b/usr.sbin/rpc.bootparamd/Makefile index a72e4debacaa..d84ebf7ae5ad 100644 --- a/usr.sbin/rpc.bootparamd/Makefile +++ b/usr.sbin/rpc.bootparamd/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.25 2007/05/28 12:06:39 tls Exp $ +# $NetBSD: Makefile,v 1.26 2019/10/13 07:28:20 mrg Exp $ .include @@ -22,6 +22,8 @@ RPC_XDIR= ${DESTDIR}/usr/include/rpcsvc/ CPPFLAGS+= -I${RPC_XDIR} +COPTS.bootparam_prot_svc.c+= ${GCC_NO_CAST_FUNCTION_TYPE} + .include .include diff --git a/usr.sbin/rpc.lockd/Makefile b/usr.sbin/rpc.lockd/Makefile index 319a4a90878a..74f07810ce89 100644 --- a/usr.sbin/rpc.lockd/Makefile +++ b/usr.sbin/rpc.lockd/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.16 2009/04/22 15:23:07 lukem Exp $ +# $NetBSD: Makefile,v 1.17 2019/10/13 07:28:20 mrg Exp $ USE_FORT?= yes # network server @@ -23,4 +23,8 @@ CLEANFILES= test test: ${.CURDIR}/test.c cc -o test ${.CURDIR}/test.c -lrpcsvc +COPTS.lockd_lock.c+= ${GCC_NO_CAST_FUNCTION_TYPE} +COPTS.lock_proc.c+= ${GCC_NO_CAST_FUNCTION_TYPE} +COPTS.nlm_prot_svc.c+= ${GCC_NO_CAST_FUNCTION_TYPE} + .include diff --git a/usr.sbin/rpc.pcnfsd/Makefile b/usr.sbin/rpc.pcnfsd/Makefile index d27a472ca84a..87d4372a5ac5 100644 --- a/usr.sbin/rpc.pcnfsd/Makefile +++ b/usr.sbin/rpc.pcnfsd/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.23 2012/08/10 12:10:30 joerg Exp $ +# $NetBSD: Makefile,v 1.24 2019/10/13 07:28:20 mrg Exp $ .include @@ -31,4 +31,8 @@ COPTS.pcnfsd_v2.c+= -Wno-pointer-sign CLEANFILES += clnt.pcnfsd pcnfsd_test.o pcnfsd_test.ln pcnfsd_clnt.* +COPTS.pcnfsd_misc.c+= ${GCC_NO_FORMAT_TRUNCATION} ${GCC_NO_CAST_FUNCTION_TYPE} +COPTS.pcnfsd_print.c+= ${GCC_NO_FORMAT_TRUNCATION} ${GCC_NO_CAST_FUNCTION_TYPE} +COPTS.pcnfsd_svc.c+= ${GCC_NO_FORMAT_TRUNCATION} ${GCC_NO_CAST_FUNCTION_TYPE} + .include diff --git a/usr.sbin/rpc.statd/Makefile b/usr.sbin/rpc.statd/Makefile index e80de5913e62..4e3834d3aaed 100644 --- a/usr.sbin/rpc.statd/Makefile +++ b/usr.sbin/rpc.statd/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.11 2003/01/05 19:24:08 sommerfeld Exp $ +# $NetBSD: Makefile,v 1.12 2019/10/13 07:28:20 mrg Exp $ PROG= rpc.statd SRCS= sm_inter_svc.c statd.c stat_proc.c @@ -16,6 +16,11 @@ RPC_SVCFILES= sm_inter_svc.c RPC_SVCFLAGS= -L -m RPC_XDIR= ${DESTDIR}/usr/include/rpcsvc/ +COPTS.sm_inter_svc.c+= ${GCC_NO_CAST_FUNCTION_TYPE} ${GCC_NO_FORMAT_TRUNCATION} +COPTS.statd.c+= ${GCC_NO_CAST_FUNCTION_TYPE} ${GCC_NO_FORMAT_TRUNCATION} ${GCC_NO_STRINGOP_TRUNCATION} +COPTS.stat_proc.c+= ${GCC_NO_CAST_FUNCTION_TYPE} +COPTS.rpcb_svc_4.c+= ${GCC_NO_CAST_FUNCTION_TYPE} + .include .include diff --git a/usr.sbin/rpc.yppasswdd/Makefile b/usr.sbin/rpc.yppasswdd/Makefile index ca22ee4d4a61..ca581a3e334d 100644 --- a/usr.sbin/rpc.yppasswdd/Makefile +++ b/usr.sbin/rpc.yppasswdd/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.6 2010/11/10 18:56:17 christos Exp $ +# $NetBSD: Makefile,v 1.7 2019/10/13 07:28:20 mrg Exp $ PROG= rpc.yppasswdd SRCS= rpc.yppasswdd.c yppasswdd_mkpw.c @@ -8,4 +8,6 @@ MLINKS= rpc.yppasswdd.8 yppasswdd.8 DPADD+= ${LIBRPCSVC} ${LIBCRYPT} ${LIBUTIL} LDADD+= -lrpcsvc -lcrypt -lutil +COPTS.rpc.yppasswdd.c+= ${GCC_NO_CAST_FUNCTION_TYPE} + .include diff --git a/usr.sbin/rpcbind/Makefile b/usr.sbin/rpcbind/Makefile index b77785b6459c..e90320be3ab8 100644 --- a/usr.sbin/rpcbind/Makefile +++ b/usr.sbin/rpcbind/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.15 2019/04/24 10:27:49 roy Exp $ +# $NetBSD: Makefile,v 1.16 2019/10/13 07:28:20 mrg Exp $ .include @@ -29,6 +29,11 @@ CPPFLAGS+= -DYP LDADD+= -lwrap -lutil DPADD+= ${LIBWRAP} ${LIBUTIL} +COPTS.rpcb_svc_4.c+= ${GCC_NO_CAST_FUNCTION_TYPE} +COPTS.pmap_svc.c+= ${GCC_NO_CAST_FUNCTION_TYPE} +COPTS.rpcb_svc.c+= ${GCC_NO_CAST_FUNCTION_TYPE} +COPTS.rpcb_svc_com.c+= ${GCC_NO_CAST_FUNCTION_TYPE} + .PATH: ${LIBCRPCDIR} .include diff --git a/usr.sbin/rtadvd/Makefile b/usr.sbin/rtadvd/Makefile index 851cf4fdfd9a..449c15aa2af8 100644 --- a/usr.sbin/rtadvd/Makefile +++ b/usr.sbin/rtadvd/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.22 2019/01/11 20:41:53 christos Exp $ +# $NetBSD: Makefile,v 1.23 2019/10/13 07:28:21 mrg Exp $ WARNS?= 4 @@ -33,4 +33,7 @@ DPADD.rump+= ${LIBRUMPRES} CWARNFLAGS.clang+= -Wno-error=address-of-packed-member +COPTS.if.c+= ${GCC_NO_STRINGOP_TRUNCATION} +COPTS.config.c+= ${GCC_NO_STRINGOP_TRUNCATION} + .include diff --git a/usr.sbin/rwhod/Makefile b/usr.sbin/rwhod/Makefile index d22d01ea56df..329e4f13ebfb 100644 --- a/usr.sbin/rwhod/Makefile +++ b/usr.sbin/rwhod/Makefile @@ -1,5 +1,5 @@ # from: @(#)Makefile 5.3 (Berkeley) 5/11/90 -# $NetBSD: Makefile,v 1.14 2009/04/22 15:23:08 lukem Exp $ +# $NetBSD: Makefile,v 1.15 2019/10/13 07:28:21 mrg Exp $ .include @@ -15,4 +15,6 @@ CPPFLAGS+=-I${NETBSDSRCDIR}/usr.bin/who -DSUPPORT_UTMPX -DSUPPORT_UTMP LDADD+= -lutil DPADD+= ${LIBUTIL} +COPTS.rwhod.c+= ${GCC_NO_STRINGOP_TRUNCATION} + .include diff --git a/usr.sbin/sliplogin/Makefile b/usr.sbin/sliplogin/Makefile index 1307c83d505a..eaabc4ed907b 100644 --- a/usr.sbin/sliplogin/Makefile +++ b/usr.sbin/sliplogin/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.7 2018/11/09 21:33:50 abs Exp $ +# $NetBSD: Makefile,v 1.8 2019/10/13 07:28:21 mrg Exp $ # from: @(#)Makefile 8.1 (Berkeley) 7/19/93 USE_FORT?= yes # setuid @@ -14,4 +14,6 @@ FILESDIR= /usr/share/examples/slip FILES= slip.login .endif +COPTS.sliplogin.c+= ${GCC_NO_FORMAT_TRUNCATION} + .include diff --git a/usr.sbin/spray/Makefile b/usr.sbin/spray/Makefile index 3a84a446a765..76a27f2d032d 100644 --- a/usr.sbin/spray/Makefile +++ b/usr.sbin/spray/Makefile @@ -1,8 +1,10 @@ -# $NetBSD: Makefile,v 1.4 1996/08/30 20:12:17 thorpej Exp $ +# $NetBSD: Makefile,v 1.5 2019/10/13 07:28:21 mrg Exp $ PROG= spray MAN= spray.8 LDADD+= -lrpcsvc DPADD+= ${LIBRPCSVC} +COPTS.spray.c+= ${GCC_NO_CAST_FUNCTION_TYPE} + .include diff --git a/usr.sbin/sup/lib/Makefile b/usr.sbin/sup/lib/Makefile index 4faa0f799099..47ab6da359b3 100644 --- a/usr.sbin/sup/lib/Makefile +++ b/usr.sbin/sup/lib/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.14 2009/01/16 07:09:09 junyoung Exp $ +# $NetBSD: Makefile,v 1.15 2019/10/13 07:28:21 mrg Exp $ LIBISPRIVATE= yes @@ -12,4 +12,6 @@ SRCS+= atoo.c expand.c ffilecopy.c filecopy.c \ BUILDSYMLINKS= ${.CURDIR}/../source/netcryptvoid.c netcrypt.c +COPTS.log.c+= ${GCC_NO_FORMAT_TRUNCATION} + .include diff --git a/usr.sbin/sup/sup/Makefile b/usr.sbin/sup/sup/Makefile index 4c4565b50b74..9777aed602cb 100644 --- a/usr.sbin/sup/sup/Makefile +++ b/usr.sbin/sup/sup/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.5 2002/11/30 03:10:58 lukem Exp $ +# $NetBSD: Makefile,v 1.6 2019/10/13 07:28:21 mrg Exp $ PROG= sup SRCS= supcmain.c supcvers.c supcparse.c supcname.c supcmisc.c supcmeat.c \ @@ -9,4 +9,6 @@ SRCS= supcmain.c supcvers.c supcparse.c supcname.c supcmisc.c supcmeat.c \ DPADD= ${LIBSUP} ${LIBCRYPT} LDADD= ${SUPLIB} -lcrypt +COPTS+= ${GCC_NO_FORMAT_TRUNCATION} ${GCC_NO_STRINGOP_TRUNCATION} + .include diff --git a/usr.sbin/sup/supfilesrv/Makefile b/usr.sbin/sup/supfilesrv/Makefile index 0aec4a50ac2e..e5567241dc63 100644 --- a/usr.sbin/sup/supfilesrv/Makefile +++ b/usr.sbin/sup/supfilesrv/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.4 2001/01/18 03:28:20 mycroft Exp $ +# $NetBSD: Makefile,v 1.5 2019/10/13 07:28:21 mrg Exp $ PROG= supfilesrv SRCS= supfilesrv.c scan.c @@ -10,4 +10,6 @@ MLINKS= supservers.8 supfilesrv.8 supservers.8 supscan.8 DPADD= ${LIBSUP} ${LIBCRYPT} ${LIBWRAP} LDADD= ${SUPLIB} -lcrypt -lwrap +COPTS+= ${GCC_NO_FORMAT_TRUNCATION} + .include diff --git a/usr.sbin/sup/supscan/Makefile b/usr.sbin/sup/supscan/Makefile index a54e33f2ab02..1050f79bad5c 100644 --- a/usr.sbin/sup/supscan/Makefile +++ b/usr.sbin/sup/supscan/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.6 2002/09/18 13:31:56 lukem Exp $ +# $NetBSD: Makefile,v 1.7 2019/10/13 07:28:21 mrg Exp $ NOMAN= # defined @@ -10,4 +10,6 @@ SRCS= supscan.c scan.c DPADD= ${LIBSUP} LDADD= ${SUPLIB} +COPTS+= ${GCC_NO_FORMAT_TRUNCATION} + .include diff --git a/usr.sbin/sysinst/Makefile.inc b/usr.sbin/sysinst/Makefile.inc index a8ac3e3824ca..de94080183d9 100644 --- a/usr.sbin/sysinst/Makefile.inc +++ b/usr.sbin/sysinst/Makefile.inc @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.inc,v 1.26 2019/10/06 00:07:11 mrg Exp $ +# $NetBSD: Makefile.inc,v 1.27 2019/10/13 07:28:21 mrg Exp $ # # Makefile for sysinst @@ -122,9 +122,7 @@ COPTS += -Os CPPFLAGS+=-DINET6 .endif -.if defined(HAVE_GCC) && ${HAVE_GCC} >= 7 && ${ACTIVE_CC} == "gcc" -COPTS+=-Wno-format-truncation -.endif +COPTS+= ${GCC_NO_FORMAT_TRUNCATION} # Host to ftp from. Default: # "ftp.NetBSD.org" diff --git a/usr.sbin/syslogd/Makefile b/usr.sbin/syslogd/Makefile index 4d52764f1567..ee54a844cf45 100644 --- a/usr.sbin/syslogd/Makefile +++ b/usr.sbin/syslogd/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.29 2019/09/29 23:45:02 mrg Exp $ +# $NetBSD: Makefile,v 1.30 2019/10/13 07:28:22 mrg Exp $ # from: @(#)Makefile 8.1 (Berkeley) 6/6/93 .include @@ -31,8 +31,6 @@ DPADD+= ${LIBWRAP} LDADD+= -lssl -lcrypto # Overflow that appears impossible -.if defined(HAVE_GCC) && ${HAVE_GCC} >= 7 && ${ACTIVE_CC} == "gcc" -COPTS.syslogd.c+= -Wno-error=format-truncation -.endif +COPTS.syslogd.c+= ${GCC_NO_FORMAT_TRUNCATION} ${GCC_NO_STRINGOP_TRUNCATION} .include diff --git a/usr.sbin/wiconfig/Makefile b/usr.sbin/wiconfig/Makefile index 665d785ab3a7..e680a3c711ba 100644 --- a/usr.sbin/wiconfig/Makefile +++ b/usr.sbin/wiconfig/Makefile @@ -1,6 +1,8 @@ -# $NetBSD: Makefile,v 1.7 2016/06/15 13:47:26 riastradh Exp $ +# $NetBSD: Makefile,v 1.8 2019/10/13 07:28:22 mrg Exp $ PROG= wiconfig MAN= wiconfig.8 +COPTS.wiconfig.c+= ${GCC_NO_STRINGOP_TRUNCATION} + .include diff --git a/usr.sbin/ypbind/Makefile b/usr.sbin/ypbind/Makefile index 944f5c2f9d68..bca810748906 100644 --- a/usr.sbin/ypbind/Makefile +++ b/usr.sbin/ypbind/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.18 2009/04/22 15:23:10 lukem Exp $ +# $NetBSD: Makefile,v 1.19 2019/10/13 07:28:22 mrg Exp $ # from: @(#)Makefile 5.8 (Berkeley) 7/28/90 USE_FORT?= yes # network client @@ -10,4 +10,6 @@ CPPFLAGS+=-DHEURISTIC -DDEBUG LDADD+= -lutil DPADD+= ${LIBUTIL} +COPTS.ypbind.c+= ${GCC_NO_CAST_FUNCTION_TYPE} + .include diff --git a/usr.sbin/ypserv/yppush/Makefile b/usr.sbin/ypserv/yppush/Makefile index 52e826a56a62..49cf108e03e6 100644 --- a/usr.sbin/ypserv/yppush/Makefile +++ b/usr.sbin/ypserv/yppush/Makefile @@ -1,7 +1,10 @@ -# $NetBSD: Makefile,v 1.5 1997/10/02 14:16:42 lukem Exp $ +# $NetBSD: Makefile,v 1.6 2019/10/13 07:28:22 mrg Exp $ PROG= yppush SRCS= yppush.c yppush_err.c yppush_proc.c yppush_svc.c MAN= yppush.8 +COPTS.yppush.c+= ${GCC_NO_CAST_FUNCTION_TYPE} +COPTS.yppush_svc.c+= ${GCC_NO_CAST_FUNCTION_TYPE} + .include diff --git a/usr.sbin/ypserv/ypserv/Makefile b/usr.sbin/ypserv/ypserv/Makefile index c6ba345ee474..3c53f97d546d 100644 --- a/usr.sbin/ypserv/ypserv/Makefile +++ b/usr.sbin/ypserv/ypserv/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.19 2019/08/15 08:30:19 kamil Exp $ +# $NetBSD: Makefile,v 1.20 2019/10/13 07:28:22 mrg Exp $ .include @@ -20,4 +20,6 @@ CPPFLAGS.getnetnamadr.c=-UYP -D_LIBC SANITIZER_RENAME_SYMBOL+= gethostbyname2 +COPTS.ypserv.c+= ${GCC_NO_CAST_FUNCTION_TYPE} + .include diff --git a/usr.sbin/ypserv/ypxfr/Makefile b/usr.sbin/ypserv/ypxfr/Makefile index e89511517fc3..1b42d04e0f99 100644 --- a/usr.sbin/ypserv/ypxfr/Makefile +++ b/usr.sbin/ypserv/ypxfr/Makefile @@ -1,7 +1,9 @@ -# $NetBSD: Makefile,v 1.5 1997/10/02 14:17:00 lukem Exp $ +# $NetBSD: Makefile,v 1.6 2019/10/13 07:28:22 mrg Exp $ PROG= ypxfr SRCS= ypxfr.c MAN= ypxfr.8 +COPTS.ypxfr.c+= ${GCC_NO_CAST_FUNCTION_TYPE} + .include diff --git a/usr.sbin/ypset/Makefile b/usr.sbin/ypset/Makefile index 132e3a1c2dd9..92edcf8195e8 100644 --- a/usr.sbin/ypset/Makefile +++ b/usr.sbin/ypset/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.11 2007/05/28 12:06:43 tls Exp $ +# $NetBSD: Makefile,v 1.12 2019/10/13 07:28:23 mrg Exp $ # from: @(#)Makefile 5.8 (Berkeley) 7/28/90 USE_FORT?= yes # network client @@ -6,4 +6,6 @@ USE_FORT?= yes # network client PROG= ypset MAN= ypset.8 +COPTS.ypset.c+= ${GCC_NO_CAST_FUNCTION_TYPE} + .include