[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v4 33/34] usb: build usb-host as module
From: |
Gerd Hoffmann |
Subject: |
[PATCH v4 33/34] usb: build usb-host as module |
Date: |
Thu, 24 Jun 2021 12:38:35 +0200 |
Drop one more shared library dependency (libusb) from core qemu.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
hw/usb/host-libusb.c | 1 +
hw/usb/meson.build | 8 ++++++--
2 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/hw/usb/host-libusb.c b/hw/usb/host-libusb.c
index 2b7f87872ce3..c0f314462aaf 100644
--- a/hw/usb/host-libusb.c
+++ b/hw/usb/host-libusb.c
@@ -1777,6 +1777,7 @@ static TypeInfo usb_host_dev_info = {
.class_init = usb_host_class_initfn,
.instance_init = usb_host_instance_init,
};
+module_obj(TYPE_USB_HOST_DEVICE);
static void usb_host_register_types(void)
{
diff --git a/hw/usb/meson.build b/hw/usb/meson.build
index 3d8f2ae99302..0a6029ec9797 100644
--- a/hw/usb/meson.build
+++ b/hw/usb/meson.build
@@ -72,8 +72,12 @@ if config_host.has_key('CONFIG_USB_REDIR')
endif
# usb pass-through
-softmmu_ss.add(when: ['CONFIG_USB', 'CONFIG_USB_LIBUSB', libusb],
- if_true: files('host-libusb.c'))
+if config_host.has_key('CONFIG_USB_LIBUSB')
+ usbhost_ss = ss.source_set()
+ usbhost_ss.add(when: ['CONFIG_USB', libusb],
+ if_true: files('host-libusb.c'))
+ hw_usb_modules += {'host': usbhost_ss}
+endif
softmmu_ss.add(when: ['CONFIG_USB', 'CONFIG_XEN', libusb], if_true:
files('xen-usb.c'))
--
2.31.1
- [PATCH v4 24/34] modules: hook up modules.h to docs build, (continued)
- [PATCH v4 24/34] modules: hook up modules.h to docs build, Gerd Hoffmann, 2021/06/24
- [PATCH v4 25/34] accel: autoload modules, Gerd Hoffmann, 2021/06/24
- [PATCH v4 27/34] accel: build qtest modular, Gerd Hoffmann, 2021/06/24
- [PATCH v4 26/34] accel: add qtest module annotations, Gerd Hoffmann, 2021/06/24
- [PATCH v4 29/34] accel: build tcg modular, Gerd Hoffmann, 2021/06/24
- [PATCH v4 28/34] accel: add tcg module annotations, Gerd Hoffmann, 2021/06/24
- [PATCH v4 30/34] monitor: allow register hmp commands, Gerd Hoffmann, 2021/06/24
- [PATCH v4 31/34] usb: drop usb_host_dev_is_scsi_storage hook, Gerd Hoffmann, 2021/06/24
- [PATCH v4 33/34] usb: build usb-host as module,
Gerd Hoffmann <=
- [PATCH v4 32/34] monitor/usb: register 'info usbhost' dynamically, Gerd Hoffmann, 2021/06/24
- [PATCH v4 34/34] monitor/tcg: move tcg hmp commands to accel/tcg, register them dynamically, Gerd Hoffmann, 2021/06/24
- Re: [PATCH v4 00/34] modules: add meta-data database, Jose R. Ziviani, 2021/06/24
- Re: [PATCH v4 00/34] modules: add meta-data database, Dr. David Alan Gilbert, 2021/06/24