golang: Use external linking for target Go
authorJeffery To <redacted>
Sat, 3 Oct 2020 11:12:11 +0000 (19:12 +0800)
committerJeffery To <redacted>
Tue, 6 Oct 2020 08:28:08 +0000 (16:28 +0800)
commita95afd67df44efa803e4d3d134e4f8d4f70e7863
tree5df5a93475b6e143d222982afe63ede544424a09
parent93ee27edb8785514142633d41a973a8c5ca79e4c
golang: Use external linking for target Go

In Go 1.15, the linker now defaults to internal linking mode for
-buildmode=pie on amd64 and arm64[1], however this results in go tool
binaries with the wrong dynamic linker/interpreter.

External linking is still used when PIE is enabled for other platforms,
whereas internal linking is used when PIE is not enabled.

This changes target Go to always use external linking, to fix PIE
binaries for amd64/arm64 and for consistency.

[1]: https://golang.org/doc/go1.15#linker

Signed-off-by: Jeffery To <redacted>
lang/golang/golang/Makefile
git clone https://git.99rst.org/PROJECT