[PATCH 15/30] kbuild: force 16-bit wchar_t treewide
Ahmad Fatoum
a.fatoum at pengutronix.de
Mon Nov 22 00:47:17 PST 2021
-fshort-wchar ensures L"" expands to code units of 16-bit each. We
already enforce this on x86, but as a small step towards ARM and
RISC-V EFI support in barebox, enable it globally. We already treat
wchar_t as 16-bit everywhere where it's used (It's typedef'ed in
<linux/nls.h> and <linux/stddef.h>.
Signed-off-by: Ahmad Fatoum <a.fatoum at pengutronix.de>
---
Makefile | 2 +-
arch/x86/Makefile | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/Makefile b/Makefile
index 77edecd1f72f..2e4c60d55ab2 100644
--- a/Makefile
+++ b/Makefile
@@ -440,7 +440,7 @@ LINUXINCLUDE := -Iinclude -I$(srctree)/dts/include \
KBUILD_CPPFLAGS := -D__KERNEL__ -D__BAREBOX__ $(LINUXINCLUDE) -fno-builtin -ffreestanding
KBUILD_CFLAGS := -Wall -Wundef -Werror=strict-prototypes -Wno-trigraphs \
- -fno-strict-aliasing -fno-common \
+ -fno-strict-aliasing -fno-common -fshort-wchar \
-Werror=implicit-function-declaration -Werror=implicit-int \
-Os -pipe -Wmissing-prototypes -std=gnu89
KBUILD_AFLAGS := -D__ASSEMBLY__
diff --git a/arch/x86/Makefile b/arch/x86/Makefile
index 53cbd5088117..a0ce8c17f181 100644
--- a/arch/x86/Makefile
+++ b/arch/x86/Makefile
@@ -5,7 +5,7 @@ KBUILD_CPPFLAGS += -D__X86__
TEXT_BASE = $(CONFIG_TEXT_BASE)
machine-y := efi
-KBUILD_CFLAGS += -fpic -fshort-wchar -mno-sse -mno-mmx
+KBUILD_CFLAGS += -fpic -mno-sse -mno-mmx
ifeq ($(CONFIG_X86_32),y)
TARGET = efi-app-ia32
else
--
2.30.2
More information about the barebox
mailing list