[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [XEN PATCH v8 07/47] 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: Tue, 7 Dec 2021 11:23:47 +0000
- Authentication-results: esa5.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none
- Cc: <xen-devel@xxxxxxxxxxxxxxxxxxxx>, 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>, Bertrand Marquis <bertrand.marquis@xxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>
- Delivery-date: Tue, 07 Dec 2021 11:24:09 +0000
- Ironport-data: A9a23:850E96wUiW+8PV2rI056t+edwSrEfRIJ4+MujC+fZmUNrF6WrkUPm DZJXGrUO67fNmXyetxzaIi19UhQvJTTzNI3TAs5/yAxQypGp/SeCIXCJC8cHc8zwu4v7q5Dx 59DAjUVBJlsFhcwnvopW1TYhSEUOZugH9IQM8aZfHAuLeNYYH1500s6wbZm2tQAbeWRWGthh /uj+6UzB3f9s9JEGjp8B3Wr8U4HUFza4Vv0j3RmDRx5lAa2e0o9VfrzEZqZPXrgKrS4K8bhL wr1IBNVyUuCl/slIovNfr8W6STmSJaKVeSFoiI+t6RPHnGuD8H9u0o2HKN0VKtZt9mGt/t7x e1InoWIcgosb5T9lLgtUhZ9Ei4raMWq+JefSZS+mcmazkmAeHrw2fR+SkoxOOX0+M4uXzsIr 6ZBbmlQMFbT3Ipaw5riIgVors0lMMnsOpJZonx6xCvVJf0nXYrCU+PB4towMDIY25AfQK6DP JJxhTxHTTPZYCVvAhQrVJthm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qKlHkJpWGFL3hGWKQ7rJAKRoTsj1NzmF1FZJXdDA7w4Y2ONIoQYhV7f GfMifqQnalYy2rDb2E3RCrE0udqjJgTvAxHkQ0ZLFOTl9uZ3vI60XW9K9jsoti5Gvmf799OB w==
- Ironport-hdrordr: A9a23:IYAl/Koiv24o6Bzv3Xe4cf8aV5oreYIsimQD101hICG8cqSj+f xGuM5rsSMc6QxhPU3I9ursBEDtex/hHNtOkO4s1NSZLWvbUQmTTL2KhLGKq1aLJ8S9zJ8/6U 4JSdkZNDSaNzlHZKjBjzWFLw==
- Ironport-sdr: c+HkDxazBjVl/++AjhAJ8ql8CneRxe0U7oNlZFzeNJ91Vy8xKmji3uYpWNioDHyuPL2jPDF6oI GgfjHUl4Nc34XQFtAtVj7aRnoE/MjlRW1R7QnVeYmogFC/rgj+W/e5ynwgvnU4wtDz8XgrPxIf 5df79F1LroGXjTPVf4bIPFgZ2Bm/2nGc+JxtPsNjr1auFEqIuyNITy0Jx9TRiStGJXw2+WIv03 /QEmG43ymVIlQeUuqcMUzZ8C7tFm/bn9r0c27/VIVlIr/8dVSRsLUpVSdzgi7QQNo0jMLc0eF2 yuR8HF634aTwh0d+3xEfVEW6
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
On Mon, Dec 06, 2021 at 05:52:51PM +0100, Jan Beulich wrote:
> On 25.11.2021 14:39, Anthony PERARD wrote:
>
> Nit: In the title, do you mean "set ALL_OBJS in main Makefile; ..."?
>
> > --- a/xen/Makefile
> > +++ b/xen/Makefile
> > @@ -285,8 +285,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)
>
> Who's the consumer of these exports? I ask because I don't consider the
> names very suitable for exporting, and hence I'd prefer to see their
> scope limited. If e.g. it's only a single make invocation where they
> need propagating, doing so on the command line might be better.
There seems to be only one consumer, "build.mk", and only the last
$(MAKE) call in the recipe "$(TARGET)". So, it's probably fine to set
both on the command line instead of using export. I'll have a look.
> > --- a/xen/arch/arm/Rules.mk
> > +++ b/xen/arch/arm/Rules.mk
> > @@ -0,0 +1,5 @@
> > +# 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: ;
>
> Can't this be a single line:
>
> arch/arm/$(TARGET_SUBARCH)/head.o: arch/arm/built_in.o ;
Sure.
> > @@ -235,7 +218,7 @@ $(TARGET).efi: FORCE
> > echo '$(if $(filter y,$(XEN_BUILD_EFI)),xen.efi generation,EFI support)
> > disabled'
> > endif
> >
> > -efi/buildid.o efi/relocs-dummy.o: $(BASEDIR)/arch/x86/efi/built_in.o
> > +# These should already have been rebuilt when building the prerequisite of
> > "prelink.o"
> > efi/buildid.o efi/relocs-dummy.o: ;
>
> If the comment is true in all cases, do they really still need an empty
> rule?
Yes. Those two targets are unfortunately a prerequisite of "xen.efi", so
make will look for a rule to make them, and would use %.o:%.c without
this explicit rule.
Thanks,
--
Anthony PERARD
|