[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 37/48] usb: build usb-host as module
From: |
Paolo Bonzini |
Subject: |
[PULL 37/48] usb: build usb-host as module |
Date: |
Thu, 8 Jul 2021 17:17:37 +0200 |
From: Gerd Hoffmann <kraxel@redhat.com>
Drop one more shared library dependency (libusb) from core qemu.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Jose R. Ziviani <jziviani@suse.de>
Message-Id: <20210624103836.2382472-34-kraxel@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@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 2b7f87872c..c0f314462a 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 817f3e027a..3ca6127937 100644
--- a/hw/usb/meson.build
+++ b/hw/usb/meson.build
@@ -72,8 +72,12 @@ if usbredir.found()
endif
# usb pass-through
-softmmu_ss.add(when: ['CONFIG_USB', 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
- [PULL 27/48] modules: module.h kerneldoc annotations, (continued)
- [PULL 27/48] modules: module.h kerneldoc annotations, Paolo Bonzini, 2021/07/08
- [PULL 24/48] modules: target-specific module build infrastructure, Paolo Bonzini, 2021/07/08
- [PULL 25/48] modules: add documentation for module sourcesets, Paolo Bonzini, 2021/07/08
- [PULL 21/48] modules: add tracepoints, Paolo Bonzini, 2021/07/08
- [PULL 22/48] modules: check arch and block load on mismatch, Paolo Bonzini, 2021/07/08
- [PULL 29/48] accel: autoload modules, Paolo Bonzini, 2021/07/08
- [PULL 28/48] modules: hook up modules.h to docs build, Paolo Bonzini, 2021/07/08
- [PULL 30/48] accel: add qtest module annotations, Paolo Bonzini, 2021/07/08
- [PULL 32/48] accel: add tcg module annotations, Paolo Bonzini, 2021/07/08
- [PULL 35/48] usb: drop usb_host_dev_is_scsi_storage hook, Paolo Bonzini, 2021/07/08
- [PULL 37/48] usb: build usb-host as module,
Paolo Bonzini <=
- [PULL 34/48] monitor: allow register hmp commands, Paolo Bonzini, 2021/07/08
- [PULL 33/48] accel: build tcg modular, Paolo Bonzini, 2021/07/08
- [PULL 26/48] modules: add module_obj() note to QOM docs, Paolo Bonzini, 2021/07/08
- [PULL 39/48] target/i386: Added MSRPM and IOPM size check, Paolo Bonzini, 2021/07/08
- [PULL 40/48] target/i386: Added DR6 and DR7 consistency checks, Paolo Bonzini, 2021/07/08
- [PULL 36/48] monitor/usb: register 'info usbhost' dynamically, Paolo Bonzini, 2021/07/08
- [PULL 38/48] monitor/tcg: move tcg hmp commands to accel/tcg, register them dynamically, Paolo Bonzini, 2021/07/08
- [PULL 45/48] hw/arm: add dependency on OR_IRQ for XLNX_VERSAL, Paolo Bonzini, 2021/07/08