Kernel KVM virtualization development
 help / color / mirror / Atom feed
* [kvm-unit-tests PATCH] kbuild: Regenerate asm-offsets when headers change
@ 2026-11-20 14:38 Andrew Jones
  0 siblings, 0 replies; only message in thread
From: Andrew Jones @ 2026-11-20 14:38 UTC (permalink / raw)
  To: kvm; +Cc: pbonzini, thuth

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


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-11-20 14:38 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-20 14:38 [kvm-unit-tests PATCH] kbuild: Regenerate asm-offsets when headers change Andrew Jones

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox