Message ID | 20200602125900.4424-2-jgross@suse.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | xen: build fixes for CONFIG_HYPFS | expand |
On 02.06.2020 14:58, Juergen Gross wrote: > Commit 58263ed7713e ("xen: add /buildinfo/config entry to hypervisor > filesystem") added a dependency to .config, but the hypervisor's build > config could be have another name via setting KCONFIG_CONFIG. > > Fix that by using $(KCONFIG_CONFIG) instead. Additionally reference > the config file via $(XEN_ROOT) instead of a relative path. > > Reported-by: Andrew Cooper <andrew.cooper3@citrix.com> > Signed-off-by: Juergen Gross <jgross@suse.com> Reviewed-by: Jan Beulich <jbeulich@suse.com> albeit ... > --- a/xen/common/Makefile > +++ b/xen/common/Makefile > @@ -75,7 +75,8 @@ obj-$(CONFIG_UBSAN) += ubsan/ > obj-$(CONFIG_NEEDS_LIBELF) += libelf/ > obj-$(CONFIG_HAS_DEVICE_TREE) += libfdt/ > > -config.gz: ../.config > +CONF_FILE := $(if $(patsubst /%,,$(KCONFIG_CONFIG)),$(XEN_ROOT)/xen/$(KCONFIG_CONFIG),$(KCONFIG_CONFIG)) ... I'll be tempted to shorten this to CONF_FILE := $(if $(patsubst /%,,$(KCONFIG_CONFIG)),$(XEN_ROOT)/xen/)$(KCONFIG_CONFIG) Jan
On 02.06.20 15:02, Jan Beulich wrote: > On 02.06.2020 14:58, Juergen Gross wrote: >> Commit 58263ed7713e ("xen: add /buildinfo/config entry to hypervisor >> filesystem") added a dependency to .config, but the hypervisor's build >> config could be have another name via setting KCONFIG_CONFIG. >> >> Fix that by using $(KCONFIG_CONFIG) instead. Additionally reference >> the config file via $(XEN_ROOT) instead of a relative path. >> >> Reported-by: Andrew Cooper <andrew.cooper3@citrix.com> >> Signed-off-by: Juergen Gross <jgross@suse.com> > > Reviewed-by: Jan Beulich <jbeulich@suse.com> > albeit ... > >> --- a/xen/common/Makefile >> +++ b/xen/common/Makefile >> @@ -75,7 +75,8 @@ obj-$(CONFIG_UBSAN) += ubsan/ >> obj-$(CONFIG_NEEDS_LIBELF) += libelf/ >> obj-$(CONFIG_HAS_DEVICE_TREE) += libfdt/ >> >> -config.gz: ../.config >> +CONF_FILE := $(if $(patsubst /%,,$(KCONFIG_CONFIG)),$(XEN_ROOT)/xen/$(KCONFIG_CONFIG),$(KCONFIG_CONFIG)) > > ... I'll be tempted to shorten this to > > CONF_FILE := $(if $(patsubst /%,,$(KCONFIG_CONFIG)),$(XEN_ROOT)/xen/)$(KCONFIG_CONFIG) Yes, this is better. Juergen
diff --git a/xen/common/Makefile b/xen/common/Makefile index 91581e1815..fc2c8eb4a3 100644 --- a/xen/common/Makefile +++ b/xen/common/Makefile @@ -75,7 +75,8 @@ obj-$(CONFIG_UBSAN) += ubsan/ obj-$(CONFIG_NEEDS_LIBELF) += libelf/ obj-$(CONFIG_HAS_DEVICE_TREE) += libfdt/ -config.gz: ../.config +CONF_FILE := $(if $(patsubst /%,,$(KCONFIG_CONFIG)),$(XEN_ROOT)/xen/$(KCONFIG_CONFIG),$(KCONFIG_CONFIG)) +config.gz: $(CONF_FILE) gzip -c $< >$@ config_data.o: config.gz
Commit 58263ed7713e ("xen: add /buildinfo/config entry to hypervisor filesystem") added a dependency to .config, but the hypervisor's build config could be have another name via setting KCONFIG_CONFIG. Fix that by using $(KCONFIG_CONFIG) instead. Additionally reference the config file via $(XEN_ROOT) instead of a relative path. Reported-by: Andrew Cooper <andrew.cooper3@citrix.com> Signed-off-by: Juergen Gross <jgross@suse.com> --- V2: - accept an absolute path in KCONFIG_CONFIG (Jan Beulich) --- xen/common/Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)