On Thu, Apr 01, 2021 at 10:33:47AM +0200, Jan Beulich wrote: > Except for an additional prereq Arm and x86 have the same needs here, > and Arm can also benefit from the recent x86 side improvement. Recurse > into arch/*/ only for a phony include target (doing nothing on Arm), > and handle asm-offsets itself entirely locally to xen/Makefile. > > Signed-off-by: Jan Beulich <jbeul...@suse.com> > > --- a/.gitignore > +++ b/.gitignore > @@ -318,7 +318,6 @@ > xen/arch/x86/efi/check.efi > xen/arch/x86/efi/mkreloc > xen/arch/*/xen.lds > -xen/arch/*/asm-offsets.s > xen/arch/*/efi/boot.c > xen/arch/*/efi/compat.c > xen/arch/*/efi/ebmalloc.c > @@ -325,6 +324,7 @@ > xen/arch/*/efi/efi.h > xen/arch/*/efi/pe.c > xen/arch/*/efi/runtime.c > +xen/asm-offsets.s > xen/common/config_data.S > xen/common/config.gz > xen/include/headers*.chk > --- a/xen/Makefile > +++ b/xen/Makefile > @@ -341,7 +341,7 @@ _clean: delete-unfresh-files > find . \( -name "*.o" -o -name ".*.d" -o -name ".*.d2" \ > -o -name "*.gcno" -o -name ".*.cmd" \) -exec rm -f {} \; > rm -f include/asm $(TARGET) $(TARGET).gz $(TARGET).efi > $(TARGET).efi.map $(TARGET)-syms $(TARGET)-syms.map *~ core > - rm -f include/asm-*/asm-offsets.h > + rm -f asm-offsets.s include/asm-*/asm-offsets.h > rm -f .banner > > .PHONY: _distclean > @@ -362,7 +362,7 @@ $(TARGET): delete-unfresh-files > done; \ > true > $(MAKE) -f $(BASEDIR)/Rules.mk -C include > - $(MAKE) -f $(BASEDIR)/Rules.mk -C arch/$(TARGET_ARCH) asm-offsets.s > + $(MAKE) -f $(BASEDIR)/Rules.mk -C arch/$(TARGET_ARCH) include > $(MAKE) -f $(BASEDIR)/Rules.mk include/asm-$(TARGET_ARCH)/asm-offsets.h > $(MAKE) -f $(BASEDIR)/Rules.mk -C arch/$(TARGET_ARCH) $@ > > @@ -399,7 +399,11 @@ include/xen/compile.h: include/xen/compi > @sed -rf tools/process-banner.sed < .banner >> $@.new > @mv -f $@.new $@ > > -include/asm-$(TARGET_ARCH)/asm-offsets.h: arch/$(TARGET_ARCH)/asm-offsets.s > +asm-offsets.s: arch/$(TARGET_ARCH)/$(TARGET_SUBARCH)/asm-offsets.c > + $(CC) $(filter-out -Wa$(comma)% -flto,$(c_flags)) -S -g0 -o $@.new -MQ > $@ $< > + $(call move-if-changed,$@.new,$@)
Won't it be more natural to keep the .s file in arch/$(TARGET_ARCH)? Thanks, Roger.