Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F169131655
D58984.id184351.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
717 B
Referenced Files
None
Subscribers
None
D58984.id184351.diff
View Options
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
Details
Attached
Mime Type
text/plain
Expires
Tue, Sep 1, 1:03 PM (19 h, 27 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
36991890
Default Alt Text
D58984.id184351.diff (717 B)
Attached To
Mode
D58984: kern.mk: add per-file bounds-safety build knob
Attached
Detach File
Event Timeline
Log In to Comment