]> Cypherpunks repositories - gostls13.git/commitdiff
misc/cgo/testcshared: use the gold linker on android/arm64
authorElias Naur <elias.naur@gmail.com>
Wed, 29 Mar 2017 23:23:20 +0000 (01:23 +0200)
committerElias Naur <elias.naur@gmail.com>
Wed, 29 Mar 2017 23:49:08 +0000 (23:49 +0000)
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: Brad Fitzpatrick <bradfitz@golang.org>
misc/cgo/testcshared/test.bash

index a0b9f786589f2a4c794e36914c7b3d2151344b17..4ff4db446c565318fd644db20e1ee700f8655f15 100755 (executable)
@@ -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