On Thu, Oct 14, 2021 at 10:51:44AM +0200, Jan Beulich wrote: > On 24.08.2021 12:50, Anthony PERARD wrote: > > --- a/xen/arch/arm/efi/Makefile > > +++ b/xen/arch/arm/efi/Makefile > > @@ -1,4 +1,10 @@ > > CFLAGS-y += -fshort-wchar > > +CFLAGS-y += -I$(srctree)/common/efi > > Perhaps another opportunity for -iquote?
Yes. > > obj-y += boot.init.o pe.init.o ebmalloc.o runtime.o > > obj-$(CONFIG_ACPI) += efi-dom0.init.o > > + > > +$(obj)/%.c: common/efi/%.c > > + $(Q)cp -f $< $@ > > In case both trees are on the same file system, trying to hardlink first > would seem desirable. When copying, I think you should also pass -p. I don't know if doing an hardlink is a good thing to do, I'm not sure of the kind of issue this could bring. As for -p, I don't think it's a good idea to copy the mode, ownership, and timestamps of the source file, I'd rather have the timestamps that Make expect, e.i. "now". > > --- a/xen/arch/x86/efi/Makefile > > +++ b/xen/arch/x86/efi/Makefile > > @@ -1,4 +1,5 @@ > > CFLAGS-y += -fshort-wchar > > +CFLAGS-y += -I$(srctree)/common/efi > > > > quiet_cmd_objcopy_o_ihex = OBJCOPY $@ > > cmd_objcopy_o_ihex = $(OBJCOPY) -I ihex -O binary $< $@ > > @@ -19,3 +20,8 @@ obj-$(XEN_BUILD_EFI) := $(filter-out %.init.o,$(EFIOBJ-y)) > > obj-bin-$(XEN_BUILD_EFI) := $(filter %.init.o,$(EFIOBJ-y)) > > extra-$(XEN_BUILD_EFI) += buildid.o relocs-dummy.o > > nocov-$(XEN_BUILD_EFI) += stub.o > > + > > +$(obj)/%.c: common/efi/%.c > > + $(Q)cp -f $< $@ > > + > > +.PRECIOUS: $(obj)/%.c > > Seeing you repeat everything here, despite it not being all this much I > wonder if there wouldn't better be a makefile fragment in common/efi/ > which all interested architectures' arch/<arch>/efi/Makefile would then > include. This could then also subsume -fshort-wchar. That sounds good, I'll look into that. Thanks, -- Anthony PERARD
