From: Jan Beulich Date: Tue, 2 Feb 2021 10:36:50 +0000 (+0100) Subject: x86/build: correctly record dependencies of asm-offsets.s X-Git-Tag: 4.15.0-rc1~99 X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=5e7aa904405fa2f268c3af213516bae271de3265;p=xen.git 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 --- 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