Skip to contentSkip to conversation

vim: _FORTIFY_SOURCE=2 be gone

PATCH Superseded Joe Slater 1 participant 1 message Jun 6, 2020

lore
Share & tools
lore

Joe Slater

author
#0 lore raw

PATCH v2 1/1 vim: _FORTIFY_SOURCE=2 be gone

vim will abort in many places with this setting. Replace it with the benign _FORTIFY_SOURCE=1.

---
 meta/recipes-support/vim/vim_8.2.bb | 5 +++++
 1 file changed, 5 insertions(+)
meta/recipes-support/vim/vim_8.2.bb +5 -0
index 60946a181f..709b6ddb55 100644
@@ -8,3 +8,8 @@ BBCLASSEXTEND = "native"
 ALTERNATIVE_${PN}_append = " xxd"
 ALTERNATIVE_TARGET[xxd] = "${bindir}/xxd"
 ALTERNATIVE_LINK_NAME[xxd] = "${bindir}/xxd"
+
+# We override the default in security_flags.inc because vim (not vim-tiny!) will abort
+# in many places for _FORTIFY_SOURCE=2.  Security flags become part of CC.
+#
+lcl_maybe_fortify = "${@oe.utils.conditional('DEBUG_BUILD','1','','-D_FORTIFY_SOURCE=1',d)}"
Signature · 1 line
2.17.1