summaryrefslogtreecommitdiff
path: root/fs
diff options
context:
space:
mode:
authorAlbert ARIBAUD <albert.u.boot@aribaud.net>2012-10-09 09:28:15 +0000
committerTom Rini <trini@ti.com>2012-10-15 11:53:07 -0700
commitb823fd9ba56d56e3cbb5b05e7a4815fb0914204a (patch)
treeb93f7f8ba2874cd0478aee2f96718aedf4031ce7 /fs
parent6528ff0109d81c1f21d20f9f1370782bccf87bcb (diff)
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 <albert.u.boot@aribaud.net> [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 <trini@ti.com>
Diffstat (limited to 'fs')
-rw-r--r--fs/fat/Makefile2
-rw-r--r--fs/ubifs/Makefile3
2 files changed, 5 insertions, 0 deletions
diff --git a/fs/fat/Makefile b/fs/fat/Makefile
index 9635d36fcf9..02e6881670f 100644
--- a/fs/fat/Makefile
+++ b/fs/fat/Makefile
@@ -39,6 +39,8 @@ all: $(LIB) $(AOBJS)
$(LIB): $(obj).depend $(OBJS)
$(call cmd_link_o_target, $(OBJS))
+# SEE README.arm-unaligned-accesses
+$(obj)file.o: CFLAGS += $(PLATFORM_NO_UNALIGNED)
#########################################################################
diff --git a/fs/ubifs/Makefile b/fs/ubifs/Makefile
index ccffe85ee1f..bfe687406fd 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