From b823fd9ba56d56e3cbb5b05e7a4815fb0914204a Mon Sep 17 00:00:00 2001 From: Albert ARIBAUD Date: Tue, 9 Oct 2012 09:28:15 +0000 Subject: ARM: prevent misaligned array inits Under option -munaligned-access, gcc can perform local char or 16-bit array initializations using misaligned native accesses which will throw a data abort exception. Fix files where these array initializations were unneeded, and for files known to contain such initializations, enforce gcc option -mno-unaligned-access. Signed-off-by: Albert ARIBAUD [trini: Switch to usign call cc-option for -mno-unaligned-access as Albert had done previously as that's really correct] Signed-off-by: Tom Rini --- fs/ubifs/Makefile | 3 +++ 1 file changed, 3 insertions(+) (limited to 'fs/ubifs') diff --git a/fs/ubifs/Makefile b/fs/ubifs/Makefile index ccffe85ee1..bfe687406f 100644 --- a/fs/ubifs/Makefile +++ b/fs/ubifs/Makefile @@ -42,6 +42,9 @@ all: $(LIB) $(AOBJS) $(LIB): $(obj).depend $(OBJS) $(call cmd_link_o_target, $(OBJS)) +# SEE README.arm-unaligned-accesses +$(obj)super.o: CFLAGS += $(PLATFORM_NO_UNALIGNED) + ######################################################################### # defines $(obj).depend target -- cgit v1.2.1