On 14 June 2017 at 19:22, Ted Unangst <[email protected]> wrote: > Charles Collicutt wrote: > > That works, thank you. gcc-local(1) only mentions -nopie as an option for > > the linker, so I thought it ought to be passed with -Wl,... > > I think I would interpret that sentence to mean linker as in the gcc > invoked > to link stuff. gcc -c is the compiler, gcc is the linker... >
Fair enough. But evidently -nopie is also a valid (but undocumented?) option for ld(1). This came up because Go passes -Wl,-nopie to gcc if you run `go build` on OpenBSD. See: https://github.com/golang/go/blob/master/src/cmd/link/internal/ld/lib.go#L1092 From what you're saying, this sounds like a bug in Go. They should just be passing -nopie. Is that right? -- Charles
