aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBernhard Rosenkraenzer <Bernhard.Rosenkranzer@linaro.org>2012-08-22 15:24:48 +0200
committerBernhard Rosenkraenzer <Bernhard.Rosenkranzer@linaro.org>2012-10-10 15:54:29 +0200
commit1d7e76a81d723244f62c82512d2aa8ee2cdb8776 (patch)
tree57be0b88a50df5251bf3bee17930710af357538d
parente9bef997b7296e3d54268f05e422a8327d46f9b6 (diff)
downloadbuild-1d7e76a81d723244f62c82512d2aa8ee2cdb8776.tar.gz
build: Use -Wno-error=strict-aliasing for the HOST compiler
Since everyone uses his own host compiler, and there's still a lot of broken compilers that report false positives (gcc <= 4.5) around, use -Wno-error=strict-aliasing for the HOST compiler. If things are broken on the host side, we'll notice at build time anyway. Change-Id: I1a7db826866c4342d168c1efa7971a988d199d3a Signed-off-by: Bernhard Rosenkraenzer <Bernhard.Rosenkranzer@linaro.org>
-rw-r--r--core/combo/HOST_linux-x86.mk6
1 files changed, 6 insertions, 0 deletions
diff --git a/core/combo/HOST_linux-x86.mk b/core/combo/HOST_linux-x86.mk
index a4da5ce506..61b472abbf 100644
--- a/core/combo/HOST_linux-x86.mk
+++ b/core/combo/HOST_linux-x86.mk
@@ -56,6 +56,12 @@ HOST_GLOBAL_CFLAGS += -fPIC
HOST_GLOBAL_CFLAGS += \
-include $(call select-android-config-h,linux-x86)
+# This is a workaround for broken host compilers such as gcc <= 4.5
+# They report false positives with -Werror=strict-aliasing, causing
+# the build to fail.
+# gcc >= 4.6 host compilers are ok.
+HOST_GLOBAL_CFLAGS += -Wno-error=strict-aliasing
+
# Disable new longjmp in glibc 2.11 and later. See bug 2967937.
HOST_GLOBAL_CFLAGS += -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=0