From 3486f698a3c0b7edb521f27e851d7362f63a114c Mon Sep 17 00:00:00 2001 From: Stephen Hines Date: Wed, 30 Apr 2014 01:16:20 -0700 Subject: [PATCH] Disable linker warnings on MIPS builds to work around relocation issue. Bug: 14296739 Clang is emitting a text relocation for __gxx_personality_v0 on MIPS, and the linker is treating this as an error (converted from a warning initially). The warning appears harmless in this case, so the temporary solution is to disable it until the LLVM bug is fixed. Change-Id: I87dd41e7e2247d5b64ba8e2c5ad03db6716871de --- Android.mk | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/Android.mk b/Android.mk index 68050770d..b5198feff 100644 --- a/Android.mk +++ b/Android.mk @@ -17,8 +17,6 @@ # Don't build for unbundled branches ifeq (,$(TARGET_BUILD_APPS)) -# libcxx isn't working on mips yet -ifneq ($(TARGET_ARCH),$(filter $(TARGET_ARCH), mips mips64)) LOCAL_PATH := $(call my-dir) LIBCXX_SRC_FILES := \ @@ -65,6 +63,15 @@ LOCAL_CPPFLAGS := $(LIBCXX_CPPFLAGS) LOCAL_SYSTEM_SHARED_LIBRARIES := libc LOCAL_SHARED_LIBRARIES := libcxxabi +# Bug: 14296739 +# The MIPS target in LLVM is spuriously generating a text relocation for +# __gxx_personality_v0 in the .eh_frame section. This triggers a linker +# warning, since it is not considered PIC. Disable warnings as errors +# for this link step until we can get the bug fixed. +ifeq ($(TARGET_ARCH),$(filter $(TARGET_ARCH), mips mips64)) +LOCAL_LDFLAGS := -Wl,--no-fatal-warnings +endif + ifneq ($(TARGET_ARCH),arm) LOCAL_SHARED_LIBRARIES += libdl endif @@ -89,6 +96,5 @@ endif LOCAL_SHARED_LIBRARIES := libcxxabi include $(BUILD_HOST_SHARED_LIBRARY) -endif endif # TARGET_BUILD_APPS