[PATCH] Makefile: Disable wchar size warnings also for arm EFI binaries

4 views
Skip to first unread message

Jan Kiszka

unread,
Sep 24, 2026, 12:37:05 PM (7 days ago) Sep 24
to EFI Boot Guard, Quirin Gylstorff
From: Jan Kiszka <jan.k...@siemens.com>

gnu-efi 4.0 no longer applies -fshort-wchar and uses a different type
than wchar_t for representing 16-bit UEFI strings. We may do that in the
future as well, but for now it is simpler to just ignore the harmless
type size mismatch warnings we will get now.

This is only needed for arm because only only there libefi is also
linked against libgcc (for math functions) from where it will get its
"wchar_t is long" tag. systemd takes the same approach for this.

Signed-off-by: Jan Kiszka <jan.k...@siemens.com>
---
Makefile.am | 4 ++++
1 file changed, 4 insertions(+)

diff --git a/Makefile.am b/Makefile.am
index 9025241..b8bfc48 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -306,6 +306,10 @@ efi_ldflags = \
-L $(GNUEFI_LIB_DIR) \
$(GNUEFI_LIB_DIR)/crt0-efi-$(ARCH).o

+if ARCH_ARM
+efi_ldflags += --no-wchar-size-warning
+endif
+
if ARCH_IS_X86
objcopy_format = --output-target=efi-app-$(ARCH)
else
--
2.47.3
Reply all
Reply to author
Forward
0 new messages