[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [XEN PATCH v7 42/51] build: grab common EFI source files in arch specific dir


  • To: Jan Beulich <jbeulich@xxxxxxxx>
  • From: Anthony PERARD <anthony.perard@xxxxxxxxxx>
  • Date: Fri, 15 Oct 2021 17:29:47 +0100
  • Authentication-results: esa3.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none
  • Cc: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>, Ian Jackson <iwj@xxxxxxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Fri, 15 Oct 2021 16:30:25 +0000
  • Ironport-data: A9a23:JjlNWa2QdP4PG/7XePbD5XJ2kn2cJEfYwER7XKvMYLTBsI5bpzQCm GscXW/QOaveY2KnfdhzPImz/U8BscLWmNdlQAJlpC1hF35El5HIVI+TRqvS04J+DSFhoGZPt Zh2hgzodZhsJpPkS5PE3oHJ9RGQ74nRLlbHILOCan0ZqTNMEn970Es7wrNh2OaEvPDia++zk YKqyyHgEAfNNw5cagr4PIra9XuDFNyr0N8plgRWicJj5TcypFFMZH4rHomjLmOQf2VhNrXSq 9Avbl2O1jixEx8FUrtJm1tgG6EAaua60QOm0hK6V0U+6/TrS+NbPqsTbZIhhUlrZzqhoOpj7 /Rii7GMeA41OOqLvKcvDDxKHHQrVUFG0OevzXmXtMWSywvNcmf2wuUoB0YzVWEa0r8pWycUr 6VecW1TKEDY7w616OvTpu1Ej8I/LM7tLcUHt2tp1z3xBvc6W5HTBa7N4Le02R9t25sVQamFO KL1bxJ1NA/sf0V1GGsdGYxnu+qkp0Hyc35x/Qf9Sa0fvDGIkV0ZPKLWGMXRUs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akgs5gbBq7tixYqlQ4eMcCNVHeu7cHdcchIP2krP iSQ1fjLiLlrz0bfd2Y+SCrW1u1HiJVS4B1HwTfu/bhSdgYpUhPv4CBszA==
  • Ironport-hdrordr: A9a23:YXQvPahUmyzUooo6TBZ6jOctg3BQXtoji2hC6mlwRA09TySZ// rBoB0+726RtN9xYgBEpTnuAsS9qB/nmaKdpLNhWotKPzOW2ldATrsD0WKK+VSJcEfDH6xmpM RdmsBFebvN5DNB7PoSjjPWL+od
  • Ironport-sdr: PjFuDB8HcK49fvC+aa6iaXLinSJyBB530Fv39ALzOtaxxyaSCJwGlePfXTnC1tAIEWAR6+RGK4 McXgJUM8Z/o03f/DFqUgsMbfWIGPq2ivAqKKmoaHIIBUgRWBYyvnSKkTvardOlBtw759y9G0Aq IQb7zSVzwqZot6PiQ0qvgN73+rFDKTEm+Ahn77d7dlBfpWnmfwSQtRa/QabsJujZY4ACdTNET6 GEQsHQQa0GtiKVXG9c3sf6e8ypNUjBsSeQR62nKNJPkyZAVjvGTrdpmTsqfruWLcyAZaaxNBi+ qJ34IQoe9BTIntABKqJcaI45
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

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



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.