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

Re: [XEN PATCH v7 10/51] build,arm: move LDFLAGS change to arch.mk


  • To: Julien Grall <julien@xxxxxxx>
  • From: Anthony PERARD <anthony.perard@xxxxxxxxxx>
  • Date: Tue, 24 Aug 2021 16:00:12 +0100
  • Authentication-results: esa5.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none
  • Cc: <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>
  • Delivery-date: Tue, 24 Aug 2021 15:00:25 +0000
  • Ironport-hdrordr: A9a23:BIjFu6jS8V+MK2sE16drg43IGXBQXtoji2hC6mlwRA09TySZ// rBoB0+726RtN9xYgBEpTnuAsS9qB/nmaKdpLNhWotKPzOW2ldATrsD0WKK+VSJcEfDH6xmpM RdmsBFebvN5DNB7PoSjjPWL+od
  • Ironport-sdr: XtIJ1k6kg6DvDDjdAEE9m0uZV7hBxkLB7lXQ2ibhFeUzzQ8PJnXe2UQU8IjfKofvvOOtCTKQ7J UCZU0W+XVw9x5m6A8SRQ/E2NCAf57KKwOx5B2J1XYngyh6tieXxGoIjfyZffJHfIFUy1OZJt2w ftPP2VKGlJ9ZfHMXhGMlvCBPFnzCxuLbvladMVqxI83i2LvZ79Lgb1xeM/5Z4joJG0MYNZuyaJ oKWy4A5feS6l9lIO/6ftVOEZJs3NeOiycWEsgNrramB3jAqS2edL02xdKJyZYJL25tzNNLz42L oWAOoSyJEUBaCqxGvl6ThivB
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On Tue, Aug 24, 2021 at 01:50:33PM +0100, Julien Grall wrote:
> Hi Anthony,
> 
> Can you explain why this is moved?

Well, it was in the wrong place, it is best to avoid making changes to
XEN_CFLAGS or XEN_LDFLAGS in Makefile in subdirectories as those are
exported variable and may not work as expected. They may or may not
change *flags in subdirectories, or in the case of arch/*/Makefile, they
might changes *flags in the other directories or not depending on
whether one try to build "xen" or just "common/".

But more importantly, with patch
    build: set ALL_OBJS to main Makefile; move prelink.o to main Makefile
make isn't going to load arch/*/Makefile before building the rest of
xen, and thus changes to XEN_LDFLAGS will only apply to arch/*/Makefile
rather than for all objects. (XEN_LDFLAGS is used with all built_in.o
and few other places like for libfdt-temp.o)

If you want an explanation in the commit message, maybe this one will
do:
    Changes to XEN_LDFLAGS may or may not apply to targets in for
    example "common/" depending on whether one runs `make` or `make
    common/`.

    But arch.mk is loaded before doing any build, so changes to LDFLAGS
    there mean that the value of XEN_LDFLAGS won't depends on the
    initial target.

Thanks,

-- 
Anthony PERARD



 


Rackspace

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