Commit 23f56c18 authored by Elias Naur's avatar Elias Naur

misc/cgo/testcshared: use the gold linker on android/arm64

The gold linker is used by default in the Android NDK, except on
arm64:

https://github.com/android-ndk/ndk/issues/148

The Go linker already forces the use of the gold linker on arm and
arm64 (CL 22141) for other reasons. However, the test.bash script in
testcshared doesn't, resulting in linker errors on android/arm64:

warning: liblog.so, needed by ./libgo.so, not found (try using -rpath or
-rpath-link)

Add -fuse-ld=gold when running testcshared on Android. Fixes the
android/arm64 builder.

Change-Id: I35ca96f01f136bae72bec56d71b7ca3f344df1ed
Reviewed-on: https://go-review.googlesource.com/38832
Run-TryBot: Elias Naur <elias.naur@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: default avatarBrad Fitzpatrick <bradfitz@golang.org>
parent 592037f3
......@@ -98,7 +98,7 @@ fi
GOGCCFLAGS=$(go env GOGCCFLAGS)
if [ "$goos" = "android" ]; then
GOGCCFLAGS="${GOGCCFLAGS} -pie"
GOGCCFLAGS="${GOGCCFLAGS} -pie -fuse-ld=gold"
fi
status=0
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment