am 6fd3bcf6: am 6d99da04: Merge "Cleanup the libm makefile."
* commit '6fd3bcf6ce2290f4e44547fb875af4ac3c741130': Cleanup the libm makefile.
This commit is contained in:
commit
2cfbcb6364
134
libm/Android.mk
134
libm/Android.mk
@ -3,18 +3,19 @@ LOCAL_PATH:= $(call my-dir)
|
|||||||
|
|
||||||
bionic_coverage := false
|
bionic_coverage := false
|
||||||
|
|
||||||
# TODO: this comes from from upstream's libc, not libm, but it's an
|
ifneq (,$(filter $(TARGET_ARCH),x86 x86_64))
|
||||||
# implementation detail that should have hidden visibility, so it needs
|
# Clang has wrong long double sizes for x86.
|
||||||
# to be in whatever library the math code is in.
|
libm_clang := false
|
||||||
libm_common_src_files := \
|
endif
|
||||||
digittoint.c \
|
|
||||||
|
|
||||||
# TODO: this is not in the BSDs.
|
# -----------------------------------------------------------------------------
|
||||||
libm_common_src_files += \
|
# libm.a
|
||||||
significandl.c \
|
# -----------------------------------------------------------------------------
|
||||||
sincos.c \
|
include $(CLEAR_VARS)
|
||||||
|
|
||||||
libm_common_src_files += \
|
LOCAL_MODULE := libm
|
||||||
|
|
||||||
|
LOCAL_SRC_FILES := \
|
||||||
upstream-freebsd/lib/msun/bsdsrc/b_exp.c \
|
upstream-freebsd/lib/msun/bsdsrc/b_exp.c \
|
||||||
upstream-freebsd/lib/msun/bsdsrc/b_log.c \
|
upstream-freebsd/lib/msun/bsdsrc/b_log.c \
|
||||||
upstream-freebsd/lib/msun/bsdsrc/b_tgamma.c \
|
upstream-freebsd/lib/msun/bsdsrc/b_tgamma.c \
|
||||||
@ -186,11 +187,10 @@ libm_common_src_files += \
|
|||||||
upstream-freebsd/lib/msun/src/w_drem.c \
|
upstream-freebsd/lib/msun/src/w_drem.c \
|
||||||
upstream-freebsd/lib/msun/src/w_dremf.c \
|
upstream-freebsd/lib/msun/src/w_dremf.c \
|
||||||
|
|
||||||
libm_common_src_files += \
|
LOCAL_SRC_FILES_32 += \
|
||||||
fake_long_double.c \
|
fake_long_double.c \
|
||||||
signbit.c \
|
|
||||||
|
|
||||||
libm_ld128_src_files = \
|
LOCAL_SRC_FILES_64 := \
|
||||||
upstream-freebsd/lib/msun/src/e_acosl.c \
|
upstream-freebsd/lib/msun/src/e_acosl.c \
|
||||||
upstream-freebsd/lib/msun/src/e_acoshl.c \
|
upstream-freebsd/lib/msun/src/e_acoshl.c \
|
||||||
upstream-freebsd/lib/msun/src/e_asinl.c \
|
upstream-freebsd/lib/msun/src/e_asinl.c \
|
||||||
@ -234,7 +234,7 @@ libm_ld128_src_files = \
|
|||||||
upstream-freebsd/lib/msun/src/s_tanl.c \
|
upstream-freebsd/lib/msun/src/s_tanl.c \
|
||||||
upstream-freebsd/lib/msun/src/s_truncl.c \
|
upstream-freebsd/lib/msun/src/s_truncl.c \
|
||||||
|
|
||||||
libm_ld128_src_files += \
|
LOCAL_SRC_FILES_64 += \
|
||||||
upstream-freebsd/lib/msun/ld128/invtrig.c \
|
upstream-freebsd/lib/msun/ld128/invtrig.c \
|
||||||
upstream-freebsd/lib/msun/ld128/e_lgammal_r.c \
|
upstream-freebsd/lib/msun/ld128/e_lgammal_r.c \
|
||||||
upstream-freebsd/lib/msun/ld128/k_cosl.c \
|
upstream-freebsd/lib/msun/ld128/k_cosl.c \
|
||||||
@ -246,11 +246,46 @@ libm_ld128_src_files += \
|
|||||||
upstream-freebsd/lib/msun/ld128/s_logl.c \
|
upstream-freebsd/lib/msun/ld128/s_logl.c \
|
||||||
upstream-freebsd/lib/msun/ld128/s_nanl.c \
|
upstream-freebsd/lib/msun/ld128/s_nanl.c \
|
||||||
|
|
||||||
# TODO: re-enable i387/e_sqrtf.S for x86, and maybe others.
|
# TODO: this comes from from upstream's libc, not libm, but it's an
|
||||||
|
# implementation detail that should have hidden visibility, so it needs
|
||||||
|
# to be in whatever library the math code is in.
|
||||||
|
LOCAL_SRC_FILES += \
|
||||||
|
digittoint.c \
|
||||||
|
|
||||||
libm_common_cflags := \
|
# Functionality not in the BSDs.
|
||||||
|
LOCAL_SRC_FILES += \
|
||||||
|
significandl.c \
|
||||||
|
sincos.c \
|
||||||
|
|
||||||
|
# Modified versions of BSD code.
|
||||||
|
LOCAL_SRC_FILES += \
|
||||||
|
signbit.c \
|
||||||
|
|
||||||
|
LOCAL_SRC_FILES_arm += \
|
||||||
|
arm/fenv.c \
|
||||||
|
|
||||||
|
LOCAL_SRC_FILES_arm64 += \
|
||||||
|
arm64/fenv.c \
|
||||||
|
|
||||||
|
LOCAL_SRC_FILES_mips += \
|
||||||
|
mips/fenv.c \
|
||||||
|
|
||||||
|
LOCAL_SRC_FILES_x86 += \
|
||||||
|
i387/fenv.c \
|
||||||
|
|
||||||
|
LOCAL_SRC_FILES_x86_64 += \
|
||||||
|
amd64/fenv.c \
|
||||||
|
|
||||||
|
LOCAL_C_INCLUDES_x86 += $(LOCAL_PATH)/i387
|
||||||
|
|
||||||
|
LOCAL_C_INCLUDES += $(LOCAL_PATH)/upstream-freebsd/lib/msun/src/
|
||||||
|
LOCAL_C_INCLUDES_64 += $(LOCAL_PATH)/upstream-freebsd/lib/msun/ld128/
|
||||||
|
|
||||||
|
LOCAL_CLANG := $(libm_clang)
|
||||||
|
LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk
|
||||||
|
LOCAL_ARM_MODE := arm
|
||||||
|
LOCAL_CFLAGS := \
|
||||||
-DFLT_EVAL_METHOD=0 \
|
-DFLT_EVAL_METHOD=0 \
|
||||||
-std=c99 \
|
|
||||||
-include $(LOCAL_PATH)/freebsd-compat.h \
|
-include $(LOCAL_PATH)/freebsd-compat.h \
|
||||||
-Wno-missing-braces \
|
-Wno-missing-braces \
|
||||||
-Wno-parentheses \
|
-Wno-parentheses \
|
||||||
@ -262,61 +297,25 @@ libm_common_cflags := \
|
|||||||
# Workaround the GCC "(long)fn -> lfn" optimization bug which will result in
|
# Workaround the GCC "(long)fn -> lfn" optimization bug which will result in
|
||||||
# self recursions for lrint, lrintf, and lrintl.
|
# self recursions for lrint, lrintf, and lrintl.
|
||||||
# BUG: 14225968
|
# BUG: 14225968
|
||||||
libm_common_cflags += -fno-builtin-rint -fno-builtin-rintf -fno-builtin-rintl
|
LOCAL_CFLAGS += \
|
||||||
|
-fno-builtin-rint \
|
||||||
|
-fno-builtin-rintf \
|
||||||
|
-fno-builtin-rintl \
|
||||||
|
|
||||||
libm_common_includes := $(LOCAL_PATH)/upstream-freebsd/lib/msun/src/
|
LOCAL_CONLY_FLAGS := \
|
||||||
|
-std=c99 \
|
||||||
libm_ld_includes := $(LOCAL_PATH)/upstream-freebsd/lib/msun/ld128/
|
|
||||||
|
|
||||||
#
|
|
||||||
# libm.a for target.
|
|
||||||
#
|
|
||||||
include $(CLEAR_VARS)
|
|
||||||
ifneq (,$(filter $(TARGET_ARCH),x86 x86_64))
|
|
||||||
# Clang has wrong long double sizes for x86.
|
|
||||||
LOCAL_CLANG := false
|
|
||||||
endif
|
|
||||||
LOCAL_MODULE:= libm
|
|
||||||
LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk
|
|
||||||
LOCAL_ARM_MODE := arm
|
|
||||||
LOCAL_CFLAGS := $(libm_common_cflags)
|
|
||||||
LOCAL_C_INCLUDES += $(libm_common_includes)
|
|
||||||
LOCAL_SRC_FILES := $(libm_common_src_files)
|
|
||||||
LOCAL_SYSTEM_SHARED_LIBRARIES := libc
|
|
||||||
|
|
||||||
LOCAL_NATIVE_COVERAGE := $(bionic_coverage)
|
LOCAL_NATIVE_COVERAGE := $(bionic_coverage)
|
||||||
LOCAL_ADDRESS_SANITIZER := false
|
LOCAL_ADDRESS_SANITIZER := false
|
||||||
|
|
||||||
# arch-specific settings
|
|
||||||
LOCAL_C_INCLUDES_arm := $(LOCAL_PATH)/arm
|
|
||||||
LOCAL_SRC_FILES_arm := arm/fenv.c
|
|
||||||
|
|
||||||
LOCAL_C_INCLUDES_arm64 := $(libm_ld_includes)
|
|
||||||
LOCAL_SRC_FILES_arm64 := arm64/fenv.c $(libm_ld128_src_files)
|
|
||||||
|
|
||||||
LOCAL_C_INCLUDES_x86 := $(LOCAL_PATH)/i387
|
|
||||||
LOCAL_SRC_FILES_x86 := i387/fenv.c
|
|
||||||
|
|
||||||
LOCAL_C_INCLUDES_x86_64 := $(libm_ld_includes)
|
|
||||||
LOCAL_SRC_FILES_x86_64 := amd64/fenv.c $(libm_ld128_src_files)
|
|
||||||
|
|
||||||
LOCAL_SRC_FILES_mips := mips/fenv.c
|
|
||||||
|
|
||||||
LOCAL_C_INCLUDES_mips64 := $(libm_ld_includes)
|
|
||||||
LOCAL_SRC_FILES_mips64 := mips/fenv.c $(libm_ld128_src_files)
|
|
||||||
|
|
||||||
LOCAL_CXX_STL := none
|
|
||||||
include $(BUILD_STATIC_LIBRARY)
|
include $(BUILD_STATIC_LIBRARY)
|
||||||
|
|
||||||
#
|
# -----------------------------------------------------------------------------
|
||||||
# libm.so for target.
|
# libm.so
|
||||||
#
|
# -----------------------------------------------------------------------------
|
||||||
include $(CLEAR_VARS)
|
include $(CLEAR_VARS)
|
||||||
ifneq (,$(filter $(TARGET_ARCH),x86 x86_64))
|
|
||||||
# Clang has wrong long double sizes for x86.
|
LOCAL_MODULE := libm
|
||||||
LOCAL_CLANG := false
|
LOCAL_CLANG := $(libm_clang)
|
||||||
endif
|
|
||||||
LOCAL_MODULE:= libm
|
|
||||||
LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk
|
LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk
|
||||||
LOCAL_SYSTEM_SHARED_LIBRARIES := libc
|
LOCAL_SYSTEM_SHARED_LIBRARIES := libc
|
||||||
LOCAL_WHOLE_STATIC_LIBRARIES := libm
|
LOCAL_WHOLE_STATIC_LIBRARIES := libm
|
||||||
@ -329,8 +328,7 @@ LOCAL_CXX_STL := none
|
|||||||
# We'd really like to do this for all architectures, but since this wasn't done
|
# We'd really like to do this for all architectures, but since this wasn't done
|
||||||
# before, these symbols must continue to be exported on LP32 for binary
|
# before, these symbols must continue to be exported on LP32 for binary
|
||||||
# compatibility.
|
# compatibility.
|
||||||
LOCAL_LDFLAGS_arm64 := -Wl,--exclude-libs,libgcc.a
|
LOCAL_LDFLAGS_64 := -Wl,--exclude-libs,libgcc.a
|
||||||
LOCAL_LDFLAGS_mips64 := -Wl,--exclude-libs,libgcc.a
|
|
||||||
LOCAL_LDFLAGS_x86_64 := -Wl,--exclude-libs,libgcc.a
|
|
||||||
include $(BUILD_SHARED_LIBRARY)
|
include $(BUILD_SHARED_LIBRARY)
|
||||||
endif
|
endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user