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

Re: [XEN PATCH v7 49/51] build: adding out-of-tree support to the xen build


  • To: Juergen Gross <jgross@xxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Mon, 18 Oct 2021 14:03:08 +0200
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=8jGuSXYlFkJ7c3Ooq0r6g076LD/DKv1Q1sCgeAd3CfY=; b=fQSHGq9guVeXz9qCCw0FAQk6rgwfDrLLaAgS/2GIug5ZsBjmLhbdCY+7ND3Xr4XqaAOEAzQka/ka2F/B4Gg4cwx5oDtLwqmoYtIXWqFAIaHul+6BuiTbBdy/SzdPc4xuQ8KwwSq22tElfaFnVwW3ObDo0EPl2E0EIZbZxrEh5x41H7g6APlls2ZoYFkDrdVaj4eL6PHBjiNyK51A/mYYT0F2RkoNyznk8qtkYYx6Do63DQEgStSBe98zAGOZiVF6UXTUmS57M9gM0eotREiSD6+dqg892PeijGmJi04QbjGwaGCcQFev3/kUq/yZ8VfGythc8GDmQzOwkv4HyAdW9Q==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=iQs2ZThet4r2v3PZG1cQp0BOFny/Isl0vULdiTHTfnUyBdNluJ+DBGgwDl5oH/5NQmQ2uT0CGIoajTK0oVRtbnhKx+vVSKIlP1CFHEApVqQ9uHprZVAmmUok9l4mWAspHGsptjTpuJbspeBmPynld7+ywHM30y189l4wS7jFAtUBCTSmCGS4CPElvC2cj/p8SfSE360tEmf2jjzttOoaZFZbzm8myuVE+2IhBPJYpD0QAuW2mr5hnVntTXS9kWrQKUsLHEhherk6wHV8mFLOxf9nuD1bX+724T3qAMQIN5Rvmidi9ZUdQVFrMwFjNfcGrRgNjVy7w+GP74ydJhfmJQ==
  • Authentication-results: citrix.com; dkim=none (message not signed) header.d=none;citrix.com; dmarc=none action=none header.from=suse.com;
  • Cc: 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>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>, Ross Lagerwall <ross.lagerwall@xxxxxxxxxx>, Daniel De Graaf <dgdegra@xxxxxxxxxxxxx>, "Daniel P. Smith" <dpsmith@xxxxxxxxxxxxxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx, Anthony PERARD <anthony.perard@xxxxxxxxxx>
  • Delivery-date: Mon, 18 Oct 2021 12:03:22 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 18.10.2021 13:20, Juergen Gross wrote:
> On 18.10.21 13:07, Jan Beulich wrote:
>> On 18.10.2021 12:40, Juergen Gross wrote:
>>> On 18.10.21 12:36, Jan Beulich wrote:
>>>> On 18.10.2021 12:28, Juergen Gross wrote:
>>>>> On 18.10.21 11:51, Anthony PERARD wrote:
>>>>>> On Mon, Oct 18, 2021 at 11:02:20AM +0200, Jan Beulich wrote:
>>>>>>> On 15.10.2021 18:58, Anthony PERARD wrote:
>>>>>>>> I have to think about that. I've made some further progress in order to
>>>>>>>> be able to build the Xen pvhshim without a link farm and notice that
>>>>>>>> nearly every source file needs to use "$(srctree)/$(src)"
>>>>>>>
>>>>>>> Oh, now I'm curious as to the why here. I thought use of $(srctree)
>>>>>>> ought to be the exception.
>>>>>>
>>>>>> In Linux, the use of $(srctree) is indeed the exception. This is because
>>>>>> we have VPATH=$(srctree), so when `make` look for a prerequisite or a
>>>>>> target it will look first in the current directory and then in
>>>>>> $(srctree). That works fine as long as the source tree only have sources
>>>>>> and no built files.
>>>>>>
>>>>>> But if we want to be able to build the pv-shim without the linkfarm and
>>>>>> thus using out-of-tree build, we are going to need the ability to build
>>>>>> from a non-clean source tree. I don't think another way is possible.
>>>>>
>>>>> Is there any reason (apart from historical ones) to build the hypervisor
>>>>> in $(srctree)?
>>>>>
>>>>> I could see several advantages to build it in another directory as soon
>>>>> as the build system has this capability:
>>>>>
>>>>> - possibility to have a simple build target for building multiple archs
>>>>>      (assuming the cross-tools are available), leading to probably less
>>>>>      problems with breaking the build of "the other" architecture we are
>>>>>      normally not working with (and in future with e.g. Risc-V being added
>>>>>      this will be even more important)
>>>>>
>>>>> - possibility to have a debug and a non-debug build in parallel (in fact
>>>>>      at least at SUSE we are working around that by building those with an
>>>>>      intermediate "make clean" for being able to package both variants)
>>>>>
>>>>> - make clean for the hypervisor part would be just a "rm -r"
>>>>
>>>> I fully agree, yet ...
>>>>
>>>>> Yes, this would require us (the developers) to maybe change some habits,
>>>>> but I think this would be better than working around the issues by
>>>>> adding $(srctree) all over the build system.
>>>>
>>>> ... developers' habits would only be my second concern here (and if that
>>>> had been the only one, then I would not see this as a reason speaking
>>>> against the change, but as said I've never been building from the root,
>>>> and I've also been building sort of out-of-tree all the time). Yet while
>>>> writing this reply I came to realize that my primary concern was wrong:
>>>> People would not need to adjust their spec files (or alike), at least
>>>> not as long as they consume only files living under dist/.
>>>>
>>>> So, Anthony - thoughts about making the default in-tree Xen build
>>>> actually build into, say, build/xen/?
>>>
>>> Or maybe even build-<arch>[-debug]/xen/?
>>
>> I'd be okay with build-<arch>, but things would become questionable imo
>> when considering further elements recorded in .config: Where would you
>> draw the line?
> 
> Okay, this is a valid question. What about an environment variable which
> can be used to determine the build directory (or a suffix of the build
> directory)?

That would be fine with me, but as said I'm not building from the root
dir anyway, so people affected by a possible change here may be more
qualified to give input. Otoh if people need to adjust their stuff
anyway, they can as well switch to an out-of-tree Xen build right away.
And anyone building in-tree won't expect to be able to build multiple
flavors in parallel.

Jan




 


Rackspace

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