Merge "Workaround the GCC "(long)fn -> lfn" optimization bug."

This commit is contained in:
Ben Cheng 2014-05-29 23:33:04 +00:00 committed by Gerrit Code Review
commit fd9f07a2a2

View File

@ -241,6 +241,11 @@ libm_common_cflags := \
-Wno-unknown-pragmas \
-fvisibility=hidden \
# Workaround the GCC "(long)fn -> lfn" optimization bug which will result in
# self recursions for lrint, lrintf, and lrintl.
# BUG: 14225968
libm_common_cflags += -fno-builtin-rint -fno-builtin-rintf -fno-builtin-rintl
libm_common_includes := $(LOCAL_PATH)/upstream-freebsd/lib/msun/src/
libm_ld_includes := $(LOCAL_PATH)/upstream-freebsd/lib/msun/ld128/
@ -270,10 +275,8 @@ LOCAL_SRC_FILES_x86 := i387/fenv.c
LOCAL_C_INCLUDES_x86_64 := $(libm_ld_includes)
LOCAL_SRC_FILES_x86_64 := amd64/fenv.c $(libm_ld_src_files)
LOCAL_CFLAGS_mips := -fno-builtin-rintf -fno-builtin-rint
LOCAL_SRC_FILES_mips := mips/fenv.c
LOCAL_CFLAGS_mips64 := -fno-builtin-rintf -fno-builtin-rint
LOCAL_C_INCLUDES_mips64 := $(libm_ld_includes)
LOCAL_SRC_FILES_mips64 := mips/fenv.c $(libm_ld_src_files)