Hello,

Following up on a suggestion from tb@, here's a proposed addition to
bsd.port.mk to document the use of USE_NOBTCFI[-${MACHINE_ARCH}]. Text and
formatting mostly borrowed from the other USE_ sections so feedback welcome on
improvements (particularly placement of the ${MACHINE_ARCH}, I wasn't sure if
that warranted its own section a la SUBST_CMD-sub).

Thanks,
Lucas
diff /usr/src
commit - 2933f00289463a6d1923d1b9cc5e5c1c5c697ece
path + /usr/src
blob - 00ec6c3f81fcf03e2222a69eabe8de1741a6e562
file + share/man/man5/bsd.port.mk.5
--- share/man/man5/bsd.port.mk.5
+++ share/man/man5/bsd.port.mk.5
@@ -3613,6 +3613,17 @@ and not intended to be a user setting.
 See
 .Ev WRKOBJDIR_MFS
 for configuration.
+.It Ev USE_NOBTCFI
+If set to
+.Sq Yes,
+writes a wrapper script to ${WRKDIR}/bin/ld in
+.Cm patch
+to request that the linker adds an
+.Dv PT_OPENBSD_NOBTCFI
+ELF section.
+Use when a port requires no enforcement of indirect branch targets. Use
+.Ev USE_NOBTCFI-${MACHINE_ARCH}
+to apply to specific architectures instead of all architectures.
 .It Ev USE_NOEXECONLY
 If set to
 .Sq Yes ,

Reply via email to