Use lib64 for mips64 as well.
This was previously working because for some reason prebuilts/ndk had
a tangled mess of hand assembled symlinks that pointed lib -> lib64
for the multilib architectures.
Change-Id: I294d67f58f2008b1a53790cf676f5223df449cbc
diff --git a/core/binary.mk b/core/binary.mk
index ddc4a1b..fb2444c 100644
--- a/core/binary.mk
+++ b/core/binary.mk
@@ -75,7 +75,15 @@
my_ndk_source_root := $(HISTORICAL_NDK_VERSIONS_ROOT)/current/sources
my_ndk_sysroot := $(HISTORICAL_NDK_VERSIONS_ROOT)/current/platforms/android-$(LOCAL_SDK_VERSION)/arch-$(TARGET_$(LOCAL_2ND_ARCH_VAR_PREFIX)ARCH)
my_ndk_sysroot_include := $(my_ndk_sysroot)/usr/include
- ifeq (x86_64,$(TARGET_$(LOCAL_2ND_ARCH_VAR_PREFIX)ARCH))
+
+ # x86_64 and and mips64 are both multilib toolchains, so their libraries are
+ # installed in /usr/lib64. Aarch64, on the other hand, is not a multilib
+ # compiler, so its libraries are in /usr/lib.
+ #
+ # Mips32r6 is yet another variation, with libraries installed in libr6.
+ #
+ # For the rest, the libraries are installed simply to /usr/lib.
+ ifneq (,$(filter x86_64 mips64,$(TARGET_$(LOCAL_2ND_ARCH_VAR_PREFIX)ARCH)))
my_ndk_sysroot_lib := $(my_ndk_sysroot)/usr/lib64
else ifeq (mips32r6,$(TARGET_$(LOCAL_2ND_ARCH_VAR_PREFIX)ARCH_VARIANT))
my_ndk_sysroot_lib := $(my_ndk_sysroot)/usr/libr6