]> git.ipfire.org Git - thirdparty/u-boot.git/commitdiff
Xilinx: ARM: Stop GCC from generating unaligned accesses
authorJohn Linn <john.linn@xilinx.com>
Fri, 6 Jan 2012 03:19:42 +0000 (19:19 -0800)
committerJohn Linn <john.linn@xilinx.com>
Fri, 6 Jan 2012 03:19:42 +0000 (19:19 -0800)
With the newer GNU tools, GCC 4.5.2 and newer, we're
seeing data aborts. This solution may not be the right
long term solution, but works for now. This causes GCC
not to generate unaligned data.

config.mk

index eb95093f46465a8b984ce871d70218418615989a..01ee50c06392373bd05393c53fb37381fce94d19 100644 (file)
--- a/config.mk
+++ b/config.mk
@@ -189,6 +189,11 @@ else
 CFLAGS := $(CPPFLAGS) -Wall -Wstrict-prototypes
 endif
 
+# Xilinx, added to prevent unaligned accesses which started happening
+# with GCC 4.5.2 tools
+
+CFLAGS += -mno-unaligned-access
+
 CFLAGS += $(call cc-option,-fno-stack-protector)
 
 # $(CPPFLAGS) sets -g, which causes gcc to pass a suitable -g<format>