From 1a074874936d720b088dbaa7b4d75b6c45c17c85 Mon Sep 17 00:00:00 2001 From: Duane Sand Date: Sat, 8 Nov 2014 15:25:18 -0800 Subject: [PATCH] [MIPSR6] Adjust prebuilts/ndk libraries for mips32r6 Change-Id: Ice2d0f65eced4fb7dd209fb15610ba555dd45f2c --- core/binary.mk | 18 ++++++++++++------ core/combo/TARGET_linux-mips.mk | 2 +- core/combo/TARGET_linux-mips64.mk | 4 ++-- 3 files changed, 15 insertions(+), 9 deletions(-) diff --git a/core/binary.mk b/core/binary.mk index e6115b08d..d02084600 100644 --- a/core/binary.mk +++ b/core/binary.mk @@ -71,6 +71,8 @@ ifdef LOCAL_SDK_VERSION my_ndk_sysroot_include := $(my_ndk_sysroot)/usr/include ifeq (x86_64,$(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 else my_ndk_sysroot_lib := $(my_ndk_sysroot)/usr/lib endif @@ -88,6 +90,10 @@ ifdef LOCAL_SDK_VERSION my_ndk_stl_shared_lib := my_ndk_stl_static_lib := my_ndk_stl_cppflags := + my_cpu_variant := $(TARGET_$(LOCAL_2ND_ARCH_VAR_PREFIX)CPU_ABI) + ifeq (mips32r6,$(TARGET_$(LOCAL_2ND_ARCH_VAR_PREFIX)ARCH_VARIANT)) + my_cpu_variant := mips32r6 + endif LOCAL_NDK_STL_VARIANT := $(strip $(LOCAL_NDK_STL_VARIANT)) ifeq (,$(LOCAL_NDK_STL_VARIANT)) LOCAL_NDK_STL_VARIANT := system @@ -102,9 +108,9 @@ ifdef LOCAL_SDK_VERSION ifneq (,$(filter stlport_%, $(LOCAL_NDK_STL_VARIANT))) my_ndk_stl_include_path := $(my_ndk_source_root)/cxx-stl/stlport/stlport ifeq (stlport_static,$(LOCAL_NDK_STL_VARIANT)) - my_ndk_stl_static_lib := $(my_ndk_source_root)/cxx-stl/stlport/libs/$(TARGET_$(LOCAL_2ND_ARCH_VAR_PREFIX)CPU_ABI)/libstlport_static.a + my_ndk_stl_static_lib := $(my_ndk_source_root)/cxx-stl/stlport/libs/$(my_cpu_variant)/libstlport_static.a else - my_ndk_stl_shared_lib_fullpath := $(my_ndk_source_root)/cxx-stl/stlport/libs/$(TARGET_$(LOCAL_2ND_ARCH_VAR_PREFIX)CPU_ABI)/libstlport_shared.so + my_ndk_stl_shared_lib_fullpath := $(my_ndk_source_root)/cxx-stl/stlport/libs/$(my_cpu_variant)/libstlport_shared.so my_ndk_stl_shared_lib := -lstlport_shared endif else # LOCAL_NDK_STL_VARIANT is not stlport_* either @@ -113,17 +119,17 @@ ifdef LOCAL_SDK_VERSION $(my_ndk_source_root)/cxx-stl/llvm-libc++/gabi++/include \ $(my_ndk_source_root)/android/support/include ifeq (c++_static,$(LOCAL_NDK_STL_VARIANT)) - my_ndk_stl_static_lib := $(my_ndk_source_root)/cxx-stl/llvm-libc++/libs/$(TARGET_$(LOCAL_2ND_ARCH_VAR_PREFIX)CPU_ABI)/libc++_static.a + my_ndk_stl_static_lib := $(my_ndk_source_root)/cxx-stl/llvm-libc++/libs/$(my_cpu_variant)/libc++_static.a else - my_ndk_stl_shared_lib_fullpath := $(my_ndk_source_root)/cxx-stl/llvm-libc++/libs/$(TARGET_$(LOCAL_2ND_ARCH_VAR_PREFIX)CPU_ABI)/libc++_shared.so + my_ndk_stl_shared_lib_fullpath := $(my_ndk_source_root)/cxx-stl/llvm-libc++/libs/$(my_cpu_variant)/libc++_shared.so my_ndk_stl_shared_lib := -lc++_shared endif my_ndk_stl_cppflags := -std=c++11 else # LOCAL_NDK_STL_VARIANT is gnustl_static - my_ndk_stl_include_path := $(my_ndk_source_root)/cxx-stl/gnu-libstdc++/$($(LOCAL_2ND_ARCH_VAR_PREFIX)TARGET_NDK_GCC_VERSION)/libs/$(TARGET_$(LOCAL_2ND_ARCH_VAR_PREFIX)CPU_ABI)/include \ + my_ndk_stl_include_path := $(my_ndk_source_root)/cxx-stl/gnu-libstdc++/$($(LOCAL_2ND_ARCH_VAR_PREFIX)TARGET_NDK_GCC_VERSION)/libs/$(my_cpu_variant)/include \ $(my_ndk_source_root)/cxx-stl/gnu-libstdc++/$($(LOCAL_2ND_ARCH_VAR_PREFIX)TARGET_NDK_GCC_VERSION)/include - my_ndk_stl_static_lib := $(my_ndk_source_root)/cxx-stl/gnu-libstdc++/$($(LOCAL_2ND_ARCH_VAR_PREFIX)TARGET_NDK_GCC_VERSION)/libs/$(TARGET_$(LOCAL_2ND_ARCH_VAR_PREFIX)CPU_ABI)/libgnustl_static.a + my_ndk_stl_static_lib := $(my_ndk_source_root)/cxx-stl/gnu-libstdc++/$($(LOCAL_2ND_ARCH_VAR_PREFIX)TARGET_NDK_GCC_VERSION)/libs/$(my_cpu_variant)/libgnustl_static.a endif endif endif diff --git a/core/combo/TARGET_linux-mips.mk b/core/combo/TARGET_linux-mips.mk index e3b4827a7..489a3b5ca 100644 --- a/core/combo/TARGET_linux-mips.mk +++ b/core/combo/TARGET_linux-mips.mk @@ -35,7 +35,7 @@ TARGET_$(combo_2nd_arch_prefix)ARCH_VARIANT := mips32r2-fp endif # Decouple NDK library selection with platform compiler version -$(combo_2nd_arch_prefix)TARGET_NDK_GCC_VERSION := 4.8 +$(combo_2nd_arch_prefix)TARGET_NDK_GCC_VERSION := 4.9 ifeq ($(strip $(TARGET_GCC_VERSION_EXP)),) $(combo_2nd_arch_prefix)TARGET_GCC_VERSION := 4.9 diff --git a/core/combo/TARGET_linux-mips64.mk b/core/combo/TARGET_linux-mips64.mk index f3ba18c52..5c5610eae 100644 --- a/core/combo/TARGET_linux-mips64.mk +++ b/core/combo/TARGET_linux-mips64.mk @@ -18,7 +18,7 @@ # Included by combo/select.mk # You can set TARGET_ARCH_VARIANT to use an arch version other -# than mips64. Each value should correspond to a file named +# than mips64r6. Each value should correspond to a file named # $(BUILD_COMBOS)/arch/.mk which must contain # makefile variable definitions similar to the preprocessor # defines in build/core/combo/include/arch//AndroidConfig.h. Their @@ -35,7 +35,7 @@ TARGET_ARCH_VARIANT := mips64r6 endif # Decouple NDK library selection with platform compiler version -TARGET_NDK_GCC_VERSION := 4.8 +TARGET_NDK_GCC_VERSION := 4.9 ifeq ($(strip $(TARGET_GCC_VERSION_EXP)),) TARGET_GCC_VERSION := 4.9