On 01/02/2021 14:56, Jan Beulich wrote: > 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 <jul...@xen.org> > Signed-off-by: Jan Beulich <jbeul...@suse.com>
Acked-by: Andrew Cooper <andrew.coop...@citrix.com>, whatever the outcome of the discussion below. > --- > Already on the original patch I did suggest that perhaps Arm would want > to follow suit. So again - perhaps the rules should be unified by moving > to common code? > > --- a/xen/arch/x86/Makefile > +++ b/xen/arch/x86/Makefile > @@ -241,7 +241,7 @@ efi/buildid.o efi/relocs-dummy.o: $(BASE > 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