From: Andrew Jones <andrew.jones@linux.dev>
To: kvm@vger.kernel.org
Cc: pbonzini@redhat.com, thuth@redhat.com
Subject: [kvm-unit-tests PATCH] kbuild: Regenerate asm-offsets when headers change
Date: Fri, 20 Nov 2026 15:38:26 +0100 [thread overview]
Message-ID: <20261120143826.1428887-1-andrew.jones@linux.dev> (raw)
The asm-offsets rule template expands $(CC) $(CFLAGS) at eval time,
before the top-level Makefile adds $(autodepend-flags), so no
dependency file is generated and header changes leave stale offsets.
Escape them so they're expanded when the recipe runs.
Fixes: b9423a4fc5a9 ("kbuild: Allow multiple asm-offsets file to be generated")
Signed-off-by: Andrew Jones <andrew.jones@linux.dev>
---
scripts/asm-offsets.mak | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/scripts/asm-offsets.mak b/scripts/asm-offsets.mak
index a5fdbf5d6d6d..1e38897d081b 100644
--- a/scripts/asm-offsets.mak
+++ b/scripts/asm-offsets.mak
@@ -35,7 +35,7 @@ endef
define gen_asm_offsets_rules
$(1).s: $(1).c
- $(CC) $(CFLAGS) -fverbose-asm -S -o $$@ $$<
+ $$(CC) $$(CFLAGS) -fverbose-asm -S -o $$@ $$<
$(1).h: $(1).s
$$(call make_asm_offsets,$(1))
--
2.56.0
next reply other threads:[~2026-11-20 14:38 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-20 14:38 Andrew Jones [this message]
2026-11-20 15:09 ` [kvm-unit-tests PATCH] kbuild: Regenerate asm-offsets when headers change Thomas Huth
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=20261120143826.1428887-1-andrew.jones@linux.dev \
--to=andrew.jones@linux.dev \
--cc=kvm@vger.kernel.org \
--cc=pbonzini@redhat.com \
--cc=thuth@redhat.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.