From 9de6c45dd3019c7074dc34954e008633409b38df Mon Sep 17 00:00:00 2001 From: Michael Brown Date: Mon, 23 Jan 2023 01:26:46 +0000 Subject: [arm] Use -fno-short-enums for all 32-bit ARM builds 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 --- src/arch/arm32/Makefile | 5 +++++ src/arch/arm32/Makefile.efi | 4 ---- 2 files changed, 5 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/arch/arm32/Makefile b/src/arch/arm32/Makefile index 3a7c092..d32ab6a 100644 --- a/src/arch/arm32/Makefile +++ b/src/arch/arm32/Makefile @@ -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 diff --git a/src/arch/arm32/Makefile.efi b/src/arch/arm32/Makefile.efi index e139a05..a06354f 100644 --- a/src/arch/arm32/Makefile.efi +++ b/src/arch/arm32/Makefile.efi @@ -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) -- cgit v1.1