From 1db45658ab9f993db8f992b23bac94cf580c925d Mon Sep 17 00:00:00 2001 From: John Linn Date: Thu, 5 Jan 2012 19:19:42 -0800 Subject: [PATCH] Xilinx: ARM: Stop GCC from generating unaligned accesses 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 | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/config.mk b/config.mk index eb95093f464..01ee50c0639 100644 --- 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 -- 2.47.3