Module Name: src
Committed By: riastradh
Date: Wed Aug 3 09:37:37 UTC 2022
Modified Files:
src/share/mk: bsd.kmodule.mk
src/sys/conf: Makefile.kern.inc
Log Message:
sys: Build kernel with -Wno-type-limits.
The type-limits warning is actively harmful because it discourages
writing safe portable overflow detection logic which happens, on some
architectures, to be dead code.
To generate a diff of this commit:
cvs rdiff -u -r1.79 -r1.80 src/share/mk/bsd.kmodule.mk
cvs rdiff -u -r1.293 -r1.294 src/sys/conf/Makefile.kern.inc
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/share/mk/bsd.kmodule.mk
diff -u src/share/mk/bsd.kmodule.mk:1.79 src/share/mk/bsd.kmodule.mk:1.80
--- src/share/mk/bsd.kmodule.mk:1.79 Sun Jul 17 14:10:55 2022
+++ src/share/mk/bsd.kmodule.mk Wed Aug 3 09:37:36 2022
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.kmodule.mk,v 1.79 2022/07/17 14:10:55 riastradh Exp $
+# $NetBSD: bsd.kmodule.mk,v 1.80 2022/08/03 09:37:36 riastradh Exp $
# We are not building this with PIE
MKPIE=no
@@ -36,6 +36,7 @@ CWARNFLAGS.clang+= -Wno-error=constant-c
# XXX until the kernel is fixed again...
CFLAGS+= -fno-strict-aliasing
CWARNFLAGS+= -Wno-pointer-sign -Wno-attributes
+CWARNFLAGS+= -Wno-type-limits
CWARNFLAGS.gcc+= ${GCC_NO_ADDR_OF_PACKED_MEMBER}
CWARNFLAGS.clang+= -Wno-error=address-of-packed-member
Index: src/sys/conf/Makefile.kern.inc
diff -u src/sys/conf/Makefile.kern.inc:1.293 src/sys/conf/Makefile.kern.inc:1.294
--- src/sys/conf/Makefile.kern.inc:1.293 Thu Jan 6 17:05:32 2022
+++ src/sys/conf/Makefile.kern.inc Wed Aug 3 09:37:37 2022
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.kern.inc,v 1.293 2022/01/06 17:05:32 christos Exp $
+# $NetBSD: Makefile.kern.inc,v 1.294 2022/08/03 09:37:37 riastradh Exp $
#
# This file contains common `MI' targets and definitions and it is included
# at the bottom of each `MD' ${MACHINE}/conf/Makefile.${MACHINE}.
@@ -82,6 +82,7 @@ CWARNFLAGS+= -Wcast-qual -Wwrite-strings
CWARNFLAGS+= -Wno-unreachable-code
#CWARNFLAGS+= -Wc++-compat -Wno-error=c++-compat
CWARNFLAGS+= -Wno-pointer-sign -Wno-attributes
+CWARNFLAGS+= -Wno-type-limits
. if ${MACHINE} == "i386" || ${MACHINE_ARCH} == "x86_64" || \
${MACHINE_ARCH} == "sparc64" || ${MACHINE} == "prep"
CWARNFLAGS+= -Wextra -Wno-unused-parameter