From mboxrd@z Thu Jan 1 00:00:00 1970 From: Gary Thomas Date: Thu, 12 Jul 2012 09:12:38 -0600 Subject: [U-Boot] [PATCH] arm: armv7: add compile option -mno-unaligned-access if available In-Reply-To: <4FF16CF2.9090808@kmckk.co.jp> References: <1338918451-10126-1-git-send-email-dev@lynxeye.de> <4FCE52FB.3020501@wwwdotorg.org> <1338923180.1377.2.camel@tellur> <20120622111501.21e1fdcc@aari01-12> <4FEA21F5.4080803@gmail.com> <4FEADD13.2040708@kmckk.co.jp> <4FF16CF2.9090808@kmckk.co.jp> Message-ID: <4FFEE966.4080609@mlbassoc.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On 2012-07-02 03:42, Tetsuyuki Kobayashi wrote: > 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 > --- > 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 5407cb6..560c084 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) > > # ========================================================================= > # > -- 1.7.9.5 Tested-by: Gary Thomas -- ------------------------------------------------------------ Gary Thomas | Consulting for the MLB Associates | Embedded world ------------------------------------------------------------