On 02/07/2018 18:56, Peter Maydell wrote: > On 2 July 2018 at 17:31, Paolo Bonzini <pbonz...@redhat.com> wrote: >> hw/9pfs/Makefile.objs uses CONFIG_VIRTIO_9P to guard the definition for >> FileOperations structs, while fsdev/Makefile.objs uses CONFIG_VIRTIO >> to guard the use. Mismatch causes linking to fail when CONFIG_VIRTIO >> is set but CONFIG_VIRTIO_9P is not. >> >> Fix it and use if/else to clarify that the two lines are for opposite >> conditions. >> >> Reported-by: Peter Maydell <peter.mayd...@linaro.org> >> Fixes: b5dfdb082fc350f3e68dfa61dc988d97cad28cfe >> Signed-off-by: Paolo Bonzini <pbonz...@redhat.com> >> --- >> fsdev/Makefile.objs | 7 +++++-- >> 1 file changed, 5 insertions(+), 2 deletions(-) > > Reviewed-by: Peter Maydell <peter.mayd...@linaro.org> > > I've also just noticed that hw/Makefile.objs guards the use > of the hw/9pfs directory with > devices-dirs-$(call land,$(CONFIG_VIRTFS),$(call > lor,$(CONFIG_VIRTIO),$(CONFIG_XEN))) += 9pfs/ > > so after b5dfdb082fc we're now somewhat redundantly guarding > the object files with both this check and with the new one > inside hw/9pfs/Makefile.objs. Maybe we should make the > hw/Makefile.objs guard use CONFIG_VIRTIO_9P where it > currently has CONFIG_VIRTIO and then drop the ifeq in > hw/9pfs/Makefile.objs ?
Yes, that makes sense. Paolo