mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Ahmad Fatoum <ahmad@a3f.at>
To: barebox@lists.infradead.org
Cc: Ahmad Fatoum <ahmad@a3f.at>
Subject: [PATCH] kbuild: force 16-bit wchar_t treewide
Date: Tue,  5 Oct 2021 09:00:07 +0200	[thread overview]
Message-ID: <20211005070007.1675059-1-ahmad@a3f.at> (raw)

All current uses of wchar_t assume 16 bit code units. We enforce this
via -fshort-wchar on x86 and by typedefing in <linux/nls.h>.

Make wchar_t universally 16-bit to acknowledge this, a small step
towards ARM and RISC-V EFI support in barebox.

Signed-off-by: Ahmad Fatoum <ahmad@a3f.at>
---
 Makefile          | 2 +-
 arch/x86/Makefile | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/Makefile b/Makefile
index 74e4893f02c8..cc01e5656d7c 100644
--- a/Makefile
+++ b/Makefile
@@ -438,7 +438,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 fd871ca21419..532246647b63 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.33.0


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox


             reply	other threads:[~2021-10-05  7:02 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-05  7:00 Ahmad Fatoum [this message]
2021-10-05  7:08 ` Ahmad Fatoum

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20211005070007.1675059-1-ahmad@a3f.at \
    --to=ahmad@a3f.at \
    --cc=barebox@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox