Page MenuHomeFreeBSD

D58984.diff
No OneTemporary

D58984.diff

diff --git a/sys/conf/kern.mk b/sys/conf/kern.mk
--- a/sys/conf/kern.mk
+++ b/sys/conf/kern.mk
@@ -348,6 +348,17 @@
CFLAGS+= -gdwarf-4
.endif
+#
+# Per-file opt-in to Clang's -fbounds-safety. BOUNDS_SAFETY_FILES is a list
+# of source basenames (e.g. tcp_ecn.c) to build with run-time bounds checking;
+# it needs a toolchain that supports the extension (Apple's LLVM fork). Empty
+# by default, in which case the annotations expand to nothing.
+#
+BOUNDS_SAFETY_FILES?=
+.for _file in ${BOUNDS_SAFETY_FILES}
+CFLAGS.${_file}+= -fbounds-safety
+.endfor
+
CFLAGS+= ${CWARNFLAGS:M*} ${CWARNFLAGS.${.IMPSRC:T}}
CFLAGS+= ${CWARNFLAGS.${COMPILER_TYPE}}
CFLAGS+= ${CFLAGS.${COMPILER_TYPE}} ${CFLAGS.${.IMPSRC:T}}

File Metadata

Mime Type
text/plain
Expires
Tue, Sep 1, 1:36 AM (9 h, 12 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
36991890
Default Alt Text
D58984.diff (717 B)

Event Timeline