[PATCH v3 5/5] RFC: treewide: Drop -fshort-char

Simon Glass sjg at chromium.org
Mon Aug 2 02:56:13 CEST 2021


Now that we use the 'u' prefix on unicode strings we don't need this
option. Drop it.

Note: This doesn't actually work and throws lots of warnings.

Signed-off-by: Simon Glass <sjg at chromium.org>
---

(no changes since v1)

 Makefile              | 2 +-
 arch/arm/config.mk    | 2 +-
 arch/x86/config.mk    | 2 +-
 arch/x86/cpu/Makefile | 2 +-
 arch/x86/lib/Makefile | 6 +++---
 lib/efi/Makefile      | 4 ++--
 6 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/Makefile b/Makefile
index 57c3e9a77df..accf9fd43ec 100644
--- a/Makefile
+++ b/Makefile
@@ -426,7 +426,7 @@ KBUILD_CPPFLAGS := -D__KERNEL__ -D__UBOOT__
 KBUILD_CFLAGS   := -Wall -Wstrict-prototypes \
 		   -Wno-format-security \
 		   -fno-builtin -ffreestanding $(CSTD_FLAG)
-KBUILD_CFLAGS	+= -fshort-wchar -fno-strict-aliasing
+KBUILD_CFLAGS	+= -fno-strict-aliasing
 KBUILD_AFLAGS   := -D__ASSEMBLY__
 KBUILD_LDFLAGS  :=
 
diff --git a/arch/arm/config.mk b/arch/arm/config.mk
index 16c63e12667..9c8996c47dd 100644
--- a/arch/arm/config.mk
+++ b/arch/arm/config.mk
@@ -13,7 +13,7 @@ endif
 
 CFLAGS_NON_EFI := -fno-pic -ffixed-r9 -ffunction-sections -fdata-sections \
 		  -fstack-protector-strong
-CFLAGS_EFI := -fpic -fshort-wchar
+CFLAGS_EFI := -fpic
 
 ifneq ($(CONFIG_LTO)$(CONFIG_USE_PRIVATE_LIBGCC),yy)
 LDFLAGS_FINAL += --gc-sections
diff --git a/arch/x86/config.mk b/arch/x86/config.mk
index 7a8242562db..feb9f114444 100644
--- a/arch/x86/config.mk
+++ b/arch/x86/config.mk
@@ -40,7 +40,7 @@ OBJCOPYFLAGS_EFI := -j .text -j .sdata -j .data -j .dynamic -j .dynsym \
 	-j .rel -j .rela -j .reloc
 
 # Compiler flags to be added when building UEFI applications
-CFLAGS_EFI := -fpic -fshort-wchar
+CFLAGS_EFI := -fpic
 # Compiler flags to be removed when building UEFI applications
 CFLAGS_NON_EFI := -mregparm=3 -fstack-protector-strong
 
diff --git a/arch/x86/cpu/Makefile b/arch/x86/cpu/Makefile
index 16e67e3da24..1b3e0012b55 100644
--- a/arch/x86/cpu/Makefile
+++ b/arch/x86/cpu/Makefile
@@ -34,7 +34,7 @@ endif
 ifndef CONFIG_$(SPL_)X86_64
 AFLAGS_REMOVE_call32.o := -mregparm=3 \
 	$(if $(CONFIG_EFI_STUB_64BIT),-march=i386 -m32)
-AFLAGS_call32.o := -fpic -fshort-wchar \
+AFLAGS_call32.o := -fpic \
 	$(if $(CONFIG_EFI_STUB_64BIT),-m64)
 
 extra-y += call32.o
diff --git a/arch/x86/lib/Makefile b/arch/x86/lib/Makefile
index 65d9b3bd6a3..1c88ff79cf5 100644
--- a/arch/x86/lib/Makefile
+++ b/arch/x86/lib/Makefile
@@ -71,14 +71,14 @@ endif
 ifneq ($(CONFIG_EFI_STUB),)
 
 CFLAGS_REMOVE_reloc_ia32_efi.o += -mregparm=3
-CFLAGS_reloc_ia32_efi.o += -fpic -fshort-wchar
+CFLAGS_reloc_ia32_efi.o += -fpic
 
 # When building for 64-bit we must remove the i386-specific flags
 CFLAGS_REMOVE_reloc_x86_64_efi.o += -mregparm=3 -march=i386 -m32
-CFLAGS_reloc_x86_64_efi.o += -fpic -fshort-wchar -m64
+CFLAGS_reloc_x86_64_efi.o += -fpic -m64
 
 AFLAGS_REMOVE_crt0_x86_64_efi.o += -mregparm=3 -march=i386 -m32
-AFLAGS_crt0_x86_64_efi.o += -fpic -fshort-wchar -m64
+AFLAGS_crt0_x86_64_efi.o += -fpic -m64
 
 extra-$(CONFIG_EFI_STUB_32BIT) += crt0_ia32_efi.o reloc_ia32_efi.o
 extra-$(CONFIG_EFI_STUB_64BIT) += crt0_x86_64_efi.o reloc_x86_64_efi.o
diff --git a/lib/efi/Makefile b/lib/efi/Makefile
index a790d2d554c..df642559849 100644
--- a/lib/efi/Makefile
+++ b/lib/efi/Makefile
@@ -7,11 +7,11 @@ obj-$(CONFIG_EFI_STUB) += efi_info.o
 
 CFLAGS_REMOVE_efi_stub.o := -mregparm=3 \
 	$(if $(CONFIG_EFI_STUB_64BIT),-march=i386 -m32)
-CFLAGS_efi_stub.o := -fpic -fshort-wchar \
+CFLAGS_efi_stub.o := -fpic \
 	$(if $(CONFIG_EFI_STUB_64BIT),-m64)
 CFLAGS_REMOVE_efi.o := -mregparm=3 \
 	$(if $(CONFIG_EFI_STUB_64BIT),-march=i386 -m32)
-CFLAGS_efi.o := -fpic -fshort-wchar \
+CFLAGS_efi.o := -fpic \
 	$(if $(CONFIG_EFI_STUB_64BIT),-m64)
 
 extra-$(CONFIG_EFI_STUB) += efi_stub.o efi.o
-- 
2.32.0.554.ge1b32706d8-goog



More information about the U-Boot mailing list