summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVincent Palatin <vpalatin@chromium.org>2012-11-27 14:09:41 -0800
committerGerrit <chrome-bot@google.com>2012-11-27 15:55:15 -0800
commite6bf4533c27d5d5a1ba041a11406248959073dd6 (patch)
treeb7c3aac8e45252773ef2b0d0f9bf92cafeb7dbdd
parente2f84669979f63df4a11d78caee9abf3e9b1724a (diff)
downloadchrome-ec-e6bf4533c27d5d5a1ba041a11406248959073dd6.tar.gz
Prevent GCC4.7 from generating unaligned memory accesses
The behavior of GCC seems to have changed between 4.6 and 4.7, now it might generate unaligned memory accesses, so we need to explicitly set "-mno-unaligned-access". Signed-off-by: Vincent Palatin <vpalatin@chromium.org> BRANCH=none BUG=chrome-os-partner:16391 TEST=make BOARD=link dis, then check the generated assembly for keyboard_scan_init Change-Id: I326479a77d6319f1d74e17efe483f5cde56ff325 Reviewed-on: https://gerrit.chromium.org/gerrit/38758 Tested-by: Vincent Palatin <vpalatin@chromium.org> Reviewed-by: Vadim Bendebury <vbendeb@chromium.org> Commit-Ready: Vincent Palatin <vpalatin@chromium.org>
-rw-r--r--core/cortex-m/build.mk1
1 files changed, 1 insertions, 0 deletions
diff --git a/core/cortex-m/build.mk b/core/cortex-m/build.mk
index ec1ba424a8..5a7877bd02 100644
--- a/core/cortex-m/build.mk
+++ b/core/cortex-m/build.mk
@@ -11,6 +11,7 @@ CFLAGS_FPU-$(CONFIG_FPU)=-mfpu=fpv4-sp-d16 -mfloat-abi=hard
# CPU specific compilation flags
CFLAGS_CPU=-mcpu=cortex-m4 -mthumb -Os -mno-sched-prolog
+CFLAGS_CPU+=-mno-unaligned-access
CFLAGS_CPU+=$(CFLAGS_FPU-y)
core-y=cpu.o init.o panic.o switch.o task.o timer.o