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 <[email protected]>
> Signed-off-by: Jan Beulich <[email protected]>Acked-by: Andrew Cooper <[email protected]>, 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 [email protected] $< > + $(CC) $(filter-out -Wa$(comma)% -flto,$(c_flags)) -S -g0 -o [email protected] -MQ > $@ $< > $(call move-if-changed,[email protected],$@) > > asm-macros.i: CFLAGS-y += -D__ASSEMBLY__ -P
