qemu/hw
Daniel P. Berrangé 8b8437259c hw/display: avoid creating empty loadable modules
When using --disable-virglrenderer, QEMU still creates

  hw-display-virtio-gpu-gl.so
  hw-display-virtio-vga-gl.so
  hw-display-virtio-gpu-pci-gl.so

but when these are loaded, they provide no functionality as the code
which registers types is not compiled in. Funtionally this is
relatively harmless, because QEMU is fine loading a module with no
types.

This is rather confusing for users and OS distro maintainers though,
as they think they have the GL functionality built, but in fact the
module they are looking at provides nothing of value.

The root cause is the use of 'when/if_true' rules when adding sources
to the module source set. If all the rules evaluate to false, then we
have declared the module, but not added anything to it.  We need to
put declaration of the entire module inside a condition based on
existance of the 3rd party library deps that are mandatory.

Fixes: https://gitlab.com/qemu-project/qemu/-/issues/1352
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
Message-Id: <20221219125830.2369169-1-berrange@redhat.com>
[Do not check for pixman. - Paolo]
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2023-01-11 10:44:34 +01:00
..
9pfs error handling: Use RETRY_ON_EINTR() macro where applicable 2023-01-09 13:50:47 +01:00
acpi acpi: cpuhp: fix guest-visible maximum access size to the legacy reg block 2023-01-08 01:54:23 -05:00
adc hw/adc: Make adci[*] R/W in NPCM7XX ADC 2022-07-18 13:20:14 +01:00
alpha include/hw/pci: Break inclusion loop pci_bridge.h and cxl.h 2023-01-08 01:54:22 -05:00
arm i.MX7D: Connect IRQs to GPIO devices. 2023-01-05 15:04:17 +00:00
audio include/hw/pci: Split pci_device.h off pci.h 2023-01-08 01:54:22 -05:00
avr
block hw/virtio: generalise CHR_EVENT_CLOSED handling 2022-12-01 02:30:13 -05:00
char include/hw/pci: Split pci_device.h off pci.h 2023-01-08 01:54:22 -05:00
core accel: introduce accelerator blocker API 2023-01-11 09:59:39 +01:00
cpu
cris
cxl hw/cxl/cdat: CXL CDAT Data Object Exchange implementation 2022-11-07 13:12:19 -05:00
display hw/display: avoid creating empty loadable modules 2023-01-11 10:44:34 +01:00
dma treewide: Remove the unnecessary space before semicolon 2022-10-24 13:41:10 +02:00
gpio hw/gpio/meson: Introduce dedicated config switch for hw/gpio/mpc8xxx 2022-10-17 16:15:09 -03:00
hppa hw: Remove unused MAX_IDE_BUS define 2022-10-31 11:32:07 +01:00
hyperv hw/hyperv/vmbus: Use device_cold_reset() and bus_cold_reset() 2022-12-16 15:55:32 +00:00
i2c hw/acpi/Kconfig: Rename ACPI_X86_ICH to ACPI_ICH9 2023-01-08 01:54:21 -05:00
i386 virtio,pc,pci: features, cleanups, fixes 2023-01-09 10:07:12 +00:00
ide virtio,pc,pci: features, cleanups, fixes 2023-01-09 10:07:12 +00:00
input hw/input/tsc2xxx: Constify set_transform()'s MouseTransformInfo arg 2023-01-05 14:11:15 +00:00
intc pull-loongarch-20230106 2023-01-07 14:25:38 +00:00
ipack include/hw/pci: Split pci_device.h off pci.h 2023-01-08 01:54:22 -05:00
ipmi include/hw/pci: Split pci_device.h off pci.h 2023-01-08 01:54:22 -05:00
isa include/hw/pci: Split pci_device.h off pci.h 2023-01-08 01:54:22 -05:00
loongarch hw/intc/loongarch_pch: Change default irq number of pch irq controller 2023-01-06 14:12:43 +08:00
m68k hw: Add compat machines for 8.0 2022-12-21 06:35:28 -05:00
mem hw/cxl/device: Add Flex Bus Port DVSEC 2022-12-21 07:32:24 -05:00
microblaze hw/microblaze: pass random seed to fdt 2022-09-21 19:59:56 +02:00
mips include/hw/pci: Split pci_device.h off pci.h 2023-01-08 01:54:22 -05:00
misc include/hw/pci: Split pci_device.h off pci.h 2023-01-08 01:54:22 -05:00
net include/hw/pci: Split pci_device.h off pci.h 2023-01-08 01:54:22 -05:00
nios2 hw/nios2: set machine->fdt in nios2_load_dtb() 2022-10-17 16:15:10 -03:00
nubus
nvme include/hw/pci: Split pci_device.h off pci.h 2023-01-08 01:54:22 -05:00
nvram qapi machine: Elide redundant has_FOO in generated C 2022-12-14 20:04:47 +01:00
openrisc openrisc: re-randomize rng-seed on reboot 2022-10-27 11:34:31 +01:00
pci include/hw/pci: Split pci_device.h off pci.h 2023-01-08 01:54:22 -05:00
pci-bridge include/hw/cxl: Move typedef PXBDev to cxl.h, and put it to use 2023-01-08 01:54:22 -05:00
pci-host include/hw/pci: Split pci_device.h off pci.h 2023-01-08 01:54:22 -05:00
pcmcia
ppc include/hw/pci: Split pci_device.h off pci.h 2023-01-08 01:54:22 -05:00
rdma include/hw/pci: Split pci_device.h off pci.h 2023-01-08 01:54:22 -05:00
remote Replace use of qdev_reset_all() with device_cold_reset() 2022-12-16 15:55:32 +00:00
riscv hw/riscv: opentitan: Drop "hartid-base" and "priority-base" initialization 2023-01-06 10:42:55 +10:00
rtc goldfish_rtc: Add big-endian property 2022-09-04 07:02:56 +01:00
rx rx: re-randomize rng-seed on reboot 2022-10-27 11:34:31 +01:00
s390x * s390x header clean-ups from Philippe 2023-01-09 15:54:31 +00:00
scsi vhost-scsi: fix memleak of vsc->inflight 2023-01-08 01:54:23 -05:00
sd hw/sd/sdhci: Support big endian SD host controller interfaces 2022-12-21 14:17:55 -03:00
sensor hw/sensor: Add Renesas ISL69259 device model 2022-07-14 16:24:38 +02:00
sh4
smbios include/hw/pci: Split pci_device.h off pci.h 2023-01-08 01:54:22 -05:00
sparc machine: make memory-backend a link property 2022-05-12 12:29:44 +02:00
sparc64 hw: Remove unused MAX_IDE_BUS define 2022-10-31 11:32:07 +01:00
ssi aspeed/smc: Cache AspeedSMCClass 2022-10-24 11:20:15 +02:00
timer i.MX6UL: Add a specific GPT timer instance for the i.MX6UL 2023-01-05 15:02:08 +00:00
tpm tpm_crb: Avoid backend startup just before shutdown under Xen 2022-09-09 17:55:59 -04:00
tricore
usb include/hw/pci: Split pci_device.h off pci.h 2023-01-08 01:54:22 -05:00
vfio include/hw/pci: Split pci_device.h off pci.h 2023-01-08 01:54:22 -05:00
virtio virtio-pci: fix proxy->vector_irqfd leak in virtio_pci_set_guest_notifiers 2023-01-08 01:54:23 -05:00
watchdog include/hw/pci: Split pci_device.h off pci.h 2023-01-08 01:54:22 -05:00
xen hw/xen: use G_GNUC_PRINTF/SCANF for various functions 2023-01-11 10:44:33 +01:00
xenpv Warn user if the vga flag is passed but no vga device is created 2022-05-09 08:21:14 +02:00
xtensa
Kconfig hw/loongarch: Add support loongson3 virt machine type. 2022-06-06 18:09:03 +00:00
meson.build hw/loongarch: Add support loongson3 virt machine type. 2022-06-06 18:09:03 +00:00