From a3d86074ccf154f4439b0c5b7e8c12b1b29fd497 Mon Sep 17 00:00:00 2001 From: Michael Brown Date: Wed, 24 Sep 2014 16:07:04 +0100 Subject: [PATCH] [build] Use -malign-double to build 32-bit UEFI binaries The EDK2 codebase uses -malign-double for 32-bit builds, which causes 64-bit integers to be naturally aligned. This affects the layout of some structures (including EFI_BLOCK_IO_MEDIA). This mirrors wimboot commit 7b8f39d ("[build] Fix building of 32-bit UEFI version"). Signed-off-by: Michael Brown --- src/arch/i386/Makefile.efi | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/arch/i386/Makefile.efi b/src/arch/i386/Makefile.efi index 8d651b04..aa809eb5 100644 --- a/src/arch/i386/Makefile.efi +++ b/src/arch/i386/Makefile.efi @@ -4,6 +4,10 @@ # ELF2EFI = $(ELF2EFI32) +# Use EFI ABI +# +CFLAGS += -malign-double + # Include generic EFI Makefile # MAKEDEPS += arch/x86/Makefile.efi