(Previous commit was made prematurely before I could finish composing
the log message) Bring in the WARNS directive from NetBSD, localized in a new bsd.sys.mk to avoid polluting sys.mk. This directive controls the addition of compiler warning flags to CFLAGS in a relatively compiler-neutral manner. The idea is that WARNS can be set in Makefile.inc or in individual Makefiles as they become clean, to prevent the introduction of new warnings in the code (-Werror is added by default when WARNS > 0). This behaviour can be overridden with the following two knobs: NO_WARNS disables the checking of WARNS completely NO_WERROR disables the addition of -Werror to the flags. Additionally, setting WFORMAT to 1 (in makefiles) and/or defining FORMAT_AUDIT (by the user) will enable increased checking of format string arguments. Obtained from: NetBSD Reviewed by: peter
This commit is contained in:
parent
d510ecb42b
commit
46adf91a3b
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=76862