From 4de6fa4069407607813dfdd1993114c79194d337 Mon Sep 17 00:00:00 2001 From: Ben Cheng Date: Thu, 10 Apr 2014 22:46:26 -0700 Subject: [PATCH] Decouple platform compiler and NDK library versioning. TARGET_GCC_VERSION: select compiler from prebuilts/gcc/... TARGET_NDK_GCC_VERSION: select libraries from prebuilts/ndk/... Change-Id: I4422a42cdc97aa92b40798014cba82c3c123bbd2 --- core/binary.mk | 6 +++--- core/combo/TARGET_linux-arm.mk | 3 +++ core/combo/TARGET_linux-arm64.mk | 3 +++ core/combo/TARGET_linux-mips.mk | 3 +++ core/combo/TARGET_linux-mips64.mk | 3 +++ core/combo/TARGET_linux-x86.mk | 3 +++ core/combo/TARGET_linux-x86_64.mk | 3 +++ 7 files changed, 21 insertions(+), 3 deletions(-) diff --git a/core/binary.mk b/core/binary.mk index cc8de4638a..13659f598d 100644 --- a/core/binary.mk +++ b/core/binary.mk @@ -60,9 +60,9 @@ ifdef LOCAL_SDK_VERSION 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_GCC_VERSION)/libs/$(TARGET_$(LOCAL_2ND_ARCH_VAR_PREFIX)CPU_ABI)/include \ - $(my_ndk_source_root)/cxx-stl/gnu-libstdc++/$($(LOCAL_2ND_ARCH_VAR_PREFIX)TARGET_GCC_VERSION)/include - my_ndk_stl_static_lib := $(my_ndk_source_root)/cxx-stl/gnu-libstdc++/$($(LOCAL_2ND_ARCH_VAR_PREFIX)TARGET_GCC_VERSION)/libs/$(TARGET_$(LOCAL_2ND_ARCH_VAR_PREFIX)CPU_ABI)/libgnustl_static.a + 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_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 endif endif endif diff --git a/core/combo/TARGET_linux-arm.mk b/core/combo/TARGET_linux-arm.mk index 5cb99b4183..f698ef5cec 100644 --- a/core/combo/TARGET_linux-arm.mk +++ b/core/combo/TARGET_linux-arm.mk @@ -34,6 +34,9 @@ ifeq ($(strip $(TARGET_$(combo_2nd_arch_prefix)ARCH_VARIANT)),) TARGET_$(combo_2nd_arch_prefix)ARCH_VARIANT := armv5te endif +# Decouple NDK library selection with platform compiler version +$(combo_2nd_arch_prefix)TARGET_NDK_GCC_VERSION := 4.8 + ifeq ($(strip $(TARGET_GCC_VERSION_EXP)),) $(combo_2nd_arch_prefix)TARGET_GCC_VERSION := 4.8 else diff --git a/core/combo/TARGET_linux-arm64.mk b/core/combo/TARGET_linux-arm64.mk index 08603b8a0f..e894f6d9b3 100644 --- a/core/combo/TARGET_linux-arm64.mk +++ b/core/combo/TARGET_linux-arm64.mk @@ -34,6 +34,9 @@ ifeq ($(strip $(TARGET_ARCH_VARIANT)),) TARGET_ARCH_VARIANT := armv8 endif +# Decouple NDK library selection with platform compiler version +TARGET_NDK_GCC_VERSION := 4.8 + ifeq ($(strip $(TARGET_GCC_VERSION_EXP)),) TARGET_GCC_VERSION := 4.8 else diff --git a/core/combo/TARGET_linux-mips.mk b/core/combo/TARGET_linux-mips.mk index 68300e1af8..27304eebcb 100644 --- a/core/combo/TARGET_linux-mips.mk +++ b/core/combo/TARGET_linux-mips.mk @@ -34,6 +34,9 @@ ifeq ($(strip $(TARGET_$(combo_2nd_arch_prefix)ARCH_VARIANT)),) 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 + ifeq ($(strip $(TARGET_GCC_VERSION_EXP)),) $(combo_2nd_arch_prefix)TARGET_GCC_VERSION := 4.8 else diff --git a/core/combo/TARGET_linux-mips64.mk b/core/combo/TARGET_linux-mips64.mk index 118582b480..36b70ada34 100644 --- a/core/combo/TARGET_linux-mips64.mk +++ b/core/combo/TARGET_linux-mips64.mk @@ -34,6 +34,9 @@ ifeq ($(strip $(TARGET_ARCH_VARIANT)),) TARGET_ARCH_VARIANT := mips64r2 endif +# Decouple NDK library selection with platform compiler version +TARGET_NDK_GCC_VERSION := 4.8 + ifeq ($(strip $(TARGET_GCC_VERSION_EXP)),) TARGET_GCC_VERSION := 4.8 else diff --git a/core/combo/TARGET_linux-x86.mk b/core/combo/TARGET_linux-x86.mk index 80df1a474c..1361be2960 100644 --- a/core/combo/TARGET_linux-x86.mk +++ b/core/combo/TARGET_linux-x86.mk @@ -22,6 +22,9 @@ ifeq ($(strip $(TARGET_$(combo_2nd_arch_prefix)ARCH_VARIANT)),) TARGET_$(combo_2nd_arch_prefix)ARCH_VARIANT := x86 endif +# Decouple NDK library selection with platform compiler version +$(combo_2nd_arch_prefix)TARGET_NDK_GCC_VERSION := 4.8 + ifeq ($(strip $(TARGET_GCC_VERSION_EXP)),) $(combo_2nd_arch_prefix)TARGET_GCC_VERSION := 4.8 else diff --git a/core/combo/TARGET_linux-x86_64.mk b/core/combo/TARGET_linux-x86_64.mk index fb9bacf7c0..2e06263d25 100644 --- a/core/combo/TARGET_linux-x86_64.mk +++ b/core/combo/TARGET_linux-x86_64.mk @@ -22,6 +22,9 @@ ifeq ($(strip $(TARGET_ARCH_VARIANT)),) TARGET_ARCH_VARIANT := x86_64 endif +# Decouple NDK library selection with platform compiler version +TARGET_NDK_GCC_VERSION := 4.8 + ifeq ($(strip $(TARGET_GCC_VERSION_EXP)),) TARGET_GCC_VERSION := 4.8 else