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