svn commit: r296144 - in stable/9: share/mk sys/conf tools/build/options
Bryan Drewery
bdrewery at FreeBSD.org
Sat Feb 27 20:51:44 UTC 2016
Author: bdrewery
Date: Sat Feb 27 20:51:42 2016
New Revision: 296144
URL: https://svnweb.freebsd.org/changeset/base/296144
Log:
MFC r250658,r250828:
r250658:
Add a new option WITHOUT_FORMAT_EXTENSIONS to disable flags related to
checking our kernel printf extensions. This is useful to allow compilers
without these extensions to build kernels.
r250828:
Spell extensions correctly.
Added:
stable/9/tools/build/options/WITHOUT_FORMAT_EXTENSIONS
- copied unchanged from r250658, head/tools/build/options/WITHOUT_FORMAT_EXTENSIONS
Modified:
stable/9/share/mk/bsd.own.mk
stable/9/sys/conf/kern.mk
Directory Properties:
stable/9/share/mk/ (props changed)
stable/9/sys/ (props changed)
stable/9/sys/conf/ (props changed)
stable/9/tools/build/options/ (props changed)
Modified: stable/9/share/mk/bsd.own.mk
==============================================================================
--- stable/9/share/mk/bsd.own.mk Sat Feb 27 20:45:07 2016 (r296143)
+++ stable/9/share/mk/bsd.own.mk Sat Feb 27 20:51:42 2016 (r296144)
@@ -367,6 +367,7 @@ __DEFAULT_YES_OPTIONS = \
FILE \
FINGER \
FLOPPY \
+ FORMAT_EXTENSIONS \
FORTH \
FP_LIBC \
FREEBSD_UPDATE \
Modified: stable/9/sys/conf/kern.mk
==============================================================================
--- stable/9/sys/conf/kern.mk Sat Feb 27 20:45:07 2016 (r296143)
+++ stable/9/sys/conf/kern.mk Sat Feb 27 20:51:42 2016 (r296144)
@@ -5,7 +5,7 @@
#
CWARNFLAGS?= -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes \
-Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual \
- -Wundef -Wno-pointer-sign -fformat-extensions \
+ -Wundef -Wno-pointer-sign ${FORMAT_EXTENSIONS} \
-Wmissing-include-dirs -fdiagnostics-show-option \
${CWARNEXTRA}
MK_CLANG_IS_CC ?= no
@@ -30,7 +30,16 @@ NO_WSOMETIMES_UNINITIALIZED= -Wno-error-
# enough to error out the whole kernel build. Display them anyway, so there is
# some incentive to fix them eventually.
CWARNEXTRA?= -Wno-error-tautological-compare -Wno-error-empty-body \
- -Wno-error-parentheses-equality -Wno-error-unused-function
+ -Wno-error-parentheses-equality -Wno-error-unused-function \
+ ${NO_WFORMAT}
+.endif
+
+# External compilers may not support our format extensions. Allow them
+# to be disabled. WARNING: format checking is disabled in this case.
+.if ${MK_FORMAT_EXTENSIONS} == "no"
+NO_WFORMAT= -Wno-format
+.else
+FORMAT_EXTENSIONS= -fformat-extensions
.endif
#
Copied: stable/9/tools/build/options/WITHOUT_FORMAT_EXTENSIONS (from r250658, head/tools/build/options/WITHOUT_FORMAT_EXTENSIONS)
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ stable/9/tools/build/options/WITHOUT_FORMAT_EXTENSIONS Sat Feb 27 20:51:42 2016 (r296144, copy of r250658, head/tools/build/options/WITHOUT_FORMAT_EXTENSIONS)
@@ -0,0 +1,5 @@
+.\" $FreeBSD$
+Set to not enable
+.Fl fformat-extensions
+when compiling the kernel.
+Also disables all format checking.
More information about the svn-src-stable-9
mailing list