]> git.ipfire.org Git - thirdparty/ipxe.git/commitdiff
[build] Use -malign-double to build 32-bit UEFI binaries
authorMichael Brown <mcb30@ipxe.org>
Wed, 24 Sep 2014 15:07:04 +0000 (16:07 +0100)
committerMichael Brown <mcb30@ipxe.org>
Wed, 24 Sep 2014 15:08:09 +0000 (16:08 +0100)
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 <mcb30@ipxe.org>
src/arch/i386/Makefile.efi

index 8d651b04dc3963e29eba4e139582050533b5970e..aa809eb5df90ebe53dd8e2c51927034520e54087 100644 (file)
@@ -4,6 +4,10 @@
 #
 ELF2EFI                = $(ELF2EFI32)
 
+# Use EFI ABI
+#
+CFLAGS         += -malign-double
+
 # Include generic EFI Makefile
 #
 MAKEDEPS       += arch/x86/Makefile.efi