summaryrefslogtreecommitdiffstats
path: root/sys/boot/efi/libefi
diff options
context:
space:
mode:
authordim <dim@FreeBSD.org>2015-01-28 18:36:33 +0000
committerdim <dim@FreeBSD.org>2015-01-28 18:36:33 +0000
commit4f1c85d9f021b19c5891376b841185e53285508d (patch)
tree5c2eb21e60f14755f5af187db56f48df51e05f31 /sys/boot/efi/libefi
parent021a8716741b99922b09ba1f48d3fe7ce69e309f (diff)
downloadFreeBSD-src-4f1c85d9f021b19c5891376b841185e53285508d.zip
FreeBSD-src-4f1c85d9f021b19c5891376b841185e53285508d.tar.gz
Since clang 3.6.0 now implements the archetype 'freebsd_kprintf' for
__attribute__((format(...))), and the -fformat-extensions flag was removed, introduce a new macro in bsd.sys.mk to choose the right variant of compile flag for the used compiler, and use it. Also add something similar to kern.mk, since including bsd.sys.mk from that file will anger Warner. :-) Note that bsd.sys.mk does not support the MK_FORMAT_EXTENSIONS knob used in kern.mk, since that knob is only available in kern.opts.mk, not in src.opts.mk. We might want to add it later, to more easily support external compilers for building world (in particular, sys/boot).
Diffstat (limited to 'sys/boot/efi/libefi')
-rw-r--r--sys/boot/efi/libefi/Makefile5
1 files changed, 2 insertions, 3 deletions
diff --git a/sys/boot/efi/libefi/Makefile b/sys/boot/efi/libefi/Makefile
index 3edeb22..55abffc 100644
--- a/sys/boot/efi/libefi/Makefile
+++ b/sys/boot/efi/libefi/Makefile
@@ -20,8 +20,7 @@ CFLAGS+= -I${.CURDIR}/../../common
CFLAGS+= -DNO_PCI
-
-# Suppress warning from clang for FreeBSD %b and %D formats
-CFLAGS+= -fformat-extensions
+# Handle FreeBSD specific %b and %D printf format specifiers
+CFLAGS+= ${FORMAT_EXTENSIONS}
.include <bsd.lib.mk>
OpenPOWER on IntegriCloud