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: Ahmad Fatoum <a.fatoum@barebox.org>
Subject: [PATCH 1/5] kbuild: emit asm-offsets markers as .ascii strings
Date: Fri,  4 Sep 2026 09:59:13 +0200	[thread overview]
Message-ID: <20260904080025.147376-2-a.fatoum@pengutronix.de> (raw)
In-Reply-To: <20260904080025.147376-1-a.fatoum@pengutronix.de>

From: Ahmad Fatoum <a.fatoum@barebox.org>

The DEFINE()/BLANK()/COMMENT() macros emit their "->" markers as bare
lines, which clang's integrated assembler rejects:

  arch/arm/lib/asm-offsets.c:16:3: error: unexpected token at start of statement

Switch to the .ascii form from Linux commit cf0c3e68aa81 ("kbuild: fix
asm-offset generation to work with clang"). $(sed-offsets) already
handles both forms and the generated header is byte-identical.

Assisted-by: Claude:fable-5
Signed-off-by: Ahmad Fatoum <a.fatoum@barebox.org>
---
 include/linux/kbuild.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/include/linux/kbuild.h b/include/linux/kbuild.h
index de0f9bdb952f..6023904b5b67 100644
--- a/include/linux/kbuild.h
+++ b/include/linux/kbuild.h
@@ -4,14 +4,14 @@
 #define __LINUX_KBUILD_H
 
 #define DEFINE(sym, val) \
-	asm volatile("\n->" #sym " %0 " #val : : "i" (val))
+	asm volatile("\n.ascii \"->" #sym " %0 " #val "\"" : : "i" (val))
 
-#define BLANK() asm volatile("\n->" : : )
+#define BLANK() asm volatile("\n.ascii \"->\"" : : )
 
 #define OFFSET(sym, str, mem) \
 	DEFINE(sym, offsetof(struct str, mem))
 
 #define COMMENT(x) \
-	asm volatile("\n->#" x)
+	asm volatile("\n.ascii \"->#" x "\"")
 
 #endif
-- 
2.47.3




  reply	other threads:[~2026-09-04  8:01 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-04  7:59 [PATCH 0/5] clang: more warning and error fixes Ahmad Fatoum
2026-09-04  7:59 ` Ahmad Fatoum [this message]
2026-09-04  7:59 ` [PATCH 2/5] scripts: imx9image: fix warnings reported by clang Ahmad Fatoum
2026-09-04  7:59 ` [PATCH 3/5] kbuild: disable -Wunused-but-set-variable after -Wall Ahmad Fatoum
2026-09-04  7:59 ` [PATCH 4/5] kbuild: disable -Winitializer-overrides for clang Ahmad Fatoum
2026-09-04  7:59 ` [PATCH 5/5] ARM64: cache: use WEAK() for v8_flush_l3_cache stub Ahmad Fatoum
2026-09-04  9:44 ` [PATCH 0/5] clang: more warning and error fixes 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=20260904080025.147376-2-a.fatoum@pengutronix.de \
    --to=a.fatoum@pengutronix.de \
    --cc=a.fatoum@barebox.org \
    --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