PERFORCE change 222403 for review

Brooks Davis brooks at FreeBSD.org
Tue Feb 26 20:36:25 UTC 2013


http://p4web.freebsd.org/@@222403?ac=10

Change 222403 by brooks at brooks_zenith on 2013/02/26 20:35:48

	Add a WITHOUT_FORMAT extensions option to diable the use of
	-fformat-extenions for compilers that don't support it.

Affected files ...

.. //depot/projects/ctsrd/tesla/src/share/man/man5/src.conf.5#2 edit
.. //depot/projects/ctsrd/tesla/src/share/mk/bsd.own.mk#4 edit
.. //depot/projects/ctsrd/tesla/src/sys/conf/kern.mk#2 edit
.. //depot/projects/ctsrd/tesla/src/tools/build/options/WITHOUT_FORMAT_EXTENSIONS#1 add

Differences ...

==== //depot/projects/ctsrd/tesla/src/share/man/man5/src.conf.5#2 (text) ====

@@ -1,7 +1,7 @@
 .\" DO NOT EDIT-- this file is automatically generated.
 .\" from FreeBSD: head/tools/build/options/makeman 236279 2012-05-30 02:37:20Z gjb
 .\" $FreeBSD: head/share/man/man5/src.conf.5 246838 2013-02-15 15:09:24Z des $
-.Dd February 15, 2013
+.Dd February 26, 2013
 .Dt SRC.CONF 5
 .Os
 .Sh NAME
@@ -433,6 +433,11 @@
 .\" from FreeBSD: head/tools/build/options/WITHOUT_FLOPPY 221540 2011-05-06 19:13:03Z ru
 Set to not build or install programs
 for operating floppy disk driver.
+.It Va WITHOUT_FORMAT_EXTENSIONS
+Set to not enable
+.Fl fformat-extensions
+when compiling the kernel.
+Also disables all format checking.
 .It Va WITHOUT_FORTH
 .\" from FreeBSD: head/tools/build/options/WITHOUT_FORTH 156932 2006-03-21 07:50:50Z ru
 Set to build bootloaders without Forth support.

==== //depot/projects/ctsrd/tesla/src/share/mk/bsd.own.mk#4 (text+ko) ====

@@ -271,6 +271,7 @@
     ED_CRYPTO \
     EXAMPLES \
     FLOPPY \
+    FORMAT_EXTENSIONS \
     FORTH \
     FP_LIBC \
     FREEBSD_UPDATE \

==== //depot/projects/ctsrd/tesla/src/sys/conf/kern.mk#2 (text+ko) ====

@@ -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} \
 		-Wmissing-include-dirs -fdiagnostics-show-option \
 		${CWARNEXTRA}
 #
@@ -29,7 +29,18 @@
 # 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-parentheses-equality \
+		-Wno-sizeof-pointer-memaccess \
+		-Wno-unused-command-line-argument \
+		${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_EXTENTIONS=	-fformat-extensions
 .endif
 
 #


More information about the p4-projects mailing list