Message ID | 20211125134006.1076646-37-anthony.perard@citrix.com (mailing list archive) |
---|---|
State | Superseded |
Headers | show |
Series | xen: Build system improvements, now with out-of-tree build! | expand |
On 25.11.2021 14:39, Anthony PERARD wrote: > From: Anthony PERARD <anthony.perard@gmail.com> > > zconf_fopen() will open file in $srctree if the file isn't in > $objtree. This is an issue for "auto.conf" as it could be in the > source tree if it is dirty. With "auto.conf" read from the source > tree, kconfig will not properly set the file associated with a > CONFIG_* properly in "include/config/" and instead only touch the > files that correspond to new CONFIG_* option that were not set in the > "auto.conf" found in the source tree. Do we really mean to support mixing in-tree and out-of-tree builds from one source tree? Without such mixing, iiuc there would be no such problem. Jan
On Tue, Dec 21, 2021 at 03:23:48PM +0100, Jan Beulich wrote: > On 25.11.2021 14:39, Anthony PERARD wrote: > > From: Anthony PERARD <anthony.perard@gmail.com> > > > > zconf_fopen() will open file in $srctree if the file isn't in > > $objtree. This is an issue for "auto.conf" as it could be in the > > source tree if it is dirty. With "auto.conf" read from the source > > tree, kconfig will not properly set the file associated with a > > CONFIG_* properly in "include/config/" and instead only touch the > > files that correspond to new CONFIG_* option that were not set in the > > "auto.conf" found in the source tree. > > Do we really mean to support mixing in-tree and out-of-tree builds > from one source tree? Without such mixing, iiuc there would be no > such problem. Could you read and reply to the cover letter instead? The second paragraph of the v8 changelog speaks about this. I would rather have a discussion about this on the cover letter thread than in a patch. Thanks,
diff --git a/xen/tools/kconfig/confdata.c b/xen/tools/kconfig/confdata.c index 4f9139d055be..805d4c3e5636 100644 --- a/xen/tools/kconfig/confdata.c +++ b/xen/tools/kconfig/confdata.c @@ -357,12 +357,17 @@ int conf_read_simple(const char *name, int def) int i, def_flags; if (name) { - in = zconf_fopen(name); + if (def == S_DEF_AUTO) { + /* only open include/config/auto.conf in objtree */ + in = fopen(name, "r"); + } else { + in = zconf_fopen(name); + } } else { struct property *prop; name = conf_get_configname(); - in = zconf_fopen(name); + in = fopen(name, "r"); if (in) goto load; sym_add_change_count(1);