Move stubs to the global stub_ss[] source set. These files
are now built once for all binaries, instead of one time
per system binary.
Add pixman to qemuutil library dependencies since pixman is
transitively included, which is needed to be able to include
prototypes for stubs we declared:
In file included from include/ui/console.h:4,
include/ui/qemu-pixman.h:10:10: fatal error: pixman.h: No such file or
directory
10 | #include <pixman.h>
| ^~~~~~~~~~
On OpenBSD, opengl headers are not available in default
include path, and thus we need to add opengl to list of
qemuutil dependencies, otherwise we get:
In file included from ../hw/display/acpi-vga-stub.c:4:
In file included from ../hw/display/vga_int.h:28:
In file included from include/ui/console.h:9:
include/ui/surface.h:11:11: fatal error: 'epoxy/gl.h' file not found
# include <epoxy/gl.h>
^~~~~~~~~~~~
1 error generated.
Signed-off-by: Philippe Mathieu-Daudé <[email protected]>
Reviewed-by: Pierrick Bouvier <[email protected]>
Reviewed-by: Richard Henderson <[email protected]>
Message-Id: <[email protected]>
---
meson.build | 2 +-
hw/display/acpi-vga-stub.c | 1 +
hw/display/meson.build | 19 ++++++++-----------
3 files changed, 10 insertions(+), 12 deletions(-)
diff --git a/meson.build b/meson.build
index b2154bb9287..ab726ea1152 100644
--- a/meson.build
+++ b/meson.build
@@ -3781,7 +3781,7 @@ util_ss = util_ss.apply({})
libqemuutil = static_library('qemuutil',
build_by_default: false,
sources: util_ss.sources() + stub_ss.sources() +
genh,
- dependencies: [util_ss.dependencies(), libm,
threads, glib, socket, malloc, rt])
+ dependencies: [util_ss.dependencies(), libm,
threads, glib, socket, malloc, rt, pixman, opengl])
qemuutil = declare_dependency(link_with: libqemuutil,
sources: genh + version_res,
dependencies: [event_loop_base])
diff --git a/hw/display/acpi-vga-stub.c b/hw/display/acpi-vga-stub.c
index a9b0ecf76d0..ee0fbf8175d 100644
--- a/hw/display/acpi-vga-stub.c
+++ b/hw/display/acpi-vga-stub.c
@@ -1,4 +1,5 @@
#include "qemu/osdep.h"
+#undef CONFIG_PIXMAN
#include "hw/acpi/acpi_aml_interface.h"
#include "vga_int.h"
diff --git a/hw/display/meson.build b/hw/display/meson.build
index 90e6c041bdb..e730c289b15 100644
--- a/hw/display/meson.build
+++ b/hw/display/meson.build
@@ -3,7 +3,8 @@ hw_display_modules = {}
system_ss.add(when: 'CONFIG_DDC', if_true: files('i2c-ddc.c'))
system_ss.add(when: 'CONFIG_EDID', if_true: files('edid-generate.c',
'edid-region.c'))
-system_ss.add(when: 'CONFIG_FW_CFG_DMA', if_true: files('ramfb.c'), if_false:
files('ramfb-stubs.c'))
+system_ss.add(when: 'CONFIG_FW_CFG_DMA', if_true: files('ramfb.c'))
+stub_ss.add(files('ramfb-stubs.c'))
system_ss.add(when: 'CONFIG_FW_CFG_DMA', if_true: files('ramfb-standalone.c'))
system_ss.add(when: 'CONFIG_VGA_CIRRUS', if_true: files('cirrus_vga.c'))
@@ -36,21 +37,20 @@ system_ss.add(when: 'CONFIG_VGA', if_true: files('vga.c'))
system_ss.add(when: 'CONFIG_VIRTIO', if_true: files('virtio-dmabuf.c'))
system_ss.add(when: 'CONFIG_DM163', if_true: files('dm163.c'))
+stub_ss.add([files('acpi-vga-stub.c'), pixman])
if (config_all_devices.has_key('CONFIG_VGA_CIRRUS') or
config_all_devices.has_key('CONFIG_VGA_PCI') or
config_all_devices.has_key('CONFIG_VMWARE_VGA') or
config_all_devices.has_key('CONFIG_ATI_VGA')
)
- system_ss.add(when: 'CONFIG_ACPI', if_true: files('acpi-vga.c'),
- if_false: files('acpi-vga-stub.c'))
+ system_ss.add(when: 'CONFIG_ACPI', if_true: files('acpi-vga.c'))
endif
if config_all_devices.has_key('CONFIG_QXL')
qxl_ss = ss.source_set()
qxl_ss.add(when: 'CONFIG_QXL', if_true: [files('qxl.c', 'qxl-logger.c',
'qxl-render.c'),
pixman, spice])
- qxl_ss.add(when: 'CONFIG_ACPI', if_true: files('acpi-vga.c'),
- if_false: files('acpi-vga-stub.c'))
+ qxl_ss.add(when: 'CONFIG_ACPI', if_true: files('acpi-vga.c'))
hw_display_modules += {'qxl': qxl_ss}
endif
@@ -119,16 +119,14 @@ if config_all_devices.has_key('CONFIG_VIRTIO_VGA')
if_true: [files('virtio-vga.c'), pixman])
virtio_vga_ss.add(when: 'CONFIG_VHOST_USER_VGA',
if_true: files('vhost-user-vga.c'))
- virtio_vga_ss.add(when: 'CONFIG_ACPI', if_true: files('acpi-vga.c'),
- if_false: files('acpi-vga-stub.c'))
+ virtio_vga_ss.add(when: 'CONFIG_ACPI', if_true: files('acpi-vga.c'))
hw_display_modules += {'virtio-vga': virtio_vga_ss}
if virgl.found() and opengl.found()
virtio_vga_gl_ss = ss.source_set()
virtio_vga_gl_ss.add(when: ['CONFIG_VIRTIO_VGA', virgl, opengl],
if_true: [files('virtio-vga-gl.c'), pixman])
- virtio_vga_gl_ss.add(when: 'CONFIG_ACPI', if_true: files('acpi-vga.c'),
- if_false:
files('acpi-vga-stub.c'))
+ virtio_vga_gl_ss.add(when: 'CONFIG_ACPI', if_true: files('acpi-vga.c'))
hw_display_modules += {'virtio-vga-gl': virtio_vga_gl_ss}
endif
@@ -136,8 +134,7 @@ if config_all_devices.has_key('CONFIG_VIRTIO_VGA')
virtio_vga_rutabaga_ss = ss.source_set()
virtio_vga_rutabaga_ss.add(when: ['CONFIG_VIRTIO_VGA', rutabaga],
if_true: [files('virtio-vga-rutabaga.c'),
pixman])
- virtio_vga_rutabaga_ss.add(when: 'CONFIG_ACPI', if_true:
files('acpi-vga.c'),
- if_false:
files('acpi-vga-stub.c'))
+ virtio_vga_rutabaga_ss.add(when: 'CONFIG_ACPI', if_true:
files('acpi-vga.c'))
hw_display_modules += {'virtio-vga-rutabaga': virtio_vga_rutabaga_ss}
endif
endif
--
2.53.0