summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta-fsl-arm/recipes-kernel/linux/linux-imx/no-unaligned-access.patch48
1 files changed, 35 insertions, 13 deletions
diff --git a/meta-fsl-arm/recipes-kernel/linux/linux-imx/no-unaligned-access.patch b/meta-fsl-arm/recipes-kernel/linux/linux-imx/no-unaligned-access.patch
index 3015b90fd..442d2731f 100644
--- a/meta-fsl-arm/recipes-kernel/linux/linux-imx/no-unaligned-access.patch
+++ b/meta-fsl-arm/recipes-kernel/linux/linux-imx/no-unaligned-access.patch
@@ -1,17 +1,39 @@
1diff --git a/Makefile b/Makefile 1diff --git a/Makefile b/Makefile
2index 554683d..7b4fe94 100644 2index 554683d..087e0c0 100644
3--- a/Makefile 3--- a/Makefile
4+++ b/Makefile 4+++ b/Makefile
5@@ -333,10 +333,10 @@ CHECK = sparse 5@@ -535,6 +535,9 @@ else
6 CHECKFLAGS := -D__linux__ -Dlinux -D__STDC__ -Dunix -D__unix__ \ 6 KBUILD_CFLAGS += -O2
7 -Wbitwise -Wno-return-void $(CF) 7 endif
8 MODFLAGS = -DMODULE
9-CFLAGS_MODULE = $(MODFLAGS)
10+CFLAGS_MODULE = $(MODFLAGS) -mno-unaligned-access
11 AFLAGS_MODULE = $(MODFLAGS)
12 LDFLAGS_MODULE = -T $(srctree)/scripts/module-common.lds
13-CFLAGS_KERNEL =
14+CFLAGS_KERNEL = -mno-unaligned-access
15 AFLAGS_KERNEL =
16 CFLAGS_GCOV = -fprofile-arcs -ftest-coverage
17 8
9+# conserve stack if available
10+KBUILD_CFLAGS += $(call cc-option,-fconserve-stack)
11+
12 include $(srctree)/arch/$(SRCARCH)/Makefile
13
14 ifneq ($(CONFIG_FRAME_WARN),0)
15@@ -579,9 +582,6 @@ KBUILD_CFLAGS += $(call cc-option,-Wno-pointer-sign,)
16 # disable invalid "can't wrap" optimizations for signed / pointers
17 KBUILD_CFLAGS += $(call cc-option,-fno-strict-overflow)
18
19-# conserve stack if available
20-KBUILD_CFLAGS += $(call cc-option,-fconserve-stack)
21-
22 # Add user supplied CPPFLAGS, AFLAGS and CFLAGS as the last assignments
23 # But warn user when we do so
24 warn-assign = \
25diff --git a/arch/arm/Makefile b/arch/arm/Makefile
26index 767874d..cdf3529 100644
27--- a/arch/arm/Makefile
28+++ b/arch/arm/Makefile
29@@ -93,6 +93,10 @@ ifeq ($(CONFIG_ARM_UNWIND),y)
30 CFLAGS_ABI +=-funwind-tables
31 endif
32
33+ifeq ($(CONFIG_ALIGMENT_TRAP),y)
34+CFLAGS_ABI +=$(call cc-option,-mno-unaligned-access,)
35+endif
36+
37 ifeq ($(CONFIG_THUMB2_KERNEL),y)
38 AFLAGS_AUTOIT :=$(call as-option,-Wa$(comma)-mimplicit-it=always,-Wa$(comma)-mauto-it)
39 AFLAGS_NOWARN :=$(call as-option,-Wa$(comma)-mno-warn-deprecated,-Wa$(comma)-W)