]> xenbits.xensource.com Git - people/royger/xen.git/commitdiff
xen/arm: set -mno-unaligned-access compiler option for Arm32
authorJuergen Gross <jgross@suse.com>
Mon, 11 Dec 2023 13:16:14 +0000 (14:16 +0100)
committerJulien Grall <jgrall@amazon.com>
Tue, 12 Dec 2023 11:41:49 +0000 (11:41 +0000)
As the hypervisor is disabling unaligned accesses for Arm32, set the
-mno-unaligned-access compiler option for building. This will prohibit
unaligned accesses when e.g. accessing 2- or 4-byte data items in
packed data structures.

Backport: 4.15+
Signed-off-by: Juergen Gross <jgross@suse.com>
Acked-by: Julien Grall <jgrall@amazon.com>
xen/arch/arm/arch.mk

index 58db76c4e172e869c830ac9a7a6db78eceb3b81f..022dcda19224c241b3c6969eff6a759dcc6da422 100644 (file)
@@ -7,6 +7,7 @@ $(call cc-option-add,CFLAGS,CC,-Wnested-externs)
 # Prevent floating-point variables from creeping into Xen.
 CFLAGS-$(CONFIG_ARM_32) += -msoft-float
 CFLAGS-$(CONFIG_ARM_32) += -mcpu=cortex-a15
+CFLAGS-$(CONFIG_ARM_32) += -mno-unaligned-access
 
 CFLAGS-$(CONFIG_ARM_64) += -mcpu=generic
 CFLAGS-$(CONFIG_ARM_64) += -mgeneral-regs-only # No fp registers etc