Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F160645636
D48426.id149130.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
813 B
Referenced Files
None
Subscribers
None
D48426.id149130.diff
View Options
diff --git a/share/mk/bsd.sys.mk b/share/mk/bsd.sys.mk
--- a/share/mk/bsd.sys.mk
+++ b/share/mk/bsd.sys.mk
@@ -304,12 +304,13 @@
FORTIFY_SOURCE?= 0
.if ${MK_SSP} != "no"
# Don't use -Wstack-protector as it breaks world with -Werror.
-SSP_CFLAGS?= -fstack-protector-strong
+SSP_CFLAGS?= -fstack-protector-strong -fstack-clash-protection
CFLAGS+= ${SSP_CFLAGS}
.endif # SSP
.if ${FORTIFY_SOURCE} > 0
-CFLAGS+= -D_FORTIFY_SOURCE=${FORTIFY_SOURCE}
-CXXFLAGS+= -D_FORTIFY_SOURCE=${FORTIFY_SOURCE}
+# Ideally we want -fstrict-flex-arrays=3, but even =2 shows issues.
+CFLAGS+= -D_FORTIFY_SOURCE=${FORTIFY_SOURCE} -fstrict-flex-arrays=1
+CXXFLAGS+= -D_FORTIFY_SOURCE=${FORTIFY_SOURCE} -D_GLIBCXX_ASSERTIONS -fstrict-flex-arrays=1
.endif
# Additional flags passed in CFLAGS and CXXFLAGS when MK_DEBUG_FILES is
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Jun 27, 11:08 AM (9 h, 36 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
34397900
Default Alt Text
D48426.id149130.diff (813 B)
Attached To
Mode
D48426: increase security/safety FORTIFY
Attached
Detach File
Event Timeline
Log In to Comment