There is an updated pull request by ericonr against master on the void-packages repository https://github.com/ericonr/void-packages go-default-pie https://github.com/void-linux/void-packages/pull/20854 go: enable PIE builds for Go executables Fixed up version of #20450 Both Arch Linux and Alpine already implement this feature. Arch has a package called go-pie that's used for most of their PKGBUILDs, while the only version of Go on Alpine is one capable of producing PIE binaries. On Arch: https://www.archlinux.org/packages/community/x86_64/go-pie/ On Alpine: https://pkgs.alpinelinux.org/package/edge/community/x86_64/go The patch used here is actually adapted from the one used by Arch, and if adopted can allow us to remove the nostrip flag from the go build_style. I'm getting some weird build output, where it says loadinternal: cannot find runtime/cgo so I'm not completely certain that it's 100% complete. Building a program that uses cgo does work cleanly, so I'm not sure what it means. A patch file from https://github.com/void-linux/void-packages/pull/20854.patch is attached