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-12-01 01:12:41 +0100
commita7c3f502dc1f8f2babee855317fbc9589cb6324d (patch)
tree66d2cdaea83c858b6e0d7300efeda024034b3f3d
parentca0ced6e14891156e4823a45ab6023d9106b42bf (diff)
downloadbuild-a7c3f502dc1f8f2babee855317fbc9589cb6324d.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 28c8f8ccf5..4b0307a878 100644
--- a/core/combo/HOST_linux-x86.mk
+++ b/core/combo/HOST_linux-x86.mk
@@ -60,6 +60,12 @@ endif # BUILD_HOST_static
HOST_GLOBAL_CFLAGS += -fPIC \
-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