Commit 0eaabf64 authored by Joel Sing's avatar Joel Sing

cmd/ld: make hostobj work on newer openbsd

Make hostobj work on OpenBSD 5.3/5.4/-current - these have PIE
enabled by default and linking fails since the Go linker generates
objects that are neither PIC nor PIE.

Fixes #5067

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/7572049
parent efd1d050
......@@ -574,6 +574,8 @@ hostlink(void)
}
if(HEADTYPE == Hdarwin)
argv[argc++] = "-Wl,-no_pie,-pagezero_size,4000000";
if(HEADTYPE == Hopenbsd)
argv[argc++] = "-Wl,-nopie";
if(iself && AssumeGoldLinker)
argv[argc++] = "-Wl,--rosegment";
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment