[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



Hi Anthony,

On 24/08/2021 16:00, Anthony PERARD wrote:
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)

Thanks for the explanation. That makes sense.


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.

An explanation in the commit message would be useful. This one you provided looks good. So:

Acked-by: Julien Grall <jgrall@xxxxxxxxxx>

Can it be merged before the previous patch? If so, I can update the commit message and commit it.

Cheers,

--
Julien Grall



 


Rackspace

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