[Qemu-devel] [PATCH 2/2] usb: only build usb-host with CONFIG_USB=y

Gerd Hoffmann posted 2 patches 8 years, 5 months ago
[Qemu-devel] [PATCH 2/2] usb: only build usb-host with CONFIG_USB=y
Posted by Gerd Hoffmann 8 years, 5 months ago
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
 hw/usb/Makefile.objs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/hw/usb/Makefile.objs b/hw/usb/Makefile.objs
index a43ebbc17f..757e365562 100644
--- a/hw/usb/Makefile.objs
+++ b/hw/usb/Makefile.objs
@@ -38,7 +38,7 @@ endif
 common-obj-$(CONFIG_USB_REDIR) += redirect.o quirks.o
 
 # usb pass-through
-ifeq ($(CONFIG_LIBUSB),y)
+ifeq ($(CONFIG_LIBUSB)$(CONFIG_USB),yy)
 common-obj-y += host-libusb.o host-legacy.o
 else
 common-obj-y += host-stub.o
-- 
2.9.3


Re: [Qemu-devel] [PATCH 2/2] usb: only build usb-host with CONFIG_USB=y
Posted by Thomas Huth 8 years, 5 months ago
On 08.09.2017 13:12, Gerd Hoffmann wrote:
> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
> ---
>  hw/usb/Makefile.objs | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/hw/usb/Makefile.objs b/hw/usb/Makefile.objs
> index a43ebbc17f..757e365562 100644
> --- a/hw/usb/Makefile.objs
> +++ b/hw/usb/Makefile.objs
> @@ -38,7 +38,7 @@ endif
>  common-obj-$(CONFIG_USB_REDIR) += redirect.o quirks.o
>  
>  # usb pass-through
> -ifeq ($(CONFIG_LIBUSB),y)
> +ifeq ($(CONFIG_LIBUSB)$(CONFIG_USB),yy)
>  common-obj-y += host-libusb.o host-legacy.o
>  else
>  common-obj-y += host-stub.o

Strange that you did not need the hack with "common-obj-$(CONFIG_ALL)"
in this patch like I had to do in the patch that I sent today... but
I've just checked it, and it seems to work this way. So:

Tested-by: Thomas Huth <thuth@redhat.com>