From 5eb497429ef065083d75ca0bbc61d421a17fcec1 Mon Sep 17 00:00:00 2001 From: Tetsuyuki Kobayashi Date: Sun, 1 Jul 2012 23:42:10 +0000 Subject: [PATCH] arm: armv7: add compile option -mno-unaligned-access if available Recent compiler generates unaligned memory access in armv7 default. But current U-Boot does not allow unaligned memory access, so it causes data abort exception. This patch add compile option "-mno-unaligned-access" if it is available. Signed-off-by: Tetsuyuki Kobayashi Tested-by: Gary Thomas --- arch/arm/cpu/armv7/config.mk | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/arm/cpu/armv7/config.mk b/arch/arm/cpu/armv7/config.mk index 5407cb68a8..560c084dc9 100644 --- a/arch/arm/cpu/armv7/config.mk +++ b/arch/arm/cpu/armv7/config.mk @@ -26,6 +26,8 @@ PLATFORM_RELFLAGS += -fno-common -ffixed-r8 -msoft-float # supported by more tool-chains PF_CPPFLAGS_ARMV7 := $(call cc-option, -march=armv7-a, -march=armv5) PLATFORM_CPPFLAGS += $(PF_CPPFLAGS_ARMV7) +PF_CPPFLAGS_NO_UNALIGNED := $(call cc-option, -mno-unaligned-access,) +PLATFORM_CPPFLAGS += $(PF_CPPFLAGS_NO_UNALIGNED) # ========================================================================= # -- 2.39.5