Created attachment 227636 [details] patch to the go linker to add an ELF header to the binaries it produces to mark them as non-exutable these binaries fail to run on systems that have W^X enabled. A patch upstream has already been merged, but won't be released until 1.18 patch upstream: https://go-review.googlesource.com/c/go/+/346872/ discussion upstream: https://github.com/golang/go/issues/48112
Created attachment 227637 [details] patch to ports system that imports upstream patch
do we need to carry the same patch for go/lang-devel, or does that somehow work automatically?
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=4e2f244da530f5d8e50b727e2ad433330a57b072 commit 4e2f244da530f5d8e50b727e2ad433330a57b072 Author: Mina Galić <me@igalic.co> AuthorDate: 2021-09-03 13:20:14 +0000 Commit: Dmitri Goutnik <dmgk@FreeBSD.org> CommitDate: 2021-09-03 13:25:08 +0000 lang/go: mark stacks as non-executable on freebsd (CL346872 backport) PR: 258241 lang/go/Makefile | 6 +++++- lang/go/distinfo | 4 +++- 2 files changed, 8 insertions(+), 2 deletions(-)
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=04e401ec556d61dbad61bd63b6f530b550c787a0 commit 04e401ec556d61dbad61bd63b6f530b550c787a0 Author: Mina Galić <me@igalic.co> AuthorDate: 2021-09-03 13:23:43 +0000 Commit: Dmitri Goutnik <dmgk@FreeBSD.org> CommitDate: 2021-09-03 13:25:09 +0000 lang/go-devel: mark stacks as non-executable on freebsd PR: 258241 lang/go-devel/Makefile | 9 ++++++--- lang/go-devel/distinfo | 8 +++++--- 2 files changed, 11 insertions(+), 6 deletions(-)
Committed, thanks!