summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile.inc19
-rw-r--r--bin/Makefile.inc1
-rw-r--r--gnu/lib/libregex/Makefile2
-rw-r--r--gnu/usr.bin/diff3/Makefile2
-rw-r--r--gnu/usr.bin/gdb/Makefile.inc2
-rw-r--r--gnu/usr.bin/grep/Makefile2
-rw-r--r--lib/Makefile.inc2
-rw-r--r--lib/clang/Makefile.inc2
-rw-r--r--lib/libarchive/tests/Makefile2
-rw-r--r--lib/libc/tests/regex/Makefile.inc1
-rw-r--r--lib/libcasper/services/cap_dns/tests/Makefile2
-rw-r--r--lib/libcasper/services/cap_grp/tests/Makefile2
-rw-r--r--lib/libcasper/services/cap_pwd/tests/Makefile2
-rw-r--r--lib/libcasper/services/cap_sysctl/tests/Makefile2
-rw-r--r--lib/libthr/tests/Makefile2
-rw-r--r--lib/libthr/tests/dlopen/Makefile2
-rw-r--r--lib/libthr/tests/dlopen/dso/Makefile1
-rw-r--r--lib/libxo/tests/Makefile2
-rw-r--r--lib/ofed/Makefile.inc2
-rw-r--r--rescue/librescue/Makefile2
-rw-r--r--sbin/Makefile.inc1
-rw-r--r--secure/lib/libcrypto/engines/Makefile.inc2
-rw-r--r--share/mk/bsd.sys.mk8
-rw-r--r--share/mk/src.sys.mk2
-rw-r--r--tests/sys/cddl/zfs/bin/Makefile2
-rw-r--r--tests/sys/cddl/zfs/tests/Makefile.inc3
-rw-r--r--tests/sys/geom/class/eli/Makefile2
-rw-r--r--tests/sys/net/routing/Makefile1
-rwxr-xr-xtools/build/depend-cleanup.sh7
-rw-r--r--usr.bin/Makefile.inc2
-rw-r--r--usr.bin/ofed/infiniband-diags/Makefile.inc1
-rw-r--r--usr.bin/ofed/libibverbs/Makefile.inc1
-rw-r--r--usr.bin/ofed/librdmacm/Makefile.inc2
-rw-r--r--usr.bin/tar/tests/Makefile2
-rw-r--r--usr.sbin/Makefile.inc2
-rw-r--r--usr.sbin/wpa/Makefile.inc2
36 files changed, 62 insertions, 22 deletions
diff --git a/Makefile.inc1 b/Makefile.inc1
index 46cecc5a9d1f7..b7a1c0476d772 100644
--- a/Makefile.inc1
+++ b/Makefile.inc1
@@ -2226,12 +2226,9 @@ _crunchide= usr.sbin/crunch/crunchide
_bootstrap_tools_links+=crunchide
.endif
-# r285986 crunchen: use STRIPBIN rather than STRIP
-# 1100113: Support MK_AUTO_OBJ
-# 1200006: META_MODE fixes
-.if ${BOOTSTRAPPING} < 1100078 || \
- (${MK_AUTO_OBJ} == "yes" && ${BOOTSTRAPPING} < 1100114) || \
- (${MK_META_MODE} == "yes" && ${BOOTSTRAPPING} < 1200006)
+# 1300115: Higher WARNS fixes
+.if ${BOOTSTRAPPING} < 1202502 || \
+ (${BOOTSTRAPPING} > 1300000 && ${BOOTSTRAPPING} < 1300115)
_crunchgen= usr.sbin/crunch/crunchgen
.else
_bootstrap_tools_links+=crunchgen
diff --git a/bin/Makefile.inc b/bin/Makefile.inc
index 86141a1387f9a..637d54f2a4ac9 100644
--- a/bin/Makefile.inc
+++ b/bin/Makefile.inc
@@ -4,7 +4,6 @@
.include <src.opts.mk>
BINDIR?= /bin
-WARNS?= 6
.if ${MK_DYNAMICROOT} == "no"
NO_SHARED?= YES
diff --git a/gnu/lib/libregex/Makefile b/gnu/lib/libregex/Makefile
index b775b74d75ae3..c18243a810655 100644
--- a/gnu/lib/libregex/Makefile
+++ b/gnu/lib/libregex/Makefile
@@ -6,6 +6,8 @@ SHLIB_MAJOR= 5
REGEXDIR= ${SRCTOP}/contrib/libgnuregex
.PATH: ${REGEXDIR}
+WARNS?= 1
+
SRCS= gnuregex.c
INCSGROUPS= INCS WRINCS PXINCS
INCS= regex.h.patched
diff --git a/gnu/usr.bin/diff3/Makefile b/gnu/usr.bin/diff3/Makefile
index 7e72487bed005..6549b7157ef68 100644
--- a/gnu/usr.bin/diff3/Makefile
+++ b/gnu/usr.bin/diff3/Makefile
@@ -18,6 +18,8 @@ CFLAGS+=-I${SRCTOP}/contrib/diff/lib
CFLAGS+=-DHAVE_CONFIG_H
CFLAGS+=-DDEFAULT_DIFF_PROGRAM=\"/usr/bin/diff\"
+WARNS?= 0
+
.for f in diff3.c
${f}: ${DIFFSRC}/${f} ${.CURDIR}/${f}.diff
patch -s -o ${.TARGET} < ${.CURDIR}/${f}.diff ${DIFFSRC}/${f}
diff --git a/gnu/usr.bin/gdb/Makefile.inc b/gnu/usr.bin/gdb/Makefile.inc
index 30d677726a008..a668a487d218a 100644
--- a/gnu/usr.bin/gdb/Makefile.inc
+++ b/gnu/usr.bin/gdb/Makefile.inc
@@ -2,6 +2,8 @@
.include <src.opts.mk>
+WARNS?= 0
+
VERSION= "6.1.1 [FreeBSD]"
VENDOR= marcel
diff --git a/gnu/usr.bin/grep/Makefile b/gnu/usr.bin/grep/Makefile
index b24b1ea292e00..98c8cec401f05 100644
--- a/gnu/usr.bin/grep/Makefile
+++ b/gnu/usr.bin/grep/Makefile
@@ -14,6 +14,8 @@ SRCS= closeout.c dfa.c error.c exclude.c grep.c grepmat.c hard-locale.c \
xstrtoumax.c
CLEANFILES+= gnugrep.1
+WARNS?= 0
+
CFLAGS+=-I${.CURDIR} -I${SYSROOT:U${DESTDIR}}/usr/include/gnu -DHAVE_CONFIG_H
.if ${MK_BSD_GREP} != "yes"
diff --git a/lib/Makefile.inc b/lib/Makefile.inc
index d77e2dbd15d5b..e9cf750939cea 100644
--- a/lib/Makefile.inc
+++ b/lib/Makefile.inc
@@ -1,5 +1,3 @@
# $FreeBSD$
# Default version for system libs (override in <lib>/Makefile if necessary)
SHLIB_MAJOR?= 5
-
-WARNS?= 6
diff --git a/lib/clang/Makefile.inc b/lib/clang/Makefile.inc
index 3d49ea44c9918..6500e91eaac17 100644
--- a/lib/clang/Makefile.inc
+++ b/lib/clang/Makefile.inc
@@ -9,3 +9,5 @@ DEBUG_FILES_CFLAGS= -gline-tables-only
.else
DEBUG_FILES_CFLAGS= -g1
.endif
+
+WARNS?= 0
diff --git a/lib/libarchive/tests/Makefile b/lib/libarchive/tests/Makefile
index 8467123d159e4..ba662adcc0708 100644
--- a/lib/libarchive/tests/Makefile
+++ b/lib/libarchive/tests/Makefile
@@ -3,6 +3,8 @@
PACKAGE= tests
+WARNS?= 3
+
_LIBARCHIVEDIR= ${SRCTOP}/contrib/libarchive
ATF_TESTS_SH+= functional_test
diff --git a/lib/libc/tests/regex/Makefile.inc b/lib/libc/tests/regex/Makefile.inc
index 00aa7c0e212bf..9e0584bd73e34 100644
--- a/lib/libc/tests/regex/Makefile.inc
+++ b/lib/libc/tests/regex/Makefile.inc
@@ -3,6 +3,7 @@
.include <bsd.own.mk>
BINDIR?= ${TESTSDIR}
+WARNS?= 3
# SKIP_LEFTASSOC -> these testcases fail on FreeBSD.
IMPLEMENTATION?= -DREGEX_SPENCER -DSKIP_LEFTASSOC
diff --git a/lib/libcasper/services/cap_dns/tests/Makefile b/lib/libcasper/services/cap_dns/tests/Makefile
index 55c163bbdb408..f79e872049d11 100644
--- a/lib/libcasper/services/cap_dns/tests/Makefile
+++ b/lib/libcasper/services/cap_dns/tests/Makefile
@@ -11,6 +11,4 @@ CFLAGS+=-DWITH_CASPER
.endif
LIBADD+= nv
-WARNS?= 3
-
.include <bsd.test.mk>
diff --git a/lib/libcasper/services/cap_grp/tests/Makefile b/lib/libcasper/services/cap_grp/tests/Makefile
index ff2f2f18e25c8..d24cba093e67c 100644
--- a/lib/libcasper/services/cap_grp/tests/Makefile
+++ b/lib/libcasper/services/cap_grp/tests/Makefile
@@ -11,6 +11,4 @@ CFLAGS+=-DWITH_CASPER
.endif
LIBADD+= nv
-WARNS?= 3
-
.include <bsd.test.mk>
diff --git a/lib/libcasper/services/cap_pwd/tests/Makefile b/lib/libcasper/services/cap_pwd/tests/Makefile
index d010cc45efddb..515fe383b971a 100644
--- a/lib/libcasper/services/cap_pwd/tests/Makefile
+++ b/lib/libcasper/services/cap_pwd/tests/Makefile
@@ -11,6 +11,4 @@ CFLAGS+=-DWITH_CASPER
.endif
LIBADD+= nv
-WARNS?= 3
-
.include <bsd.test.mk>
diff --git a/lib/libcasper/services/cap_sysctl/tests/Makefile b/lib/libcasper/services/cap_sysctl/tests/Makefile
index 46aa5424323dd..d0d9f9bd7a0dd 100644
--- a/lib/libcasper/services/cap_sysctl/tests/Makefile
+++ b/lib/libcasper/services/cap_sysctl/tests/Makefile
@@ -11,8 +11,6 @@ CFLAGS+=-DWITH_CASPER
.endif
LIBADD+= nv
-WARNS?= 3
-
TEST_METADATA.sysctl_test+= required_user="root"
.include <bsd.test.mk>
diff --git a/lib/libthr/tests/Makefile b/lib/libthr/tests/Makefile
index f899f47350939..9330297bc5798 100644
--- a/lib/libthr/tests/Makefile
+++ b/lib/libthr/tests/Makefile
@@ -2,6 +2,8 @@
PACKAGE= tests
+WARNS?= 3
+
TESTSRC= ${SRCTOP}/contrib/netbsd-tests/lib/libpthread
# TODO: t_name (missing pthread_getname_np support in FreeBSD)
diff --git a/lib/libthr/tests/dlopen/Makefile b/lib/libthr/tests/dlopen/Makefile
index bea70ec7cbd50..05f1cb7e67909 100644
--- a/lib/libthr/tests/dlopen/Makefile
+++ b/lib/libthr/tests/dlopen/Makefile
@@ -2,6 +2,8 @@
TESTSRC= ${SRCTOP}/contrib/netbsd-tests/lib/libpthread/dlopen
+WARNS?= 2
+
.include <bsd.own.mk>
TESTSDIR= ${TESTSBASE}/lib/libthr/dlopen
diff --git a/lib/libthr/tests/dlopen/dso/Makefile b/lib/libthr/tests/dlopen/dso/Makefile
index b9a90310bf2b3..dfd926586c90b 100644
--- a/lib/libthr/tests/dlopen/dso/Makefile
+++ b/lib/libthr/tests/dlopen/dso/Makefile
@@ -1,6 +1,7 @@
# $FreeBSD$
TESTSRC= ${SRCTOP}/contrib/netbsd-tests/lib/libpthread/dlopen/dso
+WARNS?= 3
SHLIB= h_pthread_dlopen
SHLIB_MAJOR= 1
diff --git a/lib/libxo/tests/Makefile b/lib/libxo/tests/Makefile
index 5d42e0d9c34e9..2d834ac502f1e 100644
--- a/lib/libxo/tests/Makefile
+++ b/lib/libxo/tests/Makefile
@@ -4,6 +4,8 @@
PACKAGE= tests
+WARNS?= 1
+
LIBXOSRC= ${SRCTOP}/contrib/libxo
# Override the default suffix transformation rules for .c/.o -> .out
diff --git a/lib/ofed/Makefile.inc b/lib/ofed/Makefile.inc
index e8c0da7a1d7eb..a73f0e488b1fb 100644
--- a/lib/ofed/Makefile.inc
+++ b/lib/ofed/Makefile.inc
@@ -1 +1,3 @@
# $FreeBSD$
+
+WARNS?= 0
diff --git a/rescue/librescue/Makefile b/rescue/librescue/Makefile
index e7147d8e67ce2..2116219dc7469 100644
--- a/rescue/librescue/Makefile
+++ b/rescue/librescue/Makefile
@@ -23,6 +23,8 @@ INTERNALLIB= # Don't install this library
SRCS= exec.c getusershell.c login_class.c popen.c rcmdsh.c \
sysctl.c system.c
+WARNS?= 3
+
CFLAGS+= -DRESCUE
# Flags copied from src/lib/libc and src/lib/libutil
# libc/db/Makefile.inc
diff --git a/sbin/Makefile.inc b/sbin/Makefile.inc
index 896c64c82c130..401e2a8e34912 100644
--- a/sbin/Makefile.inc
+++ b/sbin/Makefile.inc
@@ -4,7 +4,6 @@
.include <src.opts.mk>
BINDIR?= /sbin
-WARNS?= 6
.if ${MK_DYNAMICROOT} == "no"
NO_SHARED?= YES
diff --git a/secure/lib/libcrypto/engines/Makefile.inc b/secure/lib/libcrypto/engines/Makefile.inc
index 1d368ae5d6501..88ef355f55683 100644
--- a/secure/lib/libcrypto/engines/Makefile.inc
+++ b/secure/lib/libcrypto/engines/Makefile.inc
@@ -18,3 +18,5 @@ CFLAGS+= -DB_ENDIAN
CFLAGS+= -DNDEBUG
.PATH: ${LCRYPTO_SRC}/engines
+
+WARNS?= 0
diff --git a/share/mk/bsd.sys.mk b/share/mk/bsd.sys.mk
index 7702ddfe15a76..c5bb6e4068de4 100644
--- a/share/mk/bsd.sys.mk
+++ b/share/mk/bsd.sys.mk
@@ -28,6 +28,14 @@ CFLAGS+= -std=${CSTD}
CXXFLAGS+= -std=${CXXSTD}
.endif
+# This gives the Makefile we're evaluating at the top-level a chance to set
+# WARNS. If it doesn't do so, we may freely pull a DEFAULTWARNS if it's set
+# and use that. This allows us to default WARNS to 6 for src builds without
+# needing to set the default in various Makefile.inc.
+.if !defined(WARNS) && defined(DEFAULTWARNS)
+WARNS= ${DEFAULTWARNS}
+.endif
+
# -pedantic is problematic because it also imposes namespace restrictions
#CFLAGS+= -pedantic
.if defined(WARNS)
diff --git a/share/mk/src.sys.mk b/share/mk/src.sys.mk
index 61c51f200d351..2a6bfadee0091 100644
--- a/share/mk/src.sys.mk
+++ b/share/mk/src.sys.mk
@@ -40,6 +40,8 @@ __postrcconf_${var}:= ${MK_${var}:U-}${WITHOUT_${var}:Uno:Dyes}${WITH_${var}:Uno
CFCOMMONFLAG?= -fno-common
CFLAGS+= ${CFCOMMONFLAG}
+DEFAULTWARNS= 6
+
# tempting, but bsd.compiler.mk causes problems this early
# probably need to remove dependence on bsd.own.mk
#.include "src.opts.mk"
diff --git a/tests/sys/cddl/zfs/bin/Makefile b/tests/sys/cddl/zfs/bin/Makefile
index 21fff8e2ea515..165082e917472 100644
--- a/tests/sys/cddl/zfs/bin/Makefile
+++ b/tests/sys/cddl/zfs/bin/Makefile
@@ -7,6 +7,8 @@ MAN=
BINDIR= ${TESTSBASE}/sys/cddl/zfs/bin
SCRIPTSDIR= ${TESTSBASE}/sys/cddl/zfs/bin
+WARNS?= 0
+
SCRIPTS+= bsddisks.ksh
SCRIPTS+= dircmp.ksh
SCRIPTS+= dumpadm.ksh
diff --git a/tests/sys/cddl/zfs/tests/Makefile.inc b/tests/sys/cddl/zfs/tests/Makefile.inc
new file mode 100644
index 0000000000000..a73f0e488b1fb
--- /dev/null
+++ b/tests/sys/cddl/zfs/tests/Makefile.inc
@@ -0,0 +1,3 @@
+# $FreeBSD$
+
+WARNS?= 0
diff --git a/tests/sys/geom/class/eli/Makefile b/tests/sys/geom/class/eli/Makefile
index 8e4f2f4eb8392..c7f1342f45aef 100644
--- a/tests/sys/geom/class/eli/Makefile
+++ b/tests/sys/geom/class/eli/Makefile
@@ -4,6 +4,8 @@
PACKAGE= tests
+WARNS?= 3
+
TESTSDIR= ${TESTSBASE}/sys/geom/class/${.CURDIR:T}
ATF_TESTS_C= pbkdf2_test
diff --git a/tests/sys/net/routing/Makefile b/tests/sys/net/routing/Makefile
index f0fe536fe7470..d32ba9af54a1d 100644
--- a/tests/sys/net/routing/Makefile
+++ b/tests/sys/net/routing/Makefile
@@ -1,6 +1,7 @@
# $FreeBSD$
PACKAGE= tests
+WARNS?= 1
TESTSDIR= ${TESTSBASE}/sys/net/routing
diff --git a/tools/build/depend-cleanup.sh b/tools/build/depend-cleanup.sh
index 0134a1cae5a6e..8b249ccf55fa3 100755
--- a/tools/build/depend-cleanup.sh
+++ b/tools/build/depend-cleanup.sh
@@ -49,3 +49,10 @@ if [ -e "$OBJTOP"/cddl/lib/libzfs/.depend.libzfs_changelist.o ] && \
echo "Removing old ZFS tree"
rm -rf "$OBJTOP"/cddl "$OBJTOP"/obj-lib32/cddl
fi
+
+# 20200916 WARNS bumped, need bootstrapped crunchgen stubs
+if [ -e "$OBJTOP"/rescue/rescue/rescue.c ] && \
+ ! grep -q 'crunched_stub_t' "$OBJTOP"/rescue/rescue/rescue.c; then
+ echo "Removing old rescue(8) tree"
+ rm -rf "$OBJTOP"/rescue/rescue
+fi
diff --git a/usr.bin/Makefile.inc b/usr.bin/Makefile.inc
index 534349f251559..e4edaf4e08e19 100644
--- a/usr.bin/Makefile.inc
+++ b/usr.bin/Makefile.inc
@@ -2,5 +2,3 @@
# $FreeBSD$
BINDIR?= /usr/bin
-
-WARNS?= 6
diff --git a/usr.bin/ofed/infiniband-diags/Makefile.inc b/usr.bin/ofed/infiniband-diags/Makefile.inc
index 76bf879f60960..c3ba3a255c559 100644
--- a/usr.bin/ofed/infiniband-diags/Makefile.inc
+++ b/usr.bin/ofed/infiniband-diags/Makefile.inc
@@ -10,3 +10,4 @@ CFLAGS+= -DHAVE_CONFIG_H=1
CFLAGS+= -I${_spath} -I${_spath}/src
LIBADD+= osmcomp ibmad ibumad
+WARNS?= 0
diff --git a/usr.bin/ofed/libibverbs/Makefile.inc b/usr.bin/ofed/libibverbs/Makefile.inc
index 9ed20e6a94b00..0f60546d98209 100644
--- a/usr.bin/ofed/libibverbs/Makefile.inc
+++ b/usr.bin/ofed/libibverbs/Makefile.inc
@@ -7,3 +7,4 @@ BINDIR?= /usr/bin
CFLAGS+= -I${_spath}
LIBADD+= ibverbs mlx4 mlx5 cxgb4 pthread
+WARNS?= 2
diff --git a/usr.bin/ofed/librdmacm/Makefile.inc b/usr.bin/ofed/librdmacm/Makefile.inc
index d407c8ff9681b..05d4f33c9ab5e 100644
--- a/usr.bin/ofed/librdmacm/Makefile.inc
+++ b/usr.bin/ofed/librdmacm/Makefile.inc
@@ -6,3 +6,5 @@ _spath=${SRCTOP}/contrib/ofed/librdmacm
BINDIR?= /usr/bin
CFLAGS+= -I${SRCTOP}/contrib/ofed
LIBADD+= ibverbs rdmacm mlx4 mlx5 cxgb4 pthread
+
+WARNS?= 0
diff --git a/usr.bin/tar/tests/Makefile b/usr.bin/tar/tests/Makefile
index f537274021c50..d9ebfc2072ce0 100644
--- a/usr.bin/tar/tests/Makefile
+++ b/usr.bin/tar/tests/Makefile
@@ -2,6 +2,8 @@
PACKAGE= tests
+WARNS?= 3
+
_LIBARCHIVEDIR= ${SRCTOP}/contrib/libarchive
ATF_TESTS_SH+= functional_test
diff --git a/usr.sbin/Makefile.inc b/usr.sbin/Makefile.inc
index bd13613e1d933..4347591cf563a 100644
--- a/usr.sbin/Makefile.inc
+++ b/usr.sbin/Makefile.inc
@@ -2,5 +2,3 @@
# $FreeBSD$
BINDIR?= /usr/sbin
-
-WARNS?= 6
diff --git a/usr.sbin/wpa/Makefile.inc b/usr.sbin/wpa/Makefile.inc
index c2e216c4b6c46..0a69ca08166bf 100644
--- a/usr.sbin/wpa/Makefile.inc
+++ b/usr.sbin/wpa/Makefile.inc
@@ -2,6 +2,8 @@
BINDIR?= /usr/sbin
+WARNS?= 0
+
WPA_DISTDIR?= ${SRCTOP}/contrib/wpa/
WPA_SUPPLICANT_DISTDIR?=${WPA_DISTDIR}/wpa_supplicant
HOSTAPD_DISTDIR?= ${WPA_DISTDIR}/hostapd