From e6bf4533c27d5d5a1ba041a11406248959073dd6 Mon Sep 17 00:00:00 2001 From: Vincent Palatin Date: Tue, 27 Nov 2012 14:09:41 -0800 Subject: 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 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 Reviewed-by: Vadim Bendebury Commit-Ready: Vincent Palatin --- core/cortex-m/build.mk | 1 + 1 file changed, 1 insertion(+) 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 -- cgit v1.2.1