[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: Anthony PERARD <anthony.perard@xxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Mon, 18 Oct 2021 12:05:31 +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=aSXbxzvs8zpBem+PLCV7fg/9RgUqsDun3ZepPvgOWY4=; b=akCDQDLW8rMIQ/pN11IoFsV2FFTmJpK3AUxTO7N4Xp6l0uBXX0ydnCIDfHimL9WBbdLpjMLPRuOF49eI+Z/hbfiiRKmmSM3r4xD1UEbod2Fh2cssRYJXXJhFqf0I9z1/owKnClX1S49KF6dMIKV4uTciWNIASQUFSc/QpqlXE1m2pOKmugMvX2NJB4pEbicyYZpIkJ776Ls1G9S3RQB1bRcRfxHtwcljUTslyWzRds3RaCVRCMSMCm8t1iAV/BoaTy30JjUs4nC66f3YPkoi+p9tF1himXBRLraSXL2LujsQSe+FGugAcFA/PqrHyIGuNM0WYr/vuoVWHlGlh/C4Mw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Uc8dYR9mcgUh1pBVIzfk+mQUBSptFbQkc9DZDIWq57j4fgJKn5BCJC4VIJcNibafoSFjNm3ghaTvBcRzYuP/1knTy8MkenyGFFBypZtYJQSHujIhVv34rCjN0SY7Hm7NNl+jcv9IUwDAL6koYShl5KcB0ys1iubFq9bgvGLqalA459mZUeqjxZbQS2Cb7p8MQRByZBkQYzgY/PQz+pFtGzztu0EqJ/Ab9L6KX5gFiBuQqSJwM/NEW30cOwKENxxew0stWOYW9m4vHmqvKj8lipaMQRYBoO9P3nvN8fAbEkBlNsQq/+8/BnawesIxzN+uLkmwlpnZ9FjD9mPjMs3A8Q==
  • Authentication-results: lists.xenproject.org; dkim=none (message not signed) header.d=none;lists.xenproject.org; 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
  • Delivery-date: Mon, 18 Oct 2021 10:05:46 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 18.10.2021 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:
>>> On Thu, Oct 14, 2021 at 12:14:29PM +0200, Jan Beulich wrote:
>>>> On 24.08.2021 12:50, Anthony PERARD wrote:
>>>>> --- a/xen/Rules.mk
>>>>> +++ b/xen/Rules.mk
>>>>> @@ -38,7 +38,7 @@ SPECIAL_DATA_SECTIONS := rodata $(foreach a,1 2 4 8 16, 
>>>>> \
>>>>>                           $(foreach r,rel rel.ro,data.$(r).local)
>>>>>  
>>>>>  # The filename build.mk has precedence over Makefile
>>>>> -mk-dir := $(src)
>>>>> +mk-dir := $(srctree)/$(src)
>>>>>  include $(if $(wildcard 
>>>>> $(mk-dir)/build.mk),$(mk-dir)/build.mk,$(mk-dir)/Makefile)
>>>>
>>>> Perhaps already when it was changed to $(src) the name has become
>>>> slightly misleading, at least imo: I would rather expect a variable
>>>> with this name to refer to the build dir/tree. Maybe "srcdir" or
>>>> even shorted "sd" right from the start? (Reaching here I can finally
>>>> see why having a shorthand is helpful.)
>>>
>>> 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.
> 
> This can be done by teaching make to only look for source file in
> $(srctree), and to look for generated/built file only in $(objtree).
> That's mostly done by not using VPATH and making few other adjustments.

Oh, I see. That's ugly. Just like in Linux I was expecting that we'd
do/support only in-tree or only out-of-tree builds, but not a mix of
both within the same tree. But I can see how this would get in the
way of a build of everything from tree root (something I personally
have never made use of).

Jan




 


Rackspace

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