Blame SOURCES/0018-Make.default-use-correct-flags-to-disable-unaligned-.patch

d1e1c8
From 7f080b30f3c3718d6b2533f62a50f373fd2cda21 Mon Sep 17 00:00:00 2001
d1e1c8
From: Peter Korsgaard <peter@korsgaard.com>
d1e1c8
Date: Thu, 10 Jan 2019 23:34:11 +0100
d1e1c8
Subject: [PATCH 18/62] Make.default: use correct flags to disable unaligned
d1e1c8
 access for 32 bit ARM
d1e1c8
MIME-Version: 1.0
d1e1c8
Content-Type: text/plain; charset=UTF-8
d1e1c8
Content-Transfer-Encoding: 8bit
d1e1c8
d1e1c8
The GCC flag to disable unaligned access on 32bit ARM is
d1e1c8
-mno-unaligned-access, not -mstrict-align (which is used on aarch64):
d1e1c8
d1e1c8
https://lkml.org/lkml/2018/8/3/294
d1e1c8
d1e1c8
Otherwise build dies with:
d1e1c8
arm-linux-gnueabihf-gcc: error: unrecognized command line option
d1e1c8
   ‘-mstrict-align’; did you mean ‘-Wstrict-aliasing’?
d1e1c8
d1e1c8
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
d1e1c8
Upstream-commit-id: 41b93358e8c
d1e1c8
---
d1e1c8
 Make.defaults | 2 +-
d1e1c8
 1 file changed, 1 insertion(+), 1 deletion(-)
d1e1c8
d1e1c8
diff --git a/Make.defaults b/Make.defaults
d1e1c8
index bbfc1d7f77b..09807bd8108 100644
d1e1c8
--- a/Make.defaults
d1e1c8
+++ b/Make.defaults
d1e1c8
@@ -72,7 +72,7 @@ ifeq ($(ARCH),aarch64)
d1e1c8
 	ARCH_CFLAGS		?=
d1e1c8
 endif
d1e1c8
 ifeq ($(ARCH),arm)
d1e1c8
-	ARCH_CFLAGS		?= -DMDE_CPU_ARM -DPAGE_SIZE=4096 -mstrict-align
d1e1c8
+	ARCH_CFLAGS		?= -DMDE_CPU_ARM -DPAGE_SIZE=4096 -mno-unaligned-access
d1e1c8
 	LIBDIR			?= $(prefix)/lib
d1e1c8
 	ARCH_SUFFIX		?= arm
d1e1c8
 	ARCH_SUFFIX_UPPER	?= ARM
d1e1c8
-- 
d1e1c8
2.26.2
d1e1c8