From 45d42fdceaa60a51c0057222df5dace810ed13de Mon Sep 17 00:00:00 2001 From: Elias Naur Date: Sun, 7 May 2017 19:42:11 +0200 Subject: [PATCH] cmd/link/internal/ld: don't link with -no_pie on darwin/arm64 Ever since CL 33301 linking darwin/arm64 excutables has resulted in warnings like: ld: warning: -no_pie ignored for arm64 Remove -no_pie on darwin/arm64. Change-Id: I9f7685351fa8cce29795283e1a24fc7a6753d698 Reviewed-on: https://go-review.googlesource.com/42815 Run-TryBot: Elias Naur Reviewed-by: Brad Fitzpatrick TryBot-Result: Gobot Gobot --- src/cmd/link/internal/ld/lib.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cmd/link/internal/ld/lib.go b/src/cmd/link/internal/ld/lib.go index 43c7d73f9f..a7821ba32f 100644 --- a/src/cmd/link/internal/ld/lib.go +++ b/src/cmd/link/internal/ld/lib.go @@ -1050,7 +1050,7 @@ func (l *Link) hostlink() { argv = append(argv, "-Wl,-headerpad,1144") if l.DynlinkingGo() { argv = append(argv, "-Wl,-flat_namespace") - } else { + } else if !SysArch.InFamily(sys.ARM64) { argv = append(argv, "-Wl,-no_pie") } case objabi.Hopenbsd: