aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBernhard Rosenkraenzer <Bernhard.Rosenkranzer@linaro.org>2012-11-21 00:44:23 +0100
committerBernhard Rosenkränzer <Bernhard.Rosenkranzer@linaro.org>2013-02-04 14:45:56 +0100
commit6373f3e8e25a7e3029238c71943779b3ea27cec4 (patch)
treeefe4e622d61d16d6d6628b7390366dfbd89a96da
parent46bdaed25e3f705598aa36752debda67c9d5c09d (diff)
downloadbuild-6373f3e8e25a7e3029238c71943779b3ea27cec4.tar.gz
build: Add option to disable strict-aliasing optimizationslinaro-aosp-master
This is useful for builds that pull in unmodified AOSP repositories that can't be compiled with strict-aliasing compliance enabled Change-Id: I0599127b1e113c0799dd8fa92db00b989ebc9bd3 Signed-off-by: Bernhard Rosenkraenzer <Bernhard.Rosenkranzer@linaro.org>
-rw-r--r--core/combo/TARGET_linux-arm.mk7
-rw-r--r--core/combo/select.mk5
2 files changed, 12 insertions, 0 deletions
diff --git a/core/combo/TARGET_linux-arm.mk b/core/combo/TARGET_linux-arm.mk
index 093e0f066c..8a1e2c10a9 100644
--- a/core/combo/TARGET_linux-arm.mk
+++ b/core/combo/TARGET_linux-arm.mk
@@ -92,6 +92,13 @@ else
TARGET_thumb_CFLAGS := $(TARGET_arm_CFLAGS)
endif
+# Turn off strict-aliasing if we're building an AOSP variant without the
+# patchset...
+ifeq ($(DEBUG_NO_STRICT_ALIASING),yes)
+TARGET_arm_CFLAGS += -fno-strict-aliasing -Wno-error=strict-aliasing
+TARGET_thumb_CFLAGS += -fno-strict-aliasing -Wno-error=strict-aliasing
+endif
+
# Set FORCE_ARM_DEBUGGING to "true" in your buildspec.mk
# or in your environment to force a full arm build, even for
# files that are normally built as thumb; this can make
diff --git a/core/combo/select.mk b/core/combo/select.mk
index 0188a5557f..61ff93a5f3 100644
--- a/core/combo/select.mk
+++ b/core/combo/select.mk
@@ -53,6 +53,11 @@ $(combo_target)RELEASE_CFLAGS += -Werror=strict-aliasing
else
$(combo_target)RELEASE_CFLAGS += -Wno-error=strict-aliasing
endif
+# Turn off strict-aliasing if we're building an AOSP variant without the
+# patchset...
+ifeq ($(DEBUG_NO_STRICT_ALIASING),yes)
+$(combo_target)RELEASE_CFLAGS += -fno-strict-aliasing -Wno-error=strict-aliasing
+endif
$(combo_target)GLOBAL_LDFLAGS := -Wl,-O2
$(combo_target)GLOBAL_ARFLAGS := crsP