mirror of
https://github.com/golang/go
synced 2024-11-26 04:17:59 -07:00
cmd/link/internal/ld,misc/cgo/testcshared: don't -fuse-ld=gold on Android
The NDK is switching to ldd, and will stop including the gold linker. Change-Id: If74168017c9874134b34010906ab1d94001528b6 Reviewed-on: https://go-review.googlesource.com/c/go/+/206840 TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
This commit is contained in:
parent
71c59ee6fc
commit
d3c2b1f176
@ -103,7 +103,7 @@ func testMain(m *testing.M) int {
|
|||||||
// TODO(crawshaw): can we do better?
|
// TODO(crawshaw): can we do better?
|
||||||
cc = append(cc, []string{"-framework", "CoreFoundation", "-framework", "Foundation"}...)
|
cc = append(cc, []string{"-framework", "CoreFoundation", "-framework", "Foundation"}...)
|
||||||
case "android":
|
case "android":
|
||||||
cc = append(cc, "-pie", "-fuse-ld=gold")
|
cc = append(cc, "-pie")
|
||||||
}
|
}
|
||||||
libgodir := GOOS + "_" + GOARCH
|
libgodir := GOOS + "_" + GOARCH
|
||||||
switch GOOS {
|
switch GOOS {
|
||||||
|
@ -1313,7 +1313,7 @@ func (ctxt *Link) hostlink() {
|
|||||||
// from the beginning of the section (like sym.STYPE).
|
// from the beginning of the section (like sym.STYPE).
|
||||||
argv = append(argv, "-Wl,-znocopyreloc")
|
argv = append(argv, "-Wl,-znocopyreloc")
|
||||||
|
|
||||||
if ctxt.Arch.InFamily(sys.ARM, sys.ARM64) && (objabi.GOOS == "linux" || objabi.GOOS == "android") {
|
if ctxt.Arch.InFamily(sys.ARM, sys.ARM64) && objabi.GOOS == "linux" {
|
||||||
// On ARM, the GNU linker will generate COPY relocations
|
// On ARM, the GNU linker will generate COPY relocations
|
||||||
// even with -znocopyreloc set.
|
// even with -znocopyreloc set.
|
||||||
// https://sourceware.org/bugzilla/show_bug.cgi?id=19962
|
// https://sourceware.org/bugzilla/show_bug.cgi?id=19962
|
||||||
|
Loading…
Reference in New Issue
Block a user