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

Re: [XEN PATCH v7 21/51] build: set ALL_OBJS to main Makefile; move prelink.o to main Makefile


  • To: Jan Beulich <jbeulich@xxxxxxxx>
  • From: Anthony PERARD <anthony.perard@xxxxxxxxxx>
  • Date: Wed, 13 Oct 2021 13:30:08 +0100
  • Authentication-results: esa5.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: Wed, 13 Oct 2021 12:30:27 +0000
  • Ironport-data: A9a23:+QbTeqy8nUrCO+mZ6sx6t+eWwSrEfRIJ4+MujC+fZmUNrF6WrkUHz jcWDGmDM/zfa2f8f4ojPoi39RtVuZSBmtRrGlQ/+SAxQypGp/SeCIXCJC8cHc8zwu4v7q5Dx 59DAjUVBJlsFhcwnvopW1TYhSEUOZugH9IQM8aZfHAsLeNYYH1500s6w7di2tcAbeWRWGthh /uj+6UzB3f9s9JEGjp8B3Wr8U4HUFza4Vv0j3RmDRx5lAa2e0o9VfrzEZqZPXrgKrS4K8bhL wr1IBNVyUuCl/slIovNfr8W6STmSJaKVeSFoiI+t6RPHnGuD8H9u0o2HKN0VKtZt9mGt99b4 4thq8GVcCMkNauVpuUPXggJNRgraMWq+JefSZS+mcmazkmAeHrw2fR+SkoxOOX0+M4uXzsIr 6ZBbmlQMFbT3Ipaw5riIgVors0lMMnsOpJZonx6xCvVJf0nXYrCU+PB4towMDIY25wQQaePO ZZxhTxHbQTdPx8ROmouGb0ggdeponzfMABltwfAzUYwyzeK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sZQTAYnKjAs3yw4dPcyAW3GuuJzfOc9RNkQKI yOPgPuQjrtR8UPObn4vGCWfxuFan5kP5EhHwVJqy45lQTYZaivbBCFszAk=
  • Ironport-hdrordr: A9a23:RnbaMaM0umTQk8BcTsOjsMiBIKoaSvp037Eqv3oRdfVwSL3+qy nOpoV+6faaslossR0b9uxofZPwJ080lqQFhLX5X43SPzUO0VHAROoJgLcKgQeQeREWntQtrJ uIGJIfNDSfNzZHsfo=
  • Ironport-sdr: 3AoUv4QfdVr3gH5shJGdABR29/cCW2Eqiamj8IOv3MnAknhoqj6fTOPSzE/h5jUplpjCxAu4G1 oeevbfH3EGkwVmsecwySOClbXyDKUtz0zVQsyiI3kXWMUSxModsPvMjEBTiS/856O2u7nmBr2C Sdbb0G+S+kQVCkr6XFaF3mBLV3QNEnYIDZ2+LQJK1fNseOYoA60IPbOx0/BNKnNNSLee5b2yBH auPosBlfHA9OfL+g9k04I/c33ApHKe/E4OTy/vNnlczVmTEFx9Al7ix0VbiCsiQ5fl28FZGOTW PJiKDXfkjHjuSpd+25lBMZ1A
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On Mon, Oct 11, 2021 at 01:31:59PM +0200, Jan Beulich wrote:
> On 24.08.2021 12:50, Anthony PERARD wrote:
> > --- a/xen/Makefile
> > +++ b/xen/Makefile
> > @@ -271,8 +271,21 @@ CFLAGS += -flto
> >  LDFLAGS-$(CONFIG_CC_IS_CLANG) += -plugin LLVMgold.so
> >  endif
> >  
> > +# Note that link order matters!
> > +ALL_OBJS-y                := common/built_in.o
> > +ALL_OBJS-y                += drivers/built_in.o
> > +ALL_OBJS-y                += lib/built_in.o
> > +ALL_OBJS-y                += xsm/built_in.o
> > +ALL_OBJS-y                += arch/$(TARGET_ARCH)/built_in.o
> > +ALL_OBJS-$(CONFIG_CRYPTO) += crypto/built_in.o
> > +
> > +ALL_LIBS-y                := lib/lib.a
> > +
> >  include $(BASEDIR)/arch/$(TARGET_ARCH)/arch.mk
> >  
> > +export ALL_OBJS := $(ALL_OBJS-y)
> > +export ALL_LIBS := $(ALL_LIBS-y)
> > +
> >  # define new variables to avoid the ones defined in Config.mk
> >  export XEN_CFLAGS := $(CFLAGS)
> >  export XEN_AFLAGS := $(AFLAGS)
> > @@ -393,7 +406,7 @@ $(TARGET): FORCE
> >     $(MAKE) -f $(BASEDIR)/Rules.mk -C include
> >     $(MAKE) -f $(BASEDIR)/Rules.mk -C arch/$(TARGET_ARCH) include
> >     $(MAKE) -f $(BASEDIR)/Rules.mk 
> > arch/$(TARGET_ARCH)/include/asm/asm-offsets.h
> > -   $(MAKE) -f $(BASEDIR)/Rules.mk -C arch/$(TARGET_ARCH) $@
> > +   $(MAKE) -f $(BASEDIR)/Rules.mk $@
> 
> This merely results in what was previously invoked from here now getting
> invoked from the very bottom of build.mk. I'm afraid I don't see why this
> is a useful change to make.

Would you rather have this following change?

    @@ -393,7 +406,8 @@ $(TARGET): FORCE
        $(MAKE) -f $(BASEDIR)/Rules.mk -C include
        $(MAKE) -f $(BASEDIR)/Rules.mk -C arch/$(TARGET_ARCH) include
        $(MAKE) -f $(BASEDIR)/Rules.mk 
arch/$(TARGET_ARCH)/include/asm/asm-offsets.h
    +   $(MAKE) -f $(BASEDIR)/Rules.mk prelink.o
        $(MAKE) -f $(BASEDIR)/Rules.mk -C arch/$(TARGET_ARCH) $@

That would probably be fine.

> > --- a/xen/build.mk
> > +++ b/xen/build.mk
> > @@ -56,3 +56,27 @@ arch/$(TARGET_ARCH)/include/asm/asm-offsets.h: 
> > asm-offsets.s
> >       sed -rne "/^[^#].*==>/{s:.*==>(.*)<==.*:\1:; s: [\$$#]: :; p;}"; \
> >       echo ""; \
> >       echo "#endif") <$< >$@
> > +
> > +# head.o is built by descending into arch/arm/$(TARGET_SUBARCH), depends 
> > on the
> > +# part of $(ALL_OBJS) that will eventually recurse into $(TARGET_SUBARCH)/ 
> > and
> > +# build head.o
> > +arch/arm/$(TARGET_SUBARCH)/head.o: arch/arm/built_in.o
> > +arch/arm/$(TARGET_SUBARCH)/head.o: ;
> 
> This previously lived in an Arm-specific file. Moving this here in the
> given, still Arm-specific form is imo a no-go when done alongside all
> the other good changes you're making. Is there a reason this can't go
> into xen/arch/arm/arch.mk?

This is temporary and it is removed in patch
    "build: build everything from the root dir, use obj=$subdir"
but I could move it to "arch/arm/Rules.mk" I think.

Thanks,

-- 
Anthony PERARD



 


Rackspace

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