aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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.