On 2016/08/18 10:12, Stuart Henderson wrote: > As most readers know by now, ports requiring WX mappings must now > be annotated when the binaries are created. Because there are many > build systems in ports (sometimes even different ones within a > single port) this is an utter pain to setup, so for the jdk ports > I've used a wrapper installed to ${WRKDIR}/bin/ld that adds the > relevant flag. > > This factors out the wrapper so it can be generated by ports > infrastructure instead (by setting USE_WXNEEDED=Yes), and adds > it to the sqlports database so we can spot them more easily.
Updated manpage section after feedback from jasper@. Index: man5/bsd.port.mk.5 =================================================================== RCS file: /cvs/src/share/man/man5/bsd.port.mk.5,v retrieving revision 1.437 diff -u -p -r1.437 bsd.port.mk.5 --- man5/bsd.port.mk.5 1 Aug 2016 00:48:22 -0000 1.437 +++ man5/bsd.port.mk.5 18 Aug 2016 10:07:13 -0000 @@ -2922,6 +2922,14 @@ and not intended to be a user setting. See .Ev WRKOBJDIR_MFS for configuration. +.It Ev USE_WXNEEDED +If set to +.Sq Yes , +writes a wrapper script to ${WRKDIR}/bin/ld in +.Cm patch +to request that the linker adds an OPENBSD_WXNEEDED ELF section. +Use when a port requires memory mappings that are both executable +and writable and cannot be modified to avoid this. .It Ev USE_X11 Normally, presence of ${X11BASE} is enforced by default for building ports. But there is an experimental way to hook the xenocara build into