aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBernhard Rosenkraenzer <Bernhard.Rosenkranzer@linaro.org>2011-10-21 15:50:29 +0159
committerBernhard Rosenkraenzer <Bernhard.Rosenkranzer@linaro.org>2011-10-21 15:50:29 +0159
commitb4aaeb65af0a5f469131eb9ac77659624d1525da (patch)
tree1f9fd51ea89c0afaf3c03ad28403d6ffd7449f06
parent33fbe12da508747e5a78c88e2256094f90a63205 (diff)
downloadfdlibm-linaro_android_2.3.7.tar.gz
fdlibm: Add workaround for building with older host compilerslinaro_android_2.3.7linaro_android_2.3.5
Compiling fdlibm with old versions of gcc results in a compile error because of legitimate code misdetected as an aliasing violation. As a workaround, we build the host version of fdlibm with -fno-strict-aliasing, given we don't officially release host compilers. Signed-off-by: Bernhard Rosenkraenzer <Bernhard.Rosenkranzer@linaro.org>
-rw-r--r--Android.mk8
1 files changed, 7 insertions, 1 deletions
diff --git a/Android.mk b/Android.mk
index 5b43196..41f7512 100644
--- a/Android.mk
+++ b/Android.mk
@@ -75,7 +75,13 @@ ifeq ($(WITH_HOST_DALVIK),true)
include $(CLEAR_VARS)
LOCAL_SRC_FILES:= $(src_files)
- LOCAL_CFLAGS := $(cflags)
+ # -fno-strict-aliasing is needed on older gcc versions, because
+ # they misdetect legitimate code as an aliasing violation.
+ # Since performance of host binaries isn't that vital and we
+ # don't officially release a host toolchain, adding
+ # -fno-strict-aliasing for the host build only is a reasonable
+ # workaround for the build failure w/ older host gccs.
+ LOCAL_CFLAGS := $(cflags) -fno-strict-aliasing
ifneq ($(filter $(HOST_ARCH),arm x86),)
# See similar section above.