From: Philippe Mathieu-Daudé Date: Tue, 31 Dec 2019 18:32:03 +0000 (+0100) Subject: hw/usb/redirect: Do not link 'usb-redir' device when USB not enabled X-Git-Tag: v5.0.0-rc0~151^2~29 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=be3d7ee960143959c5866daf15f2ab93f3f282b8;p=thirdparty%2Fqemu.git hw/usb/redirect: Do not link 'usb-redir' device when USB not enabled The 'usb-redir' device requires the USB core code to work. Do not link it when there is no USB support. This fixes: $ qemu-system-tricore -M tricore_testboard -device usb-redir qemu-system-tricore: -device usb-redir: No 'usb-bus' bus found for device 'usb-redir' Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20191231183216.6781-2-philmd@redhat.com> Signed-off-by: Paolo Bonzini --- diff --git a/hw/usb/Makefile.objs b/hw/usb/Makefile.objs index 0ab20f9d731..0052d49ce1d 100644 --- a/hw/usb/Makefile.objs +++ b/hw/usb/Makefile.objs @@ -39,9 +39,11 @@ common-obj-$(CONFIG_USB_STORAGE_MTP) += dev-mtp.o endif # usb redirection +ifeq ($(CONFIG_USB),y) common-obj-$(CONFIG_USB_REDIR) += redirect.o quirks.o redirect.o-cflags = $(USB_REDIR_CFLAGS) redirect.o-libs = $(USB_REDIR_LIBS) +endif # usb pass-through ifeq ($(CONFIG_USB_LIBUSB)$(CONFIG_USB),yy)