On 2013-05-15 15:04, Brooks Davis wrote:
Author: brooks
Date: Wed May 15 13:04:10 2013
New Revision: 250658
URL: http://svnweb.freebsd.org/changeset/base/250658

Log:
   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.

As I have written before, please let us consider this to be a band-aid,
and aim to remove non-standard printf specifiers from our kernel
sources.  Otherwise we will lose most of the advantages of format
checking... :-(


--- head/share/mk/bsd.own.mk    Wed May 15 08:38:49 2013        (r250657)
+++ head/share/mk/bsd.own.mk    Wed May 15 13:04:10 2013        (r250658)
@@ -268,6 +268,7 @@ __DEFAULT_YES_OPTIONS = \
      ED_CRYPTO \
      EXAMPLES \
      FLOPPY \
+    FORMAT_EXTENSIONS \

Spelled as 'extensions' here...

Modified: head/sys/conf/kern.mk
==============================================================================
--- head/sys/conf/kern.mk       Wed May 15 08:38:49 2013        (r250657)
+++ head/sys/conf/kern.mk       Wed May 15 13:04:10 2013        (r250658)
@@ -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_EXTENTIONS} \

...but as 'extentions' here...

+# 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_EXTENTIONS=     -fformat-extensions

and here.

-Dimitry
_______________________________________________
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to