[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
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
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |