summaryrefslogtreecommitdiffstats
path: root/libm
diff options
context:
space:
mode:
authorElliott Hughes <enh@google.com>2014-07-11 01:24:15 +0000
committerElliott Hughes <enh@google.com>2014-07-11 01:24:15 +0000
commit1e83245bae05d6a70ad31c3675310036fbb74219 (patch)
tree6d79ac1618f8415982041faf046378f8b684a12e /libm
parentaadc4b2ff03b12142f2c6163266ebdb1df2a6e76 (diff)
downloadbionic-1e83245bae05d6a70ad31c3675310036fbb74219.zip
bionic-1e83245bae05d6a70ad31c3675310036fbb74219.tar.gz
bionic-1e83245bae05d6a70ad31c3675310036fbb74219.tar.bz2
Revert "Switch libm to building with clang."
This reverts commit aadc4b2ff03b12142f2c6163266ebdb1df2a6e76. The patch broke x86. Change-Id: I0cda903732a685838bbd1877f94e1593a2a32acc
Diffstat (limited to 'libm')
-rw-r--r--libm/Android.mk19
-rw-r--r--libm/sincos.c5
2 files changed, 6 insertions, 18 deletions
diff --git a/libm/Android.mk b/libm/Android.mk
index d099dc2..994caa0 100644
--- a/libm/Android.mk
+++ b/libm/Android.mk
@@ -1,5 +1,5 @@
ifneq ($(TARGET_USE_PRIVATE_LIBM),true)
-LOCAL_PATH := $(call my-dir)
+LOCAL_PATH:= $(call my-dir)
# TODO: this comes from from upstream's libc, not libm, but it's an
# implementation detail that should have hidden visibility, so it needs
@@ -232,21 +232,14 @@ libm_ld_src_files += \
# TODO: re-enable i387/e_sqrtf.S for x86, and maybe others.
libm_common_cflags := \
- -Wall \
- -Wextra \
- -Wunused \
- -Werror=pointer-to-int-cast \
- -Werror=int-to-pointer-cast \
- -Werror=type-limits \
- -Werror \
-DFLT_EVAL_METHOD=0 \
- -std=gnu99 \
+ -std=c99 \
-include $(LOCAL_PATH)/freebsd-compat.h \
-Wno-missing-braces \
-Wno-parentheses \
-Wno-sign-compare \
-Wno-uninitialized \
- -Wno-unused-variable \
+ -Wno-unknown-pragmas \
-fvisibility=hidden \
# Workaround the GCC "(long)fn -> lfn" optimization bug which will result in
@@ -262,8 +255,7 @@ libm_ld_includes := $(LOCAL_PATH)/upstream-freebsd/lib/msun/ld128/
# libm.a for target.
#
include $(CLEAR_VARS)
-LOCAL_MODULE := libm
-LOCAL_CLANG := true
+LOCAL_MODULE:= libm
LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk
LOCAL_ARM_MODE := arm
LOCAL_CFLAGS := $(libm_common_cflags)
@@ -295,8 +287,7 @@ include $(BUILD_STATIC_LIBRARY)
# libm.so for target.
#
include $(CLEAR_VARS)
-LOCAL_MODULE := libm
-LOCAL_CLANG := true
+LOCAL_MODULE:= libm
LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk
LOCAL_SYSTEM_SHARED_LIBRARIES := libc
LOCAL_WHOLE_STATIC_LIBRARIES := libm
diff --git a/libm/sincos.c b/libm/sincos.c
index 6bd483a..ad75549 100644
--- a/libm/sincos.c
+++ b/libm/sincos.c
@@ -22,21 +22,18 @@
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
+ *
*/
-
#define _GNU_SOURCE 1
#include <math.h>
-#if !defined(__clang__)
// Disable sincos optimization for all functions in this file,
// otherwise gcc would generate infinite calls.
// Refer to gcc PR46926.
// -fno-builtin-sin or -fno-builtin-cos can disable sincos optimization,
// but these two options do not work inside optimize pragma in-file.
// Thus we just enforce -O0 when compiling this file.
-// clang doesn't implement this optimization anyway, so it doesn't need this.
#pragma GCC optimize ("O0")
-#endif
void sincos(double x, double* p_sin, double* p_cos) {
*p_sin = sin(x);