mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Ahmad Fatoum <a.fatoum@pengutronix.de>
To: barebox@lists.infradead.org
Cc: David Dgien <dgienda125@gmail.com>,
	Ahmad Fatoum <a.fatoum@pengutronix.de>
Subject: [PATCH 3/3] kbuild: compile *.mod.c files with -fshort-wchar
Date: Fri, 28 Mar 2025 09:35:49 +0100	[thread overview]
Message-ID: <20250328083549.514506-3-a.fatoum@pengutronix.de> (raw)
In-Reply-To: <20250328083549.514506-1-a.fatoum@pengutronix.de>

We use wchar_t in USB and EFI code, both of which expect 2-byte wide
strings. Thus, like Linux, we set -fshort-wchar in KBUILD_CFLAGS.

This flag is not passed through to the build of *.mod.c files that are
generated in a module build, leading to a linker warning.

Add it to fix this.

Cc: David Dgien <dgienda125@gmail.com>
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
 Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Makefile b/Makefile
index 5c9fce83123c..4ee9780abeac 100644
--- a/Makefile
+++ b/Makefile
@@ -459,7 +459,7 @@ XZ		= xz
 CHECKFLAGS     := -D__linux__ -Dlinux -D__STDC__ -Dunix -D__unix__ -Wbitwise $(CF)
 CFLAGS_KERNEL	=
 AFLAGS_KERNEL	=
-CFLAGS_MODULE	=
+CFLAGS_MODULE	= -fshort-wchar
 AFLAGS_MODULE	=
 
 LDFLAGS_MODULE  = -T common/module.lds
-- 
2.39.5




  parent reply	other threads:[~2025-03-28  8:36 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-28  8:35 [PATCH 1/3] i2c: muxes: pca954x: switch to device_get_match_data Ahmad Fatoum
2025-03-28  8:35 ` [PATCH 2/3] treewide: export symbols needed for i2c-mux-pca954x.ko Ahmad Fatoum
2025-03-28 16:54   ` David Dgien
2025-03-28  8:35 ` Ahmad Fatoum [this message]
2025-03-31  7:05 ` [PATCH 1/3] i2c: muxes: pca954x: switch to device_get_match_data Sascha Hauer

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=20250328083549.514506-3-a.fatoum@pengutronix.de \
    --to=a.fatoum@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    --cc=dgienda125@gmail.com \
    /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