]> git.ipfire.org Git - thirdparty/ipxe.git/commitdiff
[arm] Use -fno-short-enums for all 32-bit ARM builds
authorMichael Brown <mcb30@ipxe.org>
Mon, 23 Jan 2023 01:26:46 +0000 (01:26 +0000)
committerMichael Brown <mcb30@ipxe.org>
Mon, 23 Jan 2023 01:26:46 +0000 (01:26 +0000)
The EFI ABI requires the use of -fno-short-enums, and the EDK2 headers
will perform a compile-time check that enums are 32 bits.

The EDK2 headers may be included even in builds for non-EFI platforms,
and so the -fno-short-enums flag must be used in all 32-bit ARM
builds.  Fortunately, nothing else currently cares about enum sizes.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
src/arch/arm32/Makefile
src/arch/arm32/Makefile.efi

index 3a7c0923075dfe0fe8992fb43e2c875ee9c328fc..d32ab6a40a424f119468e8dea953db74ddd725df 100644 (file)
@@ -13,6 +13,11 @@ ASFLAGS              += -mthumb -mcpu=cortex-a15
 #
 CFLAGS         += -fshort-wchar
 
+# EFI requires that enums are always 32 bits, and nothing else
+# currently cares
+#
+CFLAGS         += -fno-short-enums
+
 # Include common ARM Makefile
 MAKEDEPS       += arch/arm/Makefile
 include arch/arm/Makefile
index e139a055a16c5b1a47437b059618f5849204a058..a06354f1d8fdd532d1085e79aa664369175accfa 100644 (file)
@@ -1,9 +1,5 @@
 # -*- makefile -*- : Force emacs to use Makefile mode
 
-# UEFI requires that enums are always 32 bits
-#
-CFLAGS         += -fno-short-enums
-
 # Specify EFI image builder
 #
 ELF2EFI                = $(ELF2EFI32)