All of lore.kernel.org
 help / color / mirror / Atom feed
* [kvm-unit-tests PATCH] kbuild: Regenerate asm-offsets when headers change
@ 2026-11-20 14:38 Andrew Jones
  2026-11-20 15:09 ` Thomas Huth
  0 siblings, 1 reply; 2+ messages 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] 2+ messages in thread

end of thread, other threads:[~2026-11-20 15:09 UTC | newest]

Thread overview: 2+ messages (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
2026-11-20 15:09 ` Thomas Huth

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.