]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
arm: armv7: add compile option -mno-unaligned-access if available
authorTetsuyuki Kobayashi <koba@kmckk.co.jp>
Sun, 1 Jul 2012 23:42:10 +0000 (23:42 +0000)
committerAlbert ARIBAUD <albert.u.boot@aribaud.net>
Fri, 20 Jul 2012 12:24:08 +0000 (14:24 +0200)
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 <koba@kmckk.co.jp>
Tested-by: Gary Thomas <gary@mlbassoc.com>
arch/arm/cpu/armv7/config.mk

index 5407cb68a89c29f001ac58e51ee024cbde128dcf..560c084dc96b54bb5f3dade758d2513c4b030894 100644 (file)
@@ -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)
 
 # =========================================================================
 #