From 609526f97f2dbc0e52b7ff399aedec0a837832de Mon Sep 17 00:00:00 2001 From: Ying Wang Date: Mon, 27 Jan 2014 14:59:26 -0800 Subject: [PATCH] Use arch-specific LOCAL_ variables to build libm. Use arch-specific LOCAL_ variables to build libm for both TARGET_ARCH and TARGET_2ND_ARCH. Bug: 11654773 Change-Id: I6da794ba722bb68e7484d8869c6eb0425b7d17cb --- libm/Android.mk | 40 +++++++++++++++++++++------------------- 1 file changed, 21 insertions(+), 19 deletions(-) diff --git a/libm/Android.mk b/libm/Android.mk index ce98236d7..64a40e4fa 100644 --- a/libm/Android.mk +++ b/libm/Android.mk @@ -225,22 +225,6 @@ libm_common_cflags := \ libm_common_includes := $(LOCAL_PATH)/upstream-freebsd/lib/msun/src/ -libm_arm_includes := $(LOCAL_PATH)/arm -libm_arm_src_files := arm/fenv.c - -libm_arm64_includes := $(LOCAL_PATH)/arm64 -libm_arm64_src_files := arm64/fenv.c - -libm_x86_includes := $(LOCAL_PATH)/i386 $(LOCAL_PATH)/i387 -libm_x86_src_files := i387/fenv.c - -libm_x86_64_includes := $(LOCAL_PATH)/amd64 -libm_x86_64_src_files := amd64/fenv.c - -libm_mips_cflags := -fno-builtin-rintf -fno-builtin-rint -libm_mips_includes := $(LOCAL_PATH)/mips -libm_mips_src_files := mips/fenv.c - # # libm.a for target. # @@ -248,10 +232,28 @@ include $(CLEAR_VARS) LOCAL_MODULE:= libm LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk LOCAL_ARM_MODE := arm -LOCAL_CFLAGS := $(libm_common_cflags) $(libm_$(TARGET_ARCH)_cflags) -LOCAL_C_INCLUDES += $(libm_common_includes) $(libm_$(TARGET_ARCH)_includes) -LOCAL_SRC_FILES := $(libm_common_src_files) $(libm_$(TARGET_ARCH)_src_files) +LOCAL_CFLAGS := $(libm_common_cflags) +LOCAL_C_INCLUDES += $(libm_common_includes) +LOCAL_SRC_FILES := $(libm_common_src_files) LOCAL_SYSTEM_SHARED_LIBRARIES := libc + +# arch-specific settings +LOCAL_C_INCLUDES_arm := $(LOCAL_PATH)/arm +LOCAL_SRC_FILES_arm := arm/fenv.c + +LOCAL_C_INCLUDES_arm64 := $(LOCAL_PATH)/arm64 +LOCAL_SRC_FILES_arm64 := arm64/fenv.c + +LOCAL_C_INCLUDES_x86 := $(LOCAL_PATH)/i386 $(LOCAL_PATH)/i387 +LOCAL_SRC_FILES_x86 := i387/fenv.c + +LOCAL_C_INCLUDES_x86_64 := $(LOCAL_PATH)/amd64 +LOCAL_SRC_FILES_x86_64 := amd64/fenv.c + +LOCAL_CFLAGS_mips := -fno-builtin-rintf -fno-builtin-rint +LOCAL_C_INCLUDES_mips := $(LOCAL_PATH)/mips +LOCAL_SRC_FILES_mips := mips/fenv.c + include $(BUILD_STATIC_LIBRARY) #