On 13.10.2021 14:30, Anthony PERARD wrote:
> On Mon, Oct 11, 2021 at 01:31:59PM +0200, Jan Beulich wrote:
>> On 24.08.2021 12:50, Anthony PERARD wrote:
>>> @@ -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.

Hmm, perhaps I'd prefer to avoid yet another $(MAKE) invocation. But
your reply made me understand why you make the change: You need to add
the prelink.o dependency to $(TARGET). That wasn't obvious to me when
first reviewing the change.

>>> --- 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.

Moving there would be preferred; if that somehow doesn't work out, please
mention the temporary nature in the description, or else I (or perhaps
others) would ask the same question again on a future version of the
series.

Jan


Reply via email to