* [PATCH] virtio-gpu: only compile virtio-gpu-3d.c for CONFIG_VIRGL=y
@ 2020-10-26 14:28 Gerd Hoffmann
2020-10-26 19:57 ` Marc-André Lureau
2020-10-27 9:59 ` Philippe Mathieu-Daudé
0 siblings, 2 replies; 3+ messages in thread
From: Gerd Hoffmann @ 2020-10-26 14:28 UTC (permalink / raw)
To: qemu-devel; +Cc: Paolo Bonzini, Gerd Hoffmann, Michael S. Tsirkin
There is no actual code in the CONFIG_VIRGL=n case. So building is
(a) pointless and (b) makes macos ranlib complain.
Reported-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
hw/display/virtio-gpu-3d.c | 4 ----
hw/display/meson.build | 4 +++-
2 files changed, 3 insertions(+), 5 deletions(-)
diff --git a/hw/display/virtio-gpu-3d.c b/hw/display/virtio-gpu-3d.c
index 1bd33d7aedc6..0b0c11474dd3 100644
--- a/hw/display/virtio-gpu-3d.c
+++ b/hw/display/virtio-gpu-3d.c
@@ -17,8 +17,6 @@
#include "hw/virtio/virtio.h"
#include "hw/virtio/virtio-gpu.h"
-#ifdef CONFIG_VIRGL
-
#include <virglrenderer.h>
static struct virgl_renderer_callbacks virtio_gpu_3d_cbs;
@@ -633,5 +631,3 @@ int virtio_gpu_virgl_get_num_capsets(VirtIOGPU *g)
return capset2_max_ver ? 2 : 1;
}
-
-#endif /* CONFIG_VIRGL */
diff --git a/hw/display/meson.build b/hw/display/meson.build
index 0d5ddecd6503..5906b96b830e 100644
--- a/hw/display/meson.build
+++ b/hw/display/meson.build
@@ -57,7 +57,9 @@ softmmu_ss.add(when: [pixman, 'CONFIG_ATI_VGA'], if_true: files('ati.c', 'ati_2d
if config_all_devices.has_key('CONFIG_VIRTIO_GPU')
virtio_gpu_ss = ss.source_set()
virtio_gpu_ss.add(when: 'CONFIG_VIRTIO_GPU',
- if_true: [files('virtio-gpu-base.c', 'virtio-gpu.c', 'virtio-gpu-3d.c'), pixman, virgl])
+ if_true: [files('virtio-gpu-base.c', 'virtio-gpu.c'), pixman, virgl])
+ virtio_gpu_ss.add(when: ['CONFIG_VIRTIO_GPU', 'CONFIG_VIRGL'],
+ if_true: [files('virtio-gpu-3d.c'), pixman, virgl])
virtio_gpu_ss.add(when: 'CONFIG_VHOST_USER_GPU', if_true: files('vhost-user-gpu.c'))
hw_display_modules += {'virtio-gpu': virtio_gpu_ss}
endif
--
2.27.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] virtio-gpu: only compile virtio-gpu-3d.c for CONFIG_VIRGL=y
2020-10-26 14:28 [PATCH] virtio-gpu: only compile virtio-gpu-3d.c for CONFIG_VIRGL=y Gerd Hoffmann
@ 2020-10-26 19:57 ` Marc-André Lureau
2020-10-27 9:59 ` Philippe Mathieu-Daudé
1 sibling, 0 replies; 3+ messages in thread
From: Marc-André Lureau @ 2020-10-26 19:57 UTC (permalink / raw)
To: Gerd Hoffmann; +Cc: Paolo Bonzini, QEMU, Michael S. Tsirkin
[-- Attachment #1: Type: text/plain, Size: 2077 bytes --]
On Mon, Oct 26, 2020 at 6:29 PM Gerd Hoffmann <kraxel@redhat.com> wrote:
> There is no actual code in the CONFIG_VIRGL=n case. So building is
> (a) pointless and (b) makes macos ranlib complain.
>
> Reported-by: Paolo Bonzini <pbonzini@redhat.com>
> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
---
> hw/display/virtio-gpu-3d.c | 4 ----
> hw/display/meson.build | 4 +++-
> 2 files changed, 3 insertions(+), 5 deletions(-)
>
> diff --git a/hw/display/virtio-gpu-3d.c b/hw/display/virtio-gpu-3d.c
> index 1bd33d7aedc6..0b0c11474dd3 100644
> --- a/hw/display/virtio-gpu-3d.c
> +++ b/hw/display/virtio-gpu-3d.c
> @@ -17,8 +17,6 @@
> #include "hw/virtio/virtio.h"
> #include "hw/virtio/virtio-gpu.h"
>
> -#ifdef CONFIG_VIRGL
> -
> #include <virglrenderer.h>
>
> static struct virgl_renderer_callbacks virtio_gpu_3d_cbs;
> @@ -633,5 +631,3 @@ int virtio_gpu_virgl_get_num_capsets(VirtIOGPU *g)
>
> return capset2_max_ver ? 2 : 1;
> }
> -
> -#endif /* CONFIG_VIRGL */
> diff --git a/hw/display/meson.build b/hw/display/meson.build
> index 0d5ddecd6503..5906b96b830e 100644
> --- a/hw/display/meson.build
> +++ b/hw/display/meson.build
> @@ -57,7 +57,9 @@ softmmu_ss.add(when: [pixman, 'CONFIG_ATI_VGA'],
> if_true: files('ati.c', 'ati_2d
> if config_all_devices.has_key('CONFIG_VIRTIO_GPU')
> virtio_gpu_ss = ss.source_set()
> virtio_gpu_ss.add(when: 'CONFIG_VIRTIO_GPU',
> - if_true: [files('virtio-gpu-base.c', 'virtio-gpu.c',
> 'virtio-gpu-3d.c'), pixman, virgl])
> + if_true: [files('virtio-gpu-base.c', 'virtio-gpu.c'),
> pixman, virgl])
> + virtio_gpu_ss.add(when: ['CONFIG_VIRTIO_GPU', 'CONFIG_VIRGL'],
> + if_true: [files('virtio-gpu-3d.c'), pixman, virgl])
> virtio_gpu_ss.add(when: 'CONFIG_VHOST_USER_GPU', if_true:
> files('vhost-user-gpu.c'))
> hw_display_modules += {'virtio-gpu': virtio_gpu_ss}
> endif
> --
> 2.27.0
>
>
>
--
Marc-André Lureau
[-- Attachment #2: Type: text/html, Size: 3089 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] virtio-gpu: only compile virtio-gpu-3d.c for CONFIG_VIRGL=y
2020-10-26 14:28 [PATCH] virtio-gpu: only compile virtio-gpu-3d.c for CONFIG_VIRGL=y Gerd Hoffmann
2020-10-26 19:57 ` Marc-André Lureau
@ 2020-10-27 9:59 ` Philippe Mathieu-Daudé
1 sibling, 0 replies; 3+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-10-27 9:59 UTC (permalink / raw)
To: Gerd Hoffmann, qemu-devel, Mark Cave-Ayland, Emmanuel Blot
Cc: Paolo Bonzini, Michael S. Tsirkin
On 10/26/20 3:28 PM, Gerd Hoffmann wrote:
> There is no actual code in the CONFIG_VIRGL=n case. So building is
> (a) pointless and (b) makes macos ranlib complain.
>
> Reported-by: Paolo Bonzini <pbonzini@redhat.com>
> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
> ---
> hw/display/virtio-gpu-3d.c | 4 ----
> hw/display/meson.build | 4 +++-
> 2 files changed, 3 insertions(+), 5 deletions(-)
>
> diff --git a/hw/display/virtio-gpu-3d.c b/hw/display/virtio-gpu-3d.c
> index 1bd33d7aedc6..0b0c11474dd3 100644
> --- a/hw/display/virtio-gpu-3d.c
> +++ b/hw/display/virtio-gpu-3d.c
> @@ -17,8 +17,6 @@
> #include "hw/virtio/virtio.h"
> #include "hw/virtio/virtio-gpu.h"
>
> -#ifdef CONFIG_VIRGL
> -
> #include <virglrenderer.h>
>
> static struct virgl_renderer_callbacks virtio_gpu_3d_cbs;
> @@ -633,5 +631,3 @@ int virtio_gpu_virgl_get_num_capsets(VirtIOGPU *g)
>
> return capset2_max_ver ? 2 : 1;
> }
> -
> -#endif /* CONFIG_VIRGL */
> diff --git a/hw/display/meson.build b/hw/display/meson.build
> index 0d5ddecd6503..5906b96b830e 100644
> --- a/hw/display/meson.build
> +++ b/hw/display/meson.build
> @@ -57,7 +57,9 @@ softmmu_ss.add(when: [pixman, 'CONFIG_ATI_VGA'], if_true: files('ati.c', 'ati_2d
> if config_all_devices.has_key('CONFIG_VIRTIO_GPU')
> virtio_gpu_ss = ss.source_set()
> virtio_gpu_ss.add(when: 'CONFIG_VIRTIO_GPU',
> - if_true: [files('virtio-gpu-base.c', 'virtio-gpu.c', 'virtio-gpu-3d.c'), pixman, virgl])
> + if_true: [files('virtio-gpu-base.c', 'virtio-gpu.c'), pixman, virgl])
> + virtio_gpu_ss.add(when: ['CONFIG_VIRTIO_GPU', 'CONFIG_VIRGL'],
> + if_true: [files('virtio-gpu-3d.c'), pixman, virgl])
> virtio_gpu_ss.add(when: 'CONFIG_VHOST_USER_GPU', if_true: files('vhost-user-gpu.c'))
> hw_display_modules += {'virtio-gpu': virtio_gpu_ss}
> endif
Mark suggested to test this patch to see if this solve the issue
introduced by commit da0dfe251d7 ("build: fix macOS --enable-modules
build") but it does not:
missing object type 'virtio-gpu-device'
Broken pipe
../tests/qtest/libqtest.c:176: kill_qemu() detected QEMU death from
signal 6 (Abort trap: 6)
ERROR qtest-aarch64/device-introspect-test - too few tests run (expected
6, got 5)
gmake: *** [Makefile.mtest:905: run-test-111] Error 1
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-10-27 10:08 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-26 14:28 [PATCH] virtio-gpu: only compile virtio-gpu-3d.c for CONFIG_VIRGL=y Gerd Hoffmann
2020-10-26 19:57 ` Marc-André Lureau
2020-10-27 9:59 ` Philippe Mathieu-Daudé
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).