mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-10-10 23:11:17 +02:00
17 lines
567 B
Diff
17 lines
567 B
Diff
diff --git a/src/cmd/link/internal/ld/lib.go b/src/cmd/link/internal/ld/lib.go
|
|
index 8ccbec9dd634..4e96bfadc260 100644
|
|
--- a/src/cmd/link/internal/ld/lib.go
|
|
+++ b/src/cmd/link/internal/ld/lib.go
|
|
@@ -1071,6 +1071,11 @@ func hostlink() {
|
|
argv = append(argv, peimporteddlls()...)
|
|
}
|
|
|
|
+ // The Go linker does not currently support building PIE
|
|
+ // executables when using the external linker. See:
|
|
+ // https://github.com/golang/go/issues/6940
|
|
+ argv = append(argv, "-fno-PIC")
|
|
+
|
|
if Debug['v'] != 0 {
|
|
fmt.Fprintf(&Bso, "host link:")
|
|
for _, v := range argv {
|