[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: Jan Beulich <jbeulich@xxxxxxxx>
- From: Anthony PERARD <anthony.perard@xxxxxxxxxx>
- Date: Mon, 18 Oct 2021 10:51:02 +0100
- Authentication-results: esa5.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none
- 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 09:51:25 +0000
- Ironport-data: A9a23:7+WWYq7/F1hvHr6XRCGk8gxRtEzBchMFZxGqfqrLsTDasY5as4F+v jQdWWmEOPeDMTT0eNona4W/9RkBv5fdy9E2Gwtu+H8yHi5G8cbLO4+Ufxz6V8+wwmwvb67FA +E2MISowBUcFyeEzvuV3zyIQUBUjclkfJKlYAL/En03FVIMpBsJ00o5wrdh294w2LBVPivW0 T/Mi5yHULOa82Yc3lI8s8pvfzs24ZweEBtB1rAPTagjUG32zhH5P7pGTU2FFFPqQ5E8IwKPb 72rIIdVXI/u10xF5tuNyt4Xe6CRK1LYFVDmZnF+A8BOjvXez8CbP2lS2Pc0MC9qZzu1c99Z2 PdvnJCoFwkVP4KLxMUtTSl9F39mFPgTkFPHCSDXXc27ykTHdz3nwul0DVFwNoodkgp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CXCaxs0T5LZVz7pUtFLuC EKC89VXI5uTP8bhHAJDLQYpdL3bh/oVhiPT/bI+J0CjvH17+7+OUENzORiQiXMCcOspYd19m ep44ZwY8Q2yjBYuI+2qtCEM+jTeNGEEXoUmqooeXN3hhD00xwwQepfbECL3vs2CMo0eLkkwL zaIr6PenLAAlFHaen8+GHWRj+pQgZMC5EJDwFMYfgnbn9PEgrk83QFL8CRxRQNQl00V3+V2M 2ltFkt0OaTRoGs42JkdBzihS1NbGRmU2k3t0F9YxmTWQn6hWnHJMGBga/2G+1oU8j4EczVWl F1CJL0Jjdo+kBnN4xYP
- Ironport-hdrordr: A9a23:anYqX6yHcPyvehbYQ4k4KrPwLL1zdoMgy1knxilNoRw8SKKlfu SV7ZAmPH7P+VMssR4b9OxoVJPtfZqYz+8T3WBzB8bBYOCFgguVxehZhOOIqQEIWReOldK1vZ 0QFZSWY+eQMbEVt6nH3DU=
- Ironport-sdr: iZwXk77X7tVxmWmQa3b+epkYfrqoH1hSsv1JyWkxP/41SFCjXFzrs4+0g7maMVaYW/PAYYHDXp 00t4HPfM4Z2AxmSjT+IS6/MjMdGaSs3YGmAEFxYqeKzzuMXdx7sS7F/sY5VR8ZccbwCkjL36Um EbB0iOppZfFpDsqKH1my+tQuDvSkatOgQfPrQ3eps2CJymPjIN0QfS7kVk3RgiFUWFBoiu3N7m 8AVv8nu0DCW1kdWXpp2mtk60h44gpNgKs6ENO7LB8mdR1OK6kKKq1hpGuXczs3e08fq3MF4UVz wVSkx++ixVYLojtb9+V2NCUc
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
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.
I hope my description of where I'm going isn't too convoluted.
> > and I'm not
> > sure "$(src)" could be use alone. So having a single variable which have
> > both would be useful.
> >
> > "srcdir" might be to close to "srctree" and one might mistake it for the
> > other, so "sd" might be better.
>
> While I did suggest "sd" as an option, already when writing this I
> wasn't convinced this would be descriptive enough. Personally I think
> "dir" and "tree" are sufficiently different names. I would suggest
> "srcroot" for what is now "srctree", but that would have the
> disadvantage of getting us out of sync with Linux.
Ok, I guess "srcdir" is good. Thanks.
--
Anthony PERARD
|