aports/community/go/no-pic.patch
Nathan Johnson e78b23ebb2 community/go: update version to 1.6
Including patch to fix 386 build.
https://github.com/golang/go/issues/14476

Removed default-sc-getpw-r-size-max.patch, fixed upstream.
https://github.com/golang/go/issues/11319

Changed the offset for no-pic.patch to match new code.

TT: pkgrel set to 1 as the original pkgrel=0 failed to build
with x86 and was reverted.
2016-02-23 17:08:20 +00:00

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
@@ -1194,6 +1194,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 {