diff --git a/bin/pax/Makefile b/bin/pax/Makefile index 934168afe419d..efd00d5d0e5a1 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 8a99f7badc026..7e7bfc6dded47 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 b1c849ee9660a..6b5566d509068 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 a5883564ce55f..28e7b203bd6ef 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 91b9290831f6e..c4fab0364fd81 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 03c8ed145f022..abf032c19aa8d 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 499eea0ea5b8d..1891cf064585d 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 e2af1ebc69c7c..06d7140ff782a 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 7cdfbf4cd6e87..9c7e4e7204b6c 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 1f897b5f9152a..f0e4381a77426 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 c0ef962f10db5..48a79881b40b3 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 cfb32978c7009..861e285c5925e 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 061153102b7a8..cf0c0574b50eb 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 1427b3fdb717d..7a28120e210bf 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 4391238825153..767962c55671a 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 67999864af112..394d5169b9919 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 d733d1a32eff4..711d752717f8c 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 7fbed66e5bfbe..97489d2aebf61 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 c1b635c55df26..eaa966e48230b 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 35f4d3f2b12bb..2958ecf51ebbd 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 52e211e6fe7e7..82a73755923ca 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 b4109200e0619..9819dd7fb4a64 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 d3641e42c80d6..5a6ecd3d803ad 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 2efa814ded5c0..72bea06e34805 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 ecfc5bf7fa0b2..8c42dcb50ba9d 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 4bf60f6714a06..4ec1a71f2ea6b 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 2d362294ed182..e8e108e4493fc 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 c527e240bde0b..00bc68d7e2ff4 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 5b9a2a7e7e9b1..f6c34dfac5b5a 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 3df60449093a1..9cb2dedd77d58 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 cd637760c495e..46022684ba9b2 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 ac7e294671ff6..37538604e8c19 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 387fecbe03410..980a27836e4df 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 f1ad38b24abf1..0ab9343e47e61 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 a5a478420d0b2..a8a2bedb10942 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 a25cec7208e90..e36399191be85 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 278d3ae5d5809..22f374d04efa4 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 7365d316c4790..d464842602e8a 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 451506f4c8006..b9e116394ed6e 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 e0d97b70467ac..9d01f9cf506f1 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 f2731e5b9b1a9..402d0ebb7d08c 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 636ef1a781e8f..71ff354b84a8a 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 d2f4d480d68b1..bb853d21aa124 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 1802a4603af12..1f745dad91f07 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 66794662cf7b4..97a9a5b08900e 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 602b31fd93ecc..e7584aa1fdd11 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 800b192f54ef2..e46f5173fd1f9 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 25a3639a6a83b..c0ccc6045a979 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 abab17511f1ab..ba563037ded0c 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 b45305b9cf8c4..103793fd29d24 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 5c6ac34fa0469..fdb77d55f2322 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 693c022ba5d52..65e62c62ce7c1 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 8a02211504a8c..105a6a92e0ee2 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 82a9646d84c27..d28ef637d4560 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 633e521771f91..24d0a9a197341 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 306265d12da93..ebf5415b90534 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 6b99fd5f30fa8..6f9ba31423e45 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 3dc3680031e23..bc36468ca6380 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 2be052c5f343c..4dc1aafafb30d 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 47758f2cea091..1c2aad0f48236 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 a067fbad1d7c6..f38e5db0997b4 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 19df99b1d0bb8..7b0049b433bf7 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 fdfcaba5322c0..e0f1c6a15af22 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 c525305d4269d..dacd1a6c21b31 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 42000b133a126..9e8e088976722 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 edc353fd17316..753b1b57ba160 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 e7c85c026f354..68b04f85c07b9 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 11de731600809..d26e64b4cec00 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 4eec2564e7ac2..5668be47c1d2c 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 3b3df9cc4986f..c68d3c26ea9d8 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 602b5e07a30b6..8fdac948cbea2 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 ef05c75c5d445..1718c7c723029 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 af5f1d262712c..5da75465ec954 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 f3e419ff66e2d..713d7e2e2bad0 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 6a4bd1098c48a..f2617d87f40cd 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 4af1a459f811a..cd6004c03aba1 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 3f70415f0b391..2383109822510 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 ae8b18984f5fa..3f30b0df20351 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 12e9c3a8b019b..1492b6a9d4243 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 cb6fa00970b07..e6cd3793bb83a 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 30e2d3f760c30..932da6a5adab2 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 ef6ca482e9236..19511079f4986 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 210f4b81ffc00..611eeb1cfce98 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 d058b624e8a50..eb8cd6d8d3caf 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 d78c3608d4910..45edcb7aff000 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 43f5e5cddac76..f603f8e9ca5aa 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 5784f453dcc5c..bfb30d526c552 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 e32a7d97504be..32fcbd0f3aa6c 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 0f3acf70aad87..4bbf91a5caeff 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 6ed1a271b436e..92beffd7d5f00 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 4d6f8726df6f0..ba14f9ac82232 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 429921eeb6d28..640594211d9bc 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 1eca0b761aa64..866ab4fd0b974 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 a7d49f11b554a..6a808675b7188 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 db2df9eac44f9..98ef9cac6ee67 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 b0ee808079a55..def9d8a9bf74c 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 cbce5f45935e4..b671c0efb677d 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 dd388ec008b6d..a5ef39e9e5748 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 76da29aa40e60..d3b9df94dd8b6 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 10fecab165454..9dba3f24afa8e 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 bb85e6eeed03b..eed1fa011754f 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 ea8cb8eb1c129..cd4d97c8537fa 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 b985edee68c07..d1e5a4f4731ca 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 bd3844bbd0878..0667adc12efe5 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 fe431cbbd7b26..4b2228a0544c8 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 cd0576760fdbb..bda9fde0da83a 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 7c30d61effe20..3f49bd33260f8 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 8893f9c4a8bc3..be8ea03330d7c 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 c62ce28e5b646..5d87073a115d9 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 df027ba289c10..0eb0ffe9e8cf6 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 eed62192d6491..914478b6097d9 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 fd177c57f4e97..505bcfbe1602c 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 d8aad6e3cfd13..2a0025a1506e7 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 b536323b3ee40..c36737e86cf55 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 0551e2d1c516e..0bc2ebfc078b0 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 334c3690a24c9..b3fc6d7fc82ec 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 89b23d5dd93ba..5be64d6f8aba2 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 88e91a7bcef51..c7e9e36a2cfa5 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 83d4a1d728152..9f34a13ccafb1 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 9e3728bcb69a5..00b28b74728a5 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 d877997571dca..53d587b9ff235 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 e477d7db6ff1c..e15935d37368a 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 ea0cfda4e96bd..8eb8d49b55e25 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 6525807446414..6d1dc0844ba17 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 88f98a57a8aef..f085355e50b86 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 a07e370bf3013..552827bd4e914 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 94272068d6f85..66e0747a13634 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 79ed6d6f4eeae..e911d7be56606 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 ed373277da035..9327b1339fe11 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 9cd3430ba9c5b..22f8228ccd5bb 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 4b890e50ed2f4..000a70a2cca7b 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 7522fc979da8f..143b5b72bebc9 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 1e5aac877c290..15314435e3a82 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 caf04bc9dd2f2..ca9799c2fda3e 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 69d75f87fe727..f285190a47283 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 4869d73998373..fb8669a7627bd 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 f727fc0115364..9858c647128ab 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 12be557d300e9..dc2b04dfcdb4d 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 09466715f1308..0aa28edee717d 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 8188d0d9e3d26..3b1c2f5493abb 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 4734c7d755e51..5f97403738a32 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 a72e4debacaa8..d84ebf7ae5ad3 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 319a4a90878a0..74f07810ce899 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 d27a472ca84a4..87d4372a5ac58 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 e80de5913e62c..4e3834d3aaedc 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 ca22ee4d4a612..ca581a3e334db 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 b77785b6459cb..e90320be3ab89 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 851cf4fdfd9af..449c15aa2af87 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 d22d01ea56df7..329e4f13ebfb7 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 1307c83d505ac..eaabc4ed907b7 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 3a84a446a765a..76a27f2d032d0 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 4faa0f7990997..47ab6da359b3c 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 4c4565b50b745..9777aed602cb1 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 0aec4a50ac2ed..e5567241dc639 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 a54e33f2ab025..1050f79bad5c9 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 a8ac3e3824cac..de94080183d9d 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 4d52764f1567a..ee54a844cf457 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 665d785ab3a70..e680a3c711ba3 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 944f5c2f9d685..bca810748906b 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 52e826a56a625..49cf108e03e63 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 c6ba345ee4745..3c53f97d546da 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 e89511517fc3e..1b42d04e0f991 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 132e3a1c2dd94..92edcf8195e8e 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