From 3dfd20aea49cf6ff75aa41e337ae8dd9817e6428 Mon Sep 17 00:00:00 2001 From: Duane Sand Date: Wed, 29 Apr 2015 16:20:51 -0700 Subject: [PATCH] [MIPS] Temporarily disable Mips shared-textrel errors Clang++ for Mips and Mips64 generates read-only exception unwind tables that trigger DT_TEXTREL warnings at link time. Until Clang is fixed, ignore those performance warnings instead of failing the build. With this patch, Mips clang++ can be (optionally) used when building libdeqp. NDK's Mips llvm has been using an alternate temporary fix, marking the .gcc_exception_table section as read-write for Mips only: https://android-review.googlesource.com/#/c/119660/ A permanent fix using a read-only exception table is pending upstream: http://reviews.llvm.org/D9669 Change-Id: Ie0cd7da398acbe45dbe39adc251e7fd5b5ca1445 --- core/clang/mips.mk | 5 +++++ core/clang/mips64.mk | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/core/clang/mips.mk b/core/clang/mips.mk index 08daf403a..70832a33d 100644 --- a/core/clang/mips.mk +++ b/core/clang/mips.mk @@ -14,6 +14,11 @@ CLANG_CONFIG_mips_UNKNOWN_CFLAGS := \ -msynci \ -mno-fused-madd +# Temporary workaround for Mips clang++ problem, creates +# relocated ptrs in read-only pic .gcc_exception_table; +# permanent fix pending at http://reviews.llvm.org/D9669 +CLANG_CONFIG_mips_UNKNOWN_CFLAGS += -Wl,--warn-shared-textrel + # We don't have any mips flags to substitute yet. define subst-clang-incompatible-mips-flags $(1) diff --git a/core/clang/mips64.mk b/core/clang/mips64.mk index 612175c56..ba9c1d14b 100644 --- a/core/clang/mips64.mk +++ b/core/clang/mips64.mk @@ -14,6 +14,11 @@ CLANG_CONFIG_mips64_UNKNOWN_CFLAGS := \ -msynci \ -mno-fused-madd +# Temporary workaround for Mips clang++ problem creating +# relocated ptrs in read-only pic .gcc_exception_table; +# permanent fix pending at http://reviews.llvm.org/D9669 +CLANG_CONFIG_mips64_UNKNOWN_CFLAGS += -Wl,--warn-shared-textrel + # We don't have any mips64 flags to substitute yet. define subst-clang-incompatible-mips64-flags $(1) -- 2.11.0