From 5e7aa904405fa2f268c3af213516bae271de3265 Mon Sep 17 00:00:00 2001 From: Jan Beulich Date: Tue, 2 Feb 2021 11:36:50 +0100 Subject: [PATCH] x86/build: correctly record dependencies of asm-offsets.s Going through an intermediate *.new file requires telling the compiler what the real target is, so that the inclusion of the resulting .*.d file will actually be useful. Fixes: 7d2d7a43d014 ("x86/build: limit rebuilding of asm-offsets.h") Reported-by: Julien Grall Signed-off-by: Jan Beulich Acked-by: Andrew Cooper Release-Acked-by: Ian Jackson --- xen/arch/x86/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xen/arch/x86/Makefile b/xen/arch/x86/Makefile index 7769bb40d7..3a9b7e7b2e 100644 --- a/xen/arch/x86/Makefile +++ b/xen/arch/x86/Makefile @@ -241,7 +241,7 @@ efi/buildid.o efi/relocs-dummy.o: $(BASEDIR)/arch/x86/efi/built_in.o efi/buildid.o efi/relocs-dummy.o: ; asm-offsets.s: $(TARGET_SUBARCH)/asm-offsets.c $(BASEDIR)/include/asm-x86/asm-macros.h - $(CC) $(filter-out -Wa$(comma)% -flto,$(c_flags)) -S -g0 -o $@.new $< + $(CC) $(filter-out -Wa$(comma)% -flto,$(c_flags)) -S -g0 -o $@.new -MQ $@ $< $(call move-if-changed,$@.new,$@) asm-macros.i: CFLAGS-y += -D__ASSEMBLY__ -P -- 2.39.5