Skip to contentSkip to conversation

Meson integration for 5.2

PATCH In review Paolo Bonzini 12 participants 250 messages Aug 6, 2020 – Aug 10, 2020 Page 3 of 3

Subsystems (10)
lore
Share & tools
lore
#144 lore raw

Re: [PATCH 108/143] meson: convert hw/intc

In reply to Paolo Bonzini
Quoted 18 lines · Paolo Bonzini

Il gio 6 ago 2020, 23:02 Peter Maydell <[email protected] <mailto:[email protected]>> ha scritto:

On Thu, 6 Aug 2020 at 21:10, Paolo Bonzini <[email protected] <mailto:[email protected]>> wrote:
>
> From: Marc-André Lureau <[email protected] <mailto:[email protected]>>
>
> Signed-off-by: Marc-André Lureau <[email protected] <mailto:[email protected]>>
> Signed-off-by: Paolo Bonzini <[email protected] <mailto:[email protected]>>

Compared to:

Quoted 7 lines

> -common-obj-$(CONFIG_HEATHROW_PIC) += heathrow_pic.o

> +softmmu_ss.add(when: 'CONFIG_HEATHROW_PIC', if_true:
files('heathrow_pic.c'))

this feels pretty clunky. Doesn't Meson have a nicer way of expressing this kind of thing?

Don't forget we also use:

HELPERS-$(call land,$(CONFIG_SOFTMMU),$(CONFIG_LINUX)) += qemu-bridge-helper$(EXESUF)
ifeq ($(CONFIG_LINUX)$(CONFIG_VIRGL)$(CONFIG_GBM)$(CONFIG_TOOLS),yyyy) HELPERS-y += vhost-user-gpu$(EXESUF)
vhost-user-json-y += contrib/vhost-user-gpu/50-qemu-gpu.json endif

Quoted 36 lines

Nope, in fact it turns out we had to implement it ourselves because there was no way to express it at all in the way that QEMU build multiple binaries. My initial version didn't have the when/if_true part but the maintainer was quite adamant on requiring them instead of just relying on positional arguments.

Unfortunately, while common in QEMU, and in Linux too, it doesn't seem to be a very common idiom in general; Makefiles do express it in a very readable and concise way.

I cannot deny it looks clunky. While Meson does have a huge advantage in terms of predictability and lack of surprises when doing harder things, the imperative syntax is heavier when dealing with the simplest. They do remain simple (it's still one line of coffee), but the quotes and commas seem to be enough to "switch" our brain to a different mode.

My opinion is that you don't really look at these things very much, so it doesn't really matter, but I can see people disagreeing.

(You had already pointed this out during the very first discussions, if I remember correctly. I can't add much except that with extra experience the balance does tilt in favor of Meson despite the heavier syntax for simple cases).

Paolo

It's really
common and I'd hope that a build system language would provide less long-winded ways to write common operations...

thanks
-- PMM

#145 lore raw

PATCH 109/143 meson: convert hw/input

In reply to Paolo Bonzini

From: Marc-André Lureau <[email protected]>

---
 hw/Makefile.objs       |  1 -
 hw/input/Makefile.objs | 18 ------------------
 hw/input/meson.build   | 18 ++++++++++++++++++
 hw/meson.build         |  1 +
 4 files changed, 19 insertions(+), 19 deletions(-)
 delete mode 100644 hw/input/Makefile.objs
 create mode 100644 hw/input/meson.build
hw/Makefile.objs +0 -1
index 80b1041..3feccd8 100644
@@ -12,7 +12,6 @@ devices-dirs-y += gpio/
 devices-dirs-$(CONFIG_HYPERV) += hyperv/
 devices-dirs-$(CONFIG_I2C) += i2c/
 devices-dirs-y += ide/
-devices-dirs-y += input/
 endif
 
 common-obj-y += $(devices-dirs-y)
hw/input/Makefile.objs deleted +0 -18
deleted file mode 100644
index abc1ff0..0000000
@@ -1,18 +0,0 @@
-common-obj-$(CONFIG_ADB) += adb.o adb-mouse.o adb-kbd.o
-common-obj-y += hid.o
-common-obj-$(CONFIG_LM832X) += lm832x.o
-common-obj-$(CONFIG_PCKBD) += pckbd.o
-common-obj-$(CONFIG_PL050) += pl050.o
-common-obj-$(CONFIG_PS2) += ps2.o
-common-obj-$(CONFIG_STELLARIS_INPUT) += stellaris_input.o
-common-obj-$(CONFIG_TSC2005) += tsc2005.o
-
-common-obj-$(CONFIG_VIRTIO_INPUT) += virtio-input.o
-common-obj-$(CONFIG_VIRTIO_INPUT) += virtio-input-hid.o
-common-obj-$(CONFIG_VIRTIO_INPUT_HOST) += virtio-input-host.o
-common-obj-$(CONFIG_VHOST_USER_INPUT) += vhost-user-input.o
-
-common-obj-$(CONFIG_MILKYMIST) += milkymist-softusb.o
-common-obj-$(CONFIG_PXA2XX) += pxa2xx_keypad.o
-common-obj-$(CONFIG_TSC210X) += tsc210x.o
-common-obj-$(CONFIG_LASIPS2) += lasips2.o
hw/input/meson.build new file +18 -0
new file mode 100644
index 0000000..e7285b1
@@ -0,0 +1,18 @@
+softmmu_ss.add(files('hid.c'))
+softmmu_ss.add(when: 'CONFIG_ADB', if_true: files('adb.c', 'adb-mouse.c', 'adb-kbd.c'))
+softmmu_ss.add(when: 'CONFIG_LM832X', if_true: files('lm832x.c'))
+softmmu_ss.add(when: 'CONFIG_PCKBD', if_true: files('pckbd.c'))
+softmmu_ss.add(when: 'CONFIG_PL050', if_true: files('pl050.c'))
+softmmu_ss.add(when: 'CONFIG_PS2', if_true: files('ps2.c'))
+softmmu_ss.add(when: 'CONFIG_STELLARIS_INPUT', if_true: files('stellaris_input.c'))
+softmmu_ss.add(when: 'CONFIG_TSC2005', if_true: files('tsc2005.c'))
+
+softmmu_ss.add(when: 'CONFIG_VIRTIO_INPUT', if_true: files('virtio-input.c'))
+softmmu_ss.add(when: 'CONFIG_VIRTIO_INPUT', if_true: files('virtio-input-hid.c'))
+softmmu_ss.add(when: 'CONFIG_VIRTIO_INPUT_HOST', if_true: files('virtio-input-host.c'))
+softmmu_ss.add(when: 'CONFIG_VHOST_USER_INPUT', if_true: files('vhost-user-input.c'))
+
+softmmu_ss.add(when: 'CONFIG_MILKYMIST', if_true: files('milkymist-softusb.c'))
+softmmu_ss.add(when: 'CONFIG_PXA2XX', if_true: files('pxa2xx_keypad.c'))
+softmmu_ss.add(when: 'CONFIG_TSC210X', if_true: files('tsc210x.c'))
+softmmu_ss.add(when: 'CONFIG_LASIPS2', if_true: files('lasips2.c'))
hw/meson.build +1 -0
index 986e710..b15c8d0 100644
@@ -1,4 +1,5 @@
 subdir('core')
+subdir('input')
 subdir('intc')
 subdir('ipack')
 subdir('ipmi')
Signature · 1 line
1.8.3.1
#146 lore raw

PATCH 110/143 meson: convert hw/ide

In reply to Paolo Bonzini

From: Marc-André Lureau <[email protected]>

---
 hw/Makefile.objs     |  1 -
 hw/ide/Makefile.objs | 14 --------------
 hw/ide/meson.build   | 14 ++++++++++++++
 hw/meson.build       |  1 +
 4 files changed, 15 insertions(+), 15 deletions(-)
 delete mode 100644 hw/ide/Makefile.objs
 create mode 100644 hw/ide/meson.build
hw/Makefile.objs +0 -1
index 3feccd8..02c5c0d 100644
@@ -11,7 +11,6 @@ devices-dirs-y += dma/
 devices-dirs-y += gpio/
 devices-dirs-$(CONFIG_HYPERV) += hyperv/
 devices-dirs-$(CONFIG_I2C) += i2c/
-devices-dirs-y += ide/
 endif
 
 common-obj-y += $(devices-dirs-y)
hw/ide/Makefile.objs deleted +0 -14
deleted file mode 100644
index faf04e0..0000000
@@ -1,14 +0,0 @@
-common-obj-$(CONFIG_IDE_CORE) += core.o atapi.o
-common-obj-$(CONFIG_IDE_QDEV) += qdev.o
-common-obj-$(CONFIG_IDE_PCI) += pci.o
-common-obj-$(CONFIG_IDE_ISA) += isa.o ioport.o
-common-obj-$(CONFIG_IDE_PIIX) += piix.o ioport.o
-common-obj-$(CONFIG_IDE_CMD646) += cmd646.o
-common-obj-$(CONFIG_IDE_MACIO) += macio.o
-common-obj-$(CONFIG_IDE_MMIO) += mmio.o
-common-obj-$(CONFIG_IDE_VIA) += via.o
-common-obj-$(CONFIG_MICRODRIVE) += microdrive.o
-common-obj-$(CONFIG_AHCI) += ahci.o
-common-obj-$(CONFIG_AHCI_ICH9) += ich.o
-common-obj-$(CONFIG_ALLWINNER_A10) += ahci-allwinner.o
-common-obj-$(CONFIG_IDE_SII3112) += sii3112.o
hw/ide/meson.build new file +14 -0
new file mode 100644
index 0000000..ddcb3b2
@@ -0,0 +1,14 @@
+softmmu_ss.add(when: 'CONFIG_AHCI', if_true: files('ahci.c'))
+softmmu_ss.add(when: 'CONFIG_AHCI_ICH9', if_true: files('ich.c'))
+softmmu_ss.add(when: 'CONFIG_ALLWINNER_A10', if_true: files('ahci-allwinner.c'))
+softmmu_ss.add(when: 'CONFIG_IDE_CMD646', if_true: files('cmd646.c'))
+softmmu_ss.add(when: 'CONFIG_IDE_CORE', if_true: files('core.c', 'atapi.c'))
+softmmu_ss.add(when: 'CONFIG_IDE_ISA', if_true: files('isa.c', 'ioport.c'))
+softmmu_ss.add(when: 'CONFIG_IDE_MACIO', if_true: files('macio.c'))
+softmmu_ss.add(when: 'CONFIG_IDE_MMIO', if_true: files('mmio.c'))
+softmmu_ss.add(when: 'CONFIG_IDE_PCI', if_true: files('pci.c'))
+softmmu_ss.add(when: 'CONFIG_IDE_PIIX', if_true: files('piix.c', 'ioport.c'))
+softmmu_ss.add(when: 'CONFIG_IDE_QDEV', if_true: files('qdev.c'))
+softmmu_ss.add(when: 'CONFIG_IDE_SII3112', if_true: files('sii3112.c'))
+softmmu_ss.add(when: 'CONFIG_IDE_VIA', if_true: files('via.c'))
+softmmu_ss.add(when: 'CONFIG_MICRODRIVE', if_true: files('microdrive.c'))
hw/meson.build +1 -0
index b15c8d0..4d7c31c6 100644
@@ -1,4 +1,5 @@
 subdir('core')
+subdir('ide')
 subdir('input')
 subdir('intc')
 subdir('ipack')
Signature · 1 line
1.8.3.1
#147 lore raw

PATCH 111/143 meson: convert hw/i2c

In reply to Paolo Bonzini

From: Marc-André Lureau <[email protected]>

---
 hw/Makefile.objs     |  1 -
 hw/i2c/Makefile.objs | 14 --------------
 hw/i2c/meson.build   | 16 ++++++++++++++++
 hw/meson.build       |  1 +
 4 files changed, 17 insertions(+), 15 deletions(-)
 delete mode 100644 hw/i2c/Makefile.objs
 create mode 100644 hw/i2c/meson.build
hw/Makefile.objs +0 -1
index 02c5c0d..22eb804 100644
@@ -10,7 +10,6 @@ devices-dirs-y += display/
 devices-dirs-y += dma/
 devices-dirs-y += gpio/
 devices-dirs-$(CONFIG_HYPERV) += hyperv/
-devices-dirs-$(CONFIG_I2C) += i2c/
 endif
 
 common-obj-y += $(devices-dirs-y)
hw/i2c/Makefile.objs deleted +0 -14
deleted file mode 100644
index f2c61ea..0000000
@@ -1,14 +0,0 @@
-common-obj-$(CONFIG_I2C) += core.o
-common-obj-$(CONFIG_SMBUS) += smbus_slave.o smbus_master.o
-common-obj-$(CONFIG_SMBUS_EEPROM) += smbus_eeprom.o
-common-obj-$(CONFIG_VERSATILE_I2C) += versatile_i2c.o
-common-obj-$(CONFIG_ACPI_X86_ICH) += smbus_ich9.o
-common-obj-$(CONFIG_ACPI_SMBUS) += pm_smbus.o
-common-obj-$(CONFIG_BITBANG_I2C) += bitbang_i2c.o
-common-obj-$(CONFIG_EXYNOS4) += exynos4210_i2c.o
-common-obj-$(CONFIG_IMX_I2C) += imx_i2c.o
-common-obj-$(CONFIG_ASPEED_SOC) += aspeed_i2c.o
-common-obj-$(CONFIG_NRF51_SOC) += microbit_i2c.o
-common-obj-$(CONFIG_MPC_I2C) += mpc_i2c.o
-common-obj-$(CONFIG_OMAP) += omap_i2c.o
-common-obj-$(CONFIG_PPC4XX) += ppc4xx_i2c.o
hw/i2c/meson.build new file +16 -0
new file mode 100644
index 0000000..3a51153
@@ -0,0 +1,16 @@
+i2c_ss = ss.source_set()
+i2c_ss.add(when: 'CONFIG_I2C', if_true: files('core.c'))
+i2c_ss.add(when: 'CONFIG_SMBUS', if_true: files('smbus_slave.c', 'smbus_master.c'))
+i2c_ss.add(when: 'CONFIG_ACPI_SMBUS', if_true: files('pm_smbus.c'))
+i2c_ss.add(when: 'CONFIG_ACPI_X86_ICH', if_true: files('smbus_ich9.c'))
+i2c_ss.add(when: 'CONFIG_ASPEED_SOC', if_true: files('aspeed_i2c.c'))
+i2c_ss.add(when: 'CONFIG_BITBANG_I2C', if_true: files('bitbang_i2c.c'))
+i2c_ss.add(when: 'CONFIG_EXYNOS4', if_true: files('exynos4210_i2c.c'))
+i2c_ss.add(when: 'CONFIG_IMX_I2C', if_true: files('imx_i2c.c'))
+i2c_ss.add(when: 'CONFIG_MPC_I2C', if_true: files('mpc_i2c.c'))
+i2c_ss.add(when: 'CONFIG_NRF51_SOC', if_true: files('microbit_i2c.c'))
+i2c_ss.add(when: 'CONFIG_SMBUS_EEPROM', if_true: files('smbus_eeprom.c'))
+i2c_ss.add(when: 'CONFIG_VERSATILE_I2C', if_true: files('versatile_i2c.c'))
+i2c_ss.add(when: 'CONFIG_OMAP', if_true: files('omap_i2c.c'))
+i2c_ss.add(when: 'CONFIG_PPC4XX', if_true: files('ppc4xx_i2c.c'))
+softmmu_ss.add_all(when: 'CONFIG_I2C', if_true: i2c_ss)
hw/meson.build +1 -0
index 4d7c31c6..983edc1 100644
@@ -1,4 +1,5 @@
 subdir('core')
+subdir('i2c')
 subdir('ide')
 subdir('input')
 subdir('intc')
Signature · 1 line
1.8.3.1
Reviewed-by on v1 111/143
#148 lore raw

Re: [PATCH 111/143] meson: convert hw/i2c

Quoted 4 lines · Paolo Bonzini

From: Marc-André Lureau <[email protected]>

Quoted 8 lines
---
 hw/Makefile.objs     |  1 -
 hw/i2c/Makefile.objs | 14 --------------
 hw/i2c/meson.build   | 16 ++++++++++++++++
 hw/meson.build       |  1 +
 4 files changed, 17 insertions(+), 15 deletions(-)
 delete mode 100644 hw/i2c/Makefile.objs
 create mode 100644 hw/i2c/meson.build
Reviewed-by on v1 111/143
#149 lore raw

Re: [PATCH 111/143] meson: convert hw/i2c

In reply to Paolo Bonzini
Quoted 4 lines · Paolo Bonzini

From: Marc-André Lureau <[email protected]>

Quoted 78 lines
---
 hw/Makefile.objs     |  1 -
 hw/i2c/Makefile.objs | 14 --------------
 hw/i2c/meson.build   | 16 ++++++++++++++++
 hw/meson.build       |  1 +
 4 files changed, 17 insertions(+), 15 deletions(-)
 delete mode 100644 hw/i2c/Makefile.objs
 create mode 100644 hw/i2c/meson.build
hw/Makefile.objs +0 -1
index 02c5c0d..22eb804 100644
@@ -10,7 +10,6 @@ devices-dirs-y += display/
 devices-dirs-y += dma/
 devices-dirs-y += gpio/
 devices-dirs-$(CONFIG_HYPERV) += hyperv/
-devices-dirs-$(CONFIG_I2C) += i2c/
 endif
 
 common-obj-y += $(devices-dirs-y)
hw/i2c/Makefile.objs deleted +0 -14
deleted file mode 100644
index f2c61ea..0000000
@@ -1,14 +0,0 @@
-common-obj-$(CONFIG_I2C) += core.o
-common-obj-$(CONFIG_SMBUS) += smbus_slave.o smbus_master.o
-common-obj-$(CONFIG_SMBUS_EEPROM) += smbus_eeprom.o
-common-obj-$(CONFIG_VERSATILE_I2C) += versatile_i2c.o
-common-obj-$(CONFIG_ACPI_X86_ICH) += smbus_ich9.o
-common-obj-$(CONFIG_ACPI_SMBUS) += pm_smbus.o
-common-obj-$(CONFIG_BITBANG_I2C) += bitbang_i2c.o
-common-obj-$(CONFIG_EXYNOS4) += exynos4210_i2c.o
-common-obj-$(CONFIG_IMX_I2C) += imx_i2c.o
-common-obj-$(CONFIG_ASPEED_SOC) += aspeed_i2c.o
-common-obj-$(CONFIG_NRF51_SOC) += microbit_i2c.o
-common-obj-$(CONFIG_MPC_I2C) += mpc_i2c.o
-common-obj-$(CONFIG_OMAP) += omap_i2c.o
-common-obj-$(CONFIG_PPC4XX) += ppc4xx_i2c.o
hw/i2c/meson.build new file +16 -0
new file mode 100644
index 0000000..3a51153
@@ -0,0 +1,16 @@
+i2c_ss = ss.source_set()
+i2c_ss.add(when: 'CONFIG_I2C', if_true: files('core.c'))
+i2c_ss.add(when: 'CONFIG_SMBUS', if_true: files('smbus_slave.c', 'smbus_master.c'))
+i2c_ss.add(when: 'CONFIG_ACPI_SMBUS', if_true: files('pm_smbus.c'))
+i2c_ss.add(when: 'CONFIG_ACPI_X86_ICH', if_true: files('smbus_ich9.c'))
+i2c_ss.add(when: 'CONFIG_ASPEED_SOC', if_true: files('aspeed_i2c.c'))
+i2c_ss.add(when: 'CONFIG_BITBANG_I2C', if_true: files('bitbang_i2c.c'))
+i2c_ss.add(when: 'CONFIG_EXYNOS4', if_true: files('exynos4210_i2c.c'))
+i2c_ss.add(when: 'CONFIG_IMX_I2C', if_true: files('imx_i2c.c'))
+i2c_ss.add(when: 'CONFIG_MPC_I2C', if_true: files('mpc_i2c.c'))
+i2c_ss.add(when: 'CONFIG_NRF51_SOC', if_true: files('microbit_i2c.c'))
+i2c_ss.add(when: 'CONFIG_SMBUS_EEPROM', if_true: files('smbus_eeprom.c'))
+i2c_ss.add(when: 'CONFIG_VERSATILE_I2C', if_true: files('versatile_i2c.c'))
+i2c_ss.add(when: 'CONFIG_OMAP', if_true: files('omap_i2c.c'))
+i2c_ss.add(when: 'CONFIG_PPC4XX', if_true: files('ppc4xx_i2c.c'))
+softmmu_ss.add_all(when: 'CONFIG_I2C', if_true: i2c_ss)
hw/meson.build +1 -0
index 4d7c31c6..983edc1 100644
@@ -1,4 +1,5 @@
 subdir('core')
+subdir('i2c')
 subdir('ide')
 subdir('input')
 subdir('intc')
Signature · 1 line
1.8.3.1
#150 lore raw

PATCH 112/143 meson: convert hw/hyperv

In reply to Paolo Bonzini

From: Marc-André Lureau <[email protected]>

---
 hw/Makefile.objs        | 1 -
 hw/hyperv/Makefile.objs | 3 ---
 hw/hyperv/meson.build   | 3 +++
 hw/meson.build          | 1 +
 4 files changed, 4 insertions(+), 4 deletions(-)
 delete mode 100644 hw/hyperv/Makefile.objs
 create mode 100644 hw/hyperv/meson.build
hw/Makefile.objs +0 -1
index 22eb804..a2c2f6d 100644
@@ -9,7 +9,6 @@ devices-dirs-y += cpu/
 devices-dirs-y += display/
 devices-dirs-y += dma/
 devices-dirs-y += gpio/
-devices-dirs-$(CONFIG_HYPERV) += hyperv/
 endif
 
 common-obj-y += $(devices-dirs-y)
hw/hyperv/Makefile.objs deleted +0 -3
deleted file mode 100644
index 5b614e0..0000000
@@ -1,3 +0,0 @@
-obj-y += hyperv.o
-obj-$(CONFIG_HYPERV_TESTDEV) += hyperv_testdev.o
-obj-$(CONFIG_VMBUS) += vmbus.o
hw/hyperv/meson.build new file +3 -0
new file mode 100644
index 0000000..1367e29
@@ -0,0 +1,3 @@
+specific_ss.add(when: 'CONFIG_HYPERV', if_true: files('hyperv.c'))
+specific_ss.add(when: 'CONFIG_HYPERV_TESTDEV', if_true: files('hyperv_testdev.c'))
+specific_ss.add(when: 'CONFIG_VMBUS', if_true: files('vmbus.c'))
hw/meson.build +1 -0
index 983edc1..f9e5adf 100644
@@ -1,4 +1,5 @@
 subdir('core')
+subdir('hyperv')
 subdir('i2c')
 subdir('ide')
 subdir('input')
Signature · 1 line
1.8.3.1
#151 lore raw

PATCH 113/143 meson: convert hw/gpio

In reply to Paolo Bonzini

From: Marc-André Lureau <[email protected]>

---
 hw/Makefile.objs      |  1 -
 hw/gpio/Makefile.objs | 12 ------------
 hw/gpio/meson.build   | 12 ++++++++++++
 hw/meson.build        |  1 +
 4 files changed, 13 insertions(+), 13 deletions(-)
 delete mode 100644 hw/gpio/Makefile.objs
 create mode 100644 hw/gpio/meson.build
hw/Makefile.objs +0 -1
index a2c2f6d..c04dfe5 100644
@@ -8,7 +8,6 @@ devices-dirs-y += char/
 devices-dirs-y += cpu/
 devices-dirs-y += display/
 devices-dirs-y += dma/
-devices-dirs-y += gpio/
 endif
 
 common-obj-y += $(devices-dirs-y)
hw/gpio/Makefile.objs deleted +0 -12
deleted file mode 100644
index 3cfc261..0000000
@@ -1,12 +0,0 @@
-common-obj-$(CONFIG_MAX7310) += max7310.o
-common-obj-$(CONFIG_PL061) += pl061.o
-common-obj-$(CONFIG_PUV3) += puv3_gpio.o
-common-obj-$(CONFIG_ZAURUS) += zaurus.o
-common-obj-$(CONFIG_E500) += mpc8xxx.o
-common-obj-$(CONFIG_GPIO_KEY) += gpio_key.o
-
-common-obj-$(CONFIG_OMAP) += omap_gpio.o
-common-obj-$(CONFIG_IMX) += imx_gpio.o
-common-obj-$(CONFIG_RASPI) += bcm2835_gpio.o
-common-obj-$(CONFIG_NRF51_SOC) += nrf51_gpio.o
-common-obj-$(CONFIG_ASPEED_SOC) += aspeed_gpio.o
hw/gpio/meson.build new file +12 -0
new file mode 100644
index 0000000..6bcdfa6
@@ -0,0 +1,12 @@
+softmmu_ss.add(when: 'CONFIG_E500', if_true: files('mpc8xxx.c'))
+softmmu_ss.add(when: 'CONFIG_GPIO_KEY', if_true: files('gpio_key.c'))
+softmmu_ss.add(when: 'CONFIG_MAX7310', if_true: files('max7310.c'))
+softmmu_ss.add(when: 'CONFIG_PL061', if_true: files('pl061.c'))
+softmmu_ss.add(when: 'CONFIG_PUV3', if_true: files('puv3_gpio.c'))
+softmmu_ss.add(when: 'CONFIG_ZAURUS', if_true: files('zaurus.c'))
+
+softmmu_ss.add(when: 'CONFIG_IMX', if_true: files('imx_gpio.c'))
+softmmu_ss.add(when: 'CONFIG_NRF51_SOC', if_true: files('nrf51_gpio.c'))
+softmmu_ss.add(when: 'CONFIG_OMAP', if_true: files('omap_gpio.c'))
+softmmu_ss.add(when: 'CONFIG_RASPI', if_true: files('bcm2835_gpio.c'))
+softmmu_ss.add(when: 'CONFIG_ASPEED_SOC', if_true: files('aspeed_gpio.c'))
hw/meson.build +1 -0
index f9e5adf..52577c3 100644
@@ -1,4 +1,5 @@
 subdir('core')
+subdir('gpio')
 subdir('hyperv')
 subdir('i2c')
 subdir('ide')
Signature · 1 line
1.8.3.1
#152 lore raw

PATCH 114/143 meson: convert hw/dma

In reply to Paolo Bonzini

From: Marc-André Lureau <[email protected]>

---
 hw/Makefile.objs     |  1 -
 hw/dma/Makefile.objs | 16 ----------------
 hw/dma/meson.build   | 15 +++++++++++++++
 hw/meson.build       |  1 +
 4 files changed, 16 insertions(+), 17 deletions(-)
 delete mode 100644 hw/dma/Makefile.objs
 create mode 100644 hw/dma/meson.build
hw/Makefile.objs +0 -1
index c04dfe5..26917a4 100644
@@ -7,7 +7,6 @@ devices-dirs-y += block/
 devices-dirs-y += char/
 devices-dirs-y += cpu/
 devices-dirs-y += display/
-devices-dirs-y += dma/
 endif
 
 common-obj-y += $(devices-dirs-y)
hw/dma/Makefile.objs deleted +0 -16
deleted file mode 100644
index f4b1cfe..0000000
@@ -1,16 +0,0 @@
-common-obj-$(CONFIG_PUV3) += puv3_dma.o
-common-obj-$(CONFIG_RC4030) += rc4030.o
-common-obj-$(CONFIG_PL080) += pl080.o
-common-obj-$(CONFIG_PL330) += pl330.o
-common-obj-$(CONFIG_I82374) += i82374.o
-common-obj-$(CONFIG_I8257) += i8257.o
-common-obj-$(CONFIG_XILINX_AXI) += xilinx_axidma.o
-common-obj-$(CONFIG_ZYNQ_DEVCFG) += xlnx-zynq-devcfg.o
-common-obj-$(CONFIG_ETRAXFS) += etraxfs_dma.o
-common-obj-$(CONFIG_STP2000) += sparc32_dma.o
-common-obj-$(CONFIG_XLNX_ZYNQMP_ARM) += xlnx_dpdma.o
-common-obj-$(CONFIG_XLNX_ZYNQMP_ARM) += xlnx-zdma.o
-
-common-obj-$(CONFIG_OMAP) += omap_dma.o soc_dma.o
-common-obj-$(CONFIG_PXA2XX) += pxa2xx_dma.o
-common-obj-$(CONFIG_RASPI) += bcm2835_dma.o
hw/dma/meson.build new file +15 -0
new file mode 100644
index 0000000..ff5bb37
@@ -0,0 +1,15 @@
+softmmu_ss.add(when: 'CONFIG_PUV3', if_true: files('puv3_dma.c'))
+softmmu_ss.add(when: 'CONFIG_RC4030', if_true: files('rc4030.c'))
+softmmu_ss.add(when: 'CONFIG_PL080', if_true: files('pl080.c'))
+softmmu_ss.add(when: 'CONFIG_PL330', if_true: files('pl330.c'))
+softmmu_ss.add(when: 'CONFIG_I82374', if_true: files('i82374.c'))
+softmmu_ss.add(when: 'CONFIG_I8257', if_true: files('i8257.c'))
+softmmu_ss.add(when: 'CONFIG_XILINX_AXI', if_true: files('xilinx_axidma.c'))
+softmmu_ss.add(when: 'CONFIG_ZYNQ_DEVCFG', if_true: files('xlnx-zynq-devcfg.c'))
+softmmu_ss.add(when: 'CONFIG_ETRAXFS', if_true: files('etraxfs_dma.c'))
+softmmu_ss.add(when: 'CONFIG_STP2000', if_true: files('sparc32_dma.c'))
+softmmu_ss.add(when: 'CONFIG_XLNX_ZYNQMP_ARM', if_true: files('xlnx_dpdma.c'))
+softmmu_ss.add(when: 'CONFIG_XLNX_ZYNQMP_ARM', if_true: files('xlnx-zdma.c'))
+softmmu_ss.add(when: 'CONFIG_OMAP', if_true: files('omap_dma.c', 'soc_dma.c'))
+softmmu_ss.add(when: 'CONFIG_PXA2XX', if_true: files('pxa2xx_dma.c'))
+softmmu_ss.add(when: 'CONFIG_RASPI', if_true: files('bcm2835_dma.c'))
hw/meson.build +1 -0
index 52577c3..96da0bb 100644
@@ -1,4 +1,5 @@
 subdir('core')
+subdir('dma')
 subdir('gpio')
 subdir('hyperv')
 subdir('i2c')
Signature · 1 line
1.8.3.1
#153 lore raw

PATCH 115/143 meson: convert hw/display

In reply to Paolo Bonzini

From: Marc-André Lureau <[email protected]>

---
 Makefile.target          |  1 +
 hw/Makefile.objs         |  1 -
 hw/display/Makefile.objs | 65 ---------------------------------
 hw/display/meson.build   | 94 ++++++++++++++++++++++++++++++++++++++++++++++++
 hw/meson.build           |  1 +
 5 files changed, 96 insertions(+), 66 deletions(-)
 delete mode 100644 hw/display/Makefile.objs
 create mode 100644 hw/display/meson.build
Makefile.target +1 -0
index 3d5a2af..3534ece 100644
@@ -169,6 +169,7 @@ LIBS := $(LIBS) $(BRLAPI_LIBS) $(SDL_LIBS) $(SPICE_LIBS) $(OPENGL_LIBS) $(SECCOM
 LIBS := $(LIBS) $(COREAUDIO_LIBS) $(DSOUND_LIBS)
 LIBS := $(LIBS) $(VDE_LIBS) $(SLIRP_LIBS)
 LIBS := $(LIBS) $(LIBUSB_LIBS) $(SMARTCARD_LIBS) $(USB_REDIR_LIBS)
+LIBS := $(LIBS) $(VIRGL_LIBS)
 
 # Hardware support
 ifeq ($(TARGET_NAME), sparc64)
hw/Makefile.objs +0 -1
index 26917a4..6fce6a1 100644
@@ -6,7 +6,6 @@ devices-dirs-y += audio/
 devices-dirs-y += block/
 devices-dirs-y += char/
 devices-dirs-y += cpu/
-devices-dirs-y += display/
 endif
 
 common-obj-y += $(devices-dirs-y)
hw/display/Makefile.objs deleted +0 -65

65 lines not on this page · raw message

hw/display/meson.build new file +94 -0

94 lines not on this page · raw message

hw/meson.build +1 -0
index 96da0bb..dacd26c 100644
@@ -1,4 +1,5 @@
 subdir('core')
+subdir('display')
 subdir('dma')
 subdir('gpio')
 subdir('hyperv')
Signature · 1 line
1.8.3.1
#154 lore raw

PATCH 116/143 meson: convert hw/cpu

In reply to Paolo Bonzini

From: Marc-André Lureau <[email protected]>

---
 hw/Makefile.objs     | 1 -
 hw/cpu/Makefile.objs | 5 -----
 hw/cpu/meson.build   | 6 ++++++
 hw/meson.build       | 1 +
 4 files changed, 7 insertions(+), 6 deletions(-)
 delete mode 100644 hw/cpu/Makefile.objs
 create mode 100644 hw/cpu/meson.build
hw/Makefile.objs +0 -1
index 6fce6a1..97ad302 100644
@@ -5,7 +5,6 @@ devices-dirs-y += adc/
 devices-dirs-y += audio/
 devices-dirs-y += block/
 devices-dirs-y += char/
-devices-dirs-y += cpu/
 endif
 
 common-obj-y += $(devices-dirs-y)
hw/cpu/Makefile.objs deleted +0 -5
deleted file mode 100644
index 8db9e8a..0000000
@@ -1,5 +0,0 @@
-obj-$(CONFIG_ARM11MPCORE) += arm11mpcore.o
-obj-$(CONFIG_REALVIEW) += realview_mpcore.o
-obj-$(CONFIG_A9MPCORE) += a9mpcore.o
-obj-$(CONFIG_A15MPCORE) += a15mpcore.o
-common-obj-y += core.o cluster.o
hw/cpu/meson.build new file +6 -0
new file mode 100644
index 0000000..9e52fee
@@ -0,0 +1,6 @@
+softmmu_ss.add(files('core.c', 'cluster.c'))
+
+specific_ss.add(when: 'CONFIG_ARM11MPCORE', if_true: files('arm11mpcore.c'))
+specific_ss.add(when: 'CONFIG_REALVIEW', if_true: files('realview_mpcore.c'))
+specific_ss.add(when: 'CONFIG_A9MPCORE', if_true: files('a9mpcore.c'))
+specific_ss.add(when: 'CONFIG_A15MPCORE', if_true: files('a15mpcore.c'))
hw/meson.build +1 -0
index dacd26c..103da48 100644
@@ -1,4 +1,5 @@
 subdir('core')
+subdir('cpu')
 subdir('display')
 subdir('dma')
 subdir('gpio')
Signature · 1 line
1.8.3.1
#155 lore raw

PATCH 117/143 meson: convert hw/char

In reply to Paolo Bonzini

From: Marc-André Lureau <[email protected]>

---
 hw/Makefile.objs      |  1 -
 hw/char/Makefile.objs | 39 ---------------------------------------
 hw/char/meson.build   | 38 ++++++++++++++++++++++++++++++++++++++
 hw/meson.build        |  1 +
 4 files changed, 39 insertions(+), 40 deletions(-)
 delete mode 100644 hw/char/Makefile.objs
 create mode 100644 hw/char/meson.build
hw/Makefile.objs +0 -1
index 97ad302..04cfb6c 100644
@@ -4,7 +4,6 @@ devices-dirs-y += acpi/
 devices-dirs-y += adc/
 devices-dirs-y += audio/
 devices-dirs-y += block/
-devices-dirs-y += char/
 endif
 
 common-obj-y += $(devices-dirs-y)
hw/char/Makefile.objs deleted +0 -39
deleted file mode 100644
index bf177ac..0000000
@@ -1,39 +0,0 @@
-common-obj-$(CONFIG_IPACK) += ipoctal232.o
-common-obj-$(CONFIG_ESCC) += escc.o
-common-obj-$(CONFIG_NRF51_SOC) += nrf51_uart.o
-common-obj-$(CONFIG_PARALLEL) += parallel.o
-common-obj-$(CONFIG_ISA_BUS) += parallel-isa.o
-common-obj-$(CONFIG_PL011) += pl011.o
-common-obj-$(CONFIG_SERIAL) += serial.o
-common-obj-$(CONFIG_SERIAL_ISA) += serial-isa.o
-common-obj-$(CONFIG_SERIAL_PCI) += serial-pci.o
-common-obj-$(CONFIG_SERIAL_PCI_MULTI) += serial-pci-multi.o
-common-obj-$(CONFIG_VIRTIO_SERIAL) += virtio-console.o
-common-obj-$(CONFIG_XILINX) += xilinx_uartlite.o
-common-obj-$(CONFIG_XEN) += xen_console.o
-common-obj-$(CONFIG_CADENCE) += cadence_uart.o
-common-obj-$(CONFIG_IBEX) += ibex_uart.o
-
-common-obj-$(CONFIG_EXYNOS4) += exynos4210_uart.o
-common-obj-$(CONFIG_COLDFIRE) += mcf_uart.o
-common-obj-$(CONFIG_OMAP) += omap_uart.o
-common-obj-$(CONFIG_SH4) += sh_serial.o
-common-obj-$(CONFIG_DIGIC) += digic-uart.o
-common-obj-$(CONFIG_STM32F2XX_USART) += stm32f2xx_usart.o
-common-obj-$(CONFIG_RASPI) += bcm2835_aux.o
-common-obj-$(CONFIG_RENESAS_SCI) += renesas_sci.o
-common-obj-$(CONFIG_AVR_USART) += avr_usart.o
-
-common-obj-$(CONFIG_CMSDK_APB_UART) += cmsdk-apb-uart.o
-common-obj-$(CONFIG_ETRAXFS) += etraxfs_ser.o
-common-obj-$(CONFIG_ISA_DEBUG) += debugcon.o
-common-obj-$(CONFIG_GRLIB) += grlib_apbuart.o
-common-obj-$(CONFIG_IMX) += imx_serial.o
-common-obj-$(CONFIG_LM32) += lm32_juart.o
-common-obj-$(CONFIG_LM32) += lm32_uart.o
-common-obj-$(CONFIG_MILKYMIST) += milkymist-uart.o
-common-obj-$(CONFIG_SCLPCONSOLE) += sclpconsole.o sclpconsole-lm.o
-
-obj-$(CONFIG_VIRTIO) += virtio-serial-bus.o
-obj-$(CONFIG_PSERIES) += spapr_vty.o
-obj-$(CONFIG_TERMINAL3270) += terminal3270.o
hw/char/meson.build new file +38 -0
new file mode 100644
index 0000000..e888215
@@ -0,0 +1,38 @@
+softmmu_ss.add(when: 'CONFIG_CADENCE', if_true: files('cadence_uart.c'))
+softmmu_ss.add(when: 'CONFIG_CMSDK_APB_UART', if_true: files('cmsdk-apb-uart.c'))
+softmmu_ss.add(when: 'CONFIG_ESCC', if_true: files('escc.c'))
+softmmu_ss.add(when: 'CONFIG_ETRAXFS', if_true: files('etraxfs_ser.c'))
+softmmu_ss.add(when: 'CONFIG_GRLIB', if_true: files('grlib_apbuart.c'))
+softmmu_ss.add(when: 'CONFIG_IBEX', if_true: files('ibex_uart.c'))
+softmmu_ss.add(when: 'CONFIG_IMX', if_true: files('imx_serial.c'))
+softmmu_ss.add(when: 'CONFIG_IPACK', if_true: files('ipoctal232.c'))
+softmmu_ss.add(when: 'CONFIG_ISA_BUS', if_true: files('parallel-isa.c'))
+softmmu_ss.add(when: 'CONFIG_ISA_DEBUG', if_true: files('debugcon.c'))
+softmmu_ss.add(when: 'CONFIG_LM32', if_true: files('lm32_juart.c'))
+softmmu_ss.add(when: 'CONFIG_LM32', if_true: files('lm32_uart.c'))
+softmmu_ss.add(when: 'CONFIG_MILKYMIST', if_true: files('milkymist-uart.c'))
+softmmu_ss.add(when: 'CONFIG_NRF51_SOC', if_true: files('nrf51_uart.c'))
+softmmu_ss.add(when: 'CONFIG_PARALLEL', if_true: files('parallel.c'))
+softmmu_ss.add(when: 'CONFIG_PL011', if_true: files('pl011.c'))
+softmmu_ss.add(when: 'CONFIG_SCLPCONSOLE', if_true: files('sclpconsole.c', 'sclpconsole-lm.c'))
+softmmu_ss.add(when: 'CONFIG_SERIAL', if_true: files('serial.c'))
+softmmu_ss.add(when: 'CONFIG_SERIAL_ISA', if_true: files('serial-isa.c'))
+softmmu_ss.add(when: 'CONFIG_SERIAL_PCI', if_true: files('serial-pci.c'))
+softmmu_ss.add(when: 'CONFIG_SERIAL_PCI_MULTI', if_true: files('serial-pci-multi.c'))
+softmmu_ss.add(when: 'CONFIG_VIRTIO_SERIAL', if_true: files('virtio-console.c'))
+softmmu_ss.add(when: 'CONFIG_XEN', if_true: files('xen_console.c'))
+softmmu_ss.add(when: 'CONFIG_XILINX', if_true: files('xilinx_uartlite.c'))
+
+softmmu_ss.add(when: 'CONFIG_AVR_USART', if_true: files('avr_usart.c'))
+softmmu_ss.add(when: 'CONFIG_COLDFIRE', if_true: files('mcf_uart.c'))
+softmmu_ss.add(when: 'CONFIG_DIGIC', if_true: files('digic-uart.c'))
+softmmu_ss.add(when: 'CONFIG_EXYNOS4', if_true: files('exynos4210_uart.c'))
+softmmu_ss.add(when: 'CONFIG_OMAP', if_true: files('omap_uart.c'))
+softmmu_ss.add(when: 'CONFIG_RASPI', if_true: files('bcm2835_aux.c'))
+softmmu_ss.add(when: 'CONFIG_RENESAS_SCI', if_true: files('renesas_sci.c'))
+softmmu_ss.add(when: 'CONFIG_SH4', if_true: files('sh_serial.c'))
+softmmu_ss.add(when: 'CONFIG_STM32F2XX_USART', if_true: files('stm32f2xx_usart.c'))
+
+specific_ss.add(when: 'CONFIG_TERMINAL3270', if_true: files('terminal3270.c'))
+specific_ss.add(when: 'CONFIG_VIRTIO', if_true: files('virtio-serial-bus.c'))
+specific_ss.add(when: 'CONFIG_PSERIES', if_true: files('spapr_vty.c'))
hw/meson.build +1 -0
index 103da48..dd0c77e 100644
@@ -1,3 +1,4 @@
+subdir('char')
 subdir('core')
 subdir('cpu')
 subdir('display')
Signature · 1 line
1.8.3.1
#156 lore raw

PATCH 118/143 meson: convert hw/block

In reply to Paolo Bonzini

From: Marc-André Lureau <[email protected]>

---
 hw/Makefile.objs                 |  1 -
 hw/block/Makefile.objs           | 18 ------------------
 hw/block/dataplane/Makefile.objs |  2 --
 hw/block/dataplane/meson.build   |  2 ++
 hw/block/meson.build             | 21 +++++++++++++++++++++
 hw/meson.build                   |  1 +
 6 files changed, 24 insertions(+), 21 deletions(-)
 delete mode 100644 hw/block/Makefile.objs
 delete mode 100644 hw/block/dataplane/Makefile.objs
 create mode 100644 hw/block/dataplane/meson.build
 create mode 100644 hw/block/meson.build
hw/Makefile.objs +0 -1
index 04cfb6c..9068859 100644
@@ -3,7 +3,6 @@ devices-dirs-$(call lor,$(CONFIG_VIRTIO_9P),$(call land,$(CONFIG_VIRTFS),$(CONFI
 devices-dirs-y += acpi/
 devices-dirs-y += adc/
 devices-dirs-y += audio/
-devices-dirs-y += block/
 endif
 
 common-obj-y += $(devices-dirs-y)
hw/block/Makefile.objs deleted +0 -18
deleted file mode 100644
index 8855c22..0000000
@@ -1,18 +0,0 @@
-common-obj-y += block.o cdrom.o hd-geometry.o
-common-obj-$(CONFIG_FDC) += fdc.o
-common-obj-$(CONFIG_SSI_M25P80) += m25p80.o
-common-obj-$(CONFIG_NAND) += nand.o
-common-obj-$(CONFIG_PFLASH_CFI01) += pflash_cfi01.o
-common-obj-$(CONFIG_PFLASH_CFI02) += pflash_cfi02.o
-common-obj-$(CONFIG_XEN) += xen-block.o
-common-obj-$(CONFIG_ECC) += ecc.o
-common-obj-$(CONFIG_ONENAND) += onenand.o
-common-obj-$(CONFIG_SWIM) += swim.o
-
-common-obj-$(CONFIG_SH4) += tc58128.o
-
-obj-$(CONFIG_VIRTIO_BLK) += virtio-blk.o
-obj-$(CONFIG_VHOST_USER_BLK) += vhost-user-blk.o
-common-obj-$(CONFIG_NVME_PCI) += nvme.o
-
-obj-y += dataplane/
hw/block/dataplane/Makefile.objs deleted +0 -2
deleted file mode 100644
index 0c52702..0000000
@@ -1,2 +0,0 @@
-obj-$(CONFIG_VIRTIO_BLK) += virtio-blk.o
-obj-$(CONFIG_XEN) += xen-block.o
hw/block/dataplane/meson.build new file +2 -0
new file mode 100644
index 0000000..12c6a26
@@ -0,0 +1,2 @@
+specific_ss.add(when: 'CONFIG_VIRTIO_BLK', if_true: files('virtio-blk.c'))
+specific_ss.add(when: 'CONFIG_XEN', if_true: files('xen-block.c'))
hw/block/meson.build new file +21 -0
new file mode 100644
index 0000000..78cad8f
@@ -0,0 +1,21 @@
+softmmu_ss.add(files(
+  'block.c',
+  'cdrom.c',
+  'hd-geometry.c'
+))
+softmmu_ss.add(when: 'CONFIG_ECC', if_true: files('ecc.c'))
+softmmu_ss.add(when: 'CONFIG_FDC', if_true: files('fdc.c'))
+softmmu_ss.add(when: 'CONFIG_NAND', if_true: files('nand.c'))
+softmmu_ss.add(when: 'CONFIG_ONENAND', if_true: files('onenand.c'))
+softmmu_ss.add(when: 'CONFIG_PFLASH_CFI01', if_true: files('pflash_cfi01.c'))
+softmmu_ss.add(when: 'CONFIG_PFLASH_CFI02', if_true: files('pflash_cfi02.c'))
+softmmu_ss.add(when: 'CONFIG_SSI_M25P80', if_true: files('m25p80.c'))
+softmmu_ss.add(when: 'CONFIG_SWIM', if_true: files('swim.c'))
+softmmu_ss.add(when: 'CONFIG_XEN', if_true: files('xen-block.c'))
+softmmu_ss.add(when: 'CONFIG_SH4', if_true: files('tc58128.c'))
+softmmu_ss.add(when: 'CONFIG_NVME_PCI', if_true: files('nvme.c'))
+
+specific_ss.add(when: 'CONFIG_VIRTIO_BLK', if_true: files('virtio-blk.c'))
+specific_ss.add(when: 'CONFIG_VHOST_USER_BLK', if_true: files('vhost-user-blk.c'))
+
+subdir('dataplane')
hw/meson.build +1 -0
index dd0c77e..f968aa8 100644
@@ -1,3 +1,4 @@
+subdir('block')
 subdir('char')
 subdir('core')
 subdir('cpu')
Signature · 1 line
1.8.3.1
#157 lore raw

PATCH 119/143 meson: convert hw/audio

In reply to Paolo Bonzini

From: Marc-André Lureau <[email protected]>

---
 hw/Makefile.objs       |  1 -
 hw/audio/Makefile.objs | 18 ------------------
 hw/audio/meson.build   | 14 ++++++++++++++
 hw/meson.build         |  1 +
 4 files changed, 15 insertions(+), 19 deletions(-)
 delete mode 100644 hw/audio/Makefile.objs
 create mode 100644 hw/audio/meson.build
hw/Makefile.objs +0 -1
index 9068859..c0cbc0f 100644
@@ -2,7 +2,6 @@ ifeq ($(CONFIG_SOFTMMU), y)
 devices-dirs-$(call lor,$(CONFIG_VIRTIO_9P),$(call land,$(CONFIG_VIRTFS),$(CONFIG_XEN))) += 9pfs/
 devices-dirs-y += acpi/
 devices-dirs-y += adc/
-devices-dirs-y += audio/
 endif
 
 common-obj-y += $(devices-dirs-y)
hw/audio/Makefile.objs deleted +0 -18
deleted file mode 100644
index 63db383..0000000
@@ -1,18 +0,0 @@
-# Sound
-common-obj-$(CONFIG_SB16) += sb16.o
-common-obj-$(CONFIG_ES1370) += es1370.o
-common-obj-$(CONFIG_AC97) += ac97.o
-common-obj-$(CONFIG_ADLIB) += fmopl.o adlib.o
-common-obj-$(CONFIG_GUS) += gus.o gusemu_hal.o gusemu_mixer.o
-common-obj-$(CONFIG_CS4231A) += cs4231a.o
-common-obj-$(CONFIG_HDA) += intel-hda.o hda-codec.o
-
-common-obj-$(CONFIG_PCSPK) += pcspk.o
-common-obj-$(CONFIG_WM8750) += wm8750.o
-common-obj-$(CONFIG_PL041) += pl041.o lm4549.o
-
-common-obj-$(CONFIG_CS4231) += cs4231.o
-common-obj-$(CONFIG_MARVELL_88W8618) += marvell_88w8618.o
-common-obj-$(CONFIG_MILKYMIST) += milkymist-ac97.o
-
-common-obj-y += soundhw.o
hw/audio/meson.build new file +14 -0
new file mode 100644
index 0000000..549e9a0
@@ -0,0 +1,14 @@
+softmmu_ss.add(files('soundhw.c'))
+softmmu_ss.add(when: 'CONFIG_AC97', if_true: files('ac97.c'))
+softmmu_ss.add(when: 'CONFIG_ADLIB', if_true: files('fmopl.c', 'adlib.c'))
+softmmu_ss.add(when: 'CONFIG_CS4231', if_true: files('cs4231.c'))
+softmmu_ss.add(when: 'CONFIG_CS4231A', if_true: files('cs4231a.c'))
+softmmu_ss.add(when: 'CONFIG_ES1370', if_true: files('es1370.c'))
+softmmu_ss.add(when: 'CONFIG_GUS', if_true: files('gus.c', 'gusemu_hal.c', 'gusemu_mixer.c'))
+softmmu_ss.add(when: 'CONFIG_HDA', if_true: files('intel-hda.c', 'hda-codec.c'))
+softmmu_ss.add(when: 'CONFIG_MARVELL_88W8618', if_true: files('marvell_88w8618.c'))
+softmmu_ss.add(when: 'CONFIG_MILKYMIST', if_true: files('milkymist-ac97.c'))
+softmmu_ss.add(when: 'CONFIG_PCSPK', if_true: files('pcspk.c'))
+softmmu_ss.add(when: 'CONFIG_PL041', if_true: files('pl041.c', 'lm4549.c'))
+softmmu_ss.add(when: 'CONFIG_SB16', if_true: files('sb16.c'))
+softmmu_ss.add(when: 'CONFIG_WM8750', if_true: files('wm8750.c'))
hw/meson.build +1 -0
index f968aa8..624335b 100644
@@ -1,3 +1,4 @@
+subdir('audio')
 subdir('block')
 subdir('char')
 subdir('core')
Signature · 1 line
1.8.3.1
#158 lore raw

PATCH 120/143 meson: convert hw/adc

In reply to Paolo Bonzini

From: Marc-André Lureau <[email protected]>

---
 hw/Makefile.objs     | 1 -
 hw/adc/Makefile.objs | 1 -
 hw/adc/meson.build   | 1 +
 hw/meson.build       | 1 +
 4 files changed, 2 insertions(+), 2 deletions(-)
 delete mode 100644 hw/adc/Makefile.objs
 create mode 100644 hw/adc/meson.build
hw/Makefile.objs +0 -1
index c0cbc0f..4bdb674 100644
@@ -1,7 +1,6 @@
 ifeq ($(CONFIG_SOFTMMU), y)
 devices-dirs-$(call lor,$(CONFIG_VIRTIO_9P),$(call land,$(CONFIG_VIRTFS),$(CONFIG_XEN))) += 9pfs/
 devices-dirs-y += acpi/
-devices-dirs-y += adc/
 endif
 
 common-obj-y += $(devices-dirs-y)
hw/adc/Makefile.objs deleted +0 -1
deleted file mode 100644
index 2b9dc36..0000000
@@ -1 +0,0 @@
-common-obj-$(CONFIG_STM32F2XX_ADC) += stm32f2xx_adc.o
hw/adc/meson.build new file +1 -0
new file mode 100644
index 0000000..0d62ae9
@@ -0,0 +1 @@
+softmmu_ss.add(when: 'CONFIG_STM32F2XX_ADC', if_true: files('stm32f2xx_adc.c'))
hw/meson.build +1 -0
index 624335b..ffa3f06 100644
@@ -1,3 +1,4 @@
+subdir('adc')
 subdir('audio')
 subdir('block')
 subdir('char')
Signature · 1 line
1.8.3.1
#159 lore raw

PATCH 121/143 meson: convert hw/acpi

In reply to Paolo Bonzini

From: Marc-André Lureau <[email protected]>

---
 hw/Makefile.objs      |  1 -
 hw/acpi/Makefile.objs | 26 --------------------------
 hw/acpi/meson.build   | 25 +++++++++++++++++++++++++
 hw/meson.build        |  1 +
 4 files changed, 26 insertions(+), 27 deletions(-)
 delete mode 100644 hw/acpi/Makefile.objs
 create mode 100644 hw/acpi/meson.build
hw/Makefile.objs +0 -1
index 4bdb674..ebae00a 100644
@@ -1,6 +1,5 @@
 ifeq ($(CONFIG_SOFTMMU), y)
 devices-dirs-$(call lor,$(CONFIG_VIRTIO_9P),$(call land,$(CONFIG_VIRTFS),$(CONFIG_XEN))) += 9pfs/
-devices-dirs-y += acpi/
 endif
 
 common-obj-y += $(devices-dirs-y)
hw/acpi/Makefile.objs deleted +0 -26
deleted file mode 100644
index 72886c7..0000000
@@ -1,26 +0,0 @@
-ifeq ($(CONFIG_ACPI),y)
-common-obj-$(CONFIG_ACPI_X86) += core.o piix4.o pcihp.o
-common-obj-$(CONFIG_ACPI_X86_ICH) += ich9.o tco.o
-common-obj-$(CONFIG_ACPI_CPU_HOTPLUG) += cpu_hotplug.o
-common-obj-$(CONFIG_ACPI_MEMORY_HOTPLUG) += memory_hotplug.o
-common-obj-$(CONFIG_ACPI_CPU_HOTPLUG) += cpu.o
-common-obj-$(CONFIG_ACPI_NVDIMM) += nvdimm.o
-common-obj-$(CONFIG_ACPI_VMGENID) += vmgenid.o
-common-obj-$(CONFIG_ACPI_HW_REDUCED) += generic_event_device.o
-common-obj-$(CONFIG_ACPI_HMAT) += hmat.o
-common-obj-$(CONFIG_ACPI_APEI) += ghes.o
-common-obj-$(call lnot,$(CONFIG_ACPI_X86)) += acpi-stub.o
-common-obj-$(call lnot,$(CONFIG_PC)) += acpi-x86-stub.o
-
-common-obj-y += acpi_interface.o
-common-obj-y += bios-linker-loader.o
-common-obj-y += aml-build.o utils.o
-common-obj-$(CONFIG_ACPI_PCI) += pci.o
-common-obj-$(CONFIG_TPM) += tpm.o
-
-common-obj-$(CONFIG_IPMI) += ipmi.o
-common-obj-$(call lnot,$(CONFIG_IPMI)) += ipmi-stub.o
-else
-common-obj-y += acpi-stub.o aml-build-stub.o
-endif
-common-obj-$(CONFIG_ALL) += acpi-stub.o aml-build-stub.o acpi-x86-stub.o ipmi-stub.o
hw/acpi/meson.build new file +25 -0
new file mode 100644
index 0000000..dd69577
@@ -0,0 +1,25 @@
+acpi_ss = ss.source_set()
+acpi_ss.add(files(
+  'acpi_interface.c',
+  'aml-build.c',
+  'bios-linker-loader.c',
+  'utils.c',
+))
+acpi_ss.add(when: 'CONFIG_ACPI_CPU_HOTPLUG', if_true: files('cpu.c'))
+acpi_ss.add(when: 'CONFIG_ACPI_CPU_HOTPLUG', if_true: files('cpu_hotplug.c'))
+acpi_ss.add(when: 'CONFIG_ACPI_MEMORY_HOTPLUG', if_true: files('memory_hotplug.c'))
+acpi_ss.add(when: 'CONFIG_ACPI_NVDIMM', if_true: files('nvdimm.c'))
+acpi_ss.add(when: 'CONFIG_ACPI_PCI', if_true: files('pci.c'))
+acpi_ss.add(when: 'CONFIG_ACPI_VMGENID', if_true: files('vmgenid.c'))
+acpi_ss.add(when: 'CONFIG_ACPI_HW_REDUCED', if_true: files('generic_event_device.c'))
+acpi_ss.add(when: 'CONFIG_ACPI_HMAT', if_true: files('hmat.c'))
+acpi_ss.add(when: 'CONFIG_ACPI_APEI', if_true: files('ghes.c'))
+acpi_ss.add(when: 'CONFIG_ACPI_X86', if_true: files('core.c', 'piix4.c', 'pcihp.c'), if_false: files('acpi-stub.c'))
+acpi_ss.add(when: 'CONFIG_ACPI_X86_ICH', if_true: files('ich9.c', 'tco.c'))
+acpi_ss.add(when: 'CONFIG_IPMI', if_true: files('ipmi.c'), if_false: files('ipmi-stub.c'))
+acpi_ss.add(when: 'CONFIG_PC', if_false: files('acpi-x86-stub.c'))
+acpi_ss.add(when: 'CONFIG_TPM', if_true: files('tpm.c'))
+softmmu_ss.add(when: 'CONFIG_ACPI', if_false: files('acpi-stub.c', 'aml-build-stub.c'))
+softmmu_ss.add_all(when: 'CONFIG_ACPI', if_true: acpi_ss)
+softmmu_ss.add(when: 'CONFIG_ALL', if_true: files('acpi-stub.c', 'aml-build-stub.c',
+                                                  'acpi-x86-stub.c', 'ipmi-stub.c'))
hw/meson.build +1 -0
index ffa3f06..55ca2b2 100644
@@ -1,3 +1,4 @@
+subdir('acpi')
 subdir('adc')
 subdir('audio')
 subdir('block')
Signature · 1 line
1.8.3.1
#160 lore raw

PATCH 122/143 meson: convert hw/9pfs, cleanup

In reply to Paolo Bonzini

From: Marc-André Lureau <[email protected]>

hw/Makefile.objs is gone so there is more code that can be removed.

---
 Makefile              |  4 ----
 Makefile.objs         |  8 --------
 Makefile.target       | 15 ---------------
 hw/9pfs/Kconfig       |  4 ++++
 hw/9pfs/Makefile.objs |  9 ---------
 hw/9pfs/meson.build   | 20 ++++++++++++++++++++
 hw/Makefile.objs      |  8 --------
 hw/meson.build        |  1 +
 8 files changed, 25 insertions(+), 44 deletions(-)
 delete mode 100644 hw/9pfs/Makefile.objs
 create mode 100644 hw/9pfs/meson.build
 delete mode 100644 hw/Makefile.objs
Makefile +0 -4
index d9d6b59..2aaa3f8 100644
@@ -163,10 +163,6 @@ ifneq ($(wildcard config-host.mak),)
 include $(SRC_PATH)/Makefile.objs
 endif
 
-dummy := $(call unnest-vars,, \
-                common-obj-y \
-                common-obj-m)
-
 include $(SRC_PATH)/tests/Makefile.include
 
 all: $(DOCS) $(if $(BUILD_DOCS),sphinxdocs) recurse-all modules
Makefile.objs +0 -8
index 965f64c..7eaf047 100644
@@ -60,18 +60,10 @@ common-obj-$(if $(CONFIG_RBD),m) += block-rbd$(DSOSUF)
 common-obj-$(if $(CONFIG_LZFSE),m) += block-dmg-lzfse$(DSOSUF)
 common-obj-$(if $(and $(CONFIG_BZIP2),$(CONFIG_DMG)),m) += block-dmg-bz2$(DSOSUF)
 
-common-obj-y += hw/
-common-obj-m += hw/
-
 common-obj-y += libqmp.fa
 
 endif # CONFIG_SOFTMMU
 
-#######################################################################
-# Target-independent parts used in system and user emulation
-
-common-obj-y += hw/
-
 ######################################################################
 # Resource file for Windows executables
 version-obj-$(CONFIG_WIN32) += $(BUILD_DIR)/version.o
Makefile.target +0 -15
index 3534ece..c95e0de 100644
@@ -156,7 +156,6 @@ endif #CONFIG_BSD_USER
 ifdef CONFIG_SOFTMMU
 obj-y += softmmu/
 obj-y += gdbstub.o
-obj-y += hw/
 LIBS := $(libs_softmmu) $(LIBS)
 
 # Temporary until emulators are linked by Meson
@@ -185,20 +184,6 @@ endif # CONFIG_SOFTMMU
 dummy := $(call unnest-vars,,obj-y)
 all-obj-y := $(obj-y)
 
-#
-# common-obj-m has some crap here, probably as side effect from
-# unnest-vars recursing into target directories to fill obj-y and not
-# properly handling the -m case.
-#
-# Clear common-obj-m as workaround.  Fixes suspious dependency errors
-# when building devices as modules.  A bit hackish, but should be ok
-# as long as we do not have any target-specific modules.
-#
-# The meson-based build system currently in development doesn't need
-# unnest-vars and will obsolete this workaround.
-#
-common-obj-m :=
-
 include $(SRC_PATH)/Makefile.objs
 dummy := $(call fix-paths,../,, \
               authz-obj-y \
hw/9pfs/Kconfig +4 -0
index 3ae5749..d3ebd73 100644
@@ -2,8 +2,12 @@ config FSDEV_9P
     bool
     depends on VIRTFS
 
+config 9PFS
+    bool
+
 config VIRTIO_9P
     bool
     default y
     depends on VIRTFS && VIRTIO
     select FSDEV_9P
+    select 9PFS
hw/9pfs/Makefile.objs deleted +0 -9
deleted file mode 100644
index 70ded6f..0000000
@@ -1,9 +0,0 @@
-common-obj-y  = 9p.o 9p-util.o
-common-obj-y += 9p-local.o 9p-xattr.o
-common-obj-y += 9p-xattr-user.o 9p-posix-acl.o
-common-obj-y += coth.o cofs.o codir.o cofile.o
-common-obj-y += coxattr.o 9p-synth.o
-common-obj-y += 9p-proxy.o
-
-common-obj-$(CONFIG_XEN) += xen-9p-backend.o
-obj-$(CONFIG_VIRTIO_9P) += virtio-9p-device.o
hw/9pfs/meson.build new file +20 -0
new file mode 100644
index 0000000..cc09426
@@ -0,0 +1,20 @@
+fs_ss = ss.source_set()
+fs_ss.add(files(
+  '9p-local.c',
+  '9p-posix-acl.c',
+  '9p-proxy.c',
+  '9p-synth.c',
+  '9p-util.c',
+  '9p-xattr-user.c',
+  '9p-xattr.c',
+  '9p.c',
+  'codir.c',
+  'cofile.c',
+  'cofs.c',
+  'coth.c',
+  'coxattr.c',
+))
+fs_ss.add(when: 'CONFIG_XEN', if_true: files('xen-9p-backend.c'))
+softmmu_ss.add_all(when: 'CONFIG_9PFS', if_true: fs_ss)
+
+specific_ss.add(when: 'CONFIG_VIRTIO_9P', if_true: files('virtio-9p-device.c'))
hw/Makefile.objs deleted +0 -8
deleted file mode 100644
index ebae00a..0000000
@@ -1,8 +0,0 @@
-ifeq ($(CONFIG_SOFTMMU), y)
-devices-dirs-$(call lor,$(CONFIG_VIRTIO_9P),$(call land,$(CONFIG_VIRTFS),$(CONFIG_XEN))) += 9pfs/
-endif
-
-common-obj-y += $(devices-dirs-y)
-common-obj-m += display/
-common-obj-m += usb/
-obj-y += $(devices-dirs-y)
hw/meson.build +1 -0
index 55ca2b2..ba8763c 100644
@@ -1,3 +1,4 @@
+subdir('9pfs')
 subdir('acpi')
 subdir('adc')
 subdir('audio')
Signature · 1 line
1.8.3.1
#161 lore raw

PATCH 123/143 meson: convert hw/arch*

In reply to Paolo Bonzini

From: Marc-André Lureau <[email protected]>

---
 Makefile.target             |  7 ----
 hw/alpha/Makefile.objs      |  1 -
 hw/alpha/meson.build        |  8 +++++
 hw/arm/Makefile.objs        | 56 -------------------------------
 hw/arm/meson.build          | 59 +++++++++++++++++++++++++++++++++
 hw/avr/Makefile.objs        |  3 --
 hw/avr/meson.build          |  6 ++++
 hw/cris/Makefile.objs       |  2 --
 hw/cris/meson.build         |  5 +++
 hw/hppa/Makefile.objs       |  1 -
 hw/hppa/meson.build         |  4 +++
 hw/i386/Makefile.objs       | 20 ------------
 hw/i386/kvm/Makefile.objs   |  5 ---
 hw/i386/kvm/meson.build     |  8 +++++
 hw/i386/meson.build         | 32 ++++++++++++++++++
 hw/i386/xen/Makefile.objs   |  1 -
 hw/i386/xen/meson.build     |  7 ++++
 hw/lm32/Makefile.objs       |  3 --
 hw/lm32/meson.build         |  6 ++++
 hw/m68k/Makefile.objs       |  4 ---
 hw/m68k/meson.build         |  7 ++++
 hw/meson.build              | 25 ++++++++++++++
 hw/microblaze/Makefile.objs |  4 ---
 hw/microblaze/meson.build   |  7 ++++
 hw/mips/Makefile.objs       |  8 -----
 hw/mips/meson.build         | 11 +++++++
 hw/moxie/Makefile.objs      |  2 --
 hw/moxie/meson.build        |  4 +++
 hw/nios2/Makefile.objs      |  3 --
 hw/nios2/meson.build        |  6 ++++
 hw/openrisc/Makefile.objs   |  2 --
 hw/openrisc/meson.build     |  5 +++
 hw/ppc/Makefile.objs        | 35 --------------------
 hw/ppc/meson.build          | 80 +++++++++++++++++++++++++++++++++++++++++++++
 hw/riscv/Makefile.objs      | 16 ---------
 hw/riscv/meson.build        | 19 +++++++++++
 hw/rx/Makefile.objs         |  2 --
 hw/rx/meson.build           |  5 +++
 hw/s390x/Makefile.objs      | 37 ---------------------
 hw/s390x/meson.build        | 46 ++++++++++++++++++++++++++
 hw/sh4/Makefile.objs        |  4 ---
 hw/sh4/meson.build          | 10 ++++++
 hw/sparc/Makefile.objs      |  3 --
 hw/sparc/meson.build        |  6 ++++
 hw/sparc64/Makefile.objs    |  4 ---
 hw/sparc64/meson.build      |  6 ++++
 hw/tricore/Makefile.objs    |  1 -
 hw/tricore/meson.build      |  4 +++
 hw/unicore32/Makefile.objs  |  4 ---
 hw/unicore32/meson.build    |  5 +++
 hw/xenpv/Makefile.objs      |  2 --
 hw/xenpv/meson.build        |  3 ++
 hw/xtensa/Makefile.objs     |  6 ----
 hw/xtensa/meson.build       | 11 +++++++
 meson.build                 |  4 +++
 55 files changed, 399 insertions(+), 236 deletions(-)
 delete mode 100644 hw/alpha/Makefile.objs
 create mode 100644 hw/alpha/meson.build
 delete mode 100644 hw/arm/Makefile.objs
 create mode 100644 hw/arm/meson.build
 delete mode 100644 hw/avr/Makefile.objs
 create mode 100644 hw/avr/meson.build
 delete mode 100644 hw/cris/Makefile.objs
 create mode 100644 hw/cris/meson.build
 delete mode 100644 hw/hppa/Makefile.objs
 create mode 100644 hw/hppa/meson.build
 delete mode 100644 hw/i386/Makefile.objs
 delete mode 100644 hw/i386/kvm/Makefile.objs
 create mode 100644 hw/i386/kvm/meson.build
 create mode 100644 hw/i386/meson.build
 delete mode 100644 hw/i386/xen/Makefile.objs
 create mode 100644 hw/i386/xen/meson.build
 delete mode 100644 hw/lm32/Makefile.objs
 create mode 100644 hw/lm32/meson.build
 delete mode 100644 hw/m68k/Makefile.objs
 create mode 100644 hw/m68k/meson.build
 delete mode 100644 hw/microblaze/Makefile.objs
 create mode 100644 hw/microblaze/meson.build
 delete mode 100644 hw/mips/Makefile.objs
 create mode 100644 hw/mips/meson.build
 delete mode 100644 hw/moxie/Makefile.objs
 create mode 100644 hw/moxie/meson.build
 delete mode 100644 hw/nios2/Makefile.objs
 create mode 100644 hw/nios2/meson.build
 delete mode 100644 hw/openrisc/Makefile.objs
 create mode 100644 hw/openrisc/meson.build
 delete mode 100644 hw/ppc/Makefile.objs
 create mode 100644 hw/ppc/meson.build
 delete mode 100644 hw/riscv/Makefile.objs
 create mode 100644 hw/riscv/meson.build
 delete mode 100644 hw/rx/Makefile.objs
 create mode 100644 hw/rx/meson.build
 delete mode 100644 hw/s390x/Makefile.objs
 create mode 100644 hw/s390x/meson.build
 delete mode 100644 hw/sh4/Makefile.objs
 create mode 100644 hw/sh4/meson.build
 delete mode 100644 hw/sparc/Makefile.objs
 create mode 100644 hw/sparc/meson.build
 delete mode 100644 hw/sparc64/Makefile.objs
 create mode 100644 hw/sparc64/meson.build
 delete mode 100644 hw/tricore/Makefile.objs
 create mode 100644 hw/tricore/meson.build
 delete mode 100644 hw/unicore32/Makefile.objs
 create mode 100644 hw/unicore32/meson.build
 delete mode 100644 hw/xenpv/Makefile.objs
 create mode 100644 hw/xenpv/meson.build
 delete mode 100644 hw/xtensa/Makefile.objs
 create mode 100644 hw/xtensa/meson.build
Makefile.target +0 -7
index c95e0de..28cefba 100644
@@ -170,13 +170,6 @@ LIBS := $(LIBS) $(VDE_LIBS) $(SLIRP_LIBS)
 LIBS := $(LIBS) $(LIBUSB_LIBS) $(SMARTCARD_LIBS) $(USB_REDIR_LIBS)
 LIBS := $(LIBS) $(VIRGL_LIBS)
 
-# Hardware support
-ifeq ($(TARGET_NAME), sparc64)
-obj-y += hw/sparc64/
-else
-obj-y += hw/$(TARGET_BASE_ARCH)/
-endif
-
 generated-files-y += hmp-commands.h hmp-commands-info.h
 
 endif # CONFIG_SOFTMMU
hw/alpha/Makefile.objs deleted +0 -1
deleted file mode 100644
index 62fdf3e..0000000
@@ -1 +0,0 @@
-obj-$(CONFIG_DP264) += dp264.o pci.o typhoon.o
hw/alpha/meson.build new file +8 -0
new file mode 100644
index 0000000..81ca215
@@ -0,0 +1,8 @@
+alpha_ss = ss.source_set()
+alpha_ss.add(when: 'CONFIG_DP264', if_true: files(
+  'dp264.c',
+  'pci.c',
+  'typhoon.c',
+))
+
+hw_arch += {'alpha': alpha_ss}
hw/arm/Makefile.objs deleted +0 -56

56 lines not on this page · raw message

hw/arm/meson.build new file +59 -0

59 lines not on this page · raw message

hw/avr/Makefile.objs deleted +0 -3
deleted file mode 100644
index 4dca064..0000000
@@ -1,3 +0,0 @@
-obj-y += boot.o
-obj-$(CONFIG_AVR_ATMEGA_MCU) += atmega.o
-obj-$(CONFIG_ARDUINO) += arduino.o
hw/avr/meson.build new file +6 -0
new file mode 100644
index 0000000..46d53fb
@@ -0,0 +1,6 @@
+avr_ss = ss.source_set()
+avr_ss.add(files('boot.c'))
+avr_ss.add(when: 'CONFIG_AVR_ATMEGA_MCU', if_true: files('atmega.c'))
+avr_ss.add(when: 'CONFIG_ARDUINO', if_true: files('arduino.c'))
+
+hw_arch += {'avr': avr_ss}
hw/cris/Makefile.objs deleted +0 -2
deleted file mode 100644
index a4a27b3..0000000
@@ -1,2 +0,0 @@
-obj-y += boot.o
-obj-$(CONFIG_AXIS) += axis_dev88.o
hw/cris/meson.build new file +5 -0
new file mode 100644
index 0000000..dc808a4
@@ -0,0 +1,5 @@
+cris_ss = ss.source_set()
+cris_ss.add(files('boot.c'))
+cris_ss.add(when: 'CONFIG_AXIS', if_true: files('axis_dev88.c'))
+
+hw_arch += {'cris': cris_ss}
hw/hppa/Makefile.objs deleted +0 -1
deleted file mode 100644
index eac3467..0000000
@@ -1 +0,0 @@
-obj-$(CONFIG_DINO) += pci.o machine.o dino.o lasi.o
hw/hppa/meson.build new file +4 -0
new file mode 100644
index 0000000..1deae83
@@ -0,0 +1,4 @@
+hppa_ss = ss.source_set()
+hppa_ss.add(when: 'CONFIG_DINO', if_true: files('pci.c', 'machine.c', 'dino.c', 'lasi.c'))
+
+hw_arch += {'hppa': hppa_ss}
hw/i386/Makefile.objs deleted +0 -20
deleted file mode 100644
index 6abc745..0000000
@@ -1,20 +0,0 @@
-obj-$(CONFIG_KVM) += kvm/
-obj-y += e820_memory_layout.o multiboot.o
-obj-y += x86.o
-obj-$(CONFIG_PC) += pc.o pc_sysfw.o
-obj-$(CONFIG_I440FX) += pc_piix.o
-obj-$(CONFIG_Q35) += pc_q35.o
-obj-$(CONFIG_MICROVM) += microvm.o
-obj-y += fw_cfg.o
-obj-$(CONFIG_X86_IOMMU) += x86-iommu.o
-obj-$(call lnot,$(CONFIG_X86_IOMMU)) += x86-iommu-stub.o
-obj-$(CONFIG_VTD) += intel_iommu.o
-obj-$(CONFIG_AMD_IOMMU) += amd_iommu.o
-obj-$(CONFIG_XEN) += ../xenpv/ xen/
-obj-$(CONFIG_VMPORT) += vmport.o
-obj-$(CONFIG_VMMOUSE) += vmmouse.o
-obj-$(CONFIG_PC) += port92.o
-
-obj-y += kvmvapic.o
-obj-$(CONFIG_ACPI) += acpi-common.o
-obj-$(CONFIG_PC) += acpi-build.o
hw/i386/kvm/Makefile.objs deleted +0 -5
deleted file mode 100644
index 0c8d5f2..0000000
@@ -1,5 +0,0 @@
-obj-y += clock.o
-obj-$(CONFIG_APIC) += apic.o
-obj-$(CONFIG_IOAPIC) += ioapic.o
-obj-$(CONFIG_I8254) += i8254.o
-obj-$(CONFIG_I8259) += i8259.o
hw/i386/kvm/meson.build new file +8 -0
new file mode 100644
index 0000000..95467f1
@@ -0,0 +1,8 @@
+i386_kvm_ss = ss.source_set()
+i386_kvm_ss.add(files('clock.c'))
+i386_kvm_ss.add(when: 'CONFIG_APIC', if_true: files('apic.c'))
+i386_kvm_ss.add(when: 'CONFIG_I8254', if_true: files('i8254.c'))
+i386_kvm_ss.add(when: 'CONFIG_I8259', if_true: files('i8259.c'))
+i386_kvm_ss.add(when: 'CONFIG_IOAPIC', if_true: files('ioapic.c'))
+
+i386_ss.add_all(when: 'CONFIG_KVM', if_true: i386_kvm_ss)
hw/i386/meson.build new file +32 -0
new file mode 100644
index 0000000..63918fb
@@ -0,0 +1,32 @@
+i386_ss = ss.source_set()
+i386_ss.add(files(
+  'fw_cfg.c',
+  'kvmvapic.c',
+  'e820_memory_layout.c',
+  'multiboot.c',
+  'x86.c',
+))
+
+i386_ss.add(when: 'CONFIG_X86_IOMMU', if_true: files('x86-iommu.c'),
+                                      if_false: files('x86-iommu-stub.c'))
+i386_ss.add(when: 'CONFIG_AMD_IOMMU', if_true: files('amd_iommu.c'))
+i386_ss.add(when: 'CONFIG_I440FX', if_true: files('pc_piix.c'))
+i386_ss.add(when: 'CONFIG_MICROVM', if_true: files('microvm.c'))
+i386_ss.add(when: 'CONFIG_Q35', if_true: files('pc_q35.c'))
+i386_ss.add(when: 'CONFIG_VMMOUSE', if_true: files('vmmouse.c'))
+i386_ss.add(when: 'CONFIG_VMPORT', if_true: files('vmport.c'))
+i386_ss.add(when: 'CONFIG_VTD', if_true: files('intel_iommu.c'))
+
+i386_ss.add(when: 'CONFIG_ACPI', if_true: files('acpi-common.c'))
+i386_ss.add(when: 'CONFIG_PC', if_true: files(
+  'pc.c',
+  'pc_sysfw.c',
+  'acpi-build.c',
+  'port92.c'))
+
+subdir('kvm')
+subdir('xen')
+
+i386_ss.add_all(xenpv_ss)
+
+hw_arch += {'i386': i386_ss}
hw/i386/xen/Makefile.objs deleted +0 -1
deleted file mode 100644
index be9d10c..0000000
@@ -1 +0,0 @@
-obj-y += xen_platform.o xen_apic.o xen_pvdevice.o xen-hvm.o xen-mapcache.o
hw/i386/xen/meson.build new file +7 -0
new file mode 100644
index 0000000..be84130
@@ -0,0 +1,7 @@
+i386_ss.add(when: 'CONFIG_XEN', if_true: files(
+  'xen-hvm.c',
+  'xen-mapcache.c',
+  'xen_apic.c',
+  'xen_platform.c',
+  'xen_pvdevice.c',
+))
hw/lm32/Makefile.objs deleted +0 -3
deleted file mode 100644
index c394186..0000000
@@ -1,3 +0,0 @@
-# LM32 boards
-obj-$(CONFIG_LM32) += lm32_boards.o
-obj-$(CONFIG_MILKYMIST) += milkymist.o
hw/lm32/meson.build new file +6 -0
new file mode 100644
index 0000000..8caf0a7
@@ -0,0 +1,6 @@
+lm32_ss = ss.source_set()
+# LM32 boards
+lm32_ss.add(when: 'CONFIG_LM32', if_true: files('lm32_boards.c'))
+lm32_ss.add(when: 'CONFIG_MILKYMIST', if_true: files('milkymist.c'))
+
+hw_arch += {'lm32': lm32_ss}
hw/m68k/Makefile.objs deleted +0 -4
deleted file mode 100644
index b2c9e5a..0000000
@@ -1,4 +0,0 @@
-obj-$(CONFIG_AN5206) += an5206.o mcf5206.o
-obj-$(CONFIG_MCF5208) += mcf5208.o mcf_intc.o
-obj-$(CONFIG_NEXTCUBE) += next-kbd.o next-cube.o
-obj-$(CONFIG_Q800) += q800.o
hw/m68k/meson.build new file +7 -0
new file mode 100644
index 0000000..ca0044c6
@@ -0,0 +1,7 @@
+m68k_ss = ss.source_set()
+m68k_ss.add(when: 'CONFIG_AN5206', if_true: files('an5206.c', 'mcf5206.c'))
+m68k_ss.add(when: 'CONFIG_MCF5208', if_true: files('mcf5208.c', 'mcf_intc.c'))
+m68k_ss.add(when: 'CONFIG_NEXTCUBE', if_true: files('next-kbd.c', 'next-cube.c'))
+m68k_ss.add(when: 'CONFIG_Q800', if_true: files('q800.c'))
+
+hw_arch += {'m68k': m68k_ss}
hw/meson.build +25 -0
index ba8763c..010de72 100644
@@ -40,3 +40,28 @@ subdir('vfio')
 subdir('virtio')
 subdir('watchdog')
 subdir('xen')
+subdir('xenpv')
+
+subdir('alpha')
+subdir('arm')
+subdir('avr')
+subdir('cris')
+subdir('hppa')
+subdir('i386')
+subdir('lm32')
+subdir('m68k')
+subdir('microblaze')
+subdir('mips')
+subdir('moxie')
+subdir('nios2')
+subdir('openrisc')
+subdir('ppc')
+subdir('riscv')
+subdir('rx')
+subdir('s390x')
+subdir('sh4')
+subdir('sparc')
+subdir('sparc64')
+subdir('tricore')
+subdir('unicore32')
+subdir('xtensa')
hw/microblaze/Makefile.objs deleted +0 -4
deleted file mode 100644
index 8595a62..0000000
@@ -1,4 +0,0 @@
-obj-$(CONFIG_PETALOGIX_S3ADSP1800) += petalogix_s3adsp1800_mmu.o
-obj-$(CONFIG_PETALOGIX_ML605) += petalogix_ml605_mmu.o
-obj-$(CONFIG_XLNX_ZYNQMP_PMU) += xlnx-zynqmp-pmu.o
-obj-y += boot.o
hw/microblaze/meson.build new file +7 -0
new file mode 100644
index 0000000..bb9e4eb
@@ -0,0 +1,7 @@
+microblaze_ss = ss.source_set()
+microblaze_ss.add(files('boot.c'))
+microblaze_ss.add(when: 'CONFIG_PETALOGIX_S3ADSP1800', if_true: files('petalogix_s3adsp1800_mmu.c'))
+microblaze_ss.add(when: 'CONFIG_PETALOGIX_ML605', if_true: files('petalogix_ml605_mmu.c'))
+microblaze_ss.add(when: 'CONFIG_XLNX_ZYNQMP_PMU', if_true: files('xlnx-zynqmp-pmu.c'))
+
+hw_arch += {'microblaze': microblaze_ss}
hw/mips/Makefile.objs deleted +0 -8
deleted file mode 100644
index 739e2b7..0000000
@@ -1,8 +0,0 @@
-obj-y += addr.o mips_int.o
-obj-$(CONFIG_R4K) += r4k.o
-obj-$(CONFIG_MALTA) += gt64xxx_pci.o malta.o
-obj-$(CONFIG_MIPSSIM) += mipssim.o
-obj-$(CONFIG_JAZZ) += jazz.o
-obj-$(CONFIG_FULOONG) += fuloong2e.o
-obj-$(CONFIG_MIPS_CPS) += cps.o
-obj-$(CONFIG_MIPS_BOSTON) += boston.o
hw/mips/meson.build new file +11 -0
new file mode 100644
index 0000000..6ac9dc4
@@ -0,0 +1,11 @@
+mips_ss = ss.source_set()
+mips_ss.add(files('addr.c', 'mips_int.c'))
+mips_ss.add(when: 'CONFIG_FULOONG', if_true: files('fuloong2e.c'))
+mips_ss.add(when: 'CONFIG_JAZZ', if_true: files('jazz.c'))
+mips_ss.add(when: 'CONFIG_MALTA', if_true: files('gt64xxx_pci.c', 'malta.c'))
+mips_ss.add(when: 'CONFIG_MIPSSIM', if_true: files('mipssim.c'))
+mips_ss.add(when: 'CONFIG_MIPS_BOSTON', if_true: files('boston.c'))
+mips_ss.add(when: 'CONFIG_MIPS_CPS', if_true: files('cps.c'))
+mips_ss.add(when: 'CONFIG_R4K', if_true: files('r4k.c'))
+
+hw_arch += {'mips': mips_ss}
hw/moxie/Makefile.objs deleted +0 -2
deleted file mode 100644
index ddbf300..0000000
@@ -1,2 +0,0 @@
-# moxie boards
-obj-$(CONFIG_MOXIESIM) += moxiesim.o
hw/moxie/meson.build new file +4 -0
new file mode 100644
index 0000000..05a7c2e
@@ -0,0 +1,4 @@
+moxie_ss = ss.source_set()
+moxie_ss.add(when: 'CONFIG_MOXIESIM', if_true: files('moxiesim.c'))
+
+hw_arch += {'moxie': moxie_ss}
hw/nios2/Makefile.objs deleted +0 -3
deleted file mode 100644
index 3e01798..0000000
@@ -1,3 +0,0 @@
-obj-y = boot.o cpu_pic.o
-obj-$(CONFIG_NIOS2_10M50) += 10m50_devboard.o
-obj-$(CONFIG_NIOS2_GENERIC_NOMMU) += generic_nommu.o
hw/nios2/meson.build new file +6 -0
new file mode 100644
index 0000000..dd66ebb
@@ -0,0 +1,6 @@
+nios2_ss = ss.source_set()
+nios2_ss.add(files('boot.c', 'cpu_pic.c'))
+nios2_ss.add(when: 'CONFIG_NIOS2_10M50', if_true: files('10m50_devboard.c'))
+nios2_ss.add(when: 'CONFIG_NIOS2_GENERIC_NOMMU', if_true: files('generic_nommu.c'))
+
+hw_arch += {'nios2': nios2_ss}
hw/openrisc/Makefile.objs deleted +0 -2
deleted file mode 100644
index aa04de7..0000000
@@ -1,2 +0,0 @@
-obj-y = pic_cpu.o cputimer.o
-obj-$(CONFIG_OR1K_SIM) += openrisc_sim.o
hw/openrisc/meson.build new file +5 -0
new file mode 100644
index 0000000..57c4255
@@ -0,0 +1,5 @@
+openrisc_ss = ss.source_set()
+openrisc_ss.add(files('pic_cpu.c', 'cputimer.c'))
+openrisc_ss.add(when: 'CONFIG_OR1K_SIM', if_true: files('openrisc_sim.c'))
+
+hw_arch += {'openrisc': openrisc_ss}
hw/ppc/Makefile.objs deleted +0 -35
deleted file mode 100644
index c3d3cc5..0000000
@@ -1,35 +0,0 @@
-# shared objects
-obj-y += ppc.o ppc_booke.o
-obj-$(CONFIG_FDT_PPC) += fdt.o
-obj-$(CONFIG_FW_CFG_PPC) += fw_cfg.o
-# IBM pSeries (sPAPR)
-obj-$(CONFIG_PSERIES) += spapr.o spapr_caps.o spapr_vio.o spapr_events.o
-obj-$(CONFIG_PSERIES) += spapr_hcall.o spapr_iommu.o spapr_rtas.o
-obj-$(CONFIG_PSERIES) += spapr_pci.o spapr_rtc.o spapr_drc.o
-obj-$(CONFIG_PSERIES) += spapr_cpu_core.o spapr_ovec.o spapr_irq.o
-obj-$(CONFIG_PSERIES) += spapr_tpm_proxy.o spapr_nvdimm.o
-obj-$(CONFIG_SPAPR_RNG) +=  spapr_rng.o
-obj-$(call land,$(CONFIG_PSERIES),$(CONFIG_LINUX)) += spapr_pci_vfio.o spapr_pci_nvlink2.o
-# IBM PowerNV
-obj-$(CONFIG_POWERNV) += pnv.o pnv_xscom.o pnv_core.o pnv_lpc.o pnv_psi.o pnv_occ.o pnv_bmc.o
-obj-$(CONFIG_POWERNV) += pnv_homer.o pnv_pnor.o
-
-obj-$(CONFIG_PSERIES) += spapr_rtas_ddw.o
-# PowerPC 4xx boards
-obj-$(CONFIG_PPC405) += ppc405_boards.o ppc405_uc.o
-obj-$(CONFIG_PPC440) += ppc440_bamboo.o ppc440_pcix.o ppc440_uc.o
-obj-$(CONFIG_PPC4XX) += ppc4xx_pci.o ppc4xx_devs.o
-obj-$(CONFIG_SAM460EX) += sam460ex.o
-# PReP
-obj-$(CONFIG_PREP) += prep.o
-obj-$(CONFIG_PREP) += prep_systemio.o
-obj-${CONFIG_RS6000_MC} += rs6000_mc.o
-# OldWorld PowerMac
-obj-$(CONFIG_MAC_OLDWORLD) += mac_oldworld.o
-# NewWorld PowerMac
-obj-$(CONFIG_MAC_NEWWORLD) += mac_newworld.o
-# e500
-obj-$(CONFIG_E500) += e500.o mpc8544ds.o e500plat.o
-obj-$(CONFIG_E500) += mpc8544_guts.o ppce500_spin.o
-# PowerPC 440 Xilinx ML507 reference board.
-obj-$(CONFIG_VIRTEX) += virtex_ml507.o
hw/ppc/meson.build new file +80 -0

80 lines not on this page · raw message

hw/riscv/Makefile.objs deleted +0 -16
deleted file mode 100644
index 57cc708..0000000
@@ -1,16 +0,0 @@
-obj-y += boot.o
-obj-$(CONFIG_SPIKE) += riscv_htif.o
-obj-$(CONFIG_HART) += riscv_hart.o
-obj-$(CONFIG_OPENTITAN) += opentitan.o
-obj-$(CONFIG_SIFIVE_E) += sifive_e.o
-obj-$(CONFIG_SIFIVE_E) += sifive_e_prci.o
-obj-$(CONFIG_SIFIVE) += sifive_clint.o
-obj-$(CONFIG_SIFIVE) += sifive_gpio.o
-obj-$(CONFIG_SIFIVE) += sifive_plic.o
-obj-$(CONFIG_SIFIVE) += sifive_test.o
-obj-$(CONFIG_SIFIVE_U) += sifive_u.o
-obj-$(CONFIG_SIFIVE_U) += sifive_u_otp.o
-obj-$(CONFIG_SIFIVE_U) += sifive_u_prci.o
-obj-$(CONFIG_SIFIVE) += sifive_uart.o
-obj-$(CONFIG_SPIKE) += spike.o
-obj-$(CONFIG_RISCV_VIRT) += virt.o
hw/riscv/meson.build new file +19 -0
new file mode 100644
index 0000000..2de8e5a
@@ -0,0 +1,19 @@
+riscv_ss = ss.source_set()
+riscv_ss.add(files('boot.c'))
+riscv_ss.add(when: 'CONFIG_HART', if_true: files('riscv_hart.c'))
+riscv_ss.add(when: 'CONFIG_OPENTITAN', if_true: files('opentitan.c'))
+riscv_ss.add(when: 'CONFIG_RISCV_VIRT', if_true: files('virt.c'))
+riscv_ss.add(when: 'CONFIG_SIFIVE', if_true: files('sifive_clint.c'))
+riscv_ss.add(when: 'CONFIG_SIFIVE', if_true: files('sifive_gpio.c'))
+riscv_ss.add(when: 'CONFIG_SIFIVE', if_true: files('sifive_plic.c'))
+riscv_ss.add(when: 'CONFIG_SIFIVE', if_true: files('sifive_test.c'))
+riscv_ss.add(when: 'CONFIG_SIFIVE', if_true: files('sifive_uart.c'))
+riscv_ss.add(when: 'CONFIG_SIFIVE_E', if_true: files('sifive_e.c'))
+riscv_ss.add(when: 'CONFIG_SIFIVE_E', if_true: files('sifive_e_prci.c'))
+riscv_ss.add(when: 'CONFIG_SIFIVE_U', if_true: files('sifive_u.c'))
+riscv_ss.add(when: 'CONFIG_SIFIVE_U', if_true: files('sifive_u_otp.c'))
+riscv_ss.add(when: 'CONFIG_SIFIVE_U', if_true: files('sifive_u_prci.c'))
+riscv_ss.add(when: 'CONFIG_SPIKE', if_true: files('riscv_htif.c'))
+riscv_ss.add(when: 'CONFIG_SPIKE', if_true: files('spike.c'))
+
+hw_arch += {'riscv': riscv_ss}
hw/rx/Makefile.objs deleted +0 -2
deleted file mode 100644
index 4ef6b9e..0000000
@@ -1,2 +0,0 @@
-obj-$(CONFIG_RX62N_MCU) += rx62n.o
-obj-$(CONFIG_RX_GDBSIM) += rx-gdbsim.o
hw/rx/meson.build new file +5 -0
new file mode 100644
index 0000000..d223512
@@ -0,0 +1,5 @@
+rx_ss = ss.source_set()
+rx_ss.add(when: 'CONFIG_RX_GDBSIM', if_true: files('rx-gdbsim.c'))
+rx_ss.add(when: 'CONFIG_RX62N_MCU', if_true: files('rx62n.c'))
+
+hw_arch += {'rx': rx_ss}
hw/s390x/Makefile.objs deleted +0 -37
deleted file mode 100644
index a46a1c7..0000000
@@ -1,37 +0,0 @@
-obj-y += s390-virtio-hcall.o
-obj-y += sclp.o
-obj-y += event-facility.o
-obj-y += sclpquiesce.o
-obj-y += sclpcpu.o
-obj-y += ipl.o
-obj-y += css.o
-obj-$(CONFIG_S390_CCW_VIRTIO) += s390-virtio-ccw.o
-obj-$(CONFIG_TERMINAL3270) += 3270-ccw.o
-ifeq ($(CONFIG_VIRTIO_CCW),y)
-obj-y += virtio-ccw.o
-obj-$(CONFIG_VIRTIO_SERIAL) += virtio-ccw-serial.o
-obj-$(CONFIG_VIRTIO_BALLOON) += virtio-ccw-balloon.o
-obj-$(CONFIG_VIRTIO_SCSI) += virtio-ccw-scsi.o
-obj-$(CONFIG_VIRTIO_RNG) += virtio-ccw-rng.o
-obj-$(CONFIG_VIRTIO_CRYPTO) += virtio-ccw-crypto.o
-obj-$(CONFIG_VIRTIO_GPU) += virtio-ccw-gpu.o
-obj-$(CONFIG_VIRTIO_INPUT) += virtio-ccw-input.o
-obj-$(CONFIG_VIRTIO_NET) += virtio-ccw-net.o
-obj-$(CONFIG_VIRTIO_BLK) += virtio-ccw-blk.o
-obj-$(call land,$(CONFIG_VIRTIO_9P),$(CONFIG_VIRTFS)) += virtio-ccw-9p.o
-obj-$(CONFIG_VHOST_VSOCK) += vhost-vsock-ccw.o
-endif
-obj-y += css-bridge.o
-obj-y += ccw-device.o
-obj-y += s390-pci-bus.o s390-pci-inst.o
-obj-y += s390-skeys.o
-obj-y += s390-stattrib.o
-obj-y += tod.o
-obj-y += tod-qemu.o
-obj-$(CONFIG_KVM) += tod-kvm.o
-obj-$(CONFIG_KVM) += s390-skeys-kvm.o
-obj-$(CONFIG_KVM) += s390-stattrib-kvm.o
-obj-$(CONFIG_KVM) += pv.o
-obj-y += s390-ccw.o
-obj-y += ap-device.o
-obj-y += ap-bridge.o
hw/s390x/meson.build new file +46 -0

46 lines not on this page · raw message

hw/sh4/Makefile.objs deleted +0 -4
deleted file mode 100644
index 2a707f9..0000000
@@ -1,4 +0,0 @@
-obj-y += sh7750.o sh7750_regnames.o
-obj-y += sh_pci.o
-obj-$(CONFIG_R2D) +=  r2d.o
-obj-$(CONFIG_SHIX) += shix.o
hw/sh4/meson.build new file +10 -0
new file mode 100644
index 0000000..303c0f4
@@ -0,0 +1,10 @@
+sh4_ss = ss.source_set()
+sh4_ss.add(files(
+  'sh7750.c',
+  'sh7750_regnames.c',
+  'sh_pci.c'
+))
+sh4_ss.add(when: 'CONFIG_R2D', if_true: files('r2d.c'))
+sh4_ss.add(when: 'CONFIG_SHIX', if_true: files('shix.c'))
+
+hw_arch += {'sh4': sh4_ss}
hw/sparc/Makefile.objs deleted +0 -3
deleted file mode 100644
index d57e33f..0000000
@@ -1,3 +0,0 @@
-obj-$(CONFIG_SUN4M) += sun4m_iommu.o
-obj-$(CONFIG_SUN4M) += sun4m.o
-obj-$(CONFIG_LEON3) += leon3.o
hw/sparc/meson.build new file +6 -0
new file mode 100644
index 0000000..19c442c
@@ -0,0 +1,6 @@
+sparc_ss = ss.source_set()
+sparc_ss.add(when: 'CONFIG_LEON3', if_true: files('leon3.c'))
+sparc_ss.add(when: 'CONFIG_SUN4M', if_true: files('sun4m.c'))
+sparc_ss.add(when: 'CONFIG_SUN4M', if_true: files('sun4m_iommu.c'))
+
+hw_arch += {'sparc': sparc_ss}
hw/sparc64/Makefile.objs deleted +0 -4
deleted file mode 100644
index af0525c..0000000
@@ -1,4 +0,0 @@
-obj-y += sparc64.o
-obj-$(CONFIG_SUN4U) += sun4u_iommu.o
-obj-$(CONFIG_SUN4U) += sun4u.o
-obj-$(CONFIG_NIAGARA) += niagara.o
hw/sparc64/meson.build new file +6 -0
new file mode 100644
index 0000000..58b5504
@@ -0,0 +1,6 @@
+sparc64_ss = ss.source_set()
+sparc64_ss.add(files('sparc64.c'))
+sparc64_ss.add(when: 'CONFIG_NIAGARA', if_true: files('niagara.c'))
+sparc64_ss.add(when: 'CONFIG_SUN4U', if_true: files('sun4u.c', 'sun4u_iommu.c'))
+
+hw_arch += {'sparc64': sparc64_ss}
hw/tricore/Makefile.objs deleted +0 -1
deleted file mode 100644
index 5501f6c..0000000
@@ -1 +0,0 @@
-obj-$(CONFIG_TRICORE) += tricore_testboard.o
hw/tricore/meson.build new file +4 -0
new file mode 100644
index 0000000..579aa13
@@ -0,0 +1,4 @@
+tricore_ss = ss.source_set()
+tricore_ss.add(when: 'CONFIG_TRICORE', if_true: files('tricore_testboard.c'))
+
+hw_arch += {'tricore': tricore_ss}
hw/unicore32/Makefile.objs deleted +0 -4
deleted file mode 100644
index e0fd628..0000000
@@ -1,4 +0,0 @@
-# For UniCore32 machines and boards
-
-# PKUnity-v3 SoC and board information
-obj-${CONFIG_PUV3} += puv3.o
hw/unicore32/meson.build new file +5 -0
new file mode 100644
index 0000000..fc26d6b
@@ -0,0 +1,5 @@
+unicore32_ss = ss.source_set()
+# PKUnity-v3 SoC and board information
+unicore32_ss.add(when: 'CONFIG_PUV3', if_true: files('puv3.c'))
+
+hw_arch += {'unicore32': unicore32_ss}
hw/xenpv/Makefile.objs deleted +0 -2
deleted file mode 100644
index 8bfa458..0000000
@@ -1,2 +0,0 @@
-# Xen PV machine support
-obj-$(CONFIG_XEN) += xen_machine_pv.o
hw/xenpv/meson.build new file +3 -0
new file mode 100644
index 0000000..40f911a
@@ -0,0 +1,3 @@
+xenpv_ss = ss.source_set()
+
+xenpv_ss.add(when: 'CONFIG_XEN', if_true: files('xen_machine_pv.c'))
hw/xtensa/Makefile.objs deleted +0 -6
deleted file mode 100644
index 2b40e1b..0000000
@@ -1,6 +0,0 @@
-obj-y += mx_pic.o
-obj-y += pic_cpu.o
-obj-y += xtensa_memory.o
-obj-$(CONFIG_XTENSA_SIM) += sim.o
-obj-$(CONFIG_XTENSA_VIRT) += virt.o
-obj-$(CONFIG_XTENSA_XTFPGA) += xtfpga.o
hw/xtensa/meson.build new file +11 -0
new file mode 100644
index 0000000..1d5835d
@@ -0,0 +1,11 @@
+xtensa_ss = ss.source_set()
+xtensa_ss.add(files(
+  'mx_pic.c',
+  'pic_cpu.c',
+  'xtensa_memory.c',
+))
+xtensa_ss.add(when: 'CONFIG_XTENSA_SIM', if_true: files('sim.c'))
+xtensa_ss.add(when: 'CONFIG_XTENSA_VIRT', if_true: files('virt.c'))
+xtensa_ss.add(when: 'CONFIG_XTENSA_XTFPGA', if_true: files('xtfpga.c'))
+
+hw_arch += {'xtensa': xtensa_ss}
meson.build +4 -0
index e2a80b8..03d9876 100644
@@ -760,6 +760,10 @@ foreach target : target_dirs
   if target.endswith('-softmmu')
     qemu_target_name = 'qemu-system-' + target_name
     target_type='system'
+    hw_dir = target_name == 'sparc64' ? 'sparc64' : arch
+    hw = hw_arch[hw_dir].apply(config_target, strict: false)
+    arch_srcs += hw.sources()
+
     arch_srcs += config_devices_h[target]
   else
     target_type='user'
Signature · 1 line
1.8.3.1
#162 lore raw

PATCH 124/143 meson: target

In reply to Paolo Bonzini

From: Marc-André Lureau <[email protected]>

---
 Makefile.target                 |  3 +-
 libdecnumber/Makefile.objs      |  5 ---
 libdecnumber/meson.build        |  7 ++++
 meson.build                     | 11 +++++
 scripts/decodetree.py           |  2 +-
 target/alpha/Makefile.objs      |  4 --
 target/alpha/meson.build        | 18 +++++++++
 target/arm/Makefile.objs        | 89 -----------------------------------------
 target/arm/meson.build          | 62 ++++++++++++++++++++++++++++
 target/avr/Makefile.objs        | 34 ----------------
 target/avr/disas.c              |  2 +-
 target/avr/meson.build          | 20 +++++++++
 target/avr/translate.c          |  2 +-
 target/cris/Makefile.objs       |  3 --
 target/cris/meson.build         | 14 +++++++
 target/hppa/Makefile.objs       | 11 -----
 target/hppa/meson.build         | 19 +++++++++
 target/hppa/translate.c         |  2 +-
 target/i386/Makefile.objs       | 23 -----------
 target/i386/hvf/Makefile.objs   |  2 -
 target/i386/hvf/meson.build     | 12 ++++++
 target/i386/meson.build         | 40 ++++++++++++++++++
 target/lm32/Makefile.objs       |  4 --
 target/lm32/meson.build         | 15 +++++++
 target/m68k/Makefile.objs       |  5 ---
 target/m68k/meson.build         | 17 ++++++++
 target/meson.build              | 22 ++++++++++
 target/microblaze/Makefile.objs |  3 --
 target/microblaze/meson.build   | 14 +++++++
 target/mips/Makefile.objs       |  6 ---
 target/mips/meson.build         | 24 +++++++++++
 target/moxie/Makefile.objs      |  2 -
 target/moxie/meson.build        | 14 +++++++
 target/nios2/Makefile.objs      |  4 --
 target/nios2/meson.build        | 15 +++++++
 target/openrisc/Makefile.objs   | 15 -------
 target/openrisc/disas.c         |  2 +-
 target/openrisc/meson.build     | 23 +++++++++++
 target/openrisc/translate.c     |  2 +-
 target/ppc/Makefile.objs        | 20 ---------
 target/ppc/meson.build          | 37 +++++++++++++++++
 target/riscv/Makefile.objs      | 28 -------------
 target/riscv/meson.build        | 34 ++++++++++++++++
 target/riscv/translate.c        |  4 +-
 target/rx/Makefile.objs         | 11 -----
 target/rx/disas.c               |  2 +-
 target/rx/meson.build           | 16 ++++++++
 target/rx/translate.c           |  2 +-
 target/s390x/Makefile.objs      | 10 -----
 target/s390x/meson.build        | 42 ++++++++++++++++++-
 target/sh4/Makefile.objs        |  3 --
 target/sh4/meson.build          | 14 +++++++
 target/sparc/Makefile.objs      |  7 ----
 target/sparc/meson.build        | 23 +++++++++++
 target/tilegx/Makefile.objs     |  1 -
 target/tilegx/meson.build       | 13 ++++++
 target/tricore/Makefile.objs    |  1 -
 target/tricore/meson.build      | 15 +++++++
 target/unicore32/Makefile.objs  |  8 ----
 target/unicore32/meson.build    | 14 +++++++
 target/xtensa/Makefile.objs     | 16 --------
 target/xtensa/meson.build       | 30 ++++++++++++++
 62 files changed, 595 insertions(+), 328 deletions(-)
 delete mode 100644 libdecnumber/Makefile.objs
 create mode 100644 libdecnumber/meson.build
 delete mode 100644 target/alpha/Makefile.objs
 create mode 100644 target/alpha/meson.build
 delete mode 100644 target/arm/Makefile.objs
 create mode 100644 target/arm/meson.build
 delete mode 100644 target/avr/Makefile.objs
 create mode 100644 target/avr/meson.build
 delete mode 100644 target/cris/Makefile.objs
 create mode 100644 target/cris/meson.build
 delete mode 100644 target/hppa/Makefile.objs
 create mode 100644 target/hppa/meson.build
 delete mode 100644 target/i386/Makefile.objs
 delete mode 100644 target/i386/hvf/Makefile.objs
 create mode 100644 target/i386/hvf/meson.build
 create mode 100644 target/i386/meson.build
 delete mode 100644 target/lm32/Makefile.objs
 create mode 100644 target/lm32/meson.build
 delete mode 100644 target/m68k/Makefile.objs
 create mode 100644 target/m68k/meson.build
 delete mode 100644 target/microblaze/Makefile.objs
 create mode 100644 target/microblaze/meson.build
 delete mode 100644 target/mips/Makefile.objs
 create mode 100644 target/mips/meson.build
 delete mode 100644 target/moxie/Makefile.objs
 create mode 100644 target/moxie/meson.build
 delete mode 100644 target/nios2/Makefile.objs
 create mode 100644 target/nios2/meson.build
 delete mode 100644 target/openrisc/Makefile.objs
 create mode 100644 target/openrisc/meson.build
 delete mode 100644 target/ppc/Makefile.objs
 create mode 100644 target/ppc/meson.build
 delete mode 100644 target/riscv/Makefile.objs
 create mode 100644 target/riscv/meson.build
 delete mode 100644 target/rx/Makefile.objs
 create mode 100644 target/rx/meson.build
 delete mode 100644 target/s390x/Makefile.objs
 delete mode 100644 target/sh4/Makefile.objs
 create mode 100644 target/sh4/meson.build
 delete mode 100644 target/sparc/Makefile.objs
 create mode 100644 target/sparc/meson.build
 delete mode 100644 target/tilegx/Makefile.objs
 create mode 100644 target/tilegx/meson.build
 delete mode 100644 target/tricore/Makefile.objs
 create mode 100644 target/tricore/meson.build
 delete mode 100644 target/unicore32/Makefile.objs
 create mode 100644 target/unicore32/meson.build
 delete mode 100644 target/xtensa/Makefile.objs
 create mode 100644 target/xtensa/meson.build
Makefile.target +1 -2
index 28cefba..1ab8773 100644
@@ -116,7 +116,6 @@ obj-$(CONFIG_TCG) += tcg/tcg-common.o tcg/optimize.o
 obj-$(CONFIG_TCG_INTERPRETER) += tcg/tci.o
 obj-$(CONFIG_TCG_INTERPRETER) += disas/tci.o
 obj-$(CONFIG_TCG) += fpu/softfloat.o
-obj-y += target/$(TARGET_BASE_ARCH)/
 obj-y += disas.o
 obj-$(call notempty,$(TARGET_XML_FILES)) += gdbstub-xml.o
 LIBS := $(libs_cpu) $(LIBS)
@@ -168,7 +167,7 @@ LIBS := $(LIBS) $(BRLAPI_LIBS) $(SDL_LIBS) $(SPICE_LIBS) $(OPENGL_LIBS) $(SECCOM
 LIBS := $(LIBS) $(COREAUDIO_LIBS) $(DSOUND_LIBS)
 LIBS := $(LIBS) $(VDE_LIBS) $(SLIRP_LIBS)
 LIBS := $(LIBS) $(LIBUSB_LIBS) $(SMARTCARD_LIBS) $(USB_REDIR_LIBS)
-LIBS := $(LIBS) $(VIRGL_LIBS)
+LIBS := $(LIBS) $(VIRGL_LIBS) $(CURSES_LIBS)
 
 generated-files-y += hmp-commands.h hmp-commands-info.h
 
libdecnumber/Makefile.objs deleted +0 -5
deleted file mode 100644
index d81db04..0000000
@@ -1,5 +0,0 @@
-obj-y += decContext.o
-obj-y += decNumber.o
-obj-y += dpd/decimal32.o
-obj-y += dpd/decimal64.o
-obj-y += dpd/decimal128.o
libdecnumber/meson.build new file +7 -0
new file mode 100644
index 0000000..4d04139
@@ -0,0 +1,7 @@
+libdecnumber = files(
+  'decContext.c',
+  'decNumber.c',
+  'dpd/decimal128.c',
+  'dpd/decimal32.c',
+  'dpd/decimal64.c',
+)
meson.build +11 -0
index 03d9876..3e51340 100644
@@ -623,10 +623,15 @@ libqemuutil = static_library('qemuutil',
 qemuutil = declare_dependency(link_with: libqemuutil,
                               sources: genh + version_res)
 
+decodetree = generator(find_program('scripts/decodetree.py'),
+                       output: 'decode-@[email protected]',
+                       arguments: ['@INPUT@', '@EXTRA_ARGS@', '-o', '@OUTPUT@'])
+
 subdir('audio')
 subdir('io')
 subdir('chardev')
 subdir('fsdev')
+subdir('libdecnumber')
 subdir('target')
 subdir('dump')
 
@@ -760,6 +765,9 @@ foreach target : target_dirs
   if target.endswith('-softmmu')
     qemu_target_name = 'qemu-system-' + target_name
     target_type='system'
+    t = target_softmmu_arch[arch].apply(config_target, strict: false)
+    arch_srcs += t.sources()
+
     hw_dir = target_name == 'sparc64' ? 'sparc64' : arch
     hw = hw_arch[hw_dir].apply(config_target, strict: false)
     arch_srcs += hw.sources()
@@ -780,6 +788,9 @@ foreach target : target_dirs
     )
   endif
 
+  t = target_arch[arch].apply(config_target, strict: false)
+  arch_srcs += t.sources()
+
   target_common = common_ss.apply(config_target, strict: false)
   objects = common_all.extract_objects(target_common.sources())
 
scripts/decodetree.py +1 -1
index 694757b..4cd1e10 100755
@@ -1257,7 +1257,7 @@ def main():
     long_opts = ['decode=', 'translate=', 'output=', 'insnwidth=',
                  'static-decode=', 'varinsnwidth=']
     try:
-        (opts, args) = getopt.getopt(sys.argv[1:], 'o:vw:', long_opts)
+        (opts, args) = getopt.gnu_getopt(sys.argv[1:], 'o:vw:', long_opts)
     except getopt.GetoptError as err:
         error(0, err)
     for o, a in opts:
target/alpha/Makefile.objs deleted +0 -4
deleted file mode 100644
index 6366462..0000000
@@ -1,4 +0,0 @@
-obj-$(CONFIG_SOFTMMU) += machine.o
-obj-y += translate.o helper.o cpu.o
-obj-y += int_helper.o fpu_helper.o vax_helper.o sys_helper.o mem_helper.o
-obj-y += gdbstub.o
target/alpha/meson.build new file +18 -0
new file mode 100644
index 0000000..1aec55a
@@ -0,0 +1,18 @@
+alpha_ss = ss.source_set()
+alpha_ss.add(files(
+  'cpu.c',
+  'fpu_helper.c',
+  'gdbstub.c',
+  'helper.c',
+  'int_helper.c',
+  'mem_helper.c',
+  'sys_helper.c',
+  'translate.c',
+  'vax_helper.c',
+))
+
+alpha_softmmu_ss = ss.source_set()
+alpha_softmmu_ss.add(files('machine.c'))
+
+target_arch += {'alpha': alpha_ss}
+target_softmmu_arch += {'alpha': alpha_softmmu_ss}
target/arm/Makefile.objs deleted +0 -89

89 lines not on this page · raw message

target/arm/meson.build new file +62 -0

62 lines not on this page · raw message

target/avr/Makefile.objs deleted +0 -34
deleted file mode 100644
index 81d9bcd..0000000
@@ -1,34 +0,0 @@
-#
-#  QEMU AVR
-#
-#  Copyright (c) 2016-2020 Michael Rolnik
-#
-#  This library is free software; you can redistribute it and/or
-#  modify it under the terms of the GNU Lesser General Public
-#  License as published by the Free Software Foundation; either
-#  version 2.1 of the License, or (at your option) any later version.
-#
-#  This library is distributed in the hope that it will be useful,
-#  but WITHOUT ANY WARRANTY; without even the implied warranty of
-#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-#  Lesser General Public License for more details.
-#
-#  You should have received a copy of the GNU Lesser General Public
-#  License along with this library; if not, see
-#  <http://www.gnu.org/licenses/lgpl-2.1.html>
-#
-
-DECODETREE = $(SRC_PATH)/scripts/decodetree.py
-decode-y = $(SRC_PATH)/target/avr/insn.decode
-
-target/avr/decode_insn.inc: $(decode-y) $(DECODETREE)
-	$(call quiet-command, \
-	  $(PYTHON) $(DECODETREE) -o $@ --decode decode_insn --insnwidth 16 $<, \
-	  "GEN", $(TARGET_DIR)$@)
-
-target/avr/translate.o: target/avr/decode_insn.inc
-
-obj-y += translate.o cpu.o helper.o
-obj-y += gdbstub.o
-obj-y += disas.o
-obj-$(CONFIG_SOFTMMU) += machine.o
target/avr/disas.c +1 -1
index c45ab2c..5e20cbb 100644
@@ -60,7 +60,7 @@ static int append_16(DisasContext *ctx, int x)
 
 /* Include the auto-generated decoder.  */
 static bool decode_insn(DisasContext *ctx, uint16_t insn);
-#include "decode_insn.inc"
+#include "decode-insn.inc"
 
 #define output(mnemonic, format, ...) \
     (pctx->info->fprintf_func(pctx->info->stream, "%-9s " format, \
target/avr/meson.build new file +20 -0
new file mode 100644
index 0000000..7e8e29c
@@ -0,0 +1,20 @@
+gen = [
+  decodetree.process('insn.decode', extra_args: [ '--decode', 'decode_insn',
+                                                  '--insnwidth', '16' ])
+]
+
+avr_ss = ss.source_set()
+avr_softmmu_ss = ss.source_set()
+
+avr_ss.add(gen)
+avr_ss.add(files(
+  'translate.c',
+  'helper.c',
+  'cpu.c',
+  'gdbstub.c',
+  'disas.c'))
+
+avr_softmmu_ss.add(files('machine.c'))
+
+target_arch += {'avr': avr_ss}
+target_softmmu_arch += {'avr': avr_softmmu_ss}
target/avr/translate.c +1 -1
index 8deb126..ad5706a 100644
@@ -198,7 +198,7 @@ static bool avr_have_feature(DisasContext *ctx, int feature)
 }
 
 static bool decode_insn(DisasContext *ctx, uint16_t insn);
-#include "decode_insn.inc"
+#include "decode-insn.inc"
 
 /*
  * Arithmetic Instructions
target/cris/Makefile.objs deleted +0 -3
deleted file mode 100644
index 7779227..0000000
@@ -1,3 +0,0 @@
-obj-y += translate.o op_helper.o helper.o cpu.o
-obj-y += gdbstub.o
-obj-$(CONFIG_SOFTMMU) += mmu.o machine.o
target/cris/meson.build new file +14 -0
new file mode 100644
index 0000000..67c3793
@@ -0,0 +1,14 @@
+cris_ss = ss.source_set()
+cris_ss.add(files(
+  'cpu.c',
+  'gdbstub.c',
+  'helper.c',
+  'op_helper.c',
+  'translate.c',
+))
+
+cris_softmmu_ss = ss.source_set()
+cris_softmmu_ss.add(files('mmu.c', 'machine.c'))
+
+target_arch += {'cris': cris_ss}
+target_softmmu_arch += {'cris': cris_softmmu_ss}
target/hppa/Makefile.objs deleted +0 -11
deleted file mode 100644
index 40dcb86..0000000
@@ -1,11 +0,0 @@
-obj-y += translate.o helper.o cpu.o op_helper.o gdbstub.o mem_helper.o
-obj-y += int_helper.o
-obj-$(CONFIG_SOFTMMU) += machine.o
-
-DECODETREE = $(SRC_PATH)/scripts/decodetree.py
-
-target/hppa/decode.inc: $(SRC_PATH)/target/hppa/insns.decode $(DECODETREE)
-	$(call quiet-command,\
-	  $(PYTHON) $(DECODETREE) -o $@ $<, "GEN", $(TARGET_DIR)$@)
-
-target/hppa/translate.o: target/hppa/decode.inc
target/hppa/meson.build new file +19 -0
new file mode 100644
index 0000000..8a7ff82
@@ -0,0 +1,19 @@
+gen = decodetree.process('insns.decode')
+
+hppa_ss = ss.source_set()
+hppa_ss.add(gen)
+hppa_ss.add(files(
+  'cpu.c',
+  'gdbstub.c',
+  'helper.c',
+  'int_helper.c',
+  'mem_helper.c',
+  'op_helper.c',
+  'translate.c',
+))
+
+hppa_softmmu_ss = ss.source_set()
+hppa_softmmu_ss.add(files('machine.c'))
+
+target_arch += {'hppa': hppa_ss}
+target_softmmu_arch += {'hppa': hppa_softmmu_ss}
target/hppa/translate.c +1 -1
index 31e2926..4869999 100644
@@ -334,7 +334,7 @@ static int expand_shl11(DisasContext *ctx, int val)
 
 
 /* Include the auto-generated decoder.  */
-#include "decode.inc"
+#include "decode-insns.inc"
 
 /* We are not using a goto_tb (for whatever reason), but have updated
    the iaq (for whatever reason), so don't do it again on exit.  */
target/i386/Makefile.objs deleted +0 -23
deleted file mode 100644
index 0b93143..0000000
@@ -1,23 +0,0 @@
-obj-y += helper.o cpu.o gdbstub.o xsave_helper.o
-obj-$(CONFIG_TCG) += translate.o
-obj-$(CONFIG_TCG) += bpt_helper.o cc_helper.o excp_helper.o fpu_helper.o
-obj-$(CONFIG_TCG) += int_helper.o mem_helper.o misc_helper.o mpx_helper.o
-obj-$(CONFIG_TCG) += seg_helper.o smm_helper.o svm_helper.o
-obj-$(call lnot,$(CONFIG_TCG)) += tcg-stub.o
-obj-$(call lnot,$(CONFIG_KVM)) += kvm-stub.o
-ifeq ($(CONFIG_SOFTMMU),y)
-obj-y += machine.o arch_memory_mapping.o arch_dump.o monitor.o
-obj-$(CONFIG_KVM) += kvm.o
-obj-$(CONFIG_HYPERV) += hyperv.o
-obj-$(call lnot,$(CONFIG_HYPERV)) += hyperv-stub.o
-ifeq ($(CONFIG_WIN32),y)
-obj-$(CONFIG_HAX) += hax-all.o hax-mem.o hax-windows.o
-endif
-ifeq ($(CONFIG_POSIX),y)
-obj-$(CONFIG_HAX) += hax-all.o hax-mem.o hax-posix.o
-endif
-obj-$(CONFIG_HVF) += hvf/
-obj-$(CONFIG_WHPX) += whpx-all.o
-endif
-obj-$(CONFIG_SEV) += sev.o
-obj-$(call lnot,$(CONFIG_SEV)) += sev-stub.o
target/i386/hvf/Makefile.objs deleted +0 -2
deleted file mode 100644
index 927b86b..0000000
@@ -1,2 +0,0 @@
-obj-y += hvf.o
-obj-y += x86.o x86_cpuid.o x86_decode.o x86_descr.o x86_emu.o x86_flags.o x86_mmu.o x86hvf.o x86_task.o
target/i386/hvf/meson.build new file +12 -0
new file mode 100644
index 0000000..c8a4371
@@ -0,0 +1,12 @@
+i386_softmmu_ss.add(when: [hvf, 'CONFIG_HVF'], if_true: files(
+  'hvf.c',
+  'x86.c',
+  'x86_cpuid.c',
+  'x86_decode.c',
+  'x86_descr.c',
+  'x86_emu.c',
+  'x86_flags.c',
+  'x86_mmu.c',
+  'x86_task.c',
+  'x86hvf.c',
+))
target/i386/meson.build new file +40 -0
new file mode 100644
index 0000000..e0b71ad
@@ -0,0 +1,40 @@
+i386_ss = ss.source_set()
+i386_ss.add(files(
+  'cpu.c',
+  'gdbstub.c',
+  'helper.c',
+  'xsave_helper.c',
+))
+i386_ss.add(when: 'CONFIG_TCG', if_true: files(
+  'bpt_helper.c',
+  'cc_helper.c',
+  'excp_helper.c',
+  'fpu_helper.c',
+  'int_helper.c',
+  'mem_helper.c',
+  'misc_helper.c',
+  'mpx_helper.c',
+  'seg_helper.c',
+  'smm_helper.c',
+  'svm_helper.c',
+  'translate.c'), if_false: files('tcg-stub.c'))
+i386_ss.add(when: 'CONFIG_KVM', if_false: files('kvm-stub.c'))
+i386_ss.add(when: 'CONFIG_SEV', if_true: files('sev.c'), if_false: files('sev-stub.c'))
+
+i386_softmmu_ss = ss.source_set()
+i386_softmmu_ss.add(files(
+  'arch_dump.c',
+  'arch_memory_mapping.c',
+  'machine.c',
+  'monitor.c',
+))
+i386_softmmu_ss.add(when: 'CONFIG_HYPERV', if_true: files('hyperv.c'), if_false: files('hyperv-stub.c'))
+i386_softmmu_ss.add(when: 'CONFIG_KVM', if_true: files('kvm.c'))
+i386_softmmu_ss.add(when: 'CONFIG_WHPX', if_true: files('whpx-all.c'))
+i386_softmmu_ss.add(when: ['CONFIG_POSIX', 'CONFIG_HAX'], if_true: files('hax-all.c', 'hax-mem.c', 'hax-posix.c'))
+i386_softmmu_ss.add(when: ['CONFIG_WIN32', 'CONFIG_HAX'], if_true: files('hax-all.c', 'hax-mem.c', 'hax-windows.c'))
+
+subdir('hvf')
+
+target_arch += {'i386': i386_ss}
+target_softmmu_arch += {'i386': i386_softmmu_ss}
target/lm32/Makefile.objs deleted +0 -4
deleted file mode 100644
index c3e1bd6..0000000
@@ -1,4 +0,0 @@
-obj-y += translate.o op_helper.o helper.o cpu.o
-obj-y += gdbstub.o
-obj-y += lm32-semi.o
-obj-$(CONFIG_SOFTMMU) += machine.o
target/lm32/meson.build new file +15 -0
new file mode 100644
index 0000000..ef0eef0
@@ -0,0 +1,15 @@
+lm32_ss = ss.source_set()
+lm32_ss.add(files(
+  'cpu.c',
+  'gdbstub.c',
+  'helper.c',
+  'lm32-semi.c',
+  'op_helper.c',
+  'translate.c',
+))
+
+lm32_softmmu_ss = ss.source_set()
+lm32_softmmu_ss.add(files('machine.c'))
+
+target_arch += {'lm32': lm32_ss}
+target_softmmu_arch += {'lm32': lm32_softmmu_ss}
target/m68k/Makefile.objs deleted +0 -5
deleted file mode 100644
index ac61948..0000000
@@ -1,5 +0,0 @@
-obj-y += m68k-semi.o
-obj-y += translate.o op_helper.o helper.o cpu.o
-obj-y += fpu_helper.o softfloat.o
-obj-y += gdbstub.o
-obj-$(CONFIG_SOFTMMU) += monitor.o
target/m68k/meson.build new file +17 -0
new file mode 100644
index 0000000..05cd9fb
@@ -0,0 +1,17 @@
+m68k_ss = ss.source_set()
+m68k_ss.add(files(
+  'cpu.c',
+  'fpu_helper.c',
+  'gdbstub.c',
+  'helper.c',
+  'm68k-semi.c',
+  'op_helper.c',
+  'softfloat.c',
+  'translate.c',
+))
+
+m68k_softmmu_ss = ss.source_set()
+m68k_softmmu_ss.add(files('monitor.c'))
+
+target_arch += {'m68k': m68k_ss}
+target_softmmu_arch += {'m68k': m68k_softmmu_ss}
target/meson.build +22 -0
index e29dd3e..9f0ae93 100644
@@ -1 +1,23 @@
+subdir('alpha')
+subdir('arm')
+subdir('avr')
+subdir('cris')
+subdir('hppa')
+subdir('i386')
+subdir('lm32')
+subdir('m68k')
+subdir('microblaze')
+subdir('mips')
+subdir('moxie')
+subdir('nios2')
+subdir('openrisc')
+subdir('ppc')
+subdir('riscv')
+subdir('rx')
 subdir('s390x')
+subdir('sh4')
+subdir('sparc')
+subdir('tilegx')
+subdir('tricore')
+subdir('unicore32')
+subdir('xtensa')
target/microblaze/Makefile.objs deleted +0 -3
deleted file mode 100644
index f3d7b44..0000000
@@ -1,3 +0,0 @@
-obj-y += translate.o op_helper.o helper.o cpu.o
-obj-y += gdbstub.o
-obj-$(CONFIG_SOFTMMU) += mmu.o
target/microblaze/meson.build new file +14 -0
new file mode 100644
index 0000000..b8fe4af
@@ -0,0 +1,14 @@
+microblaze_ss = ss.source_set()
+microblaze_ss.add(files(
+  'cpu.c',
+  'gdbstub.c',
+  'helper.c',
+  'op_helper.c',
+  'translate.c',
+))
+
+microblaze_softmmu_ss = ss.source_set()
+microblaze_softmmu_ss.add(files('mmu.c'))
+
+target_arch += {'microblaze': microblaze_ss}
+target_softmmu_arch += {'microblaze': microblaze_softmmu_ss}
target/mips/Makefile.objs deleted +0 -6
deleted file mode 100644
index b820b3b..0000000
@@ -1,6 +0,0 @@
-obj-y += translate.o cpu.o gdbstub.o helper.o
-obj-y += op_helper.o cp0_helper.o fpu_helper.o
-obj-y += dsp_helper.o lmmi_helper.o msa_helper.o
-obj-$(CONFIG_SOFTMMU) += mips-semi.o
-obj-$(CONFIG_SOFTMMU) += machine.o cp0_timer.o
-obj-$(CONFIG_KVM) += kvm.o
target/mips/meson.build new file +24 -0
new file mode 100644
index 0000000..fa1f024
@@ -0,0 +1,24 @@
+mips_ss = ss.source_set()
+mips_ss.add(files(
+  'cp0_helper.c',
+  'cpu.c',
+  'dsp_helper.c',
+  'fpu_helper.c',
+  'gdbstub.c',
+  'helper.c',
+  'lmmi_helper.c',
+  'msa_helper.c',
+  'op_helper.c',
+  'translate.c',
+))
+mips_ss.add(when: 'CONFIG_KVM', if_true: files('kvm.c'))
+
+mips_softmmu_ss = ss.source_set()
+mips_softmmu_ss.add(files(
+  'cp0_timer.c',
+  'machine.c',
+  'mips-semi.c',
+))
+
+target_arch += {'mips': mips_ss}
+target_softmmu_arch += {'mips': mips_softmmu_ss}
target/moxie/Makefile.objs deleted +0 -2
deleted file mode 100644
index 6381d4d..0000000
@@ -1,2 +0,0 @@
-obj-y += translate.o helper.o machine.o cpu.o machine.o
-obj-$(CONFIG_SOFTMMU) += mmu.o
target/moxie/meson.build new file +14 -0
new file mode 100644
index 0000000..b4beb52
@@ -0,0 +1,14 @@
+moxie_ss = ss.source_set()
+moxie_ss.add(files(
+  'cpu.c',
+  'helper.c',
+  'machine.c',
+  'machine.c',
+  'translate.c',
+))
+
+moxie_softmmu_ss = ss.source_set()
+moxie_softmmu_ss.add(files('mmu.c'))
+
+target_arch += {'moxie': moxie_ss}
+target_softmmu_arch += {'moxie': moxie_softmmu_ss}
target/nios2/Makefile.objs deleted +0 -4
deleted file mode 100644
index 010de0e..0000000
@@ -1,4 +0,0 @@
-obj-y += translate.o op_helper.o helper.o cpu.o mmu.o nios2-semi.o
-obj-$(CONFIG_SOFTMMU) += monitor.o
-
-$(obj)/op_helper.o: QEMU_CFLAGS += $(HELPER_CFLAGS)
target/nios2/meson.build new file +15 -0
new file mode 100644
index 0000000..e643917
@@ -0,0 +1,15 @@
+nios2_ss = ss.source_set()
+nios2_ss.add(files(
+  'cpu.c',
+  'helper.c',
+  'mmu.c',
+  'nios2-semi.c',
+  'op_helper.c',
+  'translate.c',
+))
+
+nios2_softmmu_ss = ss.source_set()
+nios2_softmmu_ss.add(files('monitor.c'))
+
+target_arch += {'nios2': nios2_ss}
+target_softmmu_arch += {'nios2': nios2_softmmu_ss}
target/openrisc/Makefile.objs deleted +0 -15
deleted file mode 100644
index 0f2fcff..0000000
@@ -1,15 +0,0 @@
-obj-$(CONFIG_SOFTMMU) += machine.o
-obj-y += cpu.o exception.o interrupt.o mmu.o translate.o disas.o
-obj-y += exception_helper.o fpu_helper.o \
-         interrupt_helper.o sys_helper.o
-obj-y += gdbstub.o
-
-DECODETREE = $(SRC_PATH)/scripts/decodetree.py
-
-target/openrisc/decode.inc: \
-  $(SRC_PATH)/target/openrisc/insns.decode $(DECODETREE)
-	$(call quiet-command,\
-	  $(PYTHON) $(DECODETREE) -o $@ $<, "GEN", $(TARGET_DIR)$@)
-
-target/openrisc/translate.o: target/openrisc/decode.inc
-target/openrisc/disas.o: target/openrisc/decode.inc
target/openrisc/disas.c +1 -1
index 3f75316..d5e0a43 100644
@@ -25,7 +25,7 @@
 typedef disassemble_info DisasContext;
 
 /* Include the auto-generated decoder.  */
-#include "decode.inc"
+#include "decode-insns.inc"
 
 #define output(mnemonic, format, ...) \
     (info->fprintf_func(info->stream, "%-9s " format, \
target/openrisc/meson.build new file +23 -0
new file mode 100644
index 0000000..9774a58
@@ -0,0 +1,23 @@
+gen = decodetree.process('insns.decode')
+
+openrisc_ss = ss.source_set()
+openrisc_ss.add(gen)
+openrisc_ss.add(files(
+  'cpu.c',
+  'disas.c',
+  'exception.c',
+  'exception_helper.c',
+  'fpu_helper.c',
+  'gdbstub.c',
+  'interrupt.c',
+  'interrupt_helper.c',
+  'mmu.c',
+  'sys_helper.c',
+  'translate.c',
+))
+
+openrisc_softmmu_ss = ss.source_set()
+openrisc_softmmu_ss.add(files('machine.c'))
+
+target_arch += {'openrisc': openrisc_ss}
+target_softmmu_arch += {'openrisc': openrisc_softmmu_ss}
target/openrisc/translate.c +1 -1
index a119be2..ffd268d 100644
@@ -65,7 +65,7 @@ static inline bool is_user(DisasContext *dc)
 }
 
 /* Include the auto-generated decoder.  */
-#include "decode.inc"
+#include "decode-insns.inc"
 
 static TCGv cpu_sr;
 static TCGv cpu_regs[32];
target/ppc/Makefile.objs deleted +0 -20
deleted file mode 100644
index e8fa18c..0000000
@@ -1,20 +0,0 @@
-obj-y += cpu-models.o
-obj-y += cpu.o
-obj-y += translate.o
-ifeq ($(CONFIG_SOFTMMU),y)
-obj-y += machine.o mmu_helper.o mmu-hash32.o monitor.o arch_dump.o
-obj-$(TARGET_PPC64) += mmu-hash64.o mmu-book3s-v3.o compat.o
-obj-$(TARGET_PPC64) += mmu-radix64.o
-endif
-obj-$(CONFIG_KVM) += kvm.o
-obj-$(call lnot,$(CONFIG_KVM)) += kvm-stub.o
-obj-y += dfp_helper.o
-obj-y += excp_helper.o
-obj-y += fpu_helper.o
-obj-y += int_helper.o
-obj-y += timebase_helper.o
-obj-y += misc_helper.o
-obj-y += mem_helper.o
-obj-y += ../../libdecnumber/
-obj-$(CONFIG_USER_ONLY) += user_only_helper.o
-obj-y += gdbstub.o
target/ppc/meson.build new file +37 -0
new file mode 100644
index 0000000..bbfef90
@@ -0,0 +1,37 @@
+ppc_ss = ss.source_set()
+ppc_ss.add(files(
+  'cpu-models.c',
+  'cpu.c',
+  'dfp_helper.c',
+  'excp_helper.c',
+  'fpu_helper.c',
+  'gdbstub.c',
+  'int_helper.c',
+  'mem_helper.c',
+  'misc_helper.c',
+  'timebase_helper.c',
+  'translate.c',
+))
+
+ppc_ss.add(libdecnumber)
+
+ppc_ss.add(when: 'CONFIG_KVM', if_true: files('kvm.c'), if_false: files('kvm-stub.c'))
+ppc_ss.add(when: 'CONFIG_USER_ONLY', if_true: files('user_only_helper.c'))
+
+ppc_softmmu_ss = ss.source_set()
+ppc_softmmu_ss.add(files(
+  'arch_dump.c',
+  'machine.c',
+  'mmu-hash32.c',
+  'mmu_helper.c',
+  'monitor.c',
+))
+ppc_softmmu_ss.add(when: 'TARGET_PPC64', if_true: files(
+  'compat.c',
+  'mmu-book3s-v3.c',
+  'mmu-hash64.c',
+  'mmu-radix64.c',
+))
+
+target_arch += {'ppc': ppc_ss}
+target_softmmu_arch += {'ppc': ppc_softmmu_ss}
target/riscv/Makefile.objs deleted +0 -28
deleted file mode 100644
index 1a66d8a..0000000
@@ -1,28 +0,0 @@
-obj-y += translate.o op_helper.o cpu_helper.o cpu.o csr.o fpu_helper.o vector_helper.o gdbstub.o
-obj-$(CONFIG_SOFTMMU) += pmp.o
-
-ifeq ($(CONFIG_SOFTMMU),y)
-obj-y += monitor.o
-endif
-
-DECODETREE = $(SRC_PATH)/scripts/decodetree.py
-
-decode32-y = $(SRC_PATH)/target/riscv/insn32.decode
-decode32-$(TARGET_RISCV64) += $(SRC_PATH)/target/riscv/insn32-64.decode
-
-decode16-y = $(SRC_PATH)/target/riscv/insn16.decode
-decode16-$(TARGET_RISCV32) += $(SRC_PATH)/target/riscv/insn16-32.decode
-decode16-$(TARGET_RISCV64) += $(SRC_PATH)/target/riscv/insn16-64.decode
-
-target/riscv/decode_insn32.inc: $(decode32-y) $(DECODETREE)
-	$(call quiet-command, \
-	  $(PYTHON) $(DECODETREE) -o $@ --static-decode decode_insn32 \
-          $(decode32-y), "GEN", $(TARGET_DIR)$@)
-
-target/riscv/decode_insn16.inc: $(decode16-y) $(DECODETREE)
-	$(call quiet-command, \
-	  $(PYTHON) $(DECODETREE) -o $@ --static-decode decode_insn16 \
-          --insnwidth 16 $(decode16-y), "GEN", $(TARGET_DIR)$@)
-
-target/riscv/translate.o: target/riscv/decode_insn32.inc \
-	target/riscv/decode_insn16.inc
target/riscv/meson.build new file +34 -0
new file mode 100644
index 0000000..abd647f
@@ -0,0 +1,34 @@
+# FIXME extra_args should accept files()
+dir = meson.current_source_dir()
+gen32 = [
+  decodetree.process('insn16.decode', extra_args: [dir / 'insn16-32.decode', '--static-decode=decode_insn16', '--insnwidth=16']),
+  decodetree.process('insn32.decode', extra_args: '--static-decode=decode_insn32'),
+]
+
+gen64 = [
+  decodetree.process('insn16.decode', extra_args: [dir / 'insn16-64.decode', '--static-decode=decode_insn16', '--insnwidth=16']),
+  decodetree.process('insn32.decode', extra_args: [dir / 'insn32-64.decode', '--static-decode=decode_insn32']),
+]
+
+riscv_ss = ss.source_set()
+riscv_ss.add(when: 'TARGET_RISCV32', if_true: gen32)
+riscv_ss.add(when: 'TARGET_RISCV64', if_true: gen64)
+riscv_ss.add(files(
+  'cpu.c',
+  'cpu_helper.c',
+  'csr.c',
+  'fpu_helper.c',
+  'gdbstub.c',
+  'op_helper.c',
+  'vector_helper.c',
+  'translate.c',
+))
+
+riscv_softmmu_ss = ss.source_set()
+riscv_softmmu_ss.add(files(
+  'pmp.c',
+  'monitor.c'
+))
+
+target_arch += {'riscv': riscv_ss}
+target_softmmu_arch += {'riscv': riscv_softmmu_ss}
target/riscv/translate.c +2 -2
index aa7f56d..9be49c4 100644
@@ -583,7 +583,7 @@ static int ex_rvc_shifti(DisasContext *ctx, int imm)
 }
 
 /* Include the auto-generated decoder for 32 bit insn */
-#include "decode_insn32.inc"
+#include "decode-insn32.inc"
 
 static bool gen_arith_imm_fn(DisasContext *ctx, arg_i *a,
                              void (*func)(TCGv, TCGv, target_long))
@@ -728,7 +728,7 @@ static bool gen_shift(DisasContext *ctx, arg_r *a,
 #include "insn_trans/trans_privileged.inc"
 
 /* Include the auto-generated decoder for 16 bit insn */
-#include "decode_insn16.inc"
+#include "decode-insn16.inc"
 
 static void decode_opc(CPURISCVState *env, DisasContext *ctx, uint16_t opcode)
 {
target/rx/Makefile.objs deleted +0 -11
deleted file mode 100644
index eddc62a..0000000
@@ -1,11 +0,0 @@
-obj-y += translate.o op_helper.o helper.o cpu.o gdbstub.o disas.o
-
-DECODETREE = $(SRC_PATH)/scripts/decodetree.py
-
-target/rx/decode.inc: \
-  $(SRC_PATH)/target/rx/insns.decode $(DECODETREE)
-	$(call quiet-command,\
-	  $(PYTHON) $(DECODETREE) --varinsnwidth 32 -o $@ $<, "GEN", $(TARGET_DIR)$@)
-
-target/rx/translate.o: target/rx/decode.inc
-target/rx/disas.o: target/rx/decode.inc
target/rx/disas.c +1 -1
index 6450892..6584509 100644
@@ -100,7 +100,7 @@ static int bdsp_s(DisasContext *ctx, int d)
 }
 
 /* Include the auto-generated decoder.  */
-#include "decode.inc"
+#include "decode-insns.inc"
 
 static void dump_bytes(DisasContext *ctx)
 {
target/rx/meson.build new file +16 -0
new file mode 100644
index 0000000..8de0ad4
@@ -0,0 +1,16 @@
+gen = [
+  decodetree.process('insns.decode', extra_args: [ '--varinsnwidth', '32' ])
+]
+
+rx_ss = ss.source_set()
+rx_ss.add(gen)
+rx_ss.add(files(
+  'translate.c',
+  'op_helper.c',
+  'helper.c',
+  'cpu.c',
+  'gdbstub.c',
+  'disas.c'))
+
+target_arch += {'rx': rx_ss}
+target_softmmu_arch += {'rx': ss.source_set()}
target/rx/translate.c +1 -1
index 272619c..d688c9d 100644
@@ -124,7 +124,7 @@ static int bdsp_s(DisasContext *ctx, int d)
 }
 
 /* Include the auto-generated decoder. */
-#include "decode.inc"
+#include "decode-insns.inc"
 
 void rx_cpu_dump_state(CPUState *cs, FILE *f, int flags)
 {
target/s390x/Makefile.objs deleted +0 -10
deleted file mode 100644
index 9b9accc..0000000
@@ -1,10 +0,0 @@
-obj-y += cpu.o cpu_models.o cpu_features.o gdbstub.o interrupt.o helper.o
-obj-$(CONFIG_TCG) += translate.o cc_helper.o excp_helper.o fpu_helper.o
-obj-$(CONFIG_TCG) += int_helper.o mem_helper.o misc_helper.o crypto_helper.o
-obj-$(CONFIG_TCG) += vec_helper.o vec_int_helper.o vec_string_helper.o
-obj-$(CONFIG_TCG) += vec_fpu_helper.o
-obj-$(CONFIG_SOFTMMU) += machine.o ioinst.o arch_dump.o mmu_helper.o diag.o
-obj-$(CONFIG_SOFTMMU) += sigp.o
-obj-$(CONFIG_KVM) += kvm.o
-obj-$(call lnot,$(CONFIG_KVM)) += kvm-stub.o
-obj-$(call lnot,$(CONFIG_TCG)) += tcg-stub.o
target/s390x/meson.build +41 -1

48 lines not on this page · raw message

target/sh4/Makefile.objs deleted +0 -3
deleted file mode 100644
index 2c25d96..0000000
@@ -1,3 +0,0 @@
-obj-y += translate.o op_helper.o helper.o cpu.o
-obj-$(CONFIG_SOFTMMU) += monitor.o
-obj-y += gdbstub.o
target/sh4/meson.build new file +14 -0
new file mode 100644
index 0000000..56a5757
@@ -0,0 +1,14 @@
+sh4_ss = ss.source_set()
+sh4_ss.add(files(
+  'cpu.c',
+  'gdbstub.c',
+  'helper.c',
+  'op_helper.c',
+  'translate.c',
+))
+
+sh4_softmmu_ss = ss.source_set()
+sh4_softmmu_ss.add(files('monitor.c'))
+
+target_arch += {'sh4': sh4_ss}
+target_softmmu_arch += {'sh4': sh4_softmmu_ss}
target/sparc/Makefile.objs deleted +0 -7
deleted file mode 100644
index ec90569..0000000
@@ -1,7 +0,0 @@
-obj-$(CONFIG_SOFTMMU) += machine.o monitor.o
-obj-y += translate.o helper.o cpu.o
-obj-y += fop_helper.o cc_helper.o win_helper.o mmu_helper.o ldst_helper.o
-obj-$(TARGET_SPARC) += int32_helper.o
-obj-$(TARGET_SPARC64) += int64_helper.o
-obj-$(TARGET_SPARC64) += vis_helper.o
-obj-y += gdbstub.o
target/sparc/meson.build new file +23 -0
new file mode 100644
index 0000000..a3638b9
@@ -0,0 +1,23 @@
+sparc_ss = ss.source_set()
+sparc_ss.add(files(
+  'cc_helper.c',
+  'cpu.c',
+  'fop_helper.c',
+  'gdbstub.c',
+  'helper.c',
+  'ldst_helper.c',
+  'mmu_helper.c',
+  'translate.c',
+  'win_helper.c',
+))
+sparc_ss.add(when: 'TARGET_SPARC', if_true: files('int32_helper.c'))
+sparc_ss.add(when: 'TARGET_SPARC64', if_true: files('int64_helper.c', 'vis_helper.c'))
+
+sparc_softmmu_ss = ss.source_set()
+sparc_softmmu_ss.add(files(
+  'machine.c',
+  'monitor.c',
+))
+
+target_arch += {'sparc': sparc_ss}
+target_softmmu_arch += {'sparc': sparc_softmmu_ss}
target/tilegx/Makefile.objs deleted +0 -1
deleted file mode 100644
index 0db778f..0000000
@@ -1 +0,0 @@
-obj-y += cpu.o translate.o helper.o simd_helper.o
target/tilegx/meson.build new file +13 -0
new file mode 100644
index 0000000..6785904
@@ -0,0 +1,13 @@
+tilegx_ss = ss.source_set()
+tilegx_ss.add(files(
+  'cpu.c',
+  'helper.c',
+  'simd_helper.c',
+  'translate.c',
+))
+tilegx_ss.add(zlib)
+
+tilegx_softmmu_ss = ss.source_set()
+
+target_arch += {'tilegx': tilegx_ss}
+target_softmmu_arch += {'tilegx': tilegx_softmmu_ss}
target/tricore/Makefile.objs deleted +0 -1
deleted file mode 100644
index 281b55f..0000000
@@ -1 +0,0 @@
-obj-y += translate.o helper.o cpu.o op_helper.o fpu_helper.o gdbstub.o
target/tricore/meson.build new file +15 -0
new file mode 100644
index 0000000..0ccc829
@@ -0,0 +1,15 @@
+tricore_ss = ss.source_set()
+tricore_ss.add(files(
+  'cpu.c',
+  'fpu_helper.c',
+  'helper.c',
+  'op_helper.c',
+  'translate.c',
+  'gdbstub.c',
+))
+tricore_ss.add(zlib)
+
+tricore_softmmu_ss = ss.source_set()
+
+target_arch += {'tricore': tricore_ss}
+target_softmmu_arch += {'tricore': tricore_softmmu_ss}
target/unicore32/Makefile.objs deleted +0 -8
deleted file mode 100644
index 35d8bf5..0000000
@@ -1,8 +0,0 @@
-obj-y += translate.o op_helper.o helper.o cpu.o
-obj-y += ucf64_helper.o
-
-obj-$(CONFIG_SOFTMMU) += softmmu.o
-
-# Huh? Uses curses directly instead of using ui/console.h interfaces ...
-helper.o-cflags := $(CURSES_CFLAGS)
-helper.o-libs := $(CURSES_LIBS)
target/unicore32/meson.build new file +14 -0
new file mode 100644
index 0000000..0fa7877
@@ -0,0 +1,14 @@
+unicore32_ss = ss.source_set()
+unicore32_ss.add(files(
+  'cpu.c',
+  'helper.c',
+  'op_helper.c',
+  'translate.c',
+  'ucf64_helper.c',
+), curses)
+
+unicore32_softmmu_ss = ss.source_set()
+unicore32_softmmu_ss.add(files('softmmu.c'))
+
+target_arch += {'unicore32': unicore32_ss}
+target_softmmu_arch += {'unicore32': unicore32_softmmu_ss}
target/xtensa/Makefile.objs deleted +0 -16
deleted file mode 100644
index c7e7fe6..0000000
@@ -1,16 +0,0 @@
-obj-y += core-dc232b.o
-obj-y += core-dc233c.o
-obj-y += core-de212.o
-obj-y += core-fsf.o
-obj-y += core-sample_controller.o
-obj-y += core-test_kc705_be.o
-obj-y += core-test_mmuhifi_c3.o
-obj-$(CONFIG_SOFTMMU) += monitor.o xtensa-semi.o
-obj-y += xtensa-isa.o
-obj-y += translate.o op_helper.o helper.o cpu.o
-obj-$(CONFIG_SOFTMMU) += dbg_helper.o
-obj-y += exc_helper.o
-obj-y += fpu_helper.o
-obj-y += gdbstub.o
-obj-$(CONFIG_SOFTMMU) += mmu_helper.o
-obj-y += win_helper.o
target/xtensa/meson.build new file +30 -0
new file mode 100644
index 0000000..27e453e
@@ -0,0 +1,30 @@
+xtensa_ss = ss.source_set()
+xtensa_ss.add(files(
+  'core-dc232b.c',
+  'core-dc233c.c',
+  'core-de212.c',
+  'core-fsf.c',
+  'core-sample_controller.c',
+  'core-test_kc705_be.c',
+  'core-test_mmuhifi_c3.c',
+  'cpu.c',
+  'exc_helper.c',
+  'fpu_helper.c',
+  'gdbstub.c',
+  'helper.c',
+  'op_helper.c',
+  'translate.c',
+  'win_helper.c',
+  'xtensa-isa.c',
+))
+
+xtensa_softmmu_ss = ss.source_set()
+xtensa_softmmu_ss.add(files(
+  'dbg_helper.c',
+  'mmu_helper.c',
+  'monitor.c',
+  'xtensa-semi.c',
+))
+
+target_arch += {'xtensa': xtensa_ss}
+target_softmmu_arch += {'xtensa': xtensa_softmmu_ss}
Signature · 1 line
1.8.3.1
#163 lore raw

Re: [PATCH 124/143] meson: target

Quoted 13 lines · Paolo Bonzini

From: Marc-André Lureau <[email protected]>

scripts/decodetree.py +0 -0
index 694757b..4cd1e10 100755

scripts/decodetree.py def main(): · line 1263

Quoted 8 lines
scripts/decodetree.py +1 -1
@@ -1257,7 +1257,7 @@ def main():
     long_opts = ['decode=', 'translate=', 'output=', 'insnwidth=',
                  'static-decode=', 'varinsnwidth=']
     try:
-        (opts, args) = getopt.getopt(sys.argv[1:], 'o:vw:', long_opts)
+        (opts, args) = getopt.gnu_getopt(sys.argv[1:], 'o:vw:', long_opts)
     except getopt.GetoptError as err:
         error(0, err)
     for o, a in opts:

This change to the decodetree script doesn't seem like it belongs in this patch ?

Quoted 25 lines
target/arm/meson.build new file +22 -0
@@ -0,0 +1,62 @@
+gen = [
+  decodetree.process('sve.decode', extra_args: '--decode=disas_sve'),
+  decodetree.process('neon-shared.decode', extra_args: '--static-decode=disas_neon_shared'),
+  decodetree.process('neon-dp.decode', extra_args: '--static-decode=disas_neon_dp'),
+  decodetree.process('neon-ls.decode', extra_args: '--static-decode=disas_neon_ls'),
+  decodetree.process('vfp.decode', extra_args: '--static-decode=disas_vfp'),
+  decodetree.process('vfp-uncond.decode', extra_args: '--static-decode=disas_vfp_uncond'),
+  decodetree.process('a32.decode', extra_args: '--static-decode=disas_a32'),
+  decodetree.process('a32-uncond.decode', extra_args: '--static-decode=disas_a32_uncond'),
+  decodetree.process('t32.decode', extra_args: '--static-decode=disas_t32'),
+  decodetree.process('t16.decode', extra_args: ['-w', '16', '--static-decode=disas_t16']),
+]
+
+arm_ss = ss.source_set()
+arm_ss.add(gen)
+arm_ss.add(files(
+  'cpu.c',
+  'crypto_helper.c',
+  'debug_helper.c',
+  'gdbstub.c',
+  'helper.c',
+  'iwmmxt_helper.c',

target/arm/meson.build line 32

Quoted 10 lines
target/arm/meson.build new file +10 -0
+  'm_helper.c',
+  'neon_helper.c',
+  'op_helper.c',
+  'tlb_helper.c',
+  'translate.c',
+  'vec_helper.c',
+  'vfp_helper.c',
+  'cpu_tcg.c',
+))
+arm_ss.add(zlib)

Just to check, does this get the underlying dependencies right? ie translate.o depends on translate.c and also eg translate-vfp.inc.c, which in turn depends on vfp.decode ?

It's not clear to me why all the decodetree lines ended up in a single "gen = []" block -- they're independent of each other.

thanks
-- PMM

#164 lore raw

Re: [PATCH 124/143] meson: target

Quoted 9 lines · Peter Maydell
Quoted 5 lines · Paolo Bonzini

From: Marc-André Lureau <[email protected]>

Quoted 16 lines

scripts/decodetree.py def main(): · line 1263

Quoted 13 lines
scripts/decodetree.py +1 -1
index 694757b..4cd1e10 100755
@@ -1257,7 +1257,7 @@ def main():
     long_opts = ['decode=', 'translate=', 'output=', 'insnwidth=',
                  'static-decode=', 'varinsnwidth=']
     try:
-        (opts, args) = getopt.getopt(sys.argv[1:], 'o:vw:', long_opts)
+        (opts, args) = getopt.gnu_getopt(sys.argv[1:], 'o:vw:', long_opts)
     except getopt.GetoptError as err:
         error(0, err)
     for o, a in opts:

This change to the decodetree script doesn't seem like it belongs in this patch ?

Marc-André did this, I'll check how/why it ended up here and document it in the commit message.

Quoted 32 lines
Quoted 32 lines
target/arm/meson.build new file +28 -0
@@ -0,0 +1,62 @@
+gen = [
+  decodetree.process('sve.decode', extra_args: '--decode=disas_sve'),
+  decodetree.process('neon-shared.decode', extra_args: '--static-decode=disas_neon_shared'),
+  decodetree.process('neon-dp.decode', extra_args: '--static-decode=disas_neon_dp'),
+  decodetree.process('neon-ls.decode', extra_args: '--static-decode=disas_neon_ls'),
+  decodetree.process('vfp.decode', extra_args: '--static-decode=disas_vfp'),
+  decodetree.process('vfp-uncond.decode', extra_args: '--static-decode=disas_vfp_uncond'),
+  decodetree.process('a32.decode', extra_args: '--static-decode=disas_a32'),
+  decodetree.process('a32-uncond.decode', extra_args: '--static-decode=disas_a32_uncond'),
+  decodetree.process('t32.decode', extra_args: '--static-decode=disas_t32'),
+  decodetree.process('t16.decode', extra_args: ['-w', '16', '--static-decode=disas_t16']),
+]
+
+arm_ss = ss.source_set()
+arm_ss.add(gen)
+arm_ss.add(files(
+  'cpu.c',
+  'crypto_helper.c',
+  'debug_helper.c',
+  'gdbstub.c',
+  'helper.c',
+  'iwmmxt_helper.c',
+  'm_helper.c',
+  'neon_helper.c',
+  'op_helper.c',
+  'tlb_helper.c',
+  'translate.c',
+  'vec_helper.c',
Quoted 8 lines

target/arm/meson.build line 32

Quoted 4 lines
target/arm/meson.build new file +4 -0
+  'vfp_helper.c',
+  'cpu_tcg.c',
+))
+arm_ss.add(zlib)

Just to check, does this get the underlying dependencies right? ie translate.o depends on translate.c and also eg translate-vfp.inc.c, which in turn depends on vfp.decode ?

Yes...

Quoted 2 lines

It's not clear to me why all the decodetree lines ended up in a single "gen = []" block -- they're independent of each other.

... and I'll answer to this in the .inc.c patch because it's related.

Paolo

#165 lore raw

PATCH 125/143 meson: accel

In reply to Paolo Bonzini

From: Marc-André Lureau <[email protected]>

---
 Makefile.objs             |  2 +-
 Makefile.target           |  1 -
 accel/Makefile.objs       |  6 ------
 accel/kvm/Makefile.objs   |  2 --
 accel/kvm/meson.build     |  5 +++++
 accel/meson.build         |  7 +++++++
 accel/stubs/Makefile.objs |  6 ------
 accel/stubs/meson.build   |  6 ++++++
 accel/tcg/Makefile.objs   |  9 ---------
 accel/tcg/meson.build     | 15 +++++++++++++++
 accel/xen/Makefile.objs   |  1 -
 accel/xen/meson.build     |  1 +
 meson.build               |  1 +
 13 files changed, 36 insertions(+), 26 deletions(-)
 delete mode 100644 accel/Makefile.objs
 delete mode 100644 accel/kvm/Makefile.objs
 create mode 100644 accel/kvm/meson.build
 create mode 100644 accel/meson.build
 delete mode 100644 accel/stubs/Makefile.objs
 create mode 100644 accel/stubs/meson.build
 delete mode 100644 accel/tcg/Makefile.objs
 create mode 100644 accel/tcg/meson.build
 delete mode 100644 accel/xen/Makefile.objs
 create mode 100644 accel/xen/meson.build
Makefile.objs +1 -1
index 7eaf047..40e23a2 100644
@@ -38,7 +38,7 @@ endif # CONFIG_SOFTMMU or CONFIG_TOOLS
 # single QEMU executable should support all CPUs and machines.
 
 ifeq ($(CONFIG_SOFTMMU),y)
-common-obj-y = accel/
+common-obj-y =
 
 common-obj-$(CONFIG_AUDIO_ALSA) += audio-alsa$(DSOSUF)
 common-obj-$(CONFIG_AUDIO_OSS) += audio-oss$(DSOSUF)
Makefile.target +0 -1
index 1ab8773..8633e2b 100644
@@ -110,7 +110,6 @@ obj-y += trace/
 #########################################################
 # cpu emulator library
 obj-y += exec.o exec-vary.o
-obj-y += accel/
 obj-$(CONFIG_TCG) += tcg/tcg.o tcg/tcg-op.o tcg/tcg-op-vec.o tcg/tcg-op-gvec.o
 obj-$(CONFIG_TCG) += tcg/tcg-common.o tcg/optimize.o
 obj-$(CONFIG_TCG_INTERPRETER) += tcg/tci.o
accel/Makefile.objs deleted +0 -6
deleted file mode 100644
index ff72f0d..0000000
@@ -1,6 +0,0 @@
-common-obj-$(CONFIG_SOFTMMU) += accel.o
-obj-$(call land,$(CONFIG_SOFTMMU),$(CONFIG_POSIX)) += qtest.o
-obj-$(CONFIG_KVM) += kvm/
-obj-$(CONFIG_TCG) += tcg/
-obj-$(CONFIG_XEN) += xen/
-obj-y += stubs/
accel/kvm/Makefile.objs deleted +0 -2
deleted file mode 100644
index fdfa481..0000000
@@ -1,2 +0,0 @@
-obj-y += kvm-all.o
-obj-$(call lnot,$(CONFIG_SEV)) += sev-stub.o
accel/kvm/meson.build new file +5 -0
new file mode 100644
index 0000000..4db2388
@@ -0,0 +1,5 @@
+kvm_ss = ss.source_set()
+kvm_ss.add(files('kvm-all.c'))
+kvm_ss.add(when: 'CONFIG_SEV', if_false: files('sev-stub.c'))
+
+specific_ss.add_all(when: 'CONFIG_KVM', if_true: kvm_ss)
accel/meson.build new file +7 -0
new file mode 100644
index 0000000..26c503e
@@ -0,0 +1,7 @@
+softmmu_ss.add(files('accel.c'))
+specific_ss.add(when: ['CONFIG_SOFTMMU', 'CONFIG_POSIX'], if_true: files('qtest.c'))
+
+subdir('kvm')
+subdir('tcg')
+subdir('xen')
+subdir('stubs')
accel/stubs/Makefile.objs deleted +0 -6
deleted file mode 100644
index bbd14e7..0000000
@@ -1,6 +0,0 @@
-obj-$(call lnot,$(CONFIG_HAX))  += hax-stub.o
-obj-$(call lnot,$(CONFIG_HVF))  += hvf-stub.o
-obj-$(call lnot,$(CONFIG_WHPX)) += whpx-stub.o
-obj-$(call lnot,$(CONFIG_KVM))  += kvm-stub.o
-obj-$(call lnot,$(CONFIG_TCG))  += tcg-stub.o
-obj-$(call lnot,$(CONFIG_XEN))  += xen-stub.o
accel/stubs/meson.build new file +6 -0
new file mode 100644
index 0000000..314e3cf
@@ -0,0 +1,6 @@
+specific_ss.add(when: 'CONFIG_HAX', if_false: files('hax-stub.c'))
+specific_ss.add(when: 'CONFIG_XEN', if_false: files('xen-stub.c'))
+specific_ss.add(when: 'CONFIG_HVF', if_false: files('hvf-stub.c'))
+specific_ss.add(when: 'CONFIG_KVM', if_false: files('kvm-stub.c'))
+specific_ss.add(when: 'CONFIG_TCG', if_false: files('tcg-stub.c'))
+specific_ss.add(when: 'CONFIG_WHPX', if_false: files('whpx-stub.c'))
accel/tcg/Makefile.objs deleted +0 -9
deleted file mode 100644
index a92f2c4..0000000
@@ -1,9 +0,0 @@
-obj-$(CONFIG_SOFTMMU) += tcg-all.o
-obj-$(CONFIG_SOFTMMU) += cputlb.o
-obj-y += tcg-runtime.o tcg-runtime-gvec.o
-obj-y += cpu-exec.o cpu-exec-common.o translate-all.o
-obj-y += translator.o
-
-obj-$(CONFIG_USER_ONLY) += user-exec.o
-obj-$(call lnot,$(CONFIG_SOFTMMU)) += user-exec-stub.o
-obj-$(CONFIG_PLUGIN) += plugin-gen.o
accel/tcg/meson.build new file +15 -0
new file mode 100644
index 0000000..2a335b5
@@ -0,0 +1,15 @@
+tcg_ss = ss.source_set()
+tcg_ss.add(files(
+  'cpu-exec-common.c',
+  'cpu-exec.c',
+  'tcg-runtime-gvec.c',
+  'tcg-runtime.c',
+  'translate-all.c',
+  'translator.c',
+))
+tcg_ss.add(when: 'CONFIG_USER_ONLY', if_true: files('user-exec.c'))
+tcg_ss.add(when: 'CONFIG_SOFTMMU', if_false: files('user-exec-stub.c'))
+tcg_ss.add(when: 'CONFIG_PLUGIN', if_true: files('plugin-gen.c'))
+specific_ss.add_all(when: 'CONFIG_TCG', if_true: tcg_ss)
+
+specific_ss.add(when: ['CONFIG_SOFTMMU', 'CONFIG_TCG'], if_true: files('tcg-all.c', 'cputlb.c'))
accel/xen/Makefile.objs deleted +0 -1
deleted file mode 100644
index 7482cfb..0000000
@@ -1 +0,0 @@
-obj-y += xen-all.o
accel/xen/meson.build new file +1 -0
new file mode 100644
index 0000000..002bdb0
@@ -0,0 +1 @@
+specific_ss.add(when: 'CONFIG_XEN', if_true: files('xen-all.c'))
meson.build +1 -0
index 3e51340..2b2f597 100644
@@ -677,6 +677,7 @@ subdir('monitor')
 subdir('net')
 subdir('replay')
 subdir('hw')
+subdir('accel')
 
 # needed for fuzzing binaries
 subdir('tests/qtest/libqos')
Signature · 1 line
1.8.3.1
#166 lore raw

PATCH 126/143 meson: linux-user

In reply to Paolo Bonzini

From: Marc-André Lureau <[email protected]>

---
 Makefile.target                     |  3 ---
 configure                           | 27 ++++++++++++---------------
 linux-user/Makefile.objs            | 25 -------------------------
 linux-user/alpha/Makefile.objs      |  5 -----
 linux-user/alpha/meson.build        |  5 +++++
 linux-user/arm/Makefile.objs        |  8 --------
 linux-user/arm/meson.build          | 10 ++++++++++
 linux-user/arm/nwfpe/Makefile.objs  |  2 --
 linux-user/arm/nwfpe/meson.build    | 10 ++++++++++
 linux-user/hppa/Makefile.objs       |  5 -----
 linux-user/hppa/meson.build         |  5 +++++
 linux-user/i386/Makefile.objs       |  5 -----
 linux-user/i386/meson.build         |  5 +++++
 linux-user/i386/syscall_nr.h        |  1 +
 linux-user/m68k/Makefile.objs       |  5 -----
 linux-user/m68k/meson.build         |  5 +++++
 linux-user/meson.build              | 37 +++++++++++++++++++++++++++++++++++++
 linux-user/microblaze/Makefile.objs |  5 -----
 linux-user/microblaze/meson.build   |  5 +++++
 linux-user/mips/Makefile.objs       |  5 -----
 linux-user/mips/meson.build         |  5 +++++
 linux-user/mips/syscall_nr.h        |  1 +
 linux-user/mips64/Makefile.objs     | 12 ------------
 linux-user/mips64/meson.build       |  6 ++++++
 linux-user/mips64/syscall_nr.h      |  7 +++++++
 linux-user/ppc/Makefile.objs        |  6 ------
 linux-user/ppc/meson.build          |  5 +++++
 linux-user/s390x/Makefile.objs      |  5 -----
 linux-user/s390x/meson.build        |  5 +++++
 linux-user/sh4/Makefile.objs        |  5 -----
 linux-user/sh4/meson.build          |  5 +++++
 linux-user/sparc/Makefile.objs      |  5 -----
 linux-user/sparc/meson.build        |  5 +++++
 linux-user/sparc64/Makefile.objs    |  5 -----
 linux-user/sparc64/meson.build      |  5 +++++
 linux-user/x86_64/Makefile.objs     |  5 -----
 linux-user/x86_64/meson.build       |  5 +++++
 linux-user/x86_64/syscall_nr.h      |  1 +
 linux-user/xtensa/Makefile.objs     |  5 -----
 linux-user/xtensa/meson.build       |  5 +++++
 meson.build                         | 16 +++++++++++++++-
 41 files changed, 165 insertions(+), 132 deletions(-)
 delete mode 100644 linux-user/Makefile.objs
 delete mode 100644 linux-user/alpha/Makefile.objs
 create mode 100644 linux-user/alpha/meson.build
 delete mode 100644 linux-user/arm/Makefile.objs
 create mode 100644 linux-user/arm/meson.build
 delete mode 100644 linux-user/arm/nwfpe/Makefile.objs
 create mode 100644 linux-user/arm/nwfpe/meson.build
 delete mode 100644 linux-user/hppa/Makefile.objs
 create mode 100644 linux-user/hppa/meson.build
 delete mode 100644 linux-user/i386/Makefile.objs
 create mode 100644 linux-user/i386/meson.build
 create mode 100644 linux-user/i386/syscall_nr.h
 delete mode 100644 linux-user/m68k/Makefile.objs
 create mode 100644 linux-user/m68k/meson.build
 create mode 100644 linux-user/meson.build
 delete mode 100644 linux-user/microblaze/Makefile.objs
 create mode 100644 linux-user/microblaze/meson.build
 delete mode 100644 linux-user/mips/Makefile.objs
 create mode 100644 linux-user/mips/meson.build
 create mode 100644 linux-user/mips/syscall_nr.h
 delete mode 100644 linux-user/mips64/Makefile.objs
 create mode 100644 linux-user/mips64/meson.build
 create mode 100644 linux-user/mips64/syscall_nr.h
 delete mode 100644 linux-user/ppc/Makefile.objs
 create mode 100644 linux-user/ppc/meson.build
 delete mode 100644 linux-user/s390x/Makefile.objs
 create mode 100644 linux-user/s390x/meson.build
 delete mode 100644 linux-user/sh4/Makefile.objs
 create mode 100644 linux-user/sh4/meson.build
 delete mode 100644 linux-user/sparc/Makefile.objs
 create mode 100644 linux-user/sparc/meson.build
 delete mode 100644 linux-user/sparc64/Makefile.objs
 create mode 100644 linux-user/sparc64/meson.build
 delete mode 100644 linux-user/x86_64/Makefile.objs
 create mode 100644 linux-user/x86_64/meson.build
 create mode 100644 linux-user/x86_64/syscall_nr.h
 delete mode 100644 linux-user/xtensa/Makefile.objs
 create mode 100644 linux-user/xtensa/meson.build
Makefile.target +0 -3
index 8633e2b..a68859d 100644
@@ -131,9 +131,6 @@ QEMU_CFLAGS+=-I$(SRC_PATH)/linux-user/$(TARGET_ABI_DIR) \
              -I$(SRC_PATH)/linux-user \
              -Ilinux-user/$(TARGET_ABI_DIR)
 
-obj-y += linux-user/
-obj-y += gdbstub.o thunk.o
-
 endif #CONFIG_LINUX_USER
 
 #########################################################
configure +12 -15
index 3483d6c..525f415 100755
@@ -1945,20 +1945,6 @@ fi
 # Remove old dependency files to make sure that they get properly regenerated
 rm -f */config-devices.mak.d
 
-# Remove syscall_nr.h to be sure they will be regenerated in the build
-# directory, not in the source directory
-for arch in alpha hppa m68k xtensa sh4 microblaze arm ppc s390x sparc sparc64 \
-    i386 x86_64 mips mips64 ; do
-    # remove the file if it has been generated in the source directory
-    rm -f "${source_path}/linux-user/${arch}/syscall_nr.h"
-    # remove the dependency files
-    for target in ${arch}*-linux-user ; do
-        test -d "${target}" && find "${target}" -type f -name "*.d" \
-             -exec grep -q "${source_path}/linux-user/${arch}/syscall_nr.h" {} \; \
-             -print | while read file ; do rm "${file}" "${file%.d}.o" ; done
-    done
-done
-
 if test -z "$python"
 then
     error_exit "Python not found. Use --python=/path/to/python"
@@ -7925,18 +7911,22 @@ gdb_xml_files=""
 TARGET_ARCH="$target_name"
 TARGET_BASE_ARCH=""
 TARGET_ABI_DIR=""
+TARGET_SYSTBL_ABI=""
+TARGET_SYSTBL=""
 
 case "$target_name" in
   i386)
     mttcg="yes"
 	gdb_xml_files="i386-32bit.xml"
     TARGET_SYSTBL_ABI=i386
+    TARGET_SYSTBL=syscall_32.tbl
   ;;
   x86_64)
     TARGET_BASE_ARCH=i386
     TARGET_SYSTBL_ABI=common,64
+    TARGET_SYSTBL=syscall_64.tbl
     mttcg="yes"
-	gdb_xml_files="i386-64bit.xml"
+    gdb_xml_files="i386-64bit.xml"
   ;;
   alpha)
     mttcg="yes"
@@ -7984,6 +7974,7 @@ case "$target_name" in
     TARGET_ARCH=mips
     echo "TARGET_ABI_MIPSO32=y" >> $config_target_mak
     TARGET_SYSTBL_ABI=o32
+    TARGET_SYSTBL=syscall_o32.tbl
   ;;
   mipsn32|mipsn32el)
     mttcg="yes"
@@ -7992,6 +7983,7 @@ case "$target_name" in
     echo "TARGET_ABI_MIPSN32=y" >> $config_target_mak
     echo "TARGET_ABI32=y" >> $config_target_mak
     TARGET_SYSTBL_ABI=n32
+    TARGET_SYSTBL=syscall_n32.tbl
   ;;
   mips64|mips64el)
     mttcg="no"
@@ -7999,6 +7991,7 @@ case "$target_name" in
     TARGET_BASE_ARCH=mips
     echo "TARGET_ABI_MIPSN64=y" >> $config_target_mak
     TARGET_SYSTBL_ABI=n64
+    TARGET_SYSTBL=syscall_n64.tbl
   ;;
   moxie)
   ;;
@@ -8097,6 +8090,9 @@ esac
 if [ "$TARGET_BASE_ARCH" = "" ]; then
   TARGET_BASE_ARCH=$TARGET_ARCH
 fi
+if [ "$TARGET_SYSTBL_ABI" != "" ] && [ "$TARGET_SYSTBL" = "" ]; then
+  TARGET_SYSTBL=syscall.tbl
+fi
 
 symlink "$source_path/Makefile.target" "$target_dir/Makefile"
 
@@ -8117,6 +8113,7 @@ if [ "$HOST_VARIANT_DIR" != "" ]; then
 fi
 if [ "$TARGET_SYSTBL_ABI" != "" ]; then
     echo "TARGET_SYSTBL_ABI=$TARGET_SYSTBL_ABI" >> $config_target_mak
+    echo "TARGET_SYSTBL=$TARGET_SYSTBL" >> $config_target_mak
 fi
 
 if supported_xen_target $target; then
linux-user/Makefile.objs deleted +0 -25
deleted file mode 100644
index 1940910..0000000
@@ -1,25 +0,0 @@
-obj-y = main.o syscall.o strace.o mmap.o signal.o \
-	elfload.o linuxload.o uaccess.o uname.o \
-	safe-syscall.o $(TARGET_ABI_DIR)/signal.o \
-        $(TARGET_ABI_DIR)/cpu_loop.o exit.o fd-trans.o
-
-obj-$(TARGET_HAS_BFLT) += flatload.o
-obj-$(TARGET_I386) += vm86.o
-obj-$(TARGET_AARCH64) += arm/semihost.o
-
-obj-$(TARGET_ALPHA) += alpha/
-obj-$(TARGET_ARM) += arm/
-obj-$(TARGET_HPPA) += hppa/
-obj-$(TARGET_I386) += i386/
-obj-$(TARGET_M68K) += m68k/
-obj-$(TARGET_MICROBLAZE) += microblaze/
-obj-$(TARGET_MIPS) += mips/
-obj-$(TARGET_MIPS64) += mips64/
-obj-$(TARGET_PPC) += ppc/
-obj-$(TARGET_PPC64) += ppc/
-obj-$(TARGET_S390X) += s390x/
-obj-$(TARGET_SH4) += sh4/
-obj-$(TARGET_SPARC) += sparc/
-obj-$(TARGET_SPARC64) += $(TARGET_ABI_DIR)/
-obj-$(TARGET_X86_64) += x86_64/
-obj-$(TARGET_XTENSA) += xtensa/
linux-user/alpha/Makefile.objs deleted +0 -5
deleted file mode 100644
index d6397a7..0000000
@@ -1,5 +0,0 @@
-generated-files-y += linux-user/alpha/syscall_nr.h
-
-syshdr := $(SRC_PATH)/linux-user/alpha/syscallhdr.sh
-%/syscall_nr.h: $(SRC_PATH)/linux-user/alpha/syscall.tbl $(syshdr)
-	$(call quiet-command, sh $(syshdr) $< $@ $(TARGET_SYSTBL_ABI),"GEN","$@")
linux-user/alpha/meson.build new file +5 -0
new file mode 100644
index 0000000..a3cd22d
@@ -0,0 +1,5 @@
+syscall_nr_generators += {
+  'alpha': generator(sh,
+                     arguments: [ meson.current_source_dir() / 'syscallhdr.sh', '@INPUT@', '@OUTPUT@', '@EXTRA_ARGS@' ],
+                     output: '@BASENAME@_nr.h')
+}
linux-user/arm/Makefile.objs deleted +0 -8
deleted file mode 100644
index c7eb94d..0000000
@@ -1,8 +0,0 @@
-obj-$(TARGET_ARM) += nwfpe/
-obj-$(TARGET_ARM) += semihost.o
-
-generated-files-y += linux-user/arm/syscall_nr.h
-
-syshdr := $(SRC_PATH)/linux-user/arm/syscallhdr.sh
-%/syscall_nr.h: $(SRC_PATH)/linux-user/arm/syscall.tbl $(syshdr)
-	$(call quiet-command, sh $(syshdr) $< $@ $(TARGET_SYSTBL_ABI),"GEN","$@")
linux-user/arm/meson.build new file +10 -0
new file mode 100644
index 0000000..432984b
@@ -0,0 +1,10 @@
+linux_user_ss.add(when: 'TARGET_AARCH64', if_true: files('semihost.c'))
+linux_user_ss.add(when: 'TARGET_ARM', if_true: files('semihost.c'))
+
+subdir('nwfpe')
+
+syscall_nr_generators += {
+  'arm': generator(sh,
+                   arguments: [ meson.current_source_dir() / 'syscallhdr.sh', '@INPUT@', '@OUTPUT@', '@EXTRA_ARGS@' ],
+                   output: '@BASENAME@_nr.h')
+}
linux-user/arm/nwfpe/Makefile.objs deleted +0 -2
deleted file mode 100644
index 51b0c32..0000000
@@ -1,2 +0,0 @@
-obj-y = fpa11.o fpa11_cpdo.o fpa11_cpdt.o fpa11_cprt.o fpopcode.o
-obj-y += single_cpdo.o double_cpdo.o extended_cpdo.o
linux-user/arm/nwfpe/meson.build new file +10 -0
new file mode 100644
index 0000000..1c27e55
@@ -0,0 +1,10 @@
+linux_user_ss.add(when: 'TARGET_ARM', if_true: files(
+  'double_cpdo.c',
+  'extended_cpdo.c',
+  'fpa11.c',
+  'fpa11_cpdo.c',
+  'fpa11_cpdt.c',
+  'fpa11_cprt.c',
+  'fpopcode.c',
+  'single_cpdo.c',
+))
linux-user/hppa/Makefile.objs deleted +0 -5
deleted file mode 100644
index f8368be..0000000
@@ -1,5 +0,0 @@
-generated-files-y += linux-user/hppa/syscall_nr.h
-
-syshdr := $(SRC_PATH)/linux-user/hppa/syscallhdr.sh
-%/syscall_nr.h: $(SRC_PATH)/linux-user/hppa/syscall.tbl $(syshdr)
-	$(call quiet-command, sh $(syshdr) $< $@ $(TARGET_SYSTBL_ABI),"GEN","$@")
linux-user/hppa/meson.build new file +5 -0
new file mode 100644
index 0000000..4709508
@@ -0,0 +1,5 @@
+syscall_nr_generators += {
+  'hppa': generator(sh,
+                    arguments: [ meson.current_source_dir() / 'syscallhdr.sh', '@INPUT@', '@OUTPUT@', '@EXTRA_ARGS@' ],
+                    output: '@BASENAME@_nr.h')
+}
linux-user/i386/Makefile.objs deleted +0 -5
deleted file mode 100644
index c25cf17..0000000
@@ -1,5 +0,0 @@
-generated-files-y += linux-user/i386/syscall_nr.h
-
-syshdr := $(SRC_PATH)/linux-user/i386/syscallhdr.sh
-%/syscall_nr.h: $(SRC_PATH)/linux-user/i386/syscall_32.tbl $(syshdr)
-	$(call quiet-command, sh $(syshdr) $< $@ $(TARGET_SYSTBL_ABI),"GEN","$@")
linux-user/i386/meson.build new file +5 -0
new file mode 100644
index 0000000..ee52301
@@ -0,0 +1,5 @@
+syscall_nr_generators += {
+  'i386': generator(sh,
+                    arguments: [ meson.current_source_dir() / 'syscallhdr.sh', '@INPUT@', '@OUTPUT@', '@EXTRA_ARGS@' ],
+                    output: '@BASENAME@_nr.h')
+}
linux-user/i386/syscall_nr.h new file +1 -0
new file mode 100644
index 0000000..976caab
@@ -0,0 +1 @@
+#include "syscall_32_nr.h"
linux-user/m68k/Makefile.objs deleted +0 -5
deleted file mode 100644
index 961bd05..0000000
@@ -1,5 +0,0 @@
-generated-files-y += linux-user/m68k/syscall_nr.h
-
-syshdr := $(SRC_PATH)/linux-user/m68k/syscallhdr.sh
-%/syscall_nr.h: $(SRC_PATH)/linux-user/m68k/syscall.tbl $(syshdr)
-	$(call quiet-command, sh $(syshdr) $< $@ $(TARGET_SYSTBL_ABI),"GEN","$@")
linux-user/m68k/meson.build new file +5 -0
new file mode 100644
index 0000000..c0f436f
@@ -0,0 +1,5 @@
+syscall_nr_generators += {
+  'm68k': generator(sh,
+                    arguments: [ meson.current_source_dir() / 'syscallhdr.sh', '@INPUT@', '@OUTPUT@', '@EXTRA_ARGS@' ],
+                    output: '@BASENAME@_nr.h')
+}
linux-user/meson.build new file +37 -0
new file mode 100644
index 0000000..2b94e4b
@@ -0,0 +1,37 @@
+linux_user_ss.add(files(
+  'elfload.c',
+  'exit.c',
+  'fd-trans.c',
+  'linuxload.c',
+  'main.c',
+  'mmap.c',
+  'safe-syscall.S',
+  'signal.c',
+  'strace.c',
+  'syscall.c',
+  'uaccess.c',
+  'uname.c',
+))
+linux_user_ss.add(rt)
+
+linux_user_ss.add(when: 'TARGET_HAS_BFLT', if_true: files('flatload.c'))
+linux_user_ss.add(when: 'TARGET_I386', if_true: files('vm86.c'))
+
+
+syscall_nr_generators = {}
+
+subdir('alpha')
+subdir('arm')
+subdir('hppa')
+subdir('i386')
+subdir('m68k')
+subdir('microblaze')
+subdir('mips64')
+subdir('mips')
+subdir('ppc')
+subdir('s390x')
+subdir('sh4')
+subdir('sparc64')
+subdir('sparc')
+subdir('x86_64')
+subdir('xtensa')
linux-user/microblaze/Makefile.objs deleted +0 -5
deleted file mode 100644
index bb8b318..0000000
@@ -1,5 +0,0 @@
-generated-files-y += linux-user/microblaze/syscall_nr.h
-
-syshdr := $(SRC_PATH)/linux-user/microblaze/syscallhdr.sh
-%/syscall_nr.h: $(SRC_PATH)/linux-user/microblaze/syscall.tbl $(syshdr)
-	$(call quiet-command, sh $(syshdr) $< $@ $(TARGET_SYSTBL_ABI),"GEN","$@")
linux-user/microblaze/meson.build new file +5 -0
new file mode 100644
index 0000000..f749d89
@@ -0,0 +1,5 @@
+syscall_nr_generators += {
+  'microblaze': generator(sh,
+                          arguments: [ meson.current_source_dir() / 'syscallhdr.sh', '@INPUT@', '@OUTPUT@', '@EXTRA_ARGS@' ],
+                          output: '@BASENAME@_nr.h')
+}
linux-user/mips/Makefile.objs deleted +0 -5
deleted file mode 100644
index 9be4de0..0000000
@@ -1,5 +0,0 @@
-generated-files-y += linux-user/mips/syscall_nr.h
-
-syshdr := $(SRC_PATH)/linux-user/mips/syscallhdr.sh
-%/syscall_nr.h: $(SRC_PATH)/linux-user/mips/syscall_o32.tbl $(syshdr)
-	$(call quiet-command, sh $(syshdr) $< $@ $(TARGET_SYSTBL_ABI) "" 4000,"GEN","$@")
linux-user/mips/meson.build new file +5 -0
new file mode 100644
index 0000000..6066a50
@@ -0,0 +1,5 @@
+syscall_nr_generators += {
+  'mips': generator(sh,
+                    arguments: [ meson.current_source_dir() / 'syscallhdr.sh', '@INPUT@', '@OUTPUT@', '@EXTRA_ARGS@' ],
+                    output: '@BASENAME@_nr.h')
+}
linux-user/mips/syscall_nr.h new file +1 -0
new file mode 100644
index 0000000..45d133c
@@ -0,0 +1 @@
+#include "syscall_o32_nr.h"
linux-user/mips64/Makefile.objs deleted +0 -12
deleted file mode 100644
index 573448f..0000000
@@ -1,12 +0,0 @@
-generated-files-y += linux-user/$(TARGET_ABI_DIR)/syscall_nr.h
-
-syshdr := $(SRC_PATH)/linux-user/$(TARGET_ABI_DIR)/syscallhdr.sh
-
-ifeq ($(TARGET_SYSTBL_ABI),n32)
-%/syscall_nr.h: $(SRC_PATH)/linux-user/$(TARGET_ABI_DIR)/syscall_n32.tbl $(syshdr)
-	$(call quiet-command, sh $(syshdr) $< $@ n32 "" 6000,"GEN","$@")
-endif
-ifeq ($(TARGET_SYSTBL_ABI),n64)
-%/syscall_nr.h: $(SRC_PATH)/linux-user/$(TARGET_ABI_DIR)/syscall_n64.tbl $(syshdr)
-	$(call quiet-command, sh $(syshdr) $< $@ n64 "" 5000,"GEN","$@")
-endif
linux-user/mips64/meson.build new file +6 -0
new file mode 100644
index 0000000..0caab5f
@@ -0,0 +1,6 @@
+syscall_nr_generators += {
+  'mips64': generator(sh,
+                      arguments: [ meson.current_source_dir() / 'syscallhdr.sh', '@INPUT@', '@OUTPUT@', '@EXTRA_ARGS@',
+                                   '', 'TARGET_SYSCALL_OFFSET' ],
+                      output: '@BASENAME@_nr.h')
+}
linux-user/mips64/syscall_nr.h new file +7 -0
new file mode 100644
index 0000000..672f2fa
@@ -0,0 +1,7 @@
+#ifdef TARGET_ABI_MIPSN32
+#define TARGET_SYSCALL_OFFSET 6000
+#include "syscall_n32_nr.h"
+#else
+#define TARGET_SYSCALL_OFFSET 5000
+#include "syscall_n64_nr.h"
+#endif
linux-user/ppc/Makefile.objs deleted +0 -6
deleted file mode 100644
index be92e67..0000000
@@ -1,6 +0,0 @@
-generated-files-y += linux-user/$(TARGET_ABI_DIR)/syscall_nr.h
-
-syshdr := $(SRC_PATH)/linux-user/$(TARGET_ABI_DIR)/syscallhdr.sh
-
-%/syscall_nr.h: $(SRC_PATH)/linux-user/$(TARGET_ABI_DIR)/syscall.tbl $(syshdr)
-	$(call quiet-command, sh $(syshdr) $< $@ $(TARGET_SYSTBL_ABI),"GEN","$@")
linux-user/ppc/meson.build new file +5 -0
new file mode 100644
index 0000000..19fead7
@@ -0,0 +1,5 @@
+syscall_nr_generators += {
+  'ppc': generator(sh,
+                   arguments: [ meson.current_source_dir() / 'syscallhdr.sh', '@INPUT@', '@OUTPUT@', '@EXTRA_ARGS@' ],
+                   output: '@BASENAME@_nr.h')
+}
linux-user/s390x/Makefile.objs deleted +0 -5
deleted file mode 100644
index f30f162..0000000
@@ -1,5 +0,0 @@
-generated-files-y += linux-user/s390x/syscall_nr.h
-
-syshdr := $(SRC_PATH)/linux-user/s390x/syscallhdr.sh
-%/syscall_nr.h: $(SRC_PATH)/linux-user/s390x/syscall.tbl $(syshdr)
-	$(call quiet-command, sh $(syshdr) $< $@ $(TARGET_SYSTBL_ABI),"GEN","$@")
linux-user/s390x/meson.build new file +5 -0
new file mode 100644
index 0000000..0781cce
@@ -0,0 +1,5 @@
+syscall_nr_generators += {
+  's390x': generator(sh,
+                     arguments: [ meson.current_source_dir() / 'syscallhdr.sh', '@INPUT@', '@OUTPUT@', '@EXTRA_ARGS@' ],
+                     output: '@BASENAME@_nr.h')
+}
linux-user/sh4/Makefile.objs deleted +0 -5
deleted file mode 100644
index 83fc939..0000000
@@ -1,5 +0,0 @@
-generated-files-y += linux-user/sh4/syscall_nr.h
-
-syshdr := $(SRC_PATH)/linux-user/sh4/syscallhdr.sh
-%/syscall_nr.h: $(SRC_PATH)/linux-user/sh4/syscall.tbl $(syshdr)
-	$(call quiet-command, sh $(syshdr) $< $@ $(TARGET_SYSTBL_ABI),"GEN","$@")
linux-user/sh4/meson.build new file +5 -0
new file mode 100644
index 0000000..3bc3a69
@@ -0,0 +1,5 @@
+syscall_nr_generators += {
+  'sh4': generator(sh,
+                   arguments: [ meson.current_source_dir() / 'syscallhdr.sh', '@INPUT@', '@OUTPUT@', '@EXTRA_ARGS@' ],
+                   output: '@BASENAME@_nr.h')
+}
linux-user/sparc/Makefile.objs deleted +0 -5
deleted file mode 100644
index 29d3f06..0000000
@@ -1,5 +0,0 @@
-generated-files-y += linux-user/sparc/syscall_nr.h
-
-syshdr := $(SRC_PATH)/linux-user/sparc/syscallhdr.sh
-%/syscall_nr.h: $(SRC_PATH)/linux-user/sparc/syscall.tbl $(syshdr)
-	$(call quiet-command, sh $(syshdr) $< $@ $(TARGET_SYSTBL_ABI),"GEN","$@")
linux-user/sparc/meson.build new file +5 -0
new file mode 100644
index 0000000..51a9c77
@@ -0,0 +1,5 @@
+syscall_nr_generators += {
+  'sparc': generator(sh,
+                     arguments: [ meson.current_source_dir() / 'syscallhdr.sh', '@INPUT@', '@OUTPUT@', '@EXTRA_ARGS@' ],
+                     output: '@BASENAME@_nr.h')
+}
linux-user/sparc64/Makefile.objs deleted +0 -5
deleted file mode 100644
index afcd535..0000000
@@ -1,5 +0,0 @@
-generated-files-y += linux-user/sparc64/syscall_nr.h
-
-syshdr := $(SRC_PATH)/linux-user/sparc64/syscallhdr.sh
-%/syscall_nr.h: $(SRC_PATH)/linux-user/sparc/syscall.tbl $(syshdr)
-	$(call quiet-command, sh $(syshdr) $< $@ $(TARGET_SYSTBL_ABI),"GEN","$@")
linux-user/sparc64/meson.build new file +5 -0
new file mode 100644
index 0000000..9527a40
@@ -0,0 +1,5 @@
+syscall_nr_generators += {
+  'sparc64': generator(sh,
+                       arguments: [ meson.current_source_dir() / 'syscallhdr.sh', '@INPUT@', '@OUTPUT@', '@EXTRA_ARGS@' ],
+                       output: '@BASENAME@_nr.h')
+}
linux-user/x86_64/Makefile.objs deleted +0 -5
deleted file mode 100644
index 2cef1d4..0000000
@@ -1,5 +0,0 @@
-generated-files-y += linux-user/x86_64/syscall_nr.h
-
-syshdr := $(SRC_PATH)/linux-user/x86_64/syscallhdr.sh
-%/syscall_nr.h: $(SRC_PATH)/linux-user/x86_64/syscall_64.tbl $(syshdr)
-	$(call quiet-command, sh $(syshdr) $< $@ $(TARGET_SYSTBL_ABI),"GEN","$@")
linux-user/x86_64/meson.build new file +5 -0
new file mode 100644
index 0000000..203af9a
@@ -0,0 +1,5 @@
+syscall_nr_generators += {
+  'x86_64': generator(sh,
+                      arguments: [ meson.current_source_dir() / 'syscallhdr.sh', '@INPUT@', '@OUTPUT@', '@EXTRA_ARGS@' ],
+                      output: '@BASENAME@_nr.h')
+}
linux-user/x86_64/syscall_nr.h new file +1 -0
new file mode 100644
index 0000000..760302c
@@ -0,0 +1 @@
+#include "syscall_64_nr.h"
linux-user/xtensa/Makefile.objs deleted +0 -5
deleted file mode 100644
index d4be1b7..0000000
@@ -1,5 +0,0 @@
-generated-files-y += linux-user/xtensa/syscall_nr.h
-
-syshdr := $(SRC_PATH)/linux-user/xtensa/syscallhdr.sh
-%/syscall_nr.h: $(SRC_PATH)/linux-user/xtensa/syscall.tbl $(syshdr)
-	$(call quiet-command, sh $(syshdr) $< $@ $(TARGET_SYSTBL_ABI),"GEN","$@")
linux-user/xtensa/meson.build new file +5 -0
new file mode 100644
index 0000000..de77f3b
@@ -0,0 +1,5 @@
+syscall_nr_generators += {
+  'xtensa': generator(sh,
+                      arguments: [ meson.current_source_dir() / 'syscallhdr.sh', '@INPUT@', '@OUTPUT@', '@EXTRA_ARGS@' ],
+                      output: '@BASENAME@_nr.h')
+}
meson.build +15 -1
index 2b2f597..483e65f 100644
@@ -678,6 +678,10 @@ subdir('net')
 subdir('replay')
 subdir('hw')
 subdir('accel')
+subdir('linux-user')
+
+linux_user_ss.add(files('gdbstub.c', 'thunk.c'))
+specific_ss.add_all(when: 'CONFIG_LINUX_USER', if_true: linux_user_ss)
 
 # needed for fuzzing binaries
 subdir('tests/qtest/libqos')
@@ -775,6 +779,7 @@ foreach target : target_dirs
 
     arch_srcs += config_devices_h[target]
   else
+    abi = config_target['TARGET_ABI_DIR']
     target_type='user'
     qemu_target_name = 'qemu-' + target_name
     if 'CONFIG_LINUX_USER' in config_target
@@ -785,8 +790,17 @@ foreach target : target_dirs
     endif
     target_inc += include_directories(
       base_dir,
-      base_dir / config_target['TARGET_ABI_DIR'],
+      base_dir / abi,
     )
+    if 'CONFIG_LINUX_USER' in config_target
+      dir = base_dir / abi
+      arch_srcs += files(dir / 'signal.c', dir / 'cpu_loop.c')
+      if config_target.has_key('TARGET_SYSTBL_ABI')
+        arch_srcs += \
+          syscall_nr_generators[abi].process(base_dir / abi / config_target['TARGET_SYSTBL'],
+                                             extra_args : config_target['TARGET_SYSTBL_ABI'])
+      endif
+    endif
   endif
 
   t = target_arch[arch].apply(config_target, strict: false)
Signature · 1 line
1.8.3.1
#167 lore raw

PATCH 127/143 meson: bsd-user

In reply to Paolo Bonzini

From: Marc-André Lureau <[email protected]>

---
 Makefile.target        |  3 ---
 bsd-user/Makefile.objs |  2 --
 bsd-user/meson.build   | 10 ++++++++++
 meson.build            |  4 ++++
 4 files changed, 14 insertions(+), 5 deletions(-)
 delete mode 100644 bsd-user/Makefile.objs
 create mode 100644 bsd-user/meson.build
Makefile.target +0 -3
index a68859d..5c099fa 100644
@@ -141,9 +141,6 @@ ifdef CONFIG_BSD_USER
 QEMU_CFLAGS+=-I$(SRC_PATH)/bsd-user -I$(SRC_PATH)/bsd-user/$(TARGET_ABI_DIR) \
 			 -I$(SRC_PATH)/bsd-user/$(HOST_VARIANT_DIR)
 
-obj-y += bsd-user/
-obj-y += gdbstub.o
-
 endif #CONFIG_BSD_USER
 
 #########################################################
bsd-user/Makefile.objs deleted +0 -2
deleted file mode 100644
index 5e77f57..0000000
@@ -1,2 +0,0 @@
-obj-y = main.o bsdload.o elfload.o mmap.o signal.o strace.o syscall.o \
-	        uaccess.o
bsd-user/meson.build new file +10 -0
new file mode 100644
index 0000000..0369549
@@ -0,0 +1,10 @@
+bsd_user_ss.add(files(
+  'bsdload.c',
+  'elfload.c',
+  'main.c',
+  'mmap.c',
+  'signal.c',
+  'strace.c',
+  'syscall.c',
+  'uaccess.c',
+))
meson.build +4 -0
index 483e65f..e1d7672 100644
@@ -678,8 +678,12 @@ subdir('net')
 subdir('replay')
 subdir('hw')
 subdir('accel')
+subdir('bsd-user')
 subdir('linux-user')
 
+bsd_user_ss.add(files('gdbstub.c'))
+specific_ss.add_all(when: 'CONFIG_BSD_USER', if_true: bsd_user_ss)
+
 linux_user_ss.add(files('gdbstub.c', 'thunk.c'))
 specific_ss.add_all(when: 'CONFIG_LINUX_USER', if_true: linux_user_ss)
 
Signature · 1 line
1.8.3.1
#168 lore raw

PATCH 128/143 meson: cpu-emu

In reply to Paolo Bonzini

From: Marc-André Lureau <[email protected]>

---
 Makefile.target         | 12 ------------
 configure               |  8 ++++++++
 meson.build             | 37 +++++++++++++++++++++++++++++++++++++
 scripts/feature_to_c.sh | 24 ++++++++----------------
 4 files changed, 53 insertions(+), 28 deletions(-)
Makefile.target +0 -12
index 5c099fa..c180b4c 100644
@@ -108,15 +108,6 @@ obj-y += $(LIBQEMU)
 obj-y += trace/
 
 #########################################################
-# cpu emulator library
-obj-y += exec.o exec-vary.o
-obj-$(CONFIG_TCG) += tcg/tcg.o tcg/tcg-op.o tcg/tcg-op-vec.o tcg/tcg-op-gvec.o
-obj-$(CONFIG_TCG) += tcg/tcg-common.o tcg/optimize.o
-obj-$(CONFIG_TCG_INTERPRETER) += tcg/tci.o
-obj-$(CONFIG_TCG_INTERPRETER) += disas/tci.o
-obj-$(CONFIG_TCG) += fpu/softfloat.o
-obj-y += disas.o
-obj-$(call notempty,$(TARGET_XML_FILES)) += gdbstub-xml.o
 LIBS := $(libs_cpu) $(LIBS)
 
 obj-$(CONFIG_PLUGIN) += plugins/
@@ -200,9 +191,6 @@ ifdef CONFIG_DARWIN
 	$(call quiet-command,SetFile -a C $@,"SETFILE","$(TARGET_DIR)$@")
 endif
 
-gdbstub-xml.c: $(TARGET_XML_FILES) $(SRC_PATH)/scripts/feature_to_c.sh
-	$(call quiet-command,rm -f $@ && $(SHELL) $(SRC_PATH)/scripts/feature_to_c.sh $@ $(TARGET_XML_FILES),"GEN","$(TARGET_DIR)$@")
-
 clean: clean-target
 	rm -f *.a *~ $(PROGS)
 	rm -f $(shell find . -name '*.[od]')
configure +8 -0
index 525f415..a7a4538 100755
@@ -5416,9 +5416,13 @@ case "$capstone" in
       LIBCAPSTONE=libcapstone.a
     fi
     libs_cpu="-L$PWD/capstone -lcapstone $libs_cpu"
+    capstone_libs="-L$PWD/capstone -lcapstone"
+    capstone_cflags="-I${source_path}/capstone/include"
     ;;
 
   system)
+    capstone_libs="$($pkg_config --libs capstone)"
+    capstone_cflags="$($pkg_config --cflags capstone)"
     QEMU_CFLAGS="$QEMU_CFLAGS $($pkg_config --cflags capstone)"
     libs_cpu="$($pkg_config --libs capstone) $libs_cpu"
     ;;
@@ -7637,6 +7641,8 @@ if test "$ivshmem" = "yes" ; then
 fi
 if test "$capstone" != "no" ; then
   echo "CONFIG_CAPSTONE=y" >> $config_host_mak
+  echo "CAPSTONE_CFLAGS=$capstone_cflags" >> $config_host_mak
+  echo "CAPSTONE_LIBS=$capstone_libs" >> $config_host_mak
 fi
 if test "$debug_mutex" = "yes" ; then
   echo "CONFIG_DEBUG_MUTEX=y" >> $config_host_mak
@@ -7657,6 +7663,8 @@ fi
 
 if test "$libpmem" = "yes" ; then
   echo "CONFIG_LIBPMEM=y" >> $config_host_mak
+  echo "LIBPMEM_LIBS=$libpmem_libs" >> $config_host_mak
+  echo "LIBPMEM_CFLAGS=$libpmem_cflags" >> $config_host_mak
 fi
 
 if test "$libdaxctl" = "yes" ; then
meson.build +37 -0
index e1d7672..7ed8276 100644
@@ -328,6 +328,16 @@ if 'CONFIG_USB_LIBUSB' in config_host
   libusb = declare_dependency(compile_args: config_host['LIBUSB_CFLAGS'].split(),
                               link_args: config_host['LIBUSB_LIBS'].split())
 endif
+capstone = not_found
+if 'CONFIG_CAPSTONE' in config_host
+  capstone = declare_dependency(compile_args: config_host['CAPSTONE_CFLAGS'].split(),
+                                link_args: config_host['CAPSTONE_LIBS'].split())
+endif
+libpmem = not_found
+if 'CONFIG_LIBPMEM' in config_host
+  libpmem = declare_dependency(compile_args: config_host['LIBPMEM_CFLAGS'].split(),
+                               link_args: config_host['LIBPMEM_LIBS'].split())
+endif
 
 create_config = find_program('scripts/create_config')
 minikconf = find_program('scripts/minikconf.py')
@@ -505,6 +515,8 @@ target_softmmu_arch = {}
 # Trace files #
 ###############
 
+# TODO: add each directory to the subdirs from its own meson.build, once
+# we have those
 trace_events_subdirs = [
   'accel/kvm',
   'accel/tcg',
@@ -670,6 +682,20 @@ softmmu_ss.add(when: ['CONFIG_FDT', fdt],  if_true: [files('device_tree.c')])
 common_ss.add(files('cpus-common.c'))
 
 subdir('softmmu')
+
+specific_ss.add(files('disas.c', 'exec.c', 'gdbstub.c'), capstone, libpmem)
+specific_ss.add(files('exec-vary.c'))
+specific_ss.add(when: 'CONFIG_TCG', if_true: files(
+  'fpu/softfloat.c',
+  'tcg/optimize.c',
+  'tcg/tcg-common.c',
+  'tcg/tcg-op-gvec.c',
+  'tcg/tcg-op-vec.c',
+  'tcg/tcg-op.c',
+  'tcg/tcg.c',
+))
+specific_ss.add(when: 'CONFIG_TCG_INTERPRETER', if_true: files('disas/tci.c', 'tcg/tci.c'))
+
 subdir('backends')
 subdir('disas')
 subdir('migration')
@@ -761,6 +787,8 @@ common_all = static_library('common',
                             dependencies: common_all.dependencies(),
                             name_suffix: 'fa')
 
+feature_to_c = find_program('scripts/feature_to_c.sh')
+
 foreach target : target_dirs
   config_target = config_target_mak[target]
   target_name = config_target['TARGET_NAME']
@@ -807,6 +835,15 @@ foreach target : target_dirs
     endif
   endif
 
+  if 'TARGET_XML_FILES' in config_target
+    gdbstub_xml = custom_target(target + '-gdbstub-xml.c',
+                                output: target + '-gdbstub-xml.c',
+                                input: files(config_target['TARGET_XML_FILES'].split()),
+                                command: [feature_to_c, '@INPUT@'],
+                                capture: true)
+    arch_srcs += gdbstub_xml
+  endif
+
   t = target_arch[arch].apply(config_target, strict: false)
   arch_srcs += t.sources()
 
scripts/feature_to_c.sh +8 -16
index c8ce9b8..b116989 100644
@@ -19,16 +19,8 @@
 # You should have received a copy of the GNU General Public License
 # along with this program; if not, see <http://www.gnu.org/licenses/>.
 
-output=$1
-shift
-
-if test -z "$output" || test -z "$1"; then
-  echo "Usage: $0 OUTPUTFILE INPUTFILE..."
-  exit 1
-fi
-
-if test -e "$output"; then
-  echo "Output file \"$output\" already exists; refusing to overwrite."
+if test -z "$1"; then
+  echo "Usage: $0 INPUTFILE..."
   exit 1
 fi
 
@@ -60,17 +52,17 @@ for input; do
       printf "'\''\\n'\'', \n"
     } END {
       print "  0 };"
-    }' < $input >> $output
+    }' < $input
 done
 
-echo >> $output
-echo "const char *const xml_builtin[][2] = {" >> $output
+echo
+echo "const char *const xml_builtin[][2] = {"
 
 for input; do
   basename=$(echo $input | sed 's,.*/,,')
   arrayname=xml_feature_$(echo $input | sed 's,.*/,,; s/[-.]/_/g')
-  echo "  { \"$basename\", $arrayname }," >> $output
+  echo "  { \"$basename\", $arrayname },"
 done
 
-echo "  { (char *)0, (char *)0 }" >> $output
-echo "};" >> $output
+echo "  { (char *)0, (char *)0 }"
+echo "};"
Signature · 1 line
1.8.3.1
#169 lore raw

PATCH 129/143 meson: plugins

In reply to Paolo Bonzini

For now link arguments end up in Makefile.target, they will move to the right place soon.

---
 Makefile              |  8 +-------
 Makefile.target       | 12 ++++++++++--
 meson.build           |  5 +++++
 plugins/Makefile.objs | 21 ---------------------
 plugins/meson.build   |  5 +++++
 5 files changed, 21 insertions(+), 30 deletions(-)
 delete mode 100644 plugins/Makefile.objs
 create mode 100644 plugins/meson.build
Makefile +1 -7
index 2aaa3f8..5320a06 100644
@@ -419,13 +419,10 @@ endif
 
 ICON_SIZES=16x16 24x24 32x32 48x48 64x64 128x128 256x256 512x512
 
-install-includedir:
-	$(INSTALL_DIR) "$(DESTDIR)$(includedir)"
-
 # Needed by "meson install"
 export DESTDIR
 install: all $(if $(BUILD_DOCS),install-doc) \
-	install-datadir install-localstatedir install-includedir \
+	install-datadir install-localstatedir \
 	$(if $(INSTALL_BLOBS),$(edk2-decompressed)) \
 	recurse-install
 ifdef CONFIG_TRACE_SYSTEMTAP
@@ -468,9 +465,6 @@ endif
 ifdef CONFIG_GTK
 	$(MAKE) -C po $@
 endif
-ifeq ($(CONFIG_PLUGIN),y)
-	$(INSTALL_DATA) $(SRC_PATH)/include/qemu/qemu-plugin.h "$(DESTDIR)$(includedir)/qemu-plugin.h"
-endif
 	$(INSTALL_DIR) "$(DESTDIR)$(qemu_datadir)/keymaps"
 	set -e; for x in $(KEYMAPS); do \
 		$(INSTALL_DATA) $(SRC_PATH)/pc-bios/keymaps/$$x "$(DESTDIR)$(qemu_datadir)/keymaps"; \
Makefile.target +10 -2
index c180b4c..2b7280b 100644
@@ -110,8 +110,6 @@ obj-y += trace/
 #########################################################
 LIBS := $(libs_cpu) $(LIBS)
 
-obj-$(CONFIG_PLUGIN) += plugins/
-
 #########################################################
 # Linux user emulator target
 
@@ -153,6 +151,16 @@ LIBS := $(LIBS) $(VDE_LIBS) $(SLIRP_LIBS)
 LIBS := $(LIBS) $(LIBUSB_LIBS) $(SMARTCARD_LIBS) $(USB_REDIR_LIBS)
 LIBS := $(LIBS) $(VIRGL_LIBS) $(CURSES_LIBS)
 
+ifeq ($(CONFIG_PLUGIN),y)
+ifdef CONFIG_HAS_LD_DYNAMIC_LIST
+LIBS += -Wl,--dynamic-list=$(BUILD_DIR)/qemu-plugins-ld.symbols
+else
+ifdef CONFIG_HAS_LD_EXPORTED_SYMBOLS_LIST
+LIBS += -Wl,-exported_symbols_list,$(BUILD_DIR)/qemu-plugins-ld64.symbols
+endif
+endif
+endif
+
 generated-files-y += hmp-commands.h hmp-commands-info.h
 
 endif # CONFIG_SOFTMMU
meson.build +5 -0
index 7ed8276..58f84e8 100644
@@ -704,6 +704,7 @@ subdir('net')
 subdir('replay')
 subdir('hw')
 subdir('accel')
+subdir('plugins')
 subdir('bsd-user')
 subdir('linux-user')
 
@@ -872,6 +873,10 @@ endforeach
 
 # Other build targets
 
+if 'CONFIG_PLUGIN' in config_host
+  install_headers('include/qemu/qemu-plugin.h')
+endif
+
 if 'CONFIG_GUEST_AGENT' in config_host
   subdir('qga')
 endif
plugins/Makefile.objs deleted +0 -21
deleted file mode 100644
index 6f14d91..0000000
@@ -1,21 +0,0 @@
-#
-# Plugin Support
-#
-
-obj-y += loader.o
-obj-y += core.o
-obj-y += api.o
-
-# Abuse -libs suffix to only link with --dynamic-list/-exported_symbols_list
-# when the final binary includes the plugin object.
-#
-# Note that simply setting LDFLAGS is not enough: we build binaries that
-# never link plugin.o, and the linker might fail (at least ld64 does)
-# if the symbols in the list are not in the output binary.
-ifdef CONFIG_HAS_LD_DYNAMIC_LIST
-api.o-libs := -Wl,--dynamic-list=$(BUILD_DIR)/qemu-plugins-ld.symbols
-else
-ifdef CONFIG_HAS_LD_EXPORTED_SYMBOLS_LIST
-api.o-libs := -Wl,-exported_symbols_list,$(BUILD_DIR)/qemu-plugins-ld64.symbols
-endif
-endif
plugins/meson.build new file +5 -0
new file mode 100644
index 0000000..9608e52
@@ -0,0 +1,5 @@
+specific_ss.add(when: 'CONFIG_PLUGIN', if_true: [files(
+  'loader.c',
+  'core.c',
+  'api.c',
+)])
Signature · 1 line
1.8.3.1
#170 lore raw

PATCH 130/143 meson: link emulators without Makefile.target

In reply to Paolo Bonzini
---
 .gitlab-ci.yml                            |   4 +-
 Makefile                                  |  34 +------
 Makefile.objs                             |  32 -------
 Makefile.target                           | 153 +-----------------------------
 configure                                 |  22 ++---
 docs/devel/blkverify.txt                  |   4 +-
 docs/devel/testing.rst                    |   4 +-
 docs/interop/live-block-operations.rst    |   4 +-
 meson.build                               |  81 +++++++++++++++-
 os-posix.c                                |   2 +-
 plugins/meson.build                       |  10 +-
 rules.mak                                 |   1 -
 scripts/device-crash-test                 |   2 +-
 softmmu/Makefile.objs                     |   3 -
 softmmu/meson.build                       |   4 +
 tests/Makefile.include                    |   2 +-
 tests/acceptance/avocado_qemu/__init__.py |   3 +-
 tests/data/acpi/rebuild-expected-aml.sh   |   2 +-
 tests/multiboot/run_test.sh               |   2 +-
 tests/qemu-iotests/check                  |   6 +-
 tests/qtest/fuzz/Makefile.include         |  39 --------
 tests/qtest/fuzz/i440fx_fuzz.c            |   4 +-
 tests/qtest/fuzz/meson.build              |  34 +++++++
 tests/qtest/fuzz/virtio_net_fuzz.c        |   3 +-
 tests/qtest/libqos/qgraph.h               |   2 +-
 tests/qtest/meson.build                   |   2 +-
 tests/qtest/rtas-test.c                   |   2 +-
 tests/tcg/configure.sh                    |   4 +-
 28 files changed, 161 insertions(+), 304 deletions(-)
 delete mode 100644 softmmu/Makefile.objs
 delete mode 100644 tests/qtest/fuzz/Makefile.include
 create mode 100644 tests/qtest/fuzz/meson.build
.gitlab-ci.yml +2 -2
index 9820066..f6556e5 100644
@@ -269,5 +269,5 @@ build-tci:
         ./tests/qtest/boot-serial-test || exit 1 ;
         ./tests/qtest/cdrom-test || exit 1 ;
       done
-    - QTEST_QEMU_BINARY="x86_64-softmmu/qemu-system-x86_64" ./tests/qtest/pxe-test
-    - QTEST_QEMU_BINARY="s390x-softmmu/qemu-system-s390x" ./tests/qtest/pxe-test -m slow
+    - QTEST_QEMU_BINARY="./qemu-system-x86_64" ./tests/qtest/pxe-test
+    - QTEST_QEMU_BINARY="./qemu-system-s390x" ./tests/qtest/pxe-test -m slow
Makefile +1 -33
index 5320a06..1f89680 100644
@@ -105,9 +105,6 @@ include $(SRC_PATH)/rules.mak
 # lor is defined in rules.mak
 CONFIG_BLOCK := $(call lor,$(CONFIG_SOFTMMU),$(CONFIG_TOOLS))
 
-generated-files-y += target/s390x/gen-features.h
-target/s390x/gen-features.h: Makefile.ninja
-
 generated-files-y += .git-submodule-status
 
 edk2-decompressed = $(basename $(wildcard pc-bios/edk2-*.fd.bz2))
@@ -172,29 +169,6 @@ config-host.h-timestamp: config-host.mak
 
 TARGET_DIRS_RULES := $(foreach t, all fuzz clean install, $(addsuffix /$(t), $(TARGET_DIRS)))
 
-SOFTMMU_ALL_RULES=$(filter %-softmmu/all, $(TARGET_DIRS_RULES))
-$(SOFTMMU_ALL_RULES): $(authz-obj-y)
-$(SOFTMMU_ALL_RULES): $(block-obj-y)
-$(SOFTMMU_ALL_RULES): $(chardev-obj-y)
-$(SOFTMMU_ALL_RULES): $(crypto-obj-y)
-$(SOFTMMU_ALL_RULES): $(io-obj-y)
-$(SOFTMMU_ALL_RULES): $(qom-obj-y)
-$(SOFTMMU_ALL_RULES): config-all-devices.mak
-
-SOFTMMU_FUZZ_RULES=$(filter %-softmmu/fuzz, $(TARGET_DIRS_RULES))
-$(SOFTMMU_FUZZ_RULES): $(authz-obj-y)
-$(SOFTMMU_FUZZ_RULES): $(block-obj-y)
-$(SOFTMMU_FUZZ_RULES): $(chardev-obj-y)
-$(SOFTMMU_FUZZ_RULES): $(crypto-obj-y)
-$(SOFTMMU_FUZZ_RULES): $(io-obj-y)
-$(SOFTMMU_FUZZ_RULES): config-all-devices.mak
-$(SOFTMMU_FUZZ_RULES): $(edk2-decompressed)
-
-# meson: this is sub-optimal but going away after conversion
-TARGET_DEPS = $(patsubst %,%-config-target.h, $(TARGET_DIRS))
-TARGET_DEPS += $(patsubst %,%-config-devices.h, $(filter %-softmmu,$(TARGET_DIRS)))
-TARGET_DEPS += $(patsubst %,libqemu-%.fa, $(TARGET_DIRS))
-
 .PHONY: $(TARGET_DIRS_RULES)
 # The $(TARGET_DIRS_RULES) are of the form SUBDIR/GOAL, so that
 # $(dir $@) yields the sub-directory, and $(notdir $@) yields the sub-goal
@@ -237,11 +211,7 @@ slirp/all: .git-submodule-status
 		CC="$(CC)" AR="$(AR)" 	LD="$(LD)" RANLIB="$(RANLIB)"	\
 		CFLAGS="$(QEMU_CFLAGS) $(CFLAGS)" LDFLAGS="$(QEMU_LDFLAGS)")
 
-$(filter %/all, $(TARGET_DIRS_RULES)): libqemuutil.a $(common-obj-y) \
-	$(qom-obj-y) block.syms qemu.syms
-
-$(filter %/fuzz, $(TARGET_DIRS_RULES)): libqemuutil.a $(common-obj-y) \
-	$(qom-obj-y) $(crypto-user-obj-$(CONFIG_USER_ONLY))
+$(filter %/all, $(TARGET_DIRS_RULES)):
 
 ROM_DIRS = $(addprefix pc-bios/, $(ROMS))
 ROM_DIRS_RULES=$(foreach t, all clean, $(addsuffix /$(t), $(ROM_DIRS)))
@@ -263,8 +233,6 @@ Makefile: $(version-obj-y)
 
 ######################################################################
 
-COMMON_LDADDS = libqemuutil.a
-
 clean: recurse-clean
 # avoid old build problems by removing potentially incorrect old files
 	rm -f config.mak op-i386.h opc-i386.h gen-op-i386.h op-arm.h opc-arm.h gen-op-arm.h
Makefile.objs +0 -32
index 40e23a2..9f73e86 100644
@@ -33,37 +33,5 @@ io-obj-y = io/libio.fa
 endif # CONFIG_SOFTMMU or CONFIG_TOOLS
 
 ######################################################################
-# Target independent part of system emulation. The long term path is to
-# suppress *all* target specific code in case of system emulation, i.e. a
-# single QEMU executable should support all CPUs and machines.
-
-ifeq ($(CONFIG_SOFTMMU),y)
-common-obj-y =
-
-common-obj-$(CONFIG_AUDIO_ALSA) += audio-alsa$(DSOSUF)
-common-obj-$(CONFIG_AUDIO_OSS) += audio-oss$(DSOSUF)
-common-obj-$(CONFIG_AUDIO_PA) += audio-pa$(DSOSUF)
-common-obj-$(CONFIG_AUDIO_SDL) += audio-sdl$(DSOSUF)
-
-common-obj-$(if $(CONFIG_CURSES),m) += ui-curses$(DSOSUF)
-common-obj-$(if $(CONFIG_GTK),m) += ui-gtk$(DSOSUF)
-common-obj-$(if $(CONFIG_SDL),m) += ui-sdl$(DSOSUF)
-common-obj-$(if $(CONFIG_SPICE),m) += ui-spice-app$(DSOSUF)
-
-common-obj-$(if $(CONFIG_CURL),m) += block-curl$(DSOSUF)
-common-obj-$(if $(CONFIG_GLUSTERFS),m) += block-gluster$(DSOSUF)
-common-obj-$(if $(CONFIG_LIBISCSI),m) += block-iscsi$(DSOSUF)
-common-obj-$(if $(CONFIG_LIBNFS),m) += block-nfs$(DSOSUF)
-common-obj-$(if $(CONFIG_LIBSSH),m) += block-ssh$(DSOSUF)
-common-obj-$(if $(CONFIG_RBD),m) += block-rbd$(DSOSUF)
-
-common-obj-$(if $(CONFIG_LZFSE),m) += block-dmg-lzfse$(DSOSUF)
-common-obj-$(if $(and $(CONFIG_BZIP2),$(CONFIG_DMG)),m) += block-dmg-bz2$(DSOSUF)
-
-common-obj-y += libqmp.fa
-
-endif # CONFIG_SOFTMMU
-
-######################################################################
 # Resource file for Windows executables
 version-obj-$(CONFIG_WIN32) += $(BUILD_DIR)/version.o
Makefile.target +4 -149

186 lines not on this page · raw message

configure +7 -15
index a7a4538..61100c1 100755
@@ -316,7 +316,6 @@ audio_drv_list=""
 block_drv_rw_whitelist=""
 block_drv_ro_whitelist=""
 host_cc="cc"
-libs_cpu=""
 libs_softmmu=""
 libs_tools=""
 audio_win_int=""
@@ -5415,7 +5414,6 @@ case "$capstone" in
     else
       LIBCAPSTONE=libcapstone.a
     fi
-    libs_cpu="-L$PWD/capstone -lcapstone $libs_cpu"
     capstone_libs="-L$PWD/capstone -lcapstone"
     capstone_cflags="-I${source_path}/capstone/include"
     ;;
@@ -5424,7 +5422,6 @@ case "$capstone" in
     capstone_libs="$($pkg_config --libs capstone)"
     capstone_cflags="$($pkg_config --cflags capstone)"
     QEMU_CFLAGS="$QEMU_CFLAGS $($pkg_config --cflags capstone)"
-    libs_cpu="$($pkg_config --libs capstone) $libs_cpu"
     ;;
 
   no)
@@ -6342,7 +6339,10 @@ fi
 if test "$fuzzing" = "yes" ; then
   write_c_fuzzer_skeleton
   if compile_prog "$CPU_CFLAGS -Werror -fsanitize=fuzzer" ""; then
-      have_fuzzer=yes
+    have_fuzzer=yes
+  else
+    error_exit "Your compiler doesn't support -fsanitize=fuzzer"
+    exit 1
   fi
 fi
 
@@ -6842,7 +6842,6 @@ echo "qemu_helperdir=$libexecdir" >> $config_host_mak
 echo "qemu_localedir=$qemu_localedir" >> $config_host_mak
 echo "qemu_icondir=$qemu_icondir" >> $config_host_mak
 echo "qemu_desktopdir=$qemu_desktopdir" >> $config_host_mak
-echo "libs_cpu=$libs_cpu" >> $config_host_mak
 echo "libs_softmmu=$libs_softmmu" >> $config_host_mak
 echo "GIT=$git" >> $config_host_mak
 echo "GIT_SUBMODULES=$git_submodules" >> $config_host_mak
@@ -7705,14 +7704,7 @@ if test "$have_mlockall" = "yes" ; then
   echo "HAVE_MLOCKALL=y" >> $config_host_mak
 fi
 if test "$fuzzing" = "yes" ; then
-  if test "$have_fuzzer" = "yes"; then
-    FUZZ_LDFLAGS=" -fsanitize=fuzzer"
-    FUZZ_CFLAGS=" -fsanitize=fuzzer"
-    CFLAGS="$CFLAGS -fsanitize=fuzzer-no-link"
-  else
-    error_exit "Your compiler doesn't support -fsanitize=fuzzer"
-    exit 1
-  fi
+  CFLAGS="$CFLAGS -fsanitize=fuzzer-no-link"
 fi
 
 if test "$plugins" = "yes" ; then
@@ -8299,8 +8291,8 @@ if test "$TARGET_ARCH" = "s390x" && test "$target_softmmu" = "yes" && \
     fi
 fi
 
-echo "QEMU_LDFLAGS+=$ldflags" >> $config_target_mak
-echo "QEMU_CFLAGS+=$cflags" >> $config_target_mak
+echo "QEMU_LDFLAGS=$ldflags" >> $config_target_mak
+echo "QEMU_CFLAGS=$cflags" >> $config_target_mak
 
 done # for target in $targets
 
docs/devel/blkverify.txt +2 -2
index d556dc4..aca826c 100644
@@ -62,8 +62,8 @@ A more realistic scenario is verifying the installation of a guest OS:
 
     $ ./qemu-img create raw.img 16G
     $ ./qemu-img create -f qcow2 test.qcow2 16G
-    $ x86_64-softmmu/qemu-system-x86_64 -cdrom debian.iso \
-                                        -drive file=blkverify:raw.img:test.qcow2
+    $ ./qemu-system-x86_64 -cdrom debian.iso \
+          -drive file=blkverify:raw.img:test.qcow2
 
 If the installation is aborted when blkverify detects corruption, use qemu-io
 to explore the contents of the disk image at the sector in question.
docs/devel/testing.rst +2 -2
index a426469..196e3bc 100644
@@ -819,7 +819,7 @@ the following approaches:
 1) Set ``qemu_bin``, and use the given binary
 
 2) Do not set ``qemu_bin``, and use a QEMU binary named like
-   "${arch}-softmmu/qemu-system-${arch}", either in the current
+   "qemu-system-${arch}", either in the current
    working directory, or in the current source tree.
 
 The resulting ``qemu_bin`` value will be preserved in the
@@ -886,7 +886,7 @@ like the following:
 
 .. code::
 
-  PARAMS (key=qemu_bin, path=*, default=x86_64-softmmu/qemu-system-x86_64) => 'x86_64-softmmu/qemu-system-x86_64
+  PARAMS (key=qemu_bin, path=*, default=./qemu-system-x86_64) => './qemu-system-x86_64
 
 arch
 ~~~~
docs/interop/live-block-operations.rst +2 -2
index 48afdc7..e13f5a2 100644
@@ -129,7 +129,7 @@ To show some example invocations of command-line, we will use the
 following invocation of QEMU, with a QMP server running over UNIX
 socket::
 
-    $ ./x86_64-softmmu/qemu-system-x86_64 -display none -no-user-config \
+    $ ./qemu-system-x86_64 -display none -no-user-config \
         -M q35 -nodefaults -m 512 \
         -blockdev node-name=node-A,driver=qcow2,file.driver=file,file.node-name=file,file.filename=./a.qcow2 \
         -device virtio-blk,drive=node-A,id=virtio0 \
@@ -694,7 +694,7 @@ instance, with the following invocation.  (As noted earlier, for
 simplicity's sake, the destination QEMU is started on the same host, but
 it could be located elsewhere)::
 
-    $ ./x86_64-softmmu/qemu-system-x86_64 -display none -no-user-config \
+    $ ./qemu-system-x86_64 -display none -no-user-config \
         -M q35 -nodefaults -m 512 \
         -blockdev node-name=node-TargetDisk,driver=qcow2,file.driver=file,file.node-name=file,file.filename=./target-disk.qcow2 \
         -device virtio-blk,drive=node-TargetDisk,id=virtio0 \
meson.build +76 -5

162 lines not on this page · raw message

os-posix.c +1 -1
index 3572db3..8334193 100644
@@ -96,7 +96,7 @@ char *os_find_datadir(void)
     exec_dir = qemu_get_exec_dir();
     g_return_val_if_fail(exec_dir != NULL, NULL);
 
-    dir = g_build_filename(exec_dir, "..", "pc-bios", NULL);
+    dir = g_build_filename(exec_dir, "pc-bios", NULL);
     if (g_file_test(dir, G_FILE_TEST_IS_DIR)) {
         return g_steal_pointer(&dir);
     }
plugins/meson.build +9 -1
index 9608e52..e777230 100644
@@ -1,5 +1,13 @@
+if 'CONFIG_HAS_LD_DYNAMIC_LIST' in config_host
+  plugin_ldflags = ['-Wl,--dynamic-list=' + (meson.build_root() / 'qemu-plugins-ld.symbols')]
+elif 'CONFIG_HAS_LD_EXPORTED_SYMBOLS_LIST' in config_host
+  plugin_ldflags = ['-Wl,-exported_symbols_list,' + (meson.build_root() / 'qemu-plugins-ld64.symbols')]
+else
+  plugin_ldflags = []
+endif
+
 specific_ss.add(when: 'CONFIG_PLUGIN', if_true: [files(
   'loader.c',
   'core.c',
   'api.c',
-)])
+), declare_dependency(link_args: plugin_ldflags)])
rules.mak +0 -1
index 8285fe5..6488dc3 100644
@@ -21,7 +21,6 @@ MAKEFLAGS += -rR
 %.cpp:
 %.m:
 %.mak:
-clean-target:
 
 # Flags for dependency generation
 QEMU_DGFLAGS += -MMD -MP -MT $@ -MF $(@D)/$(*F).d
scripts/device-crash-test +1 -1
index 305d042..866baf7 100755
@@ -383,7 +383,7 @@ def binariesToTest(args, testcase):
     if args.qemu:
         r = args.qemu
     else:
-        r = glob.glob('./*-softmmu/qemu-system-*')
+        r = glob.glob('./qemu-system-*')
     return r
 
 
softmmu/Makefile.objs deleted +0 -3
deleted file mode 100644
index dd15c24..0000000
@@ -1,3 +0,0 @@
-softmmu-main-y = softmmu/main.o
-obj-y += vl.o
-vl.o-cflags := $(GPROF_CFLAGS) $(SDL_CFLAGS)
softmmu/meson.build +4 -0
index 95d38df..28eeb78 100644
@@ -8,3 +8,7 @@ specific_ss.add(when: 'CONFIG_SOFTMMU', if_true: files(
   'memory_mapping.c',
   'qtest.c',
   'vl.c'))
+
+softmmu_emulator_ss.add(files(
+  'main.c',
+), sdl)
tests/Makefile.include +1 -1
index 567ad69..7468e99 100644
@@ -494,7 +494,7 @@ tests/qemu-iotests/socket_scm_helper$(EXESUF): tests/qemu-iotests/socket_scm_hel
 .PHONY: check-tests/check-block.sh
 check-tests/check-block.sh: tests/check-block.sh qemu-img$(EXESUF) \
 		qemu-io$(EXESUF) qemu-nbd$(EXESUF) $(QEMU_IOTESTS_HELPERS-y) \
-		$(patsubst %,%/all,$(filter %-softmmu,$(TARGET_DIRS)))
+		$(patsubst %-softmmu,qemu-system-%,$(filter %-softmmu,$(TARGET_DIRS)))
 	@$<
 
 # Python venv for running tests
tests/acceptance/avocado_qemu/__init__.py +1 -2
index 77d1c1d..71ed812 100644
@@ -57,8 +57,7 @@ def pick_default_qemu_bin(arch=None):
     # qemu binary path does not match arch for powerpc, handle it
     if 'ppc64le' in arch:
         arch = 'ppc64'
-    qemu_bin_relative_path = os.path.join("%s-softmmu" % arch,
-                                          "qemu-system-%s" % arch)
+    qemu_bin_relative_path = "qemu-system-%s" % arch
     if is_readable_executable_file(qemu_bin_relative_path):
         return qemu_bin_relative_path
 
tests/data/acpi/rebuild-expected-aml.sh +1 -1
index 76cd797..fc78770 100755
@@ -12,7 +12,7 @@
 # This work is licensed under the terms of the GNU GPLv2.
 # See the COPYING.LIB file in the top-level directory.
 
-qemu_bins="x86_64-softmmu/qemu-system-x86_64 aarch64-softmmu/qemu-system-aarch64"
+qemu_bins="./qemu-system-x86_64 ./qemu-system-aarch64"
 
 if [ ! -e "tests/qtest/bios-tables-test" ]; then
     echo "Test: bios-tables-test is required! Run make check before this script."
tests/multiboot/run_test.sh +1 -1
index 98df91e..f968bf7 100755
@@ -20,7 +20,7 @@
 # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 # THE SOFTWARE.
 
-QEMU=${QEMU:-"../../x86_64-softmmu/qemu-system-x86_64"}
+QEMU=${QEMU:-"../../qemu-system-x86_64"}
 
 run_qemu() {
     local kernel=$1
tests/qemu-iotests/check +3 -3
index 0657f72..3ab859a 100755
@@ -577,11 +577,11 @@ if [ -z "$QEMU_PROG" ]
 then
     if [ -x "$build_iotests/qemu" ]; then
         export QEMU_PROG="$build_iotests/qemu"
-    elif [ -x "$build_root/${qemu_arch}-softmmu/qemu-system-${qemu_arch}" ]; then
-        export QEMU_PROG="$build_root/${qemu_arch}-softmmu/qemu-system-${qemu_arch}"
+    elif [ -x "$build_root/qemu-system-${qemu_arch}" ]; then
+        export QEMU_PROG="$build_root/qemu-system-${qemu_arch}"
     else
         pushd "$build_root" > /dev/null
-        for binary in *-softmmu/qemu-system-*
+        for binary in qemu-system-*
         do
             if [ -x "$binary" ]
             then
tests/qtest/fuzz/Makefile.include deleted +0 -39
deleted file mode 100644
index 5bde793..0000000
@@ -1,39 +0,0 @@
-QEMU_PROG_FUZZ=qemu-fuzz-$(TARGET_NAME)$(EXESUF)
-
-fuzz-obj-y += tests/qtest/libqtest.o
-fuzz-obj-y += $(libqos-obj-y)
-fuzz-obj-y += tests/qtest/fuzz/fuzz.o # Fuzzer skeleton
-fuzz-obj-y += tests/qtest/fuzz/fork_fuzz.o
-fuzz-obj-y += tests/qtest/fuzz/qos_fuzz.o
-fuzz-obj-y += tests/qtest/fuzz/qtest_wrappers.o
-
-# Targets
-fuzz-obj-$(CONFIG_PCI_I440FX) += tests/qtest/fuzz/i440fx_fuzz.o
-fuzz-obj-$(CONFIG_VIRTIO_NET) += tests/qtest/fuzz/virtio_net_fuzz.o
-fuzz-obj-$(CONFIG_SCSI) += tests/qtest/fuzz/virtio_scsi_fuzz.o
-
-FUZZ_CFLAGS += -I$(SRC_PATH)/tests -I$(SRC_PATH)/tests/qtest
-
-# Linker Script to force coverage-counters into known regions which we can mark
-# shared
-FUZZ_LDFLAGS += -Xlinker -T$(SRC_PATH)/tests/qtest/fuzz/fork_fuzz.ld
-
-FUZZ_LDFLAGS += -Wl,-wrap,qtest_inb
-FUZZ_LDFLAGS += -Wl,-wrap,qtest_inw
-FUZZ_LDFLAGS += -Wl,-wrap,qtest_inl
-FUZZ_LDFLAGS += -Wl,-wrap,qtest_outb
-FUZZ_LDFLAGS += -Wl,-wrap,qtest_outw
-FUZZ_LDFLAGS += -Wl,-wrap,qtest_outl
-FUZZ_LDFLAGS += -Wl,-wrap,qtest_readb
-FUZZ_LDFLAGS += -Wl,-wrap,qtest_readw
-FUZZ_LDFLAGS += -Wl,-wrap,qtest_readl
-FUZZ_LDFLAGS += -Wl,-wrap,qtest_readq
-FUZZ_LDFLAGS += -Wl,-wrap,qtest_writeb
-FUZZ_LDFLAGS += -Wl,-wrap,qtest_writew
-FUZZ_LDFLAGS += -Wl,-wrap,qtest_writel
-FUZZ_LDFLAGS += -Wl,-wrap,qtest_writeq
-FUZZ_LDFLAGS += -Wl,-wrap,qtest_memread
-FUZZ_LDFLAGS += -Wl,-wrap,qtest_bufread
-FUZZ_LDFLAGS += -Wl,-wrap,qtest_memwrite
-FUZZ_LDFLAGS += -Wl,-wrap,qtest_bufwrite
-FUZZ_LDFLAGS += -Wl,-wrap,qtest_memset
tests/qtest/fuzz/i440fx_fuzz.c +2 -2
index f45373f..86796bf 100644
@@ -17,8 +17,8 @@
 #include "tests/qtest/libqos/pci.h"
 #include "tests/qtest/libqos/pci-pc.h"
 #include "fuzz.h"
-#include "fuzz/qos_fuzz.h"
-#include "fuzz/fork_fuzz.h"
+#include "qos_fuzz.h"
+#include "fork_fuzz.h"
 
 
 #define I440FX_PCI_HOST_BRIDGE_CFG 0xcf8
tests/qtest/fuzz/meson.build new file +34 -0
new file mode 100644
index 0000000..58ab69a
@@ -0,0 +1,34 @@
+specific_fuzz_ss.add(files('fuzz.c', 'fork_fuzz.c', 'qos_fuzz.c'), qos)
+
+# Targets
+specific_fuzz_ss.add(when: 'CONFIG_I440FX', if_true: files('i440fx_fuzz.c'))
+specific_fuzz_ss.add(when: 'CONFIG_VIRTIO_NET', if_true: files('virtio_net_fuzz.c'))
+specific_fuzz_ss.add(when: 'CONFIG_VIRTIO_SCSI', if_true: files('virtio_scsi_fuzz.c'))
+
+# unfortunately declare_dependency does not support link_depends, so
+# this will be duplicated in meson.build
+fork_fuzz = declare_dependency(
+  link_args: ['-fsanitize=fuzzer',
+              '-Ttests/qtest/fuzz/fork_fuzz.ld',
+              '-wrap', 'qtest_inb',
+              '-wrap', 'qtest_inw',
+              '-wrap', 'qtest_inl',
+              '-wrap', 'qtest_outb',
+              '-wrap', 'qtest_outw',
+              '-wrap', 'qtest_outl',
+              '-wrap', 'qtest_readb',
+              '-wrap', 'qtest_readw',
+              '-wrap', 'qtest_readl',
+              '-wrap', 'qtest_readq',
+              '-wrap', 'qtest_writeb',
+              '-wrap', 'qtest_writew',
+              '-wrap', 'qtest_writel',
+              '-wrap', 'qtest_writeq',
+              '-wrap', 'qtest_memread',
+              '-wrap', 'qtest_bufread',
+              '-wrap', 'qtest_memwrite',
+              '-wrap', 'qtest_bufwrite',
+              '-wrap', 'qtest_memset']
+)
+
+specific_fuzz_ss.add(fork_fuzz)
tests/qtest/fuzz/virtio_net_fuzz.c +2 -1
index 277a9e2..0e873ab 100644
@@ -61,7 +61,8 @@ static void virtio_net_fuzz_multi(QTestState *s,
          * backend. Otherwise, always place the input on a virtqueue.
          */
         if (vqa.rx && sockfds_initialized) {
-            write(sockfds[0], Data, vqa.length);
+            int ignored = write(sockfds[0], Data, vqa.length);
+            (void) ignored;
         } else {
             vqa.rx = 0;
             uint64_t req_addr = guest_alloc(t_alloc, vqa.length);
tests/qtest/libqos/qgraph.h +1 -1
index 1054326..5f63d35 100644
@@ -226,7 +226,7 @@ typedef void *(*QOSBeforeTest) (GString *cmd_line, void *arg);
  *        my_test <--consumed_by-- my_interface <--produces--+
  *
  * Assuming there the binary is
- * QTEST_QEMU_BINARY=x86_64-softmmu/qemu-system-x86_64
+ * QTEST_QEMU_BINARY=./qemu-system-x86_64
  * a valid test path will be:
  * "/x86_64/pc/other_node/my_driver/my_interface/my_test".
  *
tests/qtest/meson.build +1 -1
index 820c15c..c2601d9 100644
@@ -231,7 +231,7 @@ foreach dir : target_dirs
   qtest_env = environment()
   qtest_env.set('QTEST_QEMU_IMG', './qemu-img')
   qtest_env.set('G_TEST_DBUS_DAEMON', meson.source_root() / 'tests/dbus-vmstate-daemon.sh')
-  qtest_env.set('QTEST_QEMU_BINARY', '@0@-softmmu/qemu-system-@0@'.format(target_base))
+  qtest_env.set('QTEST_QEMU_BINARY', './qemu-system-' + target_base)
   
   foreach test : qtests
     # Executables are shared across targets, declare them only the first time we
tests/qtest/rtas-test.c +1 -1
index a7e83e7..16751db 100644
@@ -31,7 +31,7 @@ int main(int argc, char *argv[])
     g_test_init(&argc, &argv, NULL);
 
     if (strcmp(arch, "ppc64")) {
-        g_printerr("RTAS requires ppc64-softmmu/qemu-system-ppc64\n");
+        g_printerr("RTAS requires qemu-system-ppc64\n");
         exit(EXIT_FAILURE);
     }
     qtest_add_func("rtas/get-time-of-day", test_rtas_get_time_of_day);
tests/tcg/configure.sh +2 -2
index 102578c..7d714f9 100755
@@ -193,11 +193,11 @@ for target in $target_list; do
   case $target in
     *-linux-user | *-bsd-user)
       echo "CONFIG_USER_ONLY=y" >> $config_target_mak
-      echo "QEMU=\$(BUILD_DIR)/$target/qemu-$arch" >> $config_target_mak
+      echo "QEMU=\$(BUILD_DIR)/qemu-$arch" >> $config_target_mak
       ;;
     *-softmmu)
       echo "CONFIG_SOFTMMU=y" >> $config_target_mak
-      echo "QEMU=\$(BUILD_DIR)/$target/qemu-system-$arch" >> $config_target_mak
+      echo "QEMU=\$(BUILD_DIR)/qemu-system-$arch" >> $config_target_mak
       ;;
   esac
 
Signature · 1 line
1.8.3.1
#171 lore raw

PATCH 131/143 meson: convert systemtap files

In reply to Paolo Bonzini

From: Marc-André Lureau <[email protected]>

---
 Makefile.target   | 85 ++-----------------------------------------------------
 meson.build       | 26 +++++++++++++++++
 rules.mak         |  3 --
 trace/meson.build | 14 ++++-----
 4 files changed, 35 insertions(+), 93 deletions(-)
Makefile.target +2 -83
index 8ee4c78..a07149c 100644
@@ -6,88 +6,7 @@ include ../config-host.mak
 include config-target.mak
 include $(SRC_PATH)/rules.mak
 
-$(call set-vpath, $(SRC_PATH):$(BUILD_DIR))
-
-ifdef CONFIG_USER_ONLY
-# user emulator name
-QEMU_PROG=qemu-$(TARGET_NAME)
-else
-# system emulator name
-QEMU_PROG=qemu-system-$(TARGET_NAME)$(EXESUF)
-endif
-
-STPFILES=
-
-ifdef CONFIG_TRACE_SYSTEMTAP
-stap: $(QEMU_PROG).stp-installed $(QEMU_PROG).stp $(QEMU_PROG)-simpletrace.stp $(QEMU_PROG)-log.stp
-
-ifdef CONFIG_USER_ONLY
-TARGET_TYPE=user
-else
-TARGET_TYPE=system
-endif
-
-tracetool-y = $(SRC_PATH)/scripts/tracetool.py
-tracetool-y += $(shell find $(SRC_PATH)/scripts/tracetool -name "*.py")
-
-$(QEMU_PROG).stp-installed: $(BUILD_DIR)/trace/trace-events-all $(tracetool-y)
-	$(call quiet-command,$(TRACETOOL) \
-		--group=all \
-		--format=stap \
-		--backends=$(TRACE_BACKENDS) \
-		--binary=$(bindir)/$(QEMU_PROG) \
-		--target-name=$(TARGET_NAME) \
-		--target-type=$(TARGET_TYPE) \
-		$< > $@,"GEN","$(TARGET_DIR)$(QEMU_PROG).stp-installed")
-
-$(QEMU_PROG).stp: $(BUILD_DIR)/trace/trace-events-all $(tracetool-y)
-	$(call quiet-command,$(TRACETOOL) \
-		--group=all \
-		--format=stap \
-		--backends=$(TRACE_BACKENDS) \
-		--binary=$(realpath .)/$(QEMU_PROG) \
-		--target-name=$(TARGET_NAME) \
-		--target-type=$(TARGET_TYPE) \
-		$< > $@,"GEN","$(TARGET_DIR)$(QEMU_PROG).stp")
-
-$(QEMU_PROG)-simpletrace.stp: $(BUILD_DIR)/trace/trace-events-all $(tracetool-y)
-	$(call quiet-command,$(TRACETOOL) \
-		--group=all \
-		--format=simpletrace-stap \
-		--backends=$(TRACE_BACKENDS) \
-		--probe-prefix=qemu.$(TARGET_TYPE).$(TARGET_NAME) \
-		$< > $@,"GEN","$(TARGET_DIR)$(QEMU_PROG)-simpletrace.stp")
-
-$(QEMU_PROG)-log.stp: $(BUILD_DIR)/trace/trace-events-all $(tracetool-y)
-	$(call quiet-command,$(TRACETOOL) \
-		--group=all \
-		--format=log-stap \
-		--backends=$(TRACE_BACKENDS) \
-		--probe-prefix=qemu.$(TARGET_TYPE).$(TARGET_NAME) \
-		$< > $@,"GEN","$(TARGET_DIR)$(QEMU_PROG)-log.stp")
-
-else
-stap:
-endif
-.PHONY: stap
-
-all: stap
-
-clean:
-	rm -f *.a *~
-	rm -f $(shell find . -name '*.[od]')
-	rm -f hmp-commands.h gdbstub-xml.c
-	rm -f trace/generated-helpers.c trace/generated-helpers.c-timestamp
-ifdef CONFIG_TRACE_SYSTEMTAP
-	rm -f *.stp
-endif
-
+all:
 install: all
-ifdef CONFIG_TRACE_SYSTEMTAP
-	$(INSTALL_DIR) "$(DESTDIR)$(qemu_datadir)/../systemtap/tapset"
-	$(INSTALL_DATA) $(QEMU_PROG).stp-installed "$(DESTDIR)$(qemu_datadir)/../systemtap/tapset/$(QEMU_PROG).stp"
-	$(INSTALL_DATA) $(QEMU_PROG)-simpletrace.stp "$(DESTDIR)$(qemu_datadir)/../systemtap/tapset/$(QEMU_PROG)-simpletrace.stp"
-	$(INSTALL_DATA) $(QEMU_PROG)-log.stp "$(DESTDIR)$(qemu_datadir)/../systemtap/tapset/$(QEMU_PROG)-log.stp"
-endif
-
+	
 .PHONY: all clean install
meson.build +26 -0
index 5052165..44b2645 100644
@@ -797,6 +797,7 @@ common_all = static_library('common',
                             name_suffix: 'fa')
 
 feature_to_c = find_program('scripts/feature_to_c.sh')
+tracetool = find_program('scripts/tracetool.py')
 
 emulators = []
 foreach target : target_dirs
@@ -939,6 +940,31 @@ foreach target : target_dirs
                link_depends: [block_syms, qemu_syms] + exe.get('link_depends', []),
                link_args: link_args,
                gui_app: exe['gui'])
+
+    if 'CONFIG_TRACE_SYSTEMTAP' in config_host
+      foreach stp: [
+        {'ext': '.stp-build', 'fmt': 'stap', 'bin': meson.current_build_dir() / exe_name, 'install': false},
+        {'ext': '.stp', 'fmt': 'stap', 'bin': get_option('prefix') / get_option('bindir') / exe_name, 'install': true},
+        {'ext': '-simpletrace.stp', 'fmt': 'simpletrace-stap', 'bin': '', 'install': true},
+        {'ext': '-log.stp', 'fmt': 'log-stap', 'bin': '', 'install': true},
+      ]
+        custom_target(exe_name + stp['ext'],
+                      input: trace_events_all,
+                      output: exe_name + stp['ext'],
+                      capture: true,
+                      install: stp['install'],
+                      install_dir: config_host['qemu_datadir'] / '../systemtap/tapset',
+                      command: [
+                        tracetool, '--group=all', '--format=' + stp['fmt'],
+                        '--backends=' + config_host['TRACE_BACKENDS'],
+                        '--binary=' + stp['bin'],
+                        '--target-name=' + target_name,
+                        '--target-type=' + target_type,
+                        '--probe-prefix=qemu.' + target_type + '.' + target_name,
+                        '@INPUT@',
+                      ])
+      endforeach
+    endif
   endforeach
 endforeach
 
rules.mak +0 -3
index 6488dc3..b983c7f 100644
@@ -199,9 +199,6 @@ ne = $(if $(subst $2,,$1)$(subst $1,,$2),y,n)
 isempty = $(if $1,n,y)
 notempty = $(if $1,y,n)
 
-# Generate files with tracetool
-TRACETOOL=$(PYTHON) $(SRC_PATH)/scripts/tracetool.py
-
 .PHONY: clean-timestamp
 clean-timestamp:
 	rm -f *.timestamp
trace/meson.build +7 -7
index b113425..eb28aff 100644
@@ -55,13 +55,13 @@ foreach dir : [ '.' ] + trace_events_subdirs
   endif
 endforeach
 
-custom_target('trace-events-all',
-              output: 'trace-events-all',
-              input: trace_events_files,
-              command: [ 'cat', '@INPUT@' ],
-              capture: true,
-              install: true,
-              install_dir: config_host['qemu_datadir'])
+trace_events_all = custom_target('trace-events-all',
+                                 output: 'trace-events-all',
+                                 input: trace_events_files,
+                                 command: [ 'cat', '@INPUT@' ],
+                                 capture: true,
+                                 install: true,
+                                 install_dir: config_host['qemu_datadir'])
 
 foreach d : [
   ['generated-tcg-tracers.h', 'tcg-h'],
Signature · 1 line
1.8.3.1
#172 lore raw

PATCH 132/143 rules.mak: remove version.o

In reply to Paolo Bonzini

From: Marc-André Lureau <[email protected]>

---
 Makefile      | 5 -----
 Makefile.objs | 4 ----
 rules.mak     | 4 +---
 3 files changed, 1 insertion(+), 12 deletions(-)
Makefile +0 -5
index 1f89680..603869d 100644
@@ -226,11 +226,6 @@ recurse-clean: $(addsuffix /clean, $(TARGET_DIRS) $(ROM_DIRS))
 recurse-install: $(addsuffix /install, $(TARGET_DIRS))
 $(addsuffix /install, $(TARGET_DIRS)): all
 
-$(BUILD_DIR)/version.o: $(SRC_PATH)/version.rc config-host.h
-	$(call quiet-command,$(WINDRES) -I$(BUILD_DIR) -o $@ $<,"RC","version.o")
-
-Makefile: $(version-obj-y)
-
 ######################################################################
 
 clean: recurse-clean
Makefile.objs +0 -4
index 9f73e86..306d81d 100644
@@ -31,7 +31,3 @@ crypto-obj-y = crypto/libcrypto.fa
 io-obj-y = io/libio.fa
 
 endif # CONFIG_SOFTMMU or CONFIG_TOOLS
-
-######################################################################
-# Resource file for Windows executables
-version-obj-$(CONFIG_WIN32) += $(BUILD_DIR)/version.o
rules.mak +1 -3
index b983c7f..6d89001 100644
@@ -77,8 +77,6 @@ expand-objs = $(strip $(sort $(filter %.o,$1)) \
 	$(call quiet-command,$(CC) $(QEMU_LOCAL_INCLUDES) $(QEMU_INCLUDES) \
 	       $(QEMU_CFLAGS) $(QEMU_DGFLAGS) $(CFLAGS) $($@-cflags) \
 	       -c -o $@ $<,"CC","$(TARGET_DIR)$@")
-%.o: %.rc
-	$(call quiet-command,$(WINDRES) -I. -o $@ $<,"RC","$(TARGET_DIR)$@")
 
 # If we have a CXX we might have some C++ objects, in which case we
 # must link with the C++ compiler, not the plain C compiler.
@@ -86,7 +84,7 @@ LINKPROG = $(or $(CXX),$(CC))
 
 LINK = $(call quiet-command, $(LINKPROG) $(CFLAGS) $(QEMU_LDFLAGS) -o $@ \
        $(call process-archive-undefs, $1) \
-       $(version-obj-y) $(call extract-libs,$1) $(LIBS),"LINK","$(TARGET_DIR)$@")
+       $(call extract-libs,$1) $(LIBS),"LINK","$(TARGET_DIR)$@")
 
 %.o: %.S
 	$(call quiet-command,$(CCAS) $(QEMU_LOCAL_INCLUDES) $(QEMU_INCLUDES) \
Signature · 1 line
1.8.3.1
#173 lore raw

PATCH 133/143 remove Makefile.target

In reply to Paolo Bonzini
---
 Makefile        | 53 ++++-------------------------------------------------
 Makefile.target | 12 ------------
 configure       |  2 --
 3 files changed, 4 insertions(+), 63 deletions(-)
 delete mode 100644 Makefile.target
Makefile +4 -49
index 603869d..9a97de0 100644
@@ -164,17 +164,6 @@ include $(SRC_PATH)/tests/Makefile.include
 
 all: $(DOCS) $(if $(BUILD_DOCS),sphinxdocs) recurse-all modules
 
-config-host.h: config-host.h-timestamp
-config-host.h-timestamp: config-host.mak
-
-TARGET_DIRS_RULES := $(foreach t, all fuzz clean install, $(addsuffix /$(t), $(TARGET_DIRS)))
-
-.PHONY: $(TARGET_DIRS_RULES)
-# The $(TARGET_DIRS_RULES) are of the form SUBDIR/GOAL, so that
-# $(dir $@) yields the sub-directory, and $(notdir $@) yields the sub-goal
-$(TARGET_DIRS_RULES): $(TARGET_DEPS)
-	$(call quiet-command,$(MAKE) $(SUBDIR_MAKEFLAGS) -C $(dir $@) V="$(V)" TARGET_DIR="$(dir $@)" $(notdir $@),)
-
 # LIBFDT_lib="": avoid breaking existing trees with objects requiring -fPIC
 DTC_MAKE_ARGS=-I$(SRC_PATH)/dtc VPATH=$(SRC_PATH)/dtc -C dtc V="$(V)" LIBFDT_lib=""
 DTC_CFLAGS=$(CFLAGS) $(QEMU_CFLAGS)
@@ -211,8 +200,6 @@ slirp/all: .git-submodule-status
 		CC="$(CC)" AR="$(AR)" 	LD="$(LD)" RANLIB="$(RANLIB)"	\
 		CFLAGS="$(QEMU_CFLAGS) $(CFLAGS)" LDFLAGS="$(QEMU_LDFLAGS)")
 
-$(filter %/all, $(TARGET_DIRS_RULES)):
-
 ROM_DIRS = $(addprefix pc-bios/, $(ROMS))
 ROM_DIRS_RULES=$(foreach t, all clean, $(addsuffix /$(t), $(ROM_DIRS)))
 # Only keep -O and -g cflags
@@ -220,11 +207,9 @@ ROM_DIRS_RULES=$(foreach t, all clean, $(addsuffix /$(t), $(ROM_DIRS)))
 $(ROM_DIRS_RULES):
 	$(call quiet-command,$(MAKE) $(SUBDIR_MAKEFLAGS) -C $(dir $@) V="$(V)" TARGET_DIR="$(dir $@)" CFLAGS="$(filter -O% -g%,$(CFLAGS))" $(notdir $@),)
 
-.PHONY: recurse-all recurse-clean recurse-install
-recurse-all: $(addsuffix /all, $(TARGET_DIRS) $(ROM_DIRS))
-recurse-clean: $(addsuffix /clean, $(TARGET_DIRS) $(ROM_DIRS))
-recurse-install: $(addsuffix /install, $(TARGET_DIRS))
-$(addsuffix /install, $(TARGET_DIRS)): all
+.PHONY: recurse-all recurse-clean
+recurse-all: $(ROM_DIRS)
+recurse-clean: $(addsuffix /clean, $(ROM_DIRS))
 
 ######################################################################
 
@@ -274,9 +259,6 @@ distclean: clean
 	$(call clean-manual,system)
 	$(call clean-manual,tools)
 	$(call clean-manual,user)
-	for d in $(TARGET_DIRS); do \
-	rm -rf $$d || exit 1 ; \
-        done
 	rm -Rf .sdk
 
 KEYMAPS=da     en-gb  et  fr     fr-ch  is  lt  no  pt-br  sv \
@@ -386,8 +368,7 @@ ICON_SIZES=16x16 24x24 32x32 48x48 64x64 128x128 256x256 512x512
 export DESTDIR
 install: all $(if $(BUILD_DOCS),install-doc) \
 	install-datadir install-localstatedir \
-	$(if $(INSTALL_BLOBS),$(edk2-decompressed)) \
-	recurse-install
+	$(if $(INSTALL_BLOBS),$(edk2-decompressed))
 ifdef CONFIG_TRACE_SYSTEMTAP
 	$(INSTALL_PROG) "scripts/qemu-trace-stap" $(DESTDIR)$(bindir)
 endif
@@ -432,9 +413,6 @@ endif
 	set -e; for x in $(KEYMAPS); do \
 		$(INSTALL_DATA) $(SRC_PATH)/pc-bios/keymaps/$$x "$(DESTDIR)$(qemu_datadir)/keymaps"; \
 	done
-	for d in $(TARGET_DIRS); do \
-	$(MAKE) $(SUBDIR_MAKEFLAGS) TARGET_DIR=$$d/ -C $$d $@ || exit 1 ; \
-        done
 
 # documentation
 MAKEINFO=makeinfo
@@ -549,20 +527,6 @@ docs/interop/qemu-qmp-ref.dvi docs/interop/qemu-qmp-ref.html \
 
 $(filter %.1 %.7 %.8,$(DOCS)): scripts/texi2pod.pl
 
-# Reports/Analysis
-
-%/coverage-report.html:
-	@mkdir -p $*
-	$(call quiet-command,\
-		gcovr -r $(SRC_PATH) \
-		$(foreach t, $(TARGET_DIRS), --object-directory $(BUILD_DIR)/$(t)) \
-		 --object-directory $(BUILD_DIR) \
-		-p --html --html-details -o $@, \
-		"GEN", "coverage-report.html")
-
-.PHONY: coverage-report
-coverage-report: $(CURDIR)/reports/coverage/coverage-report.html
-
 ifdef CONFIG_WIN32
 
 INSTALLER = qemu-setup-$(VERSION)$(EXESUF)
@@ -650,15 +614,6 @@ endif
 	$(call print-help,cscope,Generate cscope index)
 	$(call print-help,sparse,Run sparse on the QEMU source)
 	@echo  ''
-	@$(if $(TARGET_DIRS), \
-		echo 'Architecture specific targets:'; \
-		$(foreach t, $(TARGET_DIRS), \
-		$(call print-help-run,$(t)/all,Build for $(t)); \
-		$(if $(CONFIG_FUZZ), \
-			$(if $(findstring softmmu,$(t)), \
-				$(call print-help-run,$(t)/fuzz,Build fuzzer for $(t)); \
-		))) \
-		echo '')
 	@echo  'Cleaning targets:'
 	$(call print-help,clean,Remove most generated files but keep the config)
 	$(call print-help,distclean,Remove all generated files)
Makefile.target deleted +0 -12
deleted file mode 100644
index a07149c..0000000
@@ -1,12 +0,0 @@
-# -*- Mode: makefile -*-
-
-BUILD_DIR?=$(CURDIR)/..
-
-include ../config-host.mak
-include config-target.mak
-include $(SRC_PATH)/rules.mak
-
-all:
-install: all
-	
-.PHONY: all clean install
configure +0 -2
index 61100c1..a3727dc 100755
@@ -8094,8 +8094,6 @@ if [ "$TARGET_SYSTBL_ABI" != "" ] && [ "$TARGET_SYSTBL" = "" ]; then
   TARGET_SYSTBL=syscall.tbl
 fi
 
-symlink "$source_path/Makefile.target" "$target_dir/Makefile"
-
 upper() {
     echo "$@"| LC_ALL=C tr '[a-z]' '[A-Z]'
 }
Signature · 1 line
1.8.3.1
#174 lore raw

PATCH 134/143 meson: sphinx-build

In reply to Paolo Bonzini
---
 Makefile           | 142 +++--------------------------------------------------
 configure          |   1 -
 docs/index.html.in |   4 +-
 docs/meson.build   |  68 +++++++++++++++++++++++++
 meson.build        |   2 +
 rules.mak          |  48 ------------------
 6 files changed, 79 insertions(+), 186 deletions(-)
 create mode 100644 docs/meson.build
Makefile +7 -135
index 9a97de0..d0d0294 100644
@@ -120,36 +120,9 @@ $(call set-vpath, $(SRC_PATH))
 
 LIBS+=-lz $(LIBS_TOOLS)
 
-# Sphinx does not allow building manuals into the same directory as
-# the source files, so if we're doing an in-tree QEMU build we must
-# build the manuals into a subdirectory (and then install them from
-# there for 'make install'). For an out-of-tree build we can just
-# use the docs/ subdirectory in the build tree as normal.
-ifeq ($(realpath $(SRC_PATH)),$(realpath .))
-MANUAL_BUILDDIR := docs/built
-else
-MANUAL_BUILDDIR := docs
-endif
-
 ifdef BUILD_DOCS
-DOCS+=$(MANUAL_BUILDDIR)/system/qemu.1
-DOCS+=$(MANUAL_BUILDDIR)/tools/qemu-img.1
-DOCS+=$(MANUAL_BUILDDIR)/tools/qemu-nbd.8
-DOCS+=$(MANUAL_BUILDDIR)/interop/qemu-ga.8
-ifeq ($(CONFIG_LINUX)$(CONFIG_SECCOMP)$(CONFIG_LIBCAP_NG),yyy)
-DOCS+=$(MANUAL_BUILDDIR)/tools/virtiofsd.1
-endif
-DOCS+=$(MANUAL_BUILDDIR)/system/qemu-block-drivers.7
 DOCS+=docs/interop/qemu-qmp-ref.html docs/interop/qemu-qmp-ref.txt docs/interop/qemu-qmp-ref.7
 DOCS+=docs/interop/qemu-ga-ref.html docs/interop/qemu-ga-ref.txt docs/interop/qemu-ga-ref.7
-DOCS+=$(MANUAL_BUILDDIR)/system/qemu-cpu-models.7
-DOCS+=$(MANUAL_BUILDDIR)/index.html
-ifdef CONFIG_VIRTFS
-DOCS+=$(MANUAL_BUILDDIR)/tools/virtfs-proxy-helper.1
-endif
-ifdef CONFIG_TRACE_SYSTEMTAP
-DOCS+=$(MANUAL_BUILDDIR)/tools/qemu-trace-stap.1
-endif
 else
 DOCS=
 endif
@@ -232,11 +205,6 @@ dist: qemu-$(VERSION).tar.bz2
 qemu-%.tar.bz2:
 	$(SRC_PATH)/scripts/make-release "$(SRC_PATH)" "$(patsubst qemu-%.tar.bz2,%,$@)"
 
-define clean-manual =
-rm -rf $(MANUAL_BUILDDIR)/$1/_static
-rm -f $(MANUAL_BUILDDIR)/$1/objects.inv $(MANUAL_BUILDDIR)/$1/searchindex.js $(MANUAL_BUILDDIR)/$1/*.html
-endef
-
 distclean: clean
 	rm -f config-host.mak config-host.h* $(DOCS)
 	rm -f tests/tcg/config-*.mak
@@ -252,13 +220,6 @@ distclean: clean
 	rm -f docs/interop/qemu-qmp-ref.txt docs/interop/qemu-ga-ref.txt
 	rm -f docs/interop/qemu-qmp-ref.pdf docs/interop/qemu-ga-ref.pdf
 	rm -f docs/interop/qemu-qmp-ref.html docs/interop/qemu-ga-ref.html
-	rm -rf .doctrees
-	$(call clean-manual,devel)
-	$(call clean-manual,interop)
-	$(call clean-manual,specs)
-	$(call clean-manual,system)
-	$(call clean-manual,tools)
-	$(call clean-manual,user)
 	rm -Rf .sdk
 
 KEYMAPS=da     en-gb  et  fr     fr-ch  is  lt  no  pt-br  sv \
@@ -297,28 +258,8 @@ BLOBS=
 DESCS=
 endif
 
-# Note that we manually filter-out the non-Sphinx documentation which
-# is currently built into the docs/interop directory in the build tree,
-# and also any sphinx-built manpages.
-define install-manual =
-for d in $$(cd $(MANUAL_BUILDDIR) && find $1 -type d); do $(INSTALL_DIR) "$(DESTDIR)$(qemu_docdir)/$$d"; done
-for f in $$(cd $(MANUAL_BUILDDIR) && find $1 -type f -a '!' '(' -name '*.[0-9]' -o -name 'qemu-*-qapi.*' -o -name 'qemu-*-ref.*' ')' ); do $(INSTALL_DATA) "$(MANUAL_BUILDDIR)/$$f" "$(DESTDIR)$(qemu_docdir)/$$f"; done
-endef
-
-# Note that we deliberately do not install the "devel" manual: it is
-# for QEMU developers, and not interesting to our users.
-.PHONY: install-sphinxdocs
-install-sphinxdocs: sphinxdocs
-	$(call install-manual,interop)
-	$(call install-manual,specs)
-	$(call install-manual,system)
-	$(call install-manual,tools)
-	$(call install-manual,user)
-
-install-doc: $(DOCS) install-sphinxdocs
+install-doc: $(DOCS)
 	$(INSTALL_DIR) "$(DESTDIR)$(qemu_docdir)"
-	$(INSTALL_DATA) $(MANUAL_BUILDDIR)/index.html "$(DESTDIR)$(qemu_docdir)"
-	$(INSTALL_DIR) "$(DESTDIR)$(qemu_docdir)/interop"
 	$(INSTALL_DATA) docs/interop/qemu-qmp-ref.html "$(DESTDIR)$(qemu_docdir)/interop"
 	$(INSTALL_DATA) docs/interop/qemu-qmp-ref.txt "$(DESTDIR)$(qemu_docdir)/interop"
 ifdef CONFIG_POSIX
@@ -326,19 +267,7 @@ ifdef CONFIG_POSIX
 	$(INSTALL_DATA) $(MANUAL_BUILDDIR)/system/qemu.1 "$(DESTDIR)$(mandir)/man1"
 	$(INSTALL_DIR) "$(DESTDIR)$(mandir)/man7"
 	$(INSTALL_DATA) docs/interop/qemu-qmp-ref.7 "$(DESTDIR)$(mandir)/man7"
-	$(INSTALL_DATA) $(MANUAL_BUILDDIR)/system/qemu-block-drivers.7 "$(DESTDIR)$(mandir)/man7"
-	$(INSTALL_DATA) $(MANUAL_BUILDDIR)/system/qemu-cpu-models.7 "$(DESTDIR)$(mandir)/man7"
-ifeq ($(CONFIG_TOOLS),y)
-	$(INSTALL_DATA) $(MANUAL_BUILDDIR)/tools/qemu-img.1 "$(DESTDIR)$(mandir)/man1"
-	$(INSTALL_DIR) "$(DESTDIR)$(mandir)/man8"
-	$(INSTALL_DATA) $(MANUAL_BUILDDIR)/tools/qemu-nbd.8 "$(DESTDIR)$(mandir)/man8"
-endif
-ifdef CONFIG_TRACE_SYSTEMTAP
-	$(INSTALL_DATA) $(MANUAL_BUILDDIR)/tools/qemu-trace-stap.1 "$(DESTDIR)$(mandir)/man1"
-endif
 ifeq ($(CONFIG_GUEST_AGENT),y)
-	$(INSTALL_DATA) $(MANUAL_BUILDDIR)/interop/qemu-ga.8 "$(DESTDIR)$(mandir)/man8"
-	$(INSTALL_DIR) "$(DESTDIR)$(qemu_docdir)/interop"
 	$(INSTALL_DATA) docs/interop/qemu-ga-ref.html "$(DESTDIR)$(qemu_docdir)/interop"
 	$(INSTALL_DATA) docs/interop/qemu-ga-ref.txt "$(DESTDIR)$(qemu_docdir)/interop"
 	$(INSTALL_DATA) docs/interop/qemu-ga-ref.7 "$(DESTDIR)$(mandir)/man7"
@@ -441,69 +370,6 @@ docs/version.texi: $(SRC_PATH)/VERSION config-host.mak
 %.pdf: %.texi docs/version.texi
 	$(call quiet-command,texi2pdf $(TEXI2PDFFLAGS) $< -o $@,"GEN","$@")
 
-# Sphinx builds all its documentation at once in one invocation
-# and handles "don't rebuild things unless necessary" itself.
-# The '.doctrees' files are cached information to speed this up.
-.PHONY: sphinxdocs
-sphinxdocs: $(MANUAL_BUILDDIR)/devel/index.html \
-            $(MANUAL_BUILDDIR)/interop/index.html \
-            $(MANUAL_BUILDDIR)/specs/index.html \
-            $(MANUAL_BUILDDIR)/system/index.html \
-            $(MANUAL_BUILDDIR)/tools/index.html \
-            $(MANUAL_BUILDDIR)/user/index.html
-
-# Canned command to build a single manual
-# Arguments: $1 = manual name, $2 = Sphinx builder ('html' or 'man')
-# Note the use of different doctree for each (manual, builder) tuple;
-# this works around Sphinx not handling parallel invocation on
-# a single doctree: https://github.com/sphinx-doc/sphinx/issues/2946
-build-manual = $(call quiet-command,CONFDIR="$(qemu_confdir)" $(SPHINX_BUILD) $(if $(V),,-q) $(SPHINX_WERROR) -b $2 -D version=$(VERSION) -D release="$(FULL_VERSION)" -d .doctrees/$1-$2 $(SRC_PATH)/docs/$1 $(MANUAL_BUILDDIR)/$1 ,"SPHINX","$(MANUAL_BUILDDIR)/$1")
-# We assume all RST files in the manual's directory are used in it
-manual-deps = $(wildcard $(SRC_PATH)/docs/$1/*.rst $(SRC_PATH)/docs/$1/*/*.rst) \
-              $(SRC_PATH)/docs/defs.rst.inc \
-              $(SRC_PATH)/docs/$1/conf.py $(SRC_PATH)/docs/conf.py \
-              $(SRC_PATH)/docs/sphinx/*.py
-# Macro to write out the rule and dependencies for building manpages
-# Usage: $(call define-manpage-rule,manualname,manpage1 manpage2...[,extradeps])
-# 'extradeps' is optional, and specifies extra files (eg .hx files) that
-# the manual page depends on.
-define define-manpage-rule
-$(call atomic,$(foreach manpage,$2,$(MANUAL_BUILDDIR)/$1/$(manpage)),$(call manual-deps,$1) $3)
-	$(call build-manual,$1,man)
-endef
-
-$(MANUAL_BUILDDIR)/devel/index.html: $(call manual-deps,devel)
-	$(call build-manual,devel,html)
-
-$(MANUAL_BUILDDIR)/interop/index.html: $(call manual-deps,interop)
-	$(call build-manual,interop,html)
-
-$(MANUAL_BUILDDIR)/specs/index.html: $(call manual-deps,specs)
-	$(call build-manual,specs,html)
-
-$(MANUAL_BUILDDIR)/system/index.html: $(call manual-deps,system) $(SRC_PATH)/hmp-commands.hx $(SRC_PATH)/hmp-commands-info.hx $(SRC_PATH)/qemu-options.hx
-	$(call build-manual,system,html)
-
-$(MANUAL_BUILDDIR)/tools/index.html: $(call manual-deps,tools) $(SRC_PATH)/qemu-img-cmds.hx $(SRC_PATH)/docs/qemu-option-trace.rst.inc
-	$(call build-manual,tools,html)
-
-$(MANUAL_BUILDDIR)/user/index.html: $(call manual-deps,user)
-	$(call build-manual,user,html)
-
-$(call define-manpage-rule,interop,qemu-ga.8)
-
-$(call define-manpage-rule,system,qemu.1 qemu-block-drivers.7 qemu-cpu-models.7)
-
-$(call define-manpage-rule,tools,\
-       qemu-img.1 qemu-nbd.8 qemu-trace-stap.1\
-       virtiofsd.1 virtfs-proxy-helper.1,\
-       $(SRC_PATH)/qemu-img-cmds.hx $(SRC_PATH)/docs/qemu-option-trace.rst.inc)
-
-$(MANUAL_BUILDDIR)/index.html: $(SRC_PATH)/docs/index.html.in qemu-version.h
-	@mkdir -p "$(MANUAL_BUILDDIR)"
-	$(call quiet-command, sed "s|@@VERSION@@|${VERSION}|g" $< >$@, \
-             "GEN","$@")
-
 docs/interop/qemu-qmp-qapi.texi: qapi/qapi-doc.texi
 	@cp -p $< $@
 
@@ -526,6 +392,12 @@ docs/interop/qemu-qmp-ref.dvi docs/interop/qemu-qmp-ref.html \
 	docs/interop/qemu-qmp-ref.texi docs/interop/qemu-qmp-qapi.texi
 
 $(filter %.1 %.7 %.8,$(DOCS)): scripts/texi2pod.pl
+	$(call quiet-command, \
+	  perl -Ww -- $(SRC_PATH)/scripts/texi2pod.pl $(TEXI2PODFLAGS) $< [email protected] && \
+	  $(POD2MAN) --section=$(subst .,,$(suffix $@)) --center=" " --release=" " [email protected] > $@, \
+	  "GEN","$@")
+
+man: $(filter %.1 %.7 %.8,$(DOCS))
 
 ifdef CONFIG_WIN32
 
configure +0 -1
index a3727dc..08aee81 100755
@@ -7764,7 +7764,6 @@ echo "INSTALL_PROG=$install -c -m 0755" >> $config_host_mak
 echo "INSTALL_LIB=$install -c -m 0644" >> $config_host_mak
 echo "PYTHON=$python" >> $config_host_mak
 echo "SPHINX_BUILD=$sphinx_build" >> $config_host_mak
-echo "SPHINX_WERROR=$sphinx_werror" >> $config_host_mak
 echo "GENISOIMAGE=$genisoimage" >> $config_host_mak
 echo "MESON=$meson" >> $config_host_mak
 echo "CC=$cc" >> $config_host_mak
docs/index.html.in +2 -2
index 6736fa4..ca28047 100644
@@ -2,10 +2,10 @@
 <html lang="en">
     <head>
         <meta charset="UTF-8">
-        <title>QEMU @@VERSION@@ Documentation</title>
+        <title>QEMU @VERSION@ Documentation</title>
     </head>
     <body>
-        <h1>QEMU @@VERSION@@ Documentation</h1>
+        <h1>QEMU @VERSION@ Documentation</h1>
         <ul>
             <li><a href="system/index.html">System Emulation User's Guide</a></li>
             <li><a href="user/index.html">User Mode Emulation User's Guide</a></li>
docs/meson.build new file +68 -0

68 lines not on this page · raw message

meson.build +2 -0
index 44b2645..eb1b0cd 100644
@@ -11,6 +11,7 @@ cc = meson.get_compiler('c')
 config_host = keyval.load(meson.current_build_dir() / 'config-host.mak')
 config_all_disas = keyval.load(meson.current_build_dir() / 'config-all-disas.mak')
 enable_modules = 'CONFIG_MODULES' in config_host
+build_docs = 'BUILD_DOCS' in config_host
 
 add_project_arguments(config_host['QEMU_CFLAGS'].split(),
                       language: ['c', 'objc'])
@@ -1031,6 +1032,7 @@ endif
 subdir('tools')
 subdir('pc-bios')
 subdir('tests')
+subdir('docs')
 
 summary_info = {}
 summary_info += {'Install prefix':    config_host['prefix']}
rules.mak +0 -48

53 lines not on this page · raw message

Signature · 1 line
1.8.3.1
#175 lore raw

PATCH 135/143 meson: build texi doc

In reply to Paolo Bonzini
---
 Makefile                       | 108 +++--------------------------------------
 docs/interop/qemu-ga-ref.texi  |   2 +-
 docs/interop/qemu-qmp-ref.texi |   2 +-
 meson.build                    |  85 ++++++++++++++++++++++++++++++++
 qga/meson.build                |  12 +++--
 version.texi.in                |   2 +
 6 files changed, 105 insertions(+), 106 deletions(-)
 create mode 100644 version.texi.in
Makefile +7 -101
index d0d0294..6735832 100644
@@ -11,7 +11,6 @@ BUILD_DIR=$(CURDIR)
 SRC_PATH=.
 
 UNCHECKED_GOALS := %clean TAGS cscope ctags dist \
-    html info pdf txt \
     help check-help print-% \
     docker docker-% vm-help vm-test vm-build-%
 
@@ -113,20 +112,13 @@ edk2-decompressed = $(basename $(wildcard pc-bios/edk2-*.fd.bz2))
 Makefile: ;
 configure: ;
 
-.PHONY: all clean cscope distclean html info install install-doc \
-	pdf txt recurse-all dist msi FORCE
+.PHONY: all clean cscope distclean install \
+	recurse-all dist msi FORCE
 
 $(call set-vpath, $(SRC_PATH))
 
 LIBS+=-lz $(LIBS_TOOLS)
 
-ifdef BUILD_DOCS
-DOCS+=docs/interop/qemu-qmp-ref.html docs/interop/qemu-qmp-ref.txt docs/interop/qemu-qmp-ref.7
-DOCS+=docs/interop/qemu-ga-ref.html docs/interop/qemu-ga-ref.txt docs/interop/qemu-ga-ref.7
-else
-DOCS=
-endif
-
 SUBDIR_MAKEFLAGS=$(if $(V),,--no-print-directory --quiet) BUILD_DIR=$(BUILD_DIR)
 
 ifneq ($(wildcard config-host.mak),)
@@ -135,7 +127,7 @@ endif
 
 include $(SRC_PATH)/tests/Makefile.include
 
-all: $(DOCS) $(if $(BUILD_DOCS),sphinxdocs) recurse-all modules
+all: recurse-all modules
 
 # LIBFDT_lib="": avoid breaking existing trees with objects requiring -fPIC
 DTC_MAKE_ARGS=-I$(SRC_PATH)/dtc VPATH=$(SRC_PATH)/dtc -C dtc V="$(V)" LIBFDT_lib=""
@@ -206,7 +198,7 @@ qemu-%.tar.bz2:
 	$(SRC_PATH)/scripts/make-release "$(SRC_PATH)" "$(patsubst qemu-%.tar.bz2,%,$@)"
 
 distclean: clean
-	rm -f config-host.mak config-host.h* $(DOCS)
+	rm -f config-host.mak config-host.h*
 	rm -f tests/tcg/config-*.mak
 	rm -f config-all-disas.mak config.status
 	rm -f po/*.mo tests/qemu-iotests/common.env
@@ -214,12 +206,6 @@ distclean: clean
 	rm -f qemu-plugins-ld.symbols qemu-plugins-ld64.symbols
 	rm -f config.log
 	rm -f linux-headers/asm
-	rm -f docs/version.texi
-	rm -f docs/interop/qemu-ga-qapi.texi docs/interop/qemu-qmp-qapi.texi
-	rm -f docs/interop/qemu-qmp-ref.7 docs/interop/qemu-ga-ref.7
-	rm -f docs/interop/qemu-qmp-ref.txt docs/interop/qemu-ga-ref.txt
-	rm -f docs/interop/qemu-qmp-ref.pdf docs/interop/qemu-ga-ref.pdf
-	rm -f docs/interop/qemu-qmp-ref.html docs/interop/qemu-ga-ref.html
 	rm -Rf .sdk
 
 KEYMAPS=da     en-gb  et  fr     fr-ch  is  lt  no  pt-br  sv \
@@ -258,29 +244,6 @@ BLOBS=
 DESCS=
 endif
 
-install-doc: $(DOCS)
-	$(INSTALL_DIR) "$(DESTDIR)$(qemu_docdir)"
-	$(INSTALL_DATA) docs/interop/qemu-qmp-ref.html "$(DESTDIR)$(qemu_docdir)/interop"
-	$(INSTALL_DATA) docs/interop/qemu-qmp-ref.txt "$(DESTDIR)$(qemu_docdir)/interop"
-ifdef CONFIG_POSIX
-	$(INSTALL_DIR) "$(DESTDIR)$(mandir)/man1"
-	$(INSTALL_DATA) $(MANUAL_BUILDDIR)/system/qemu.1 "$(DESTDIR)$(mandir)/man1"
-	$(INSTALL_DIR) "$(DESTDIR)$(mandir)/man7"
-	$(INSTALL_DATA) docs/interop/qemu-qmp-ref.7 "$(DESTDIR)$(mandir)/man7"
-ifeq ($(CONFIG_GUEST_AGENT),y)
-	$(INSTALL_DATA) docs/interop/qemu-ga-ref.html "$(DESTDIR)$(qemu_docdir)/interop"
-	$(INSTALL_DATA) docs/interop/qemu-ga-ref.txt "$(DESTDIR)$(qemu_docdir)/interop"
-	$(INSTALL_DATA) docs/interop/qemu-ga-ref.7 "$(DESTDIR)$(mandir)/man7"
-endif
-endif
-ifdef CONFIG_VIRTFS
-	$(INSTALL_DIR) "$(DESTDIR)$(mandir)/man1"
-	$(INSTALL_DATA) $(MANUAL_BUILDDIR)/tools/virtfs-proxy-helper.1 "$(DESTDIR)$(mandir)/man1"
-endif
-ifeq ($(CONFIG_LINUX)$(CONFIG_SECCOMP)$(CONFIG_LIBCAP_NG),yyy)
-	$(INSTALL_DATA) $(MANUAL_BUILDDIR)/tools/virtiofsd.1 "$(DESTDIR)$(mandir)/man1"
-endif
-
 install-datadir:
 	$(INSTALL_DIR) "$(DESTDIR)$(qemu_datadir)"
 
@@ -295,8 +258,7 @@ ICON_SIZES=16x16 24x24 32x32 48x48 64x64 128x128 256x256 512x512
 
 # Needed by "meson install"
 export DESTDIR
-install: all $(if $(BUILD_DOCS),install-doc) \
-	install-datadir install-localstatedir \
+install: all install-datadir install-localstatedir \
 	$(if $(INSTALL_BLOBS),$(edk2-decompressed))
 ifdef CONFIG_TRACE_SYSTEMTAP
 	$(INSTALL_PROG) "scripts/qemu-trace-stap" $(DESTDIR)$(bindir)
@@ -343,62 +305,6 @@ endif
 		$(INSTALL_DATA) $(SRC_PATH)/pc-bios/keymaps/$$x "$(DESTDIR)$(qemu_datadir)/keymaps"; \
 	done
 
-# documentation
-MAKEINFO=makeinfo
-MAKEINFOINCLUDES= -I docs -I $(<D) -I $(@D)
-MAKEINFOFLAGS=--no-split --number-sections $(MAKEINFOINCLUDES)
-TEXI2PODFLAGS=$(MAKEINFOINCLUDES) -DVERSION="$(VERSION)" -DCONFDIR="$(qemu_confdir)"
-TEXI2PDFFLAGS=$(if $(V),,--quiet) -I $(SRC_PATH) $(MAKEINFOINCLUDES)
-
-docs/version.texi: $(SRC_PATH)/VERSION config-host.mak
-	$(call quiet-command,(\
-		echo "@set VERSION $(VERSION)" && \
-		echo "@set CONFDIR $(qemu_confdir)" \
-	)> $@,"GEN","$@")
-
-%.html: %.texi docs/version.texi
-	$(call quiet-command,LC_ALL=C $(MAKEINFO) $(MAKEINFOFLAGS) --no-headers \
-	--html $< -o $@,"GEN","$@")
-
-%.info: %.texi docs/version.texi
-	$(call quiet-command,$(MAKEINFO) $(MAKEINFOFLAGS) $< -o $@,"GEN","$@")
-
-%.txt: %.texi docs/version.texi
-	$(call quiet-command,LC_ALL=C $(MAKEINFO) $(MAKEINFOFLAGS) --no-headers \
-	--plaintext $< -o $@,"GEN","$@")
-
-%.pdf: %.texi docs/version.texi
-	$(call quiet-command,texi2pdf $(TEXI2PDFFLAGS) $< -o $@,"GEN","$@")
-
-docs/interop/qemu-qmp-qapi.texi: qapi/qapi-doc.texi
-	@cp -p $< $@
-
-docs/interop/qemu-ga-qapi.texi: qga/qga-qapi-doc.texi
-	@cp -p $< $@
-
-html: docs/interop/qemu-qmp-ref.html docs/interop/qemu-ga-ref.html sphinxdocs
-info: docs/interop/qemu-qmp-ref.info docs/interop/qemu-ga-ref.info
-pdf: docs/interop/qemu-qmp-ref.pdf docs/interop/qemu-ga-ref.pdf
-txt: docs/interop/qemu-qmp-ref.txt docs/interop/qemu-ga-ref.txt
-
-docs/interop/qemu-ga-ref.dvi docs/interop/qemu-ga-ref.html \
-    docs/interop/qemu-ga-ref.info docs/interop/qemu-ga-ref.pdf \
-    docs/interop/qemu-ga-ref.txt docs/interop/qemu-ga-ref.7: \
-	docs/interop/qemu-ga-ref.texi docs/interop/qemu-ga-qapi.texi
-
-docs/interop/qemu-qmp-ref.dvi docs/interop/qemu-qmp-ref.html \
-    docs/interop/qemu-qmp-ref.info docs/interop/qemu-qmp-ref.pdf \
-    docs/interop/qemu-qmp-ref.txt docs/interop/qemu-qmp-ref.7: \
-	docs/interop/qemu-qmp-ref.texi docs/interop/qemu-qmp-qapi.texi
-
-$(filter %.1 %.7 %.8,$(DOCS)): scripts/texi2pod.pl
-	$(call quiet-command, \
-	  perl -Ww -- $(SRC_PATH)/scripts/texi2pod.pl $(TEXI2PODFLAGS) $< [email protected] && \
-	  $(POD2MAN) --section=$(subst .,,$(suffix $@)) --center=" " --release=" " [email protected] > $@, \
-	  "GEN","$@")
-
-man: $(filter %.1 %.7 %.8,$(DOCS))
-
 ifdef CONFIG_WIN32
 
 INSTALLER = qemu-setup-$(VERSION)$(EXESUF)
@@ -421,7 +327,7 @@ installer: $(INSTALLER)
 
 INSTDIR=/tmp/qemu-nsis
 
-$(INSTALLER): install-doc $(SRC_PATH)/qemu.nsi
+$(INSTALLER): $(SRC_PATH)/qemu.nsi
 	$(MAKE) install prefix=${INSTDIR}
 ifdef SIGNCODE
 	(cd ${INSTDIR}; \
@@ -497,7 +403,7 @@ endif
 	$(call print-help,vm-help,Help about targets running tests inside VM)
 	@echo  ''
 	@echo  'Documentation targets:'
-	$(call print-help,html info pdf txt,Build documentation in specified format)
+	$(call print-help,html info pdf txt man,Build documentation in specified format)
 	@echo  ''
 ifdef CONFIG_WIN32
 	@echo  'Windows targets:'
docs/interop/qemu-ga-ref.texi +1 -1
index ddb76ce..a23cc2e 100644
@@ -65,7 +65,7 @@ along with this manual.  If not, see http://www.gnu.org/licenses/.
 @c for texi2pod:
 @c man begin DESCRIPTION
 
-@include qemu-ga-qapi.texi
+@include qga/qga-qapi-doc.texi
 
 @c man end
 
docs/interop/qemu-qmp-ref.texi +1 -1
index bb25758..ea1d7fe 100644
@@ -65,7 +65,7 @@ along with this manual.  If not, see http://www.gnu.org/licenses/.
 @c for texi2pod:
 @c man begin DESCRIPTION
 
-@include qemu-qmp-qapi.texi
+@include qapi/qapi-doc.texi
 
 @c man end
 
meson.build +85 -0

91 lines not on this page · raw message

qga/meson.build +9 -3
index dcd4772..55d590c 100644
@@ -1,7 +1,6 @@
 qga_qapi_outputs = [
   'qga-qapi-commands.c',
   'qga-qapi-commands.h',
-  'qga-qapi-doc.texi',
   'qga-qapi-emit-events.c',
   'qga-qapi-emit-events.h',
   'qga-qapi-events.c',
@@ -17,12 +16,19 @@ qga_qapi_outputs = [
 ]
 
 qga_qapi_files = custom_target('QGA QAPI files',
-                               output: qga_qapi_outputs,
+                               output: qga_qapi_outputs + ['qga-qapi-doc.texi'],
                                input: 'qapi-schema.json',
                                command: [ qapi_gen, '-o', 'qga', '-p', 'qga-', '@INPUT0@' ],
                                depend_files: qapi_gen_depends)
+
 qga_ss = ss.source_set()
-qga_ss.add(qga_qapi_files)
+i = 0
+foreach output: qga_qapi_outputs
+  qga_ss.add(qga_qapi_files[i])
+  i = i + 1
+endforeach
+qga_qapi_doc_texi = qga_qapi_files[i]
+
 qga_ss.add(files(
   'commands.c',
   'guest-agent-command-state.c',
version.texi.in new file +2 -0
new file mode 100644
index 0000000..0a723b8
@@ -0,0 +1,2 @@
+@set VERSION @VERSION@
+@set CONFDIR @qemu_confdir@
Signature · 1 line
1.8.3.1
#176 lore raw

PATCH 136/143 meson: convert check-block

In reply to Paolo Bonzini
---
 tests/Makefile.include         | 18 ++----------------
 tests/meson.build              |  4 ++++
 tests/qemu-iotests/meson.build |  8 ++++++++
 3 files changed, 14 insertions(+), 16 deletions(-)
 create mode 100644 tests/qemu-iotests/meson.build
tests/Makefile.include +2 -16
index 7468e99..a1e4871 100644
@@ -160,8 +160,6 @@ check-unit-y += tests/test-uuid$(EXESUF)
 check-unit-y += tests/ptimer-test$(EXESUF)
 check-unit-y += tests/test-qapi-util$(EXESUF)
 
-check-block-$(call land,$(CONFIG_POSIX),$(CONFIG_SOFTMMU)) += tests/check-block.sh
-
 generated-files-y += tests/test-qapi-types.h
 generated-files-y += tests/include/test-qapi-types-sub-module.h
 generated-files-y += tests/test-qapi-types-sub-sub-module.h
@@ -487,16 +485,6 @@ check-tcg: $(RUN_TCG_TARGET_RULES)
 clean-tcg: $(CLEAN_TCG_TARGET_RULES)
 
 
-QEMU_IOTESTS_HELPERS-$(call land,$(CONFIG_SOFTMMU),$(CONFIG_LINUX)) = tests/qemu-iotests/socket_scm_helper$(EXESUF)
-
-tests/qemu-iotests/socket_scm_helper$(EXESUF): tests/qemu-iotests/socket_scm_helper.o
-
-.PHONY: check-tests/check-block.sh
-check-tests/check-block.sh: tests/check-block.sh qemu-img$(EXESUF) \
-		qemu-io$(EXESUF) qemu-nbd$(EXESUF) $(QEMU_IOTESTS_HELPERS-y) \
-		$(patsubst %-softmmu,qemu-system-%,$(filter %-softmmu,$(TARGET_DIRS)))
-	@$<
-
 # Python venv for running tests
 
 .PHONY: check-venv check-acceptance
@@ -550,13 +538,13 @@ check-acceptance: check-venv $(TESTS_RESULTS_DIR) get-vm-images
 
 # Consolidated targets
 
-.PHONY: check-block check-unit check check-clean get-vm-images
+.PHONY: check-unit check check-clean get-vm-images
 ifeq ($(CONFIG_TOOLS),y)
 check-block: $(patsubst %,check-%, $(check-block-y))
 endif
 check-build: build-unit
 
-check: check-block check-unit
+check: check-unit
 check-clean:
 	rm -rf $(check-unit-y) tests/*.o tests/*/*.o $(QEMU_IOTESTS_HELPERS-y)
 	rm -f tests/test-qapi-gen-timestamp
@@ -568,8 +556,6 @@ clean: check-clean
 
 # Build the help program automatically
 
-all: $(QEMU_IOTESTS_HELPERS-y)
-
 -include $(wildcard tests/*.d)
 
 endif
tests/meson.build +4 -0
index d724402..f834c27 100644
@@ -1,3 +1,7 @@
+if have_system and 'CONFIG_POSIX' in config_host
+  subdir('qemu-iotests')
+endif
+
 test('decodetree', sh,
      args: [ files('decode/check.sh'), config_host['PYTHON'], files('../scripts/decodetree.py') ],
      workdir: meson.current_source_dir() / 'decode',
tests/qemu-iotests/meson.build new file +8 -0
new file mode 100644
index 0000000..60e81a2
@@ -0,0 +1,8 @@
+dep = [qemu_img, qemu_io, qemu_nbd, emulators]
+if 'CONFIG_LINUX' in config_host
+    dep += executable('socket_scm_helper', 'socket_scm_helper.c',
+                      build_by_default: false)
+endif
+test('qemu-iotests', sh, args: [files('../check-block.sh')], depends: dep,
+     suite: 'block', timeout: 10000)
+
Signature · 1 line
1.8.3.1
#177 lore raw

PATCH 137/143 rules.mak: drop unneeded macros

In reply to Paolo Bonzini
---
 .gitignore                  |   1 -
 Makefile                    |   7 +-
 configure                   |  32 +-----
 docs/devel/build-system.txt |   5 +-
 rules.mak                   | 231 +-------------------------------------------
 scripts/create_config       |   6 +-
 6 files changed, 14 insertions(+), 268 deletions(-)
.gitignore +0 -1
index de1f20e..5eaeada 100644
@@ -78,7 +78,6 @@
 *.msi
 *.dll
 *.so
-*.mo
 *.fn
 *.ky
 *.log
Makefile +2 -5
index 6735832..cc0b053 100644
@@ -127,7 +127,7 @@ endif
 
 include $(SRC_PATH)/tests/Makefile.include
 
-all: recurse-all modules
+all: recurse-all
 
 # LIBFDT_lib="": avoid breaking existing trees with objects requiring -fPIC
 DTC_MAKE_ARGS=-I$(SRC_PATH)/dtc VPATH=$(SRC_PATH)/dtc -C dtc V="$(V)" LIBFDT_lib=""
@@ -181,7 +181,7 @@ recurse-clean: $(addsuffix /clean, $(ROM_DIRS))
 clean: recurse-clean
 # avoid old build problems by removing potentially incorrect old files
 	rm -f config.mak op-i386.h opc-i386.h gen-op-i386.h op-arm.h opc-arm.h gen-op-arm.h
-	find . \( -name '*.so' -o -name '*.dll' -o -name '*.mo' -o -name '*.[oda]' \) -type f \
+	find . \( -name '*.so' -o -name '*.dll' -o -name '*.[oda]' \) -type f \
 		! -path ./roms/edk2/ArmPkg/Library/GccLto/liblto-aarch64.a \
 		! -path ./roms/edk2/ArmPkg/Library/GccLto/liblto-arm.a \
 		! -path ./roms/edk2/BaseTools/Source/Python/UPT/Dll/sqlite3.dll \
@@ -383,9 +383,6 @@ print-help = $(quiet-@)$(call print-help-run,$1,$2)
 help:
 	@echo  'Generic targets:'
 	$(call print-help,all,Build all)
-ifdef CONFIG_MODULES
-	$(call print-help,modules,Build all modules)
-endif
 	$(call print-help,dir/file.o,Build specified target only)
 	$(call print-help,install,Install QEMU, documentation and tools)
 	$(call print-help,ctags/TAGS,Generate tags file for editors)
configure +3 -29
index 08aee81..99ed6fa 100755
@@ -29,7 +29,6 @@ TMPC="${TMPDIR1}/${TMPB}.c"
 TMPO="${TMPDIR1}/${TMPB}.o"
 TMPCXX="${TMPDIR1}/${TMPB}.cxx"
 TMPE="${TMPDIR1}/${TMPB}.exe"
-TMPMO="${TMPDIR1}/${TMPB}.mo"
 TMPTXT="${TMPDIR1}/${TMPB}.txt"
 
 rm -f config.log
@@ -424,7 +423,7 @@ bigendian="no"
 mingw32="no"
 gcov="no"
 EXESUF=""
-DSOSUF=".so"
+HOST_DSOSUF=".so"
 LDFLAGS_SHARED="-shared"
 modules="no"
 module_upgrades="no"
@@ -958,7 +957,7 @@ fi
 
 if test "$mingw32" = "yes" ; then
   EXESUF=".exe"
-  DSOSUF=".dll"
+  HOST_DSOSUF=".dll"
   # MinGW needs -mthreads for TLS and macro _MT.
   QEMU_CFLAGS="-mthreads $QEMU_CFLAGS"
   LIBS="-lwinmm -lws2_32 $LIBS"
@@ -6205,31 +6204,6 @@ EOF
   fi
 fi
 
-#################################################
-# Sparc implicitly links with --relax, which is
-# incompatible with -r, so --no-relax should be
-# given. It does no harm to give it on other
-# platforms too.
-
-# Note: the prototype is needed since QEMU_CFLAGS
-#       contains -Wmissing-prototypes
-cat > $TMPC << EOF
-extern int foo(void);
-int foo(void) { return 0; }
-EOF
-if ! compile_object ""; then
-  error_exit "Failed to compile object file for LD_REL_FLAGS test"
-fi
-for i in '-Wl,-r -Wl,--no-relax' -Wl,-r -r; do
-  if do_cc -nostdlib $i -o $TMPMO $TMPO; then
-    LD_REL_FLAGS=$i
-    break
-  fi
-done
-if test "$modules" = "yes" && test "$LD_REL_FLAGS" = ""; then
-  feature_not_found "modules" "Cannot find how to build relocatable objects"
-fi
-
 ##########################################
 # check for sysmacros.h
 
@@ -7803,7 +7777,7 @@ echo "LIBS+=$LIBS" >> $config_host_mak
 echo "LIBS_TOOLS+=$libs_tools" >> $config_host_mak
 echo "PTHREAD_LIB=$PTHREAD_LIB" >> $config_host_mak
 echo "EXESUF=$EXESUF" >> $config_host_mak
-echo "DSOSUF=$DSOSUF" >> $config_host_mak
+echo "HOST_DSOSUF=$HOST_DSOSUF" >> $config_host_mak
 echo "LDFLAGS_SHARED=$LDFLAGS_SHARED" >> $config_host_mak
 echo "LIBS_QGA=$libs_qga" >> $config_host_mak
 echo "TASN1_LIBS=$tasn1_libs" >> $config_host_mak
docs/devel/build-system.txt +1 -4
index 41bd08e..fea67b2 100644
@@ -404,10 +404,7 @@ using Makefile.target for the build rules.
 - rules.mak
 
 This file provides the generic helper rules for invoking build tools, in
-particular the compiler and linker. This also contains the magic (hairy)
-'unnest-vars' function which is used to merge the variable definitions
-from all Makefile.objs in the source tree down into the main Makefile
-context.
+particular the compiler and linker.
 
 
 - default-configs/*.mak
rules.mak +5 -226

270 lines not on this page · raw message

scripts/create_config +3 -3
index bc82661..ec5c0b4 100755
@@ -91,6 +91,9 @@ case $line in
     name=${line%=*}
     echo "#define $name 1"
     ;;
+ HOST_DSOSUF=*)
+    echo "#define HOST_DSOSUF \"${line#*=}\""
+    ;;
  HOST_*=*) # configuration
     name=${line%=*}
     value=${line#*=}
@@ -123,9 +126,6 @@ case $line in
     value=${line#*=}
     echo "#define $name $value"
     ;;
- DSOSUF=*)
-    echo "#define HOST_DSOSUF \"${line#*=}\""
-    ;;
 esac
 
 done # read
Signature · 1 line
1.8.3.1
#178 lore raw

PATCH 138/143 meson: replace create-config with meson configure_file

In reply to Paolo Bonzini

Move the create-config logic to meson.build; create a configuration_data object and let meson handle the quoting and output.

---
 Makefile                       |   2 +-
 block.c                        |   4 +-
 configure                      |   9 ++-
 meson.build                    | 100 ++++++++++++++++++++++---------
 scripts/create_config          | 131 -----------------------------------------
 tests/qtest/bios-tables-test.c |   2 +-
 6 files changed, 80 insertions(+), 168 deletions(-)
 delete mode 100755 scripts/create_config
Makefile +1 -1
index cc0b053..bab1021 100644
@@ -190,7 +190,7 @@ clean: recurse-clean
 	rm -f fsdev/*.pod scsi/*.pod
 	rm -f $(foreach f,$(generated-files-y),$(f) $(f)-timestamp)
 
-VERSION ?= $(shell cat VERSION)
+VERSION = $(shell cat $(SRC_PATH)/VERSION)
 
 dist: qemu-$(VERSION).tar.bz2
 
block.c +2 -2
index 67c5028..67ca543 100644
@@ -443,13 +443,13 @@ static int bdrv_format_is_whitelisted(const char *format_name, bool read_only)
         return 1;               /* no whitelist, anything goes */
     }
 
-    for (p = whitelist_rw; *p; p++) {
+    for (p = whitelist_rw; p < &whitelist_rw[ARRAY_SIZE(whitelist_rw)]; p++) {
         if (!strcmp(format_name, *p)) {
             return 1;
         }
     }
     if (read_only) {
-        for (p = whitelist_ro; *p; p++) {
+        for (p = whitelist_ro; p < &whitelist_ro[ARRAY_SIZE(whitelist_ro)]; p++) {
             if (!strcmp(format_name, *p)) {
                 return 1;
             }
configure +4 -5
index 99ed6fa..13b03ac 100755
@@ -6905,7 +6905,7 @@ if test "$slirp" != "no"; then
   echo "SLIRP_LIBS=$slirp_libs" >> $config_host_mak
 fi
 if [ "$slirp" = "git" -o "$slirp" = "internal" ]; then
-    echo "config-host.h: slirp/all" >> $config_host_mak
+    echo "all Makefile: slirp/all" >> $config_host_mak
 fi
 if test "$vde" = "yes" ; then
   echo "CONFIG_VDE=y" >> $config_host_mak
@@ -6983,7 +6983,6 @@ if test "$xfs" = "yes" ; then
   echo "CONFIG_XFS=y" >> $config_host_mak
 fi
 qemu_version=$(head $source_path/VERSION)
-echo "VERSION=$qemu_version" >>$config_host_mak
 echo "PKGVERSION=$pkgversion" >>$config_host_mak
 echo "SRC_PATH=$source_path" >> $config_host_mak
 echo "TARGET_DIRS=$target_list" >> $config_host_mak
@@ -7742,7 +7741,7 @@ echo "GENISOIMAGE=$genisoimage" >> $config_host_mak
 echo "MESON=$meson" >> $config_host_mak
 echo "CC=$cc" >> $config_host_mak
 if $iasl -h > /dev/null 2>&1; then
-  echo "IASL=$iasl" >> $config_host_mak
+  echo "CONFIG_IASL=$iasl" >> $config_host_mak
 fi
 echo "HOST_CC=$host_cc" >> $config_host_mak
 echo "CXX=$cxx" >> $config_host_mak
@@ -8271,10 +8270,10 @@ echo "PIXMAN_CFLAGS=$pixman_cflags" >> $config_host_mak
 echo "PIXMAN_LIBS=$pixman_libs" >> $config_host_mak
 
 if [ "$fdt" = "git" ]; then
-  echo "config-host.h: dtc/all" >> $config_host_mak
+  echo "all Makefile: dtc/all" >> $config_host_mak
 fi
 if [ "$capstone" = "git" -o "$capstone" = "internal" ]; then
-  echo "config-host.h: capstone/all" >> $config_host_mak
+  echo "all Makefile: capstone/all" >> $config_host_mak
 fi
 if test -n "$LIBCAPSTONE"; then
   echo "LIBCAPSTONE=$LIBCAPSTONE" >> $config_host_mak
meson.build +72 -28

180 lines not on this page · raw message

scripts/create_config deleted +0 -131

131 lines not on this page · raw message

tests/qtest/bios-tables-test.c +1 -1
index d49b398..d25ff35 100644
@@ -88,7 +88,7 @@ typedef struct {
 static char disk[] = "tests/acpi-test-disk-XXXXXX";
 static const char *data_dir = "tests/data/acpi";
 #ifdef CONFIG_IASL
-static const char *iasl = stringify(CONFIG_IASL);
+static const char *iasl = CONFIG_IASL;
 #else
 static const char *iasl;
 #endif
Signature · 1 line
1.8.3.1
#179 lore raw

PATCH 139/143 meson: convert sample plugins

In reply to Paolo Bonzini
---
 configure                |  4 ----
 tests/Makefile.include   |  9 ---------
 tests/meson.build        |  3 +++
 tests/plugin/Makefile    | 46 ----------------------------------------------
 tests/plugin/meson.build |  7 +++++++
 5 files changed, 10 insertions(+), 59 deletions(-)
 delete mode 100644 tests/plugin/Makefile
 create mode 100644 tests/plugin/meson.build
configure +0 -4
index 13b03ac..a0b51d0 100755
@@ -6823,9 +6823,6 @@ echo "GIT_UPDATE=$git_update" >> $config_host_mak
 
 echo "ARCH=$ARCH" >> $config_host_mak
 
-echo "GLIB_CFLAGS=$glib_cflags" >> $config_host_mak
-echo "GLIB_LDFLAGS=$glib_ldflags" >> $config_host_mak
-
 if test "$default_devices" = "yes" ; then
   echo "CONFIG_MINIKCONF_MODE=--defconfig" >> $config_host_mak
 else
@@ -8310,7 +8307,6 @@ DIRS="$DIRS roms/seabios"
 LINKS="Makefile"
 LINKS="$LINKS tests/tcg/lm32/Makefile po/Makefile"
 LINKS="$LINKS tests/tcg/Makefile.target"
-LINKS="$LINKS tests/plugin/Makefile"
 LINKS="$LINKS pc-bios/optionrom/Makefile pc-bios/keymaps"
 LINKS="$LINKS pc-bios/s390-ccw/Makefile"
 LINKS="$LINKS roms/seabios/Makefile"
tests/Makefile.include +0 -9
index a1e4871..89eeeaa 100644
@@ -436,15 +436,6 @@ check-speed: $(check-speed-y)
 check-report-unit.tap: $(check-unit-y)
 	$(call do_test_tap,$^)
 
-# Plugins
-ifeq ($(CONFIG_PLUGIN),y)
-.PHONY: plugins
-plugins:
-	$(call quiet-command,\
-		$(MAKE) $(SUBDIR_MAKEFLAGS) -C tests/plugin V="$(V)", \
-		"BUILD", "plugins")
-endif
-
 # Per guest TCG tests
 
 BUILD_TCG_TARGET_RULES=$(patsubst %,build-tcg-tests-%, $(TARGET_DIRS))
tests/meson.build +3 -0
index f834c27..fe2c6d8 100644
@@ -9,6 +9,9 @@ test('decodetree', sh,
 
 if 'CONFIG_TCG' in config_host
   subdir('fp')
+  if 'CONFIG_PLUGIN' in config_host
+    subdir('plugin')
+  endif
 endif
 
 subdir('qapi-schema')
tests/plugin/Makefile deleted +0 -46

46 lines not on this page · raw message

tests/plugin/meson.build new file +7 -0
new file mode 100644
index 0000000..dbbdcba
@@ -0,0 +1,7 @@
+t = []
+foreach i : ['bb', 'empty', 'insn', 'mem', 'hotblocks', 'howvec', 'hotpages', 'lockstep']
+  t += shared_module(i, files(i + '.c'),
+                     include_directories: '../../include/qemu',
+                     dependencies: glib)
+endforeach
+alias_target('plugins', t)
Signature · 1 line
1.8.3.1
#180 lore raw

PATCH 140/143 meson: move SDL and SDL-image detection to meson

In reply to Paolo Bonzini
---
 chardev/meson.build |   2 +-
 configure           | 142 +++-------------------------------------------------
 meson.build         |  24 ++++++---
 meson_options.txt   |   2 +
 ui/meson.build      |   4 +-
 5 files changed, 30 insertions(+), 144 deletions(-)
 create mode 100644 meson_options.txt
chardev/meson.build +1 -1
index 2122505..a0aaafa 100644
@@ -36,7 +36,7 @@ softmmu_ss.add(when: ['CONFIG_SPICE', spice], if_true: files('spice.c'))
 
 chardev_modules = []
 
-if config_host.has_key('CONFIG_BRLAPI') and config_host.has_key('CONFIG_SDL')
+if config_host.has_key('CONFIG_BRLAPI') and sdl.found()
   chardev_modules += [['baum', files('baum.c'), [sdl, brlapi]]]
 endif
 
configure +8 -134

181 lines not on this page · raw message

meson.build +17 -7
index cb2ffd6..8bb0c69 100644
@@ -201,13 +201,21 @@ brlapi = not_found
 if 'CONFIG_BRLAPI' in config_host
   brlapi = declare_dependency(link_args: config_host['BRLAPI_LIBS'].split())
 endif
+
+sdl = dependency('sdl2', method: 'config-tool', required: get_option('sdl'))
+sdl_image = not_found
 sdlwindows = false
-sdl = not_found
-if 'CONFIG_SDL' in config_host
-  sdl = declare_dependency(compile_args: config_host['SDL_CFLAGS'].split(),
-                           link_args: config_host['SDL_LIBS'].split())
-  sdlwindows = config_host['SDL_LIBS'].contains('-mwindows')
+if sdl.found()
+  sdlwindows = sdl.get_configtool_variable('libs').split().contains('-mwindows')
+  sdl_image = dependency('sdl-image', required: get_option('sdl_image'))
+else
+  if get_option('sdl_image').enabled()
+    error('sdl-image required, but SDL was @0@',
+          get_option('sdl').disabled() ? 'disabled' : 'not found')
+  endif
+  sdl_image = not_found
 endif
+
 rbd = not_found
 if 'CONFIG_RBD' in config_host
   rbd = declare_dependency(link_args: config_host['RBD_LIBS'].split())
@@ -346,6 +354,8 @@ endif
 
 # Create config-host.h
 
+config_host_data.set('CONFIG_SDL', sdl.found())
+config_host_data.set('CONFIG_SDL_IMAGE', sdl_image.found())
 config_host_data.set('QEMU_VERSION', '"@0@"'.format(meson.project_version()))
 config_host_data.set('QEMU_VERSION_MAJOR', meson.project_version().split('.')[0])
 config_host_data.set('QEMU_VERSION_MINOR', meson.project_version().split('.')[1])
@@ -1219,8 +1229,8 @@ if targetos == 'darwin'
   summary_info += {'Cocoa support': config_host.has_key('CONFIG_COCOA')}
 endif
 # TODO: add back version
-summary_info += {'SDL support':       config_host.has_key('CONFIG_SDL')}
-summary_info += {'SDL image support': config_host.has_key('CONFIG_SDL_IMAGE')}
+summary_info += {'SDL support':       sdl.found()}
+summary_info += {'SDL image support': sdl_image.found()}
 # TODO: add back version
 summary_info += {'GTK support':       config_host.has_key('CONFIG_GTK')}
 summary_info += {'GTK GL support':    config_host.has_key('CONFIG_GTK_GL')}
meson_options.txt new file +2 -0
new file mode 100644
index 0000000..e548211
@@ -0,0 +1,2 @@
+option('sdl', type : 'feature', value : 'auto')
+option('sdl_image', type : 'feature', value : 'auto')
ui/meson.build +2 -2
index 36a70c3..2822ad9 100644
@@ -54,11 +54,11 @@ if config_host.has_key('CONFIG_GTK') and config_host.has_key('CONFIG_VTE')
   ui_modules += [['gtk', gtk_ss.sources(), gtk_ss.dependencies()]]
 endif
 
-if config_host.has_key('CONFIG_SDL')
+if sdl.found()
   softmmu_ss.add(when: 'CONFIG_WIN32', if_true: files('win32-kbd-hook.c'))
 
   sdl_ss = ss.source_set()
-  sdl_ss.add(pixman, glib, files(
+  sdl_ss.add(sdl, sdl_image, pixman, glib, files(
     'sdl2-2d.c',
     'sdl2-input.c',
     'sdl2.c',
Signature · 1 line
1.8.3.1
#181 lore raw

PATCH 141/143 meson: convert VNC and dependent libraries to meson

In reply to Paolo Bonzini
---
 configure         | 122 ++++++------------------------------------------------
 meson.build       |  42 ++++++++++---------
 meson_options.txt |   4 ++
 ui/meson.build    |  10 ++---
 4 files changed, 44 insertions(+), 134 deletions(-)
configure +13 -109
index 288a75f..cd1ab0c 100755
@@ -381,12 +381,12 @@ sdl="auto"
 sdl_image="auto"
 virtfs=""
 mpath=""
-vnc="yes"
+vnc="enabled"
 sparse="no"
 vde=""
-vnc_sasl=""
-vnc_jpeg=""
-vnc_png=""
+vnc_sasl="auto"
+vnc_jpeg="auto"
+vnc_png="auto"
 xkbcommon=""
 xen=""
 xen_ctrl_version=""
@@ -1112,9 +1112,9 @@ for opt do
   ;;
   --enable-mpath) mpath="yes"
   ;;
-  --disable-vnc) vnc="no"
+  --disable-vnc) vnc="disabled"
   ;;
-  --enable-vnc) vnc="yes"
+  --enable-vnc) vnc="enabled"
   ;;
   --oss-lib=*) oss_lib="$optarg"
   ;;
@@ -1150,17 +1150,17 @@ for opt do
   ;;
   --disable-strip) strip_opt="no"
   ;;
-  --disable-vnc-sasl) vnc_sasl="no"
+  --disable-vnc-sasl) vnc_sasl="disabled"
   ;;
-  --enable-vnc-sasl) vnc_sasl="yes"
+  --enable-vnc-sasl) vnc_sasl="enabled"
   ;;
-  --disable-vnc-jpeg) vnc_jpeg="no"
+  --disable-vnc-jpeg) vnc_jpeg="disabled"
   ;;
-  --enable-vnc-jpeg) vnc_jpeg="yes"
+  --enable-vnc-jpeg) vnc_jpeg="enabled"
   ;;
-  --disable-vnc-png) vnc_png="no"
+  --disable-vnc-png) vnc_png="disabled"
   ;;
-  --enable-vnc-png) vnc_png="yes"
+  --enable-vnc-png) vnc_png="enabled"
   ;;
   --disable-slirp) slirp="no"
   ;;
@@ -3369,85 +3369,6 @@ EOF
 fi
 
 ##########################################
-# VNC SASL detection
-if test "$vnc" = "yes" && test "$vnc_sasl" != "no" ; then
-  cat > $TMPC <<EOF
-#include <sasl/sasl.h>
-#include <stdio.h>
-int main(void) { sasl_server_init(NULL, "qemu"); return 0; }
-EOF
-  # Assuming Cyrus-SASL installed in /usr prefix
-  # QEMU defines struct iovec in "qemu/osdep.h",
-  # we don't want libsasl to redefine it in <sasl/sasl.h>.
-  vnc_sasl_cflags="-DSTRUCT_IOVEC_DEFINED"
-  vnc_sasl_libs="-lsasl2"
-  if compile_prog "$vnc_sasl_cflags" "$vnc_sasl_libs" ; then
-    vnc_sasl=yes
-    libs_softmmu="$vnc_sasl_libs $libs_softmmu"
-    QEMU_CFLAGS="$QEMU_CFLAGS $vnc_sasl_cflags"
-  else
-    if test "$vnc_sasl" = "yes" ; then
-      feature_not_found "vnc-sasl" "Install Cyrus SASL devel"
-    fi
-    vnc_sasl=no
-  fi
-fi
-
-##########################################
-# VNC JPEG detection
-if test "$vnc" = "yes" && test "$vnc_jpeg" != "no" ; then
-cat > $TMPC <<EOF
-#include <stdio.h>
-#include <jpeglib.h>
-int main(void) { struct jpeg_compress_struct s; jpeg_create_compress(&s); return 0; }
-EOF
-    vnc_jpeg_cflags=""
-    vnc_jpeg_libs="-ljpeg"
-  if compile_prog "$vnc_jpeg_cflags" "$vnc_jpeg_libs" ; then
-    vnc_jpeg=yes
-    libs_softmmu="$vnc_jpeg_libs $libs_softmmu"
-    QEMU_CFLAGS="$QEMU_CFLAGS $vnc_jpeg_cflags"
-  else
-    if test "$vnc_jpeg" = "yes" ; then
-      feature_not_found "vnc-jpeg" "Install libjpeg-turbo devel"
-    fi
-    vnc_jpeg=no
-  fi
-fi
-
-##########################################
-# VNC PNG detection
-if test "$vnc" = "yes" && test "$vnc_png" != "no" ; then
-cat > $TMPC <<EOF
-//#include <stdio.h>
-#include <png.h>
-#include <stddef.h>
-int main(void) {
-    png_structp png_ptr;
-    png_ptr = png_create_write_struct(PNG_LIBPNG_VER_STRING, NULL, NULL, NULL);
-    return png_ptr != 0;
-}
-EOF
-  if $pkg_config libpng --exists; then
-    vnc_png_cflags=$($pkg_config libpng --cflags)
-    vnc_png_libs=$($pkg_config libpng --libs)
-  else
-    vnc_png_cflags=""
-    vnc_png_libs="-lpng"
-  fi
-  if compile_prog "$vnc_png_cflags" "$vnc_png_libs" ; then
-    vnc_png=yes
-    libs_softmmu="$vnc_png_libs $libs_softmmu"
-    QEMU_CFLAGS="$QEMU_CFLAGS $vnc_png_cflags"
-  else
-    if test "$vnc_png" = "yes" ; then
-      feature_not_found "vnc-png" "Install libpng devel"
-    fi
-    vnc_png=no
-  fi
-fi
-
-##########################################
 # xkbcommon probe
 if test "$xkbcommon" != "no" ; then
   if $pkg_config xkbcommon --exists; then
@@ -6834,24 +6755,6 @@ if test "$audio_win_int" = "yes" ; then
 fi
 echo "CONFIG_BDRV_RW_WHITELIST=$block_drv_rw_whitelist" >> $config_host_mak
 echo "CONFIG_BDRV_RO_WHITELIST=$block_drv_ro_whitelist" >> $config_host_mak
-if test "$vnc" = "yes" ; then
-  echo "CONFIG_VNC=y" >> $config_host_mak
-fi
-if test "$vnc_sasl" = "yes" ; then
-  echo "CONFIG_VNC_SASL=y" >> $config_host_mak
-fi
-echo "SASL_CFLAGS=$vnc_sasl_cflags" >> $config_host_mak
-echo "SASL_LIBS=$vnc_sasl_libs" >> $config_host_mak
-if test "$vnc_jpeg" = "yes" ; then
-  echo "CONFIG_VNC_JPEG=y" >> $config_host_mak
-fi
-echo "JPEG_CFLAGS=$vnc_jpeg_cflags" >> $config_host_mak
-echo "JPEG_LIBS=$vnc_jpeg_libs" >> $config_host_mak
-if test "$vnc_png" = "yes" ; then
-  echo "CONFIG_VNC_PNG=y" >> $config_host_mak
-fi
-echo "PNG_CFLAGS=$vnc_png_cflags" >> $config_host_mak
-echo "PNG_LIBS=$vnc_png_libs" >> $config_host_mak
 if test "$xkbcommon" = "yes" ; then
   echo "CONFIG_XKBCOMMON=y" >> $config_host_mak
   echo "XKBCOMMON_CFLAGS=$xkbcommon_cflags" >> $config_host_mak
@@ -8298,6 +8201,7 @@ NINJA=$PWD/ninjatool $python $meson setup \
         -Db_pie=$(if test "$pie" = yes; then echo true; else echo false; fi) \
         -Db_coverage=$(if test "$gcov" = yes; then echo true; else echo false; fi) \
 	-Dsdl=$sdl -Dsdl_image=$sdl_image \
+	-Dvnc=$vnc -Dvnc_sasl=$vnc_sasl -Dvnc_jpeg=$vnc_jpeg -Dvnc_png=$vnc_png \
         $cross_arg \
         "$PWD" "$source_path"
 
meson.build +23 -19

60 lines not on this page · raw message

meson_options.txt +4 -0
index e548211..67455c5 100644
@@ -1,2 +1,6 @@
 option('sdl', type : 'feature', value : 'auto')
 option('sdl_image', type : 'feature', value : 'auto')
+option('vnc', type : 'feature', value : 'enabled')
+option('vnc_jpeg', type : 'feature', value : 'auto')
+option('vnc_png', type : 'feature', value : 'auto')
+option('vnc_sasl', type : 'feature', value : 'auto')
ui/meson.build +4 -6
index 2822ad9..1504338 100644
@@ -27,14 +27,12 @@ vnc_ss.add(files(
   'vnc-ws.c',
   'vnc-jobs.c',
 ))
-vnc_ss.add(zlib)
-vnc_ss.add(when: 'CONFIG_VNC_SASL', if_true: [files('vnc-auth-sasl.c'), sasl])
-softmmu_ss.add_all(when: 'CONFIG_VNC', if_true: vnc_ss)
-softmmu_ss.add(when: 'CONFIG_VNC', if_false: files('vnc-stubs.c'))
+vnc_ss.add(zlib, png, jpeg)
+vnc_ss.add(when: sasl, if_true: files('vnc-auth-sasl.c'))
+softmmu_ss.add_all(when: vnc, if_true: vnc_ss)
+softmmu_ss.add(when: vnc, if_false: files('vnc-stubs.c'))
 softmmu_ss.add(when: [opengl, 'CONFIG_OPENGL'], if_true: files('shader.c', 'console-gl.c', 'egl-helpers.c', 'egl-context.c'))
 softmmu_ss.add(when: [opengl, 'CONFIG_OPENGL_DMABUF'], if_true: files('egl-headless.c'))
-softmmu_ss.add(when: 'CONFIG_VNC_PNG', if_true: png)
-softmmu_ss.add(when: 'CONFIG_VNC_JPEG', if_true: jpeg)
 
 ui_modules = []
 
Signature · 1 line
1.8.3.1
#182 lore raw

PATCH 142/143 meson: convert po/

In reply to Paolo Bonzini

From: Marc-André Lureau <[email protected]>

---
 Makefile       |  5 +---
 configure      |  2 +-
 meson.build    |  3 +++
 po/LINGUAS     |  7 ++++++
 po/Makefile    | 52 -----------------------------------------
 po/POTFILES    |  1 +
 po/meson.build |  5 ++++
 po/messages.po | 74 ----------------------------------------------------------
 8 files changed, 18 insertions(+), 131 deletions(-)
 create mode 100644 po/LINGUAS
 delete mode 100644 po/Makefile
 create mode 100644 po/POTFILES
 create mode 100644 po/meson.build
 delete mode 100644 po/messages.po
Makefile +1 -4
index bab1021..a0867c5 100644
@@ -201,7 +201,7 @@ distclean: clean
 	rm -f config-host.mak config-host.h*
 	rm -f tests/tcg/config-*.mak
 	rm -f config-all-disas.mak config.status
-	rm -f po/*.mo tests/qemu-iotests/common.env
+	rm -f tests/qemu-iotests/common.env
 	rm -f roms/seabios/config.mak roms/vgabios/config.mak
 	rm -f qemu-plugins-ld.symbols qemu-plugins-ld64.symbols
 	rm -f config.log
@@ -297,9 +297,6 @@ endif
 	mkdir -p "$(DESTDIR)$(qemu_desktopdir)"
 	$(INSTALL_DATA) $(SRC_PATH)/ui/qemu.desktop \
 		"$(DESTDIR)$(qemu_desktopdir)/qemu.desktop"
-ifdef CONFIG_GTK
-	$(MAKE) -C po $@
-endif
 	$(INSTALL_DIR) "$(DESTDIR)$(qemu_datadir)/keymaps"
 	set -e; for x in $(KEYMAPS); do \
 		$(INSTALL_DATA) $(SRC_PATH)/pc-bios/keymaps/$$x "$(DESTDIR)$(qemu_datadir)/keymaps"; \
configure +1 -1
index cd1ab0c..5ad0f4c 100755
@@ -8081,7 +8081,7 @@ DIRS="$DIRS docs docs/interop fsdev scsi"
 DIRS="$DIRS pc-bios/optionrom pc-bios/s390-ccw"
 DIRS="$DIRS roms/seabios"
 LINKS="Makefile"
-LINKS="$LINKS tests/tcg/lm32/Makefile po/Makefile"
+LINKS="$LINKS tests/tcg/lm32/Makefile"
 LINKS="$LINKS tests/tcg/Makefile.target"
 LINKS="$LINKS pc-bios/optionrom/Makefile pc-bios/keymaps"
 LINKS="$LINKS pc-bios/s390-ccw/Makefile"
meson.build +3 -0
index 913f22d..e9fd237 100644
@@ -1091,6 +1091,9 @@ subdir('tools')
 subdir('pc-bios')
 subdir('tests')
 subdir('docs')
+if 'CONFIG_GTK' in config_host
+  subdir('po')
+endif
 
 if build_docs
   makeinfo = find_program('makeinfo', required: build_docs)
po/LINGUAS new file +7 -0
new file mode 100644
index 0000000..054930d
@@ -0,0 +1,7 @@
+bg
+de_DE
+fr_FR
+hu
+it
+tr
+zh_CN
po/Makefile deleted +0 -52

52 lines not on this page · raw message

po/POTFILES new file +1 -0
new file mode 100644
index 0000000..d34d5ed
@@ -0,0 +1 @@
+ui/gtk.c
po/meson.build new file +5 -0
new file mode 100644
index 0000000..b99d8e2
@@ -0,0 +1,5 @@
+i18n = import('i18n')
+
+i18n.gettext(meson.project_name(),
+             args: '[email protected]',
+             preset: 'glib')
po/messages.po deleted +0 -74

74 lines not on this page · raw message

Signature · 1 line
1.8.3.1
#183 lore raw

PATCH 143/143 meson: update build-system documentation

In reply to Paolo Bonzini
---
 docs/devel/build-system.txt | 373 ++++++++++++++++++++++----------------------
 1 file changed, 185 insertions(+), 188 deletions(-)
docs/devel/build-system.txt +185 -188
index fea67b2..fb62cb2 100644
@@ -22,6 +22,30 @@ silent while it is checking for features. It will only display output
 when an error occurs, or to show the final feature enablement summary
 on completion.
 
+Because QEMU uses the Meson build system under the hood, only VPATH
+builds are supported.  There are two general ways to invoke configure &
+perform a build:
+
+ - VPATH, build artifacts outside of QEMU source tree entirely
+
+     cd ../
+     mkdir build
+     cd build
+     ../qemu/configure
+     make
+
+ - VPATH, build artifacts in a subdir of QEMU source tree
+
+     mkdir build
+     cd build
+     ../configure
+     make
+
+For now, checks on the compilation environment are found in configure
+rather than meson.build, though this is expected to change.  The command
+line is parsed in the configure script and, whenever needed, converted
+into the appropriate options to Meson.
+
 Adding new checks to the configure script usually comprises the
 following tasks:
 
@@ -164,145 +188,161 @@ developers in checking for system features:
    then --static will be automatically added to $ARGS
 
 
-Stage 2: makefiles
-==================
-
-The use of GNU make is required with the QEMU build system.
-
-Although the source code is spread across multiple subdirectories, the
-build system should be considered largely non-recursive in nature, in
-contrast to common practices seen with automake. There is some recursive
-invocation of make, but this is related to the things being built,
-rather than the source directory structure.
-
-QEMU currently supports both VPATH and non-VPATH builds, so there are
-three general ways to invoke configure & perform a build.
+Stage 2: Meson
+==============
 
- - VPATH, build artifacts outside of QEMU source tree entirely
+The Meson build system is currently used to describe the build
+process for:
 
-     cd ../
-     mkdir build
-     cd build
-     ../qemu/configure
-     make
-
- - VPATH, build artifacts in a subdir of QEMU source tree
+1) executables, which include:
+   - Tools - qemu-img, qemu-nbd, qga (guest agent), etc
+   - System emulators - qemu-system-$ARCH
+   - Userspace emulators - qemu-$ARCH
+   - Some (but not all) unit tests
 
-     mkdir build
-     cd build
-     ../configure
-     make
+2) documentation
 
- - non-VPATH, build artifacts everywhere
+3) ROMs, which can be either installed as binary blobs or compiled
 
-     ./configure
-     make
+4) other data files, such as icons or desktop files
 
-The QEMU maintainers generally recommend that a VPATH build is used by
-developers. Patches to QEMU are expected to ensure VPATH build still
-works.
+The source code is highly modularized, split across many files to
+facilitate building of all of these components with as little duplicated
+compilation as possible. The Meson "sourceset" functionality is used
+to list the files and their dependency on various configuration  
+symbols.
 
+Various subsystems that are common to both tools and emulators have
+their own sourceset, for example block_ss for the block device subsystem,
+chardev_ss for the character device subsystem, etc.  These sourcesets
+are then turned into static libraries as follows:
 
-Module structure
-----------------
+    libchardev = static_library('chardev', chardev_ss.sources(),
+                                name_suffix: 'fa',
+                                build_by_default: false)
 
-There are a number of key outputs of the QEMU build system:
+    chardev = declare_dependency(link_whole: libchardev)
 
- - Tools - qemu-img, qemu-nbd, qga (guest agent), etc
- - System emulators - qemu-system-$ARCH
- - Userspace emulators - qemu-$ARCH
- - Unit tests
+The special ".fa" suffix is needed as long as unit tests are built with
+the older Makefile infrastructure, and will go away later.
 
-The source code is highly modularized, split across many files to
-facilitate building of all of these components with as little duplicated
-compilation as possible. There can be considered to be two distinct
-groups of files, those which are independent of the QEMU emulation
-target and those which are dependent on the QEMU emulation target.
+Files linked into emulator targets there can be split into two distinct groups
+of files, those which are independent of the QEMU emulation target and
+those which are dependent on the QEMU emulation target.
 
 In the target-independent set lives various general purpose helper code,
 such as error handling infrastructure, standard data structures,
 platform portability wrapper functions, etc. This code can be compiled
 once only and the .o files linked into all output binaries.
+Target-independent code lives in the common_ss, softmmu_ss and user_ss
+sourcesets.  common_ss is linked into all emulators, softmmu_ss only
+in system emulators, user_ss only in user-mode emulators.
 
 In the target-dependent set lives CPU emulation, device emulation and
 much glue code. This sometimes also has to be compiled multiple times,
 once for each target being built.
 
-The utility code that is used by all binaries is built into a
-static archive called libqemuutil.a, which is then linked to all the
-binaries. In order to provide hooks that are only needed by some of the
-binaries, code in libqemuutil.a may depend on other functions that are
-not fully implemented by all QEMU binaries.  Dummy stubs for all these
-functions are also provided by this library, and will only be linked
+All binaries link with a static library libqemuutil.a, which is then
+linked to all the binaries.  libqemuutil.a is built from several
+sourcesets; most of them however host generated code, and the only two
+of general interest are util_ss and stub_ss.
+
+The separation between these two is purely for documentation purposes.
+util_ss contains generic utility files.  Even though this code is only
+linked in some binaries, sometimes it requires hooks only in some of
+these and depend on other functions that are not fully implemented by
+all QEMU binaries.  stub_ss links dummy stubs that will only be linked
 into the binary if the real implementation is not present.  In a way,
 the stubs can be thought of as a portable implementation of the weak
 symbols concept.
 
-All binaries should link to libqemuutil.a, e.g.:
+The following files concur in the definition of which files are linked
+into each emulator:
 
- qemu-img$(EXESUF): qemu-img.o ..snip.. libqemuutil.a
+- default-configs/*.mak
+
+The files under default-configs/ control what emulated hardware is built
+into each QEMU system and userspace emulator targets. They merely contain
+a list of config variable definitions like the machines that should be
+included. For example, default-configs/aarch64-softmmu.mak has:
 
+  include arm-softmmu.mak
+  CONFIG_XLNX_ZYNQMP_ARM=y
+  CONFIG_XLNX_VERSAL=y
 
-Windows platform portability
-----------------------------
+These files rarely need changing unless new devices / hardware need to
+be enabled for a particular system/userspace emulation target
 
-On Windows, all binaries have the suffix '.exe', so all Makefile rules
-which create binaries must include the $(EXESUF) variable on the binary
-name. e.g.
+- */Kconfig
 
- qemu-img$(EXESUF): qemu-img.o ..snip..
+These files are processed together with default-configs/*.mak and
+describe the dependencies between various features, subsystems and
+device models.  They are described in kconfig.rst.
 
-This expands to '.exe' on Windows, or '' on other platforms.
 
-A further complication for the system emulator binaries is that
-two separate binaries need to be generated.
+Stage 3: makefiles
+==================
 
-The main binary (e.g. qemu-system-x86_64.exe) is linked against the
-Windows console runtime subsystem. These are expected to be run from a
-command prompt window, and so will print stderr to the console that
-launched them.
+The use of GNU make is required with the QEMU build system.
 
-The second binary generated has a 'w' on the end of its name (e.g.
-qemu-system-x86_64w.exe) and is linked against the Windows graphical
-runtime subsystem. These are expected to be run directly from the
-desktop and will open up a dedicated console window for stderr output.
+The output of Meson is a build.ninja file, which is used with the Ninja
+build system.  QEMU uses a different approach, where Makefile rules are
+synthesized from the build.ninja file.  The main Makefile includes these
+rules and wraps them so that e.g. submodules are built before QEMU.
+The resulting build system is largely non-recursive in nature, in
+contrast to common practices seen with automake.
 
-The Makefile.target will generate the binary for the graphical subsystem
-first, and then use objcopy to relink it against the console subsystem
-to generate the second binary.
+Tests are also ran by the Makefile with the traditional "make check"
+phony target.  Meson test suites such as "unit" can be ran with "make
+check-unit" too.  It is also possible to run tests defined in meson.build
+with "meson test".
 
+The following text is only relevant for unit tests which still have to
+be converted to Meson.
 
-Object variable naming
-----------------------
+All binaries should link to libqemuutil.a, e.g.:
+
+   qemu-img$(EXESUF): qemu-img.o ..snip.. libqemuutil.a
+
+On Windows, all binaries have the suffix '.exe', so all Makefile rules
+which create binaries must include the $(EXESUF) variable on the binary
+name. e.g.
+
+   qemu-img$(EXESUF): qemu-img.o ..snip..
+
+This expands to '.exe' on Windows, or '' on other platforms.
+
+Variable naming
+---------------
 
 The QEMU convention is to define variables to list different groups of
-object files. These are named with the convention $PREFIX-obj-y. For
-example the libqemuutil.a file will be linked with all objects listed
-in a variable 'util-obj-y'. So, for example, util/Makefile.obj will
-contain a set of definitions looking like
+object files. These are named with the convention $PREFIX-obj-y.  The
+Meson "chardev" variable in the previous example corresponds to a
+variable 'chardev-obj-y'.
+
+Likewise, tests that are executed by "make check-unit" are grouped into
+a variable check-unit-y, like this:
 
-  util-obj-y += bitmap.o bitops.o hbitmap.o
-  util-obj-y += fifo8.o
-  util-obj-y += acl.o
-  util-obj-y += error.o qemu-error.o
+  check-unit-y += tests/test-visitor-serialization$(EXESUF)
+  check-unit-y += tests/test-iov$(EXESUF)
+  check-unit-y += tests/test-bitmap$(EXESUF)
 
-When there is an object file which needs to be conditionally built based
+When a test or object file which needs to be conditionally built based
 on some characteristic of the host system, the configure script will
 define a variable for the conditional. For example, on Windows it will
 define $(CONFIG_POSIX) with a value of 'n' and $(CONFIG_WIN32) with a
 value of 'y'. It is now possible to use the config variables when
 listing object files. For example,
 
-  util-obj-$(CONFIG_WIN32) += oslib-win32.o qemu-thread-win32.o
-  util-obj-$(CONFIG_POSIX) += oslib-posix.o qemu-thread-posix.o
+  check-unit-$(CONFIG_POSIX) += tests/test-vmstate$(EXESUF)
 
 On Windows this expands to
 
-  util-obj-y += oslib-win32.o qemu-thread-win32.o
-  util-obj-n += oslib-posix.o qemu-thread-posix.o
+  check-unit-n += tests/vmstate.exe
 
-Since libqemutil.a links in $(util-obj-y), the POSIX specific files
-listed against $(util-obj-n) are ignored on the Windows platform builds.
+Since the "check-unit" target only runs tests included in "$(check-unit-y)",
+POSIX specific tests listed in $(util-obj-n) are ignored on the Windows
+platform builds.
 
 
 CFLAGS / LDFLAGS / LIBS handling
@@ -316,27 +356,25 @@ avoided in QEMU, since it would apply to too many build targets.
 Flags that are needed by any QEMU code (i.e. everything *except* GIT
 submodule projects) are put in $(QEMU_CFLAGS) variable. For linker
 flags the $(LIBS) variable is sometimes used, but a couple of more
-targeted variables are preferred. $(libs_softmmu) is used for
-libraries that must be linked to system emulator targets, $(LIBS_TOOLS)
-is used for tools like qemu-img, qemu-nbd, etc and $(LIBS_QGA) is used
-for the QEMU guest agent. There is currently no specific variable for
-the userspace emulator targets as the global $(LIBS), or more targeted
-variables shown below, are sufficient.
+targeted variables are preferred.
 
 In addition to these variables, it is possible to provide cflags and
 libs against individual source code files, by defining variables of the
-form $FILENAME-cflags and $FILENAME-libs. For example, the curl block
-driver needs to link to the libcurl library, so block/Makefile defines
-some variables:
+form $FILENAME-cflags and $FILENAME-libs. For example, the test
+test-crypto-tlscredsx509 needs to link to the libtasn1 library,
+so tests/Makefile.include defines some variables:
 
-  curl.o-cflags      := $(CURL_CFLAGS)
-  curl.o-libs        := $(CURL_LIBS)
+  tests/crypto-tls-x509-helpers.o-cflags := $(TASN1_CFLAGS)
+  tests/crypto-tls-x509-helpers.o-libs := $(TASN1_LIBS)
 
 The scope is a little different between the two variables. The libs get
 used when linking any target binary that includes the curl.o object
 file, while the cflags get used when compiling the curl.c file only.
 
 
+Important files for the build system
+====================================
+
 Statically defined files
 ------------------------
 
@@ -348,81 +386,26 @@ number of dynamically created files listed later.
 
 The main entry point used when invoking make to build all the components
 of QEMU. The default 'all' target will naturally result in the build of
-every component. The various tools and helper binaries are built
+every component. Makefile takes care of recursively building submodules
 directly via a non-recursive set of rules.
 
-Each system/userspace emulation target needs to have a slightly
-different set of make rules / variables. Thus, make will be recursively
-invoked for each of the emulation targets.
-
-The recursive invocation will end up processing the toplevel
-Makefile.target file (more on that later).
-
-
-- */Makefile.objs
-
-Since the source code is spread across multiple directories, the rules
-for each file are similarly modularized. Thus each subdirectory
-containing .c files will usually also contain a Makefile.objs file.
-These files are not directly invoked by a recursive make, but instead
-they are imported by the top level Makefile and/or Makefile.target
+- Makefile.objs
 
-Each Makefile.objs usually just declares a set of variables listing the
-.o files that need building from the source files in the directory. They
-will also define any custom linker or compiler flags. For example in
-block/Makefile.objs
+Defines *-obj-y files corresponding to 
 
-  block-obj-$(CONFIG_LIBISCSI) += iscsi.o
-  block-obj-$(CONFIG_CURL) += curl.o
-
-  ..snip...
-
-  iscsi.o-cflags     := $(LIBISCSI_CFLAGS)
-  iscsi.o-libs       := $(LIBISCSI_LIBS)
-  curl.o-cflags      := $(CURL_CFLAGS)
-  curl.o-libs        := $(CURL_LIBS)
-
-If there are any rules defined in the Makefile.objs file, they should
-all use $(obj) as a prefix to the target, e.g.
-
-  $(obj)/generated-tcg-tracers.h: $(obj)/generated-tcg-tracers.h-timestamp
-
-
-- Makefile.target
-
-This file provides the entry point used to build each individual system
-or userspace emulator target. Each enabled target has its own
-subdirectory. For example if configure is run with the argument
-'--target-list=x86_64-softmmu', then a sub-directory 'x86_64-softmmu'
-will be created, containing a 'Makefile' which symlinks back to
-Makefile.target
-
-So when the recursive '$(MAKE) -C x86_64-softmmu' is invoked, it ends up
-using Makefile.target for the build rules.
+- */meson.build
 
+The meson.build file in the root directory is the main entry point for the
+Meson build system, and it coordinates the configuration and build of all
+executables.  Build rules for various subdirectories are included in
+other meson.build files spread throughout the QEMU source tree.
 
 - rules.mak
 
 This file provides the generic helper rules for invoking build tools, in
 particular the compiler and linker.
 
-
-- default-configs/*.mak
-
-The files under default-configs/ control what emulated hardware is built
-into each QEMU system and userspace emulator targets. They merely contain
-a list of config variable definitions like the machines that should be
-included. For example, default-configs/aarch64-softmmu.mak has:
-
-  include arm-softmmu.mak
-  CONFIG_XLNX_ZYNQMP_ARM=y
-  CONFIG_XLNX_VERSAL=y
-
-These files rarely need changing unless new devices / hardware need to
-be enabled for a particular system/userspace emulation target
-
-
-- tests/Makefile
+- tests/Makefile.include
 
 Rules for building the unit tests. This file is included directly by the
 top level Makefile, so anything defined in this file will influence the
@@ -435,11 +418,11 @@ Rules for Docker tests. Like tests/Makefile, this file is included
 directly by the top level Makefile, anything defined in this file will
 influence the entire build system.
 
-- po/Makefile
-
-Rules for building and installing the binary message catalogs from the
-text .po file sources. This almost never needs changing for any reason.
+- tests/vm/Makefile.include
 
+Rules for VM-based tests. Like tests/Makefile, this file is included
+directly by the top level Makefile, anything defined in this file will
+influence the entire build system.
 
 Dynamically created files
 -------------------------
@@ -450,6 +433,7 @@ the need for QEMU makefiles to go through any pre-processing as seen
 with autotools, where Makefile.am generates Makefile.in which generates
 Makefile.
 
+Built by configure:
 
 - config-host.mak
 
@@ -457,27 +441,17 @@ When configure has determined the characteristics of the build host it
 will write a long list of variables to config-host.mak file. This
 provides the various install directories, compiler / linker flags and a
 variety of CONFIG_* variables related to optionally enabled features.
-This is imported by the top level Makefile in order to tailor the build
-output.
+This is imported by the top level Makefile and meson.build in order to
+tailor the build output.
+
+config-host.mak is also used as a dependency checking mechanism. If make
+sees that the modification timestamp on configure is newer than that on
+config-host.mak, then configure will be re-run.
 
 The variables defined here are those which are applicable to all QEMU
 build outputs. Variables which are potentially different for each
 emulator target are defined by the next file...
 
-It is also used as a dependency checking mechanism. If make sees that
-the modification timestamp on configure is newer than that on
-config-host.mak, then configure will be re-run.
-
-
-- config-host.h
-
-The config-host.h file is used by source code to determine what features
-are enabled. It is generated from the contents of config-host.mak using
-the scripts/create_config program. This extracts all the CONFIG_* variables,
-most of the HOST_* variables and a few other misc variables from
-config-host.mak, formatting them as C preprocessor macros.
-
-
 - $TARGET-NAME/config-target.mak
 
 TARGET-NAME is the name of a system or userspace emulator, for example,
@@ -488,19 +462,42 @@ the target and any other potential custom libraries needed for linking
 the target.
 
 
-- $TARGET-NAME/config-devices.mak
+Built by Meson:
+
+- ${TARGET-NAME}-config-devices.mak
 
 TARGET-NAME is again the name of a system or userspace emulator. The
 config-devices.mak file is automatically generated by make using the
 scripts/make_device_config.sh program, feeding it the
 default-configs/$TARGET-NAME file as input.
 
+- config-host.h
+- $TARGET-NAME/config-target.h
+- $TARGET-NAME/config-devices.h
+
+These files are used by source code to determine what features
+are enabled.  They are generated from the contents of the corresponding
+*.h files using the scripts/create_config program. This extracts
+relevant variables and formats them as C preprocessor macros.
+
+- build.ninja
+
+
+Built by Makefile:
+
+- Makefile.ninja:
+
+A Makefile conversion of the build rules in build.ninja.  The conversion
+is straightforward and, were it necessary to debug the rules produced
+by Meson, it should be enough to look at build.ninja.  The conversion
+is performed by scripts/ninjatool.py.
 
-- $TARGET-NAME/Makefile
+- Makefile.mtest:
 
-This is the entrypoint used when make recurses to build a single system
-or userspace emulator target. It is merely a symlink back to the
-Makefile.target in the top level.
+The Makefile definitions that let "make check" run tests defined in
+meson.build.  The rules are produced from Meson's JSON description of
+tests (obtained with "meson introspect --tests") through the script
+scripts/mtest2make.py.
 
 
 Useful make targets
Signature · 1 line
1.8.3.1
#184 lore raw
In reply to Paolo Bonzini
Quoted 11 lines · On Thu, 6 Aug 2020 21:13:56 +0200 Paolo Bonzini <[email protected]> wrote:

This the more or less final version of the Meson conversion. Due to the sheer size of the series you have been CCed only on the cover letter.

The series reaches the point where Makefile.target and unnest-vars can be removed, and all builds become non-recursive. I have also converted parts of the testsuite, notably qtest since it is needed for fuzzing. What's left for _after_ the merge is: 1) unit tests;
2) moving the rest of installation to meson (for which I have patches);
3) moving feature detection from configure to meson.

Quoted 3 lines

Things I still haven't tested:
- fuzzing
- non-x86/Linux builds

So, I was planning to give it a go on s390, but I cannot even build it on x86 (fails configure):

Build started at 2020-08-07T08:43:43.873638
Main binary: /usr/bin/python3
Build Options: -Doptimization=2 -Ddebug=true -Dwerror=true -Dstrip=true -Db_pie=true -Db_coverage=false -Dsdl=auto -Dsdl_image=auto -Dvnc=enabled -Dvnc_sasl=auto -Dvnc_jpeg=auto -Dvnc_png=auto -Dprefix=/usr/local -Dbindir=/usr/local/bin -Ddatadir=/usr/local/share -Dincludedir=/usr/local/include -Dlibdir=/usr/local/lib -Dlibexecdir=/usr/local/libexec -Dlocalstatedir=/usr/local/var -Dmandir=/usr/local/share/man -Dsysconfdir=/usr/local/etc Python system: Linux
The Meson build system
Version: 0.52.0
Source dir: /home/cohuck/git/qemu
Build dir: /home/cohuck/git/qemu/build
Build type: native build

meson.build:438:22: ERROR: Key must be a string.
config_target_h += {target: configure_file(output: target + '-config-target.h',

                      ^

(Fedora 31, version from your github branch)

Is there anything special I need to install beyond meson?

Quoted 44 lines

- static builds
- Docker and VM builds

Things I have checked:
- x86 builds
- modules
- "make install"
- internal slirp/dtc/capstone.

It should be more or less bisectable. I have not tried building _all_ steps, but I have tried both before and after each major one.

Build system rebuild rules seem to work reliably.

After a week or quite intense rebasing, my impression is more or less the same as last December: Meson looks more daunting, but it is actually much nicer to work with.

The diffstat so far is not very favorable, but remember that:

1) the series leaves quite a few nearly-obsolete bits in configure, Makefile and rules.mak (over 200 lines only in the makefiles).

2) configure test conversion will be where meson really shines. I included a couple examples just to show

meson: convert VNC and dependent libraries to meson
4 files changed, 44 insertions(+), 134 deletions(-)

meson: move SDL and SDL-image detection to meson
5 files changed, 30 insertions(+), 144 deletions(-)

meson: replace create-config with meson configure_file
6 files changed, 80 insertions(+), 168 deletions(-)

3) the idea behind using Makefile generators is to have stable code written in a high-level language instead of Makefile magic that tends to grow by accretion. So even though ninjatool is large at 1000 lines of Python, it can already be considered mature or even "done". It had only ~15 lines changed since the last post, and whenever debugging meson.build issues looking at build.ninja has always (literally!) been enough.

Available on git://github.com/bonzini/qemu branch meson-poc-next.

#185 lore raw
Quoted 13 lines · Cornelia Huck

So, I was planning to give it a go on s390, but I cannot even build it on x86 (fails configure):

Build started at 2020-08-07T08:43:43.873638
Main binary: /usr/bin/python3
Build Options: -Doptimization=2 -Ddebug=true -Dwerror=true -Dstrip=true -Db_pie=true -Db_coverage=false -Dsdl=auto -Dsdl_image=auto -Dvnc=enabled -Dvnc_sasl=auto -Dvnc_jpeg=auto -Dvnc_png=auto -Dprefix=/usr/local -Dbindir=/usr/local/bin -Ddatadir=/usr/local/share -Dincludedir=/usr/local/include -Dlibdir=/usr/local/lib -Dlibexecdir=/usr/local/libexec -Dlocalstatedir=/usr/local/var -Dmandir=/usr/local/share/man -Dsysconfdir=/usr/local/etc Python system: Linux
The Meson build system
Version: 0.52.0
Source dir: /home/cohuck/git/qemu
Build dir: /home/cohuck/git/qemu/build
Build type: native build

Quoted 6 lines

meson.build:438:22: ERROR: Key must be a string.
config_target_h += {target: configure_file(output: target + '-config-target.h',

                      ^

(Fedora 31, version from your github branch)

Is there anything special I need to install beyond meson?

You probably need to do "git submodule init"/"git submodule update" so that it picks up the in-tree meson (0.55.0).

If you want to test on s390, just testing the boot ROM would be great (patch 3). That one does not need Meson at all; the purpose of the patch is just to decouple the boot ROM makefile from rules.mak, which allows to drop some of the contents of rules.mak.

Paolo

#186 lore raw
Quoted 19 lines · On Fri, 7 Aug 2020 09:59:57 +0200 Paolo Bonzini <[email protected]> wrote:
Quoted 18 lines · Cornelia Huck

So, I was planning to give it a go on s390, but I cannot even build it on x86 (fails configure):

Build started at 2020-08-07T08:43:43.873638
Main binary: /usr/bin/python3
Build Options: -Doptimization=2 -Ddebug=true -Dwerror=true -Dstrip=true -Db_pie=true -Db_coverage=false -Dsdl=auto -Dsdl_image=auto -Dvnc=enabled -Dvnc_sasl=auto -Dvnc_jpeg=auto -Dvnc_png=auto -Dprefix=/usr/local -Dbindir=/usr/local/bin -Ddatadir=/usr/local/share -Dincludedir=/usr/local/include -Dlibdir=/usr/local/lib -Dlibexecdir=/usr/local/libexec -Dlocalstatedir=/usr/local/var -Dmandir=/usr/local/share/man -Dsysconfdir=/usr/local/etc Python system: Linux
The Meson build system
Version: 0.52.0
Source dir: /home/cohuck/git/qemu
Build dir: /home/cohuck/git/qemu/build
Build type: native build

meson.build:438:22: ERROR: Key must be a string.
config_target_h += {target: configure_file(output: target + '-config-target.h',

                      ^

(Fedora 31, version from your github branch)

Quoted 4 lines
Quoted 1 line

Is there anything special I need to install beyond meson?

You probably need to do "git submodule init"/"git submodule update" so that it picks up the in-tree meson (0.55.0).

Thanks, that is getting me further. I still seem to be holding it wrong in different places, though...

- on an x86 system, configure fails with:
../meson.build:1257:3: ERROR: Key CONFIG_QEMU_PRIVATE_XTS is not in dict
- on an s390x system, it mostly builds, but I end up with a bunch of link errors for libblock.fa, where it fails to find various ZSTD_ symbols

Quoted 5 lines

If you want to test on s390, just testing the boot ROM would be great (patch 3). That one does not need Meson at all; the purpose of the patch is just to decouple the boot ROM makefile from rules.mak, which allows to drop some of the contents of rules.mak.

I gave it a try; no errors, but then I realized that the image does not seem to get rebuilt? I'll double check later.

#187 lore raw
Quoted 6 lines · On Fri, 7 Aug 2020 11:35:57 +0200 Cornelia Huck <[email protected]> wrote:

On Fri, 7 Aug 2020 09:59:57 +0200
Paolo Bonzini <[email protected]> wrote:

- on an s390x system, it mostly builds, but I end up with a bunch of link errors for libblock.fa, where it fails to find various ZSTD_ symbols

Still happening after switching to the latest version of your branch.

Quoted 9 lines
Quoted 6 lines

If you want to test on s390, just testing the boot ROM would be great (patch 3). That one does not need Meson at all; the purpose of the patch is just to decouple the boot ROM makefile from rules.mak, which allows to drop some of the contents of rules.mak.

I gave it a try; no errors, but then I realized that the image does not seem to get rebuilt? I'll double check later.

I re-tried with a pristine build directory (on a different system), and it does not look good:

BUILD pc-bios/s390-ccw/s390-ccw.elf
cc: error: start.o: No such file or directory
cc: error: main.o: No such file or directory
cc: error: bootmap.o: No such file or directory
cc: error: jump2ipl.o: No such file or directory
cc: error: sclp.o: No such file or directory
cc: error: menu.o: No such file or directory
cc: error: virtio.o: No such file or directory
cc: error: virtio-scsi.o: No such file or directory
cc: error: virtio-blkdev.o: No such file or directory
cc: error: libc.o: No such file or directory
cc: error: cio.o: No such file or directory
cc: error: dasd-ipl.o: No such file or directory make[1]: *** [Makefile:85: s390-ccw.elf] Error 1
make: *** [Makefile:576: pc-bios/s390-ccw/all] Error 2

#188 lore raw
Quoted 5 lines · Cornelia Huck
Quoted 3 lines

- on an s390x system, it mostly builds, but I end up with a bunch of link errors for libblock.fa, where it fails to find various ZSTD_ symbols

Still happening after switching to the latest version of your branch.

Fixed thusly:

block/meson.build +1 -1
index c59e9ebd94..cd3bff5d80 100644
@@ -40,7 +40,7 @@ block_ss.add(files(
   'vmdk.c',
   'vpc.c',
   'write-threshold.c',
-))
+), zstd)
 
 block_ss.add(when: [zlib, 'CONFIG_QCOW1'], if_true: files('qcow.c'))
 block_ss.add(when: 'CONFIG_VDI', if_true: files('vdi.c'))
configure +2 -2
index 54c60bc8d6..610801ddaa 100755
@@ -2623,8 +2623,6 @@ if test "$zstd" != "no" ; then
     if $pkg_config --atleast-version=$libzstd_minver libzstd ; then
         zstd_cflags="$($pkg_config --cflags libzstd)"
         zstd_libs="$($pkg_config --libs libzstd)"
-        LIBS="$zstd_libs $LIBS"
-        QEMU_CFLAGS="$QEMU_CFLAGS $zstd_cflags"
         zstd="yes"
     else
         if test "$zstd" = "yes" ; then
@@ -7394,6 +7392,8 @@ fi
 
 if test "$zstd" = "yes" ; then
   echo "CONFIG_ZSTD=y" >> $config_host_mak
+  echo "ZSTD_CFLAGS=$zstd_cflags" >> $config_host_mak
+  echo "ZSTD_LIBS=$zstd_libs" >> $config_host_mak
 fi
 
 if test "$libiscsi" = "yes" ; then
meson.build +5 -0
index 155f7f8065..0323968aec 100644
@@ -141,6 +141,11 @@ if 'CONFIG_LIBISCSI' in config_host
   libiscsi = declare_dependency(compile_args: config_host['LIBISCSI_CFLAGS'].split(),
                                 link_args: config_host['LIBISCSI_LIBS'].split())
 endif
+zstd = not_found
+if 'CONFIG_ZSTD' in config_host
+  zstd = declare_dependency(compile_args: config_host['ZSTD_CFLAGS'].split(),
+                            link_args: config_host['ZSTD_LIBS'].split())
+endif
 gbm = not_found
 if 'CONFIG_GBM' in config_host
   gbm = declare_dependency(compile_args: config_host['GBM_CFLAGS'].split(),
#189 lore raw
Quoted 8 lines · On Fri, 7 Aug 2020 17:18:42 +0200 Paolo Bonzini <[email protected]> wrote:
Quoted 5 lines · Cornelia Huck
Quoted 3 lines

- on an s390x system, it mostly builds, but I end up with a bunch of link errors for libblock.fa, where it fails to find various ZSTD_ symbols

Still happening after switching to the latest version of your branch.

Fixed thusly:

(...)

Thanks, that makes it build now on my LPAR, and it seems to have created a working qemu-system-s390x.

#190 lore raw
Quoted 10 lines · On Mon, 10 Aug 2020 11:58:51 +0200 Cornelia Huck <[email protected]> wrote:
Quoted 7 lines · On Fri, 7 Aug 2020 17:18:42 +0200 Paolo Bonzini <[email protected]> wrote:
Quoted 5 lines · Cornelia Huck
Quoted 3 lines

- on an s390x system, it mostly builds, but I end up with a bunch of link errors for libblock.fa, where it fails to find various ZSTD_ symbols

Still happening after switching to the latest version of your branch.

Quoted 6 lines
Quoted 1 line

Fixed thusly:

(...)

Thanks, that makes it build now on my LPAR, and it seems to have created a working qemu-system-s390x.

'make check' is unhappy, however:

Running test qtest-s390x: device-introspect-test
missing object type 'virtio-gpu-device'
Broken pipe
../tests/qtest/libqtest.c:175: kill_qemu() detected QEMU death from signal 6 (Aborted) (core dumped) ERROR qtest-s390x: device-introspect-test - too few tests run (expected 6, got 5)

Any idea why virtio-gpu is missing? I'd expect it to be included by default.

#191 lore raw
Quoted 7 lines · Cornelia Huck

'make check' is unhappy, however:

Running test qtest-s390x: device-introspect-test
missing object type 'virtio-gpu-device'
Broken pipe
../tests/qtest/libqtest.c:175: kill_qemu() detected QEMU death from signal 6 (Aborted) (core dumped) ERROR qtest-s390x: device-introspect-test - too few tests run (expected 6, got 5)

It could be an unnecessary dependency on virgl that was detected by the GitLab CI:

hw/display/meson.build +1 -1
index ffcccc0..fa4f806 100644
@@ -77,7 +77,7 @@ if config_all_devices.has_key('CONFIG_VIRTIO_GPU')
   #hw_display_modules += [[ 'virtio-gpu', virtio_gpu.sources(), [pixman, virgl],
   #                         ['CONFIG_VIRTIO_GPU']]]
 
-  softmmu_ss.add_all(when: [pixman, virgl, 'CONFIG_VIRTIO_GPU'],
+  softmmu_ss.add_all(when: [pixman, 'CONFIG_VIRTIO_GPU'],
                      if_true: virtio_gpu_ss)
 endif
 

In any case I'll post another version today or tomorrow. (I decided to bite the bullet, include the unit tests conversion and get rid of more Makefile gunk).

Paolo

#192 lore raw
Quoted 16 lines · On Mon, 10 Aug 2020 13:16:03 +0200 Paolo Bonzini <[email protected]> wrote:
Quoted 7 lines · Cornelia Huck

'make check' is unhappy, however:

Running test qtest-s390x: device-introspect-test
missing object type 'virtio-gpu-device'
Broken pipe
../tests/qtest/libqtest.c:175: kill_qemu() detected QEMU death from signal 6 (Aborted) (core dumped) ERROR qtest-s390x: device-introspect-test - too few tests run (expected 6, got 5)

It could be an unnecessary dependency on virgl that was detected by the GitLab CI:

hw/display/meson.build +0 -0
index ffcccc0..fa4f806 100644

hw/display/meson.build if config_all_devices.has_key('CONFIG_VIRTIO_GPU') · line 82

Quoted 7 lines
hw/display/meson.build +1 -1
@@ -77,7 +77,7 @@ if config_all_devices.has_key('CONFIG_VIRTIO_GPU')
   #hw_display_modules += [[ 'virtio-gpu', virtio_gpu.sources(), [pixman, virgl],
   #                         ['CONFIG_VIRTIO_GPU']]]
 
-  softmmu_ss.add_all(when: [pixman, virgl, 'CONFIG_VIRTIO_GPU'],
+  softmmu_ss.add_all(when: [pixman, 'CONFIG_VIRTIO_GPU'],
                      if_true: virtio_gpu_ss)
 endif

Yes, that gets me further along.

Quoted 2 lines

In any case I'll post another version today or tomorrow. (I decided to bite the bullet, include the unit tests conversion and get rid of more Makefile gunk).

I have another one for you :)

Building tests/test-coroutine gives me another link error in libblock.fa(block_qcow2-threads.c.o) (again, some missing zstd symbols; let me know if you need more info.)

#193 lore raw
In reply to Cornelia Huck

Could meson can generate CMake file or directly using CMake? cause Cmake have better IDE support.

Quoted 92 lines · Cornelia Huck
Quoted 11 lines · On Thu, 6 Aug 2020 21:13:56 +0200 Paolo Bonzini <[email protected]> wrote:

This the more or less final version of the Meson conversion. Due to the sheer size of the series you have been CCed only on the cover letter.

The series reaches the point where Makefile.target and unnest-vars can be removed, and all builds become non-recursive. I have also converted parts of the testsuite, notably qtest since it is needed for fuzzing. What's left for _after_ the merge is: 1) unit tests;
2) moving the rest of installation to meson (for which I have patches);
3) moving feature detection from configure to meson.

Quoted 3 lines

Things I still haven't tested:
- fuzzing
- non-x86/Linux builds

So, I was planning to give it a go on s390, but I cannot even build it on x86 (fails configure):

Build started at 2020-08-07T08:43:43.873638
Main binary: /usr/bin/python3
Build Options: -Doptimization=2 -Ddebug=true -Dwerror=true -Dstrip=true

(quoted diff) +0 -6
-Db_pie=true -Db_coverage=false -Dsdl=auto -Dsdl_image=auto -Dvnc=enabled
-Dvnc_sasl=auto -Dvnc_jpeg=auto -Dvnc_png=auto -Dprefix=/usr/local
-Dbindir=/usr/local/bin -Ddatadir=/usr/local/share
-Dincludedir=/usr/local/include -Dlibdir=/usr/local/lib
-Dlibexecdir=/usr/local/libexec -Dlocalstatedir=/usr/local/var
-Dmandir=/usr/local/share/man -Dsysconfdir=/usr/local/etc

Python system: Linux
The Meson build system
Version: 0.52.0
Source dir: /home/cohuck/git/qemu
Build dir: /home/cohuck/git/qemu/build
Build type: native build

meson.build:438:22: ERROR: Key must be a string.
config_target_h += {target: configure_file(output: target +
'-config-target.h',

                      ^

(Fedora 31, version from your github branch)

Is there anything special I need to install beyond meson?

Quoted 44 lines

- static builds
- Docker and VM builds

Things I have checked:
- x86 builds
- modules
- "make install"
- internal slirp/dtc/capstone.

It should be more or less bisectable. I have not tried building _all_ steps, but I have tried both before and after each major one.

Build system rebuild rules seem to work reliably.

After a week or quite intense rebasing, my impression is more or less the same as last December: Meson looks more daunting, but it is actually much nicer to work with.

The diffstat so far is not very favorable, but remember that:

1) the series leaves quite a few nearly-obsolete bits in configure, Makefile and rules.mak (over 200 lines only in the makefiles).

2) configure test conversion will be where meson really shines. I included a couple examples just to show

meson: convert VNC and dependent libraries to meson
4 files changed, 44 insertions(+), 134 deletions(-)

meson: move SDL and SDL-image detection to meson
5 files changed, 30 insertions(+), 144 deletions(-)

meson: replace create-config with meson configure_file
6 files changed, 80 insertions(+), 168 deletions(-)

3) the idea behind using Makefile generators is to have stable code written in a high-level language instead of Makefile magic that tends to grow by accretion. So even though ninjatool is large at 1000 lines of Python, it can already be considered mature or even "done". It had only ~15 lines changed since the last post, and whenever debugging meson.build issues looking at build.ninja has always (literally!) been enough.

Available on git://github.com/bonzini/qemu branch meson-poc-next.

Signature · 6 lines
         此致
礼
罗勇刚
Yours
    sincerely,
Yonggang Luo
#194 lore raw
Quoted 2 lines · 罗勇刚(Yonggang Luo)

Could meson can generate CMake file or directly using CMake? cause Cmake have better IDE support.

No, Meson generates ninja files. In QEMU I am translating them to Makefile to aid in bisectability.

Paolo

#195 lore raw

Any IDE works with meson properly? Does meson have vs code plugin?

Quoted 10 lines · Paolo Bonzini
Quoted 2 lines · 罗勇刚(Yonggang Luo)

Could meson can generate CMake file or directly using CMake? cause Cmake have better IDE support.

No, Meson generates ninja files. In QEMU I am translating them to Makefile to aid in bisectability.

Paolo

Signature · 6 lines
         此致
礼
罗勇刚
Yours
    sincerely,
Yonggang Luo
#196 lore raw
Quoted 1 line · 罗勇刚(Yonggang Luo)

Any IDE works with meson properly? Does meson have vs code plugin?

I'm not sure what the plugin would do. However note that even with Meson, QEMU would be built with "./configure && make".

Paolo

#197 lore raw
Quoted 5 lines · Paolo Bonzini
Quoted 1 line · 罗勇刚(Yonggang Luo)

Any IDE works with meson properly? Does meson have vs code plugin?

I'm not sure what the plugin would do. However note that even with Meson, QEMU would be built with "./configure && make".

One the subject of IDE's my Emacs tooling (counsel-compile) uses a mixture of "make -nqp" and "make help" to probe for potential make targets. I assume these are still probable with the meson generated files?

Signature · 1 line
Alex Bennée
#198 lore raw
Quoted 8 lines · Alex Bennée
Quoted 4 lines · 罗勇刚(Yonggang Luo)
Quoted 1 line

Any IDE works with meson properly? Does meson have vs code plugin?

I'm not sure what the plugin would do. However note that even with Meson, QEMU would be built with "./configure && make".

One the subject of IDE's my Emacs tooling (counsel-compile) uses a mixture of "make -nqp" and "make help" to probe for potential make targets. I assume these are still probable with the meson generated files?

With the generated files yes, I have no idea how counsel-compile would deal with ninja.

Paolo

#199 lore raw
Quoted 5 lines · Paolo Bonzini
Quoted 4 lines · Alex Bennée
Quoted 4 lines · 罗勇刚(Yonggang Luo)
Quoted 1 line

Any IDE works with meson properly? Does meson have vs code plugin?

I'm not sure what the plugin would do. However note that even with Meson, QEMU would be built with "./configure && make".

Quoted 7 lines
Quoted 4 lines

One the subject of IDE's my Emacs tooling (counsel-compile) uses a mixture of "make -nqp" and "make help" to probe for potential make targets. I assume these are still probable with the meson generated files?

With the generated files yes, I have no idea how counsel-compile would deal with ninja.

It's probing for top-level targets. So if there is a way to query ninja for that it's easy enough to write a probe to collect them. The make -nqp stuff is a little janky but basically greps for .PHONY patterns and assumes a .PHONY target is a top level target. The help parsing is pure regexery:

(defvar counsel-compile-phony-pattern "^\\.PHONY:[\t ]+\\(.+\\)$"
"Regexp for extracting phony targets from Makefiles.")

(defvar counsel-compile-help-pattern
"\\(?:^\\(\\*\\)?[[:space:]]+\\([^[:space:]]+\\)[[:space:]]+-\\)" "Regexp for extracting help targets from a make help call.")

I guess I'll have to see what:

ninja -t targets all

lists.

Signature · 1 line
Alex Bennée
#200 lore raw
Quoted 9 lines · Alex Bennée

It's probing for top-level targets. So if there is a way to query ninja for that it's easy enough to write a probe to collect them. The make -nqp stuff is a little janky but basically greps for .PHONY patterns and assumes a .PHONY target is a top level target. The help parsing is pure regexery:

(defvar counsel-compile-phony-pattern "^\\.PHONY:[\t ]+\\(.+\\)$"
"Regexp for extracting phony targets from Makefiles.")

Quoted 7 lines

(defvar counsel-compile-help-pattern
"\\(?:^\\(\\*\\)?[[:space:]]+\\([^[:space:]]+\\)[[:space:]]+-\\)" "Regexp for extracting help targets from a make help call.")

I guess I'll have to see what:

ninja -t targets all

It would have to grep for "^(.+): phony$".

Paolo

#201 lore raw
In reply to Paolo Bonzini
Quoted 3 lines · Paolo Bonzini

This the more or less final version of the Meson conversion. Due to the sheer size of the series you have been CCed only on the cover letter.

Perfect timing: right before I drop off for two weeks of vacation. I'm excused! *Maniacal laughter*

Quoted 13 lines

The series reaches the point where Makefile.target and unnest-vars can be removed, and all builds become non-recursive. I have also converted parts of the testsuite, notably qtest since it is needed for fuzzing. What's left for _after_ the merge is: 1) unit tests;
2) moving the rest of installation to meson (for which I have patches);
3) moving feature detection from configure to meson.

Things I still haven't tested:
- fuzzing
- non-x86/Linux builds
- static builds
- Docker and VM builds

Quoted 5 lines

Things I have checked:
- x86 builds
- modules
- "make install"
- internal slirp/dtc/capstone.

Have you run it through our CI?

Quoted 4 lines

It should be more or less bisectable. I have not tried building _all_ steps, but I have tried both before and after each major one.

Build system rebuild rules seem to work reliably.

Is it faster in common build scenarios?

Quoted 3 lines

After a week or quite intense rebasing, my impression is more or less the same as last December: Meson looks more daunting, but it is actually much nicer to work with.

Not a particularly high bar to cross: our Makefiles are full of the kind of black magic that keeps simple things simple (which is quite an achievement; kudos!), and makes not-so-simple things really hard.

I think it's now time to plan the end game, preferably without even more weeks of intense rebasing.

Do we have consensus to move forward with Meson? If yes, I'd like to propose to aim for merging as early as practical in the 5.2 cycle.
Rationale: rebasing build system changes on top of the Meson work is probably easier than rebasing the Meson work, and avoids turning Paolo into an overworked bottleneck.

In more detail:

1. Pick a tentative deadline.

2. Cover the testing gaps and get as much review as we can until then. Fix defects as we go.

3. If the known defects are expected to disrupt others too much, goto 1. Do not worry about unknown defects at this point.

4. Merge.

5. Deal with the fallout.

Opinions?

Quoted 17 lines

The diffstat so far is not very favorable, but remember that:

1) the series leaves quite a few nearly-obsolete bits in configure, Makefile and rules.mak (over 200 lines only in the makefiles).

2) configure test conversion will be where meson really shines. I included a couple examples just to show

meson: convert VNC and dependent libraries to meson
4 files changed, 44 insertions(+), 134 deletions(-)

meson: move SDL and SDL-image detection to meson
5 files changed, 30 insertions(+), 144 deletions(-)

meson: replace create-config with meson configure_file
6 files changed, 80 insertions(+), 168 deletions(-)

Quoted 7 lines

3) the idea behind using Makefile generators is to have stable code written in a high-level language instead of Makefile magic that tends to grow by accretion. So even though ninjatool is large at 1000 lines of Python, it can already be considered mature or even "done". It had only ~15 lines changed since the last post, and whenever debugging meson.build issues looking at build.ninja has always (literally!) been enough.

The major drawback with generating code is usually having to debug the generated code. Your experience of not having to do that is encouraging.

Quoted 1 line

Available on git://github.com/bonzini/qemu branch meson-poc-next.

#202 lore raw
Quoted 54 lines · Markus Armbruster
Quoted 3 lines · Paolo Bonzini

This the more or less final version of the Meson conversion. Due to the sheer size of the series you have been CCed only on the cover letter.

Perfect timing: right before I drop off for two weeks of vacation. I'm excused! *Maniacal laughter*

Quoted 13 lines

The series reaches the point where Makefile.target and unnest-vars can be removed, and all builds become non-recursive. I have also converted parts of the testsuite, notably qtest since it is needed for fuzzing. What's left for _after_ the merge is: 1) unit tests;
2) moving the rest of installation to meson (for which I have patches);
3) moving feature detection from configure to meson.

Things I still haven't tested:
- fuzzing
- non-x86/Linux builds
- static builds
- Docker and VM builds

Quoted 5 lines

Things I have checked:
- x86 builds
- modules
- "make install"
- internal slirp/dtc/capstone.

Have you run it through our CI?

Quoted 4 lines

It should be more or less bisectable. I have not tried building _all_ steps, but I have tried both before and after each major one.

Build system rebuild rules seem to work reliably.

Is it faster in common build scenarios?

Quoted 3 lines

After a week or quite intense rebasing, my impression is more or less the same as last December: Meson looks more daunting, but it is actually much nicer to work with.

Not a particularly high bar to cross: our Makefiles are full of the kind of black magic that keeps simple things simple (which is quite an achievement; kudos!), and makes not-so-simple things really hard.

I think it's now time to plan the end game, preferably without even more weeks of intense rebasing.

Do we have consensus to move forward with Meson? If yes, I'd like to propose to aim for merging as early as practical in the 5.2 cycle.
Rationale: rebasing build system changes on top of the Meson work is probably easier than rebasing the Meson work, and avoids turning Paolo into an overworked bottleneck.

Quoted 3 lines

In more detail:

1. Pick a tentative deadline.

I'd suggest we need a bare minimum of half a development cycle to. So if we want it tin 5.2, we need to make a strong push now and over next month to review it and iron out any obvious blocking testing problems.

Quoted 2 lines

2. Cover the testing gaps and get as much review as we can until then. Fix defects as we go.

In terms of testing I'd suggest the minimium bar is likely the GitLab CI and Peter's merge scripts.

Anything beyond that is just nice to have.

Quoted 6 lines

3. If the known defects are expected to disrupt others too much, goto 1. Do not worry about unknown defects at this point.

4. Merge.

5. Deal with the fallout.

Yep, there's no substitute for getting it used for real by a wide range of people, which is why we we need leave ourselves at min 1/2 a dev cycle for this.

Regards,
Daniel

Signature · 3 lines
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|
#203 lore raw
Quoted 46 lines · Daniel P. Berrangé
Quoted 45 lines · Markus Armbruster
Quoted 3 lines · Paolo Bonzini

This the more or less final version of the Meson conversion. Due to the sheer size of the series you have been CCed only on the cover letter.

Perfect timing: right before I drop off for two weeks of vacation. I'm excused! *Maniacal laughter*

Quoted 13 lines

The series reaches the point where Makefile.target and unnest-vars can be removed, and all builds become non-recursive. I have also converted parts of the testsuite, notably qtest since it is needed for fuzzing. What's left for _after_ the merge is: 1) unit tests;
2) moving the rest of installation to meson (for which I have patches);
3) moving feature detection from configure to meson.

Things I still haven't tested:
- fuzzing
- non-x86/Linux builds
- static builds
- Docker and VM builds

Quoted 5 lines

Things I have checked:
- x86 builds
- modules
- "make install"
- internal slirp/dtc/capstone.

Have you run it through our CI?

Quoted 4 lines

It should be more or less bisectable. I have not tried building _all_ steps, but I have tried both before and after each major one.

Build system rebuild rules seem to work reliably.

Is it faster in common build scenarios?

Quoted 3 lines

After a week or quite intense rebasing, my impression is more or less the same as last December: Meson looks more daunting, but it is actually much nicer to work with.

Not a particularly high bar to cross: our Makefiles are full of the kind of black magic that keeps simple things simple (which is quite an achievement; kudos!), and makes not-so-simple things really hard.

Quoted 8 lines
Quoted 8 lines

I think it's now time to plan the end game, preferably without even more weeks of intense rebasing.

Do we have consensus to move forward with Meson? If yes, I'd like to propose to aim for merging as early as practical in the 5.2 cycle.
Rationale: rebasing build system changes on top of the Meson work is probably easier than rebasing the Meson work, and avoids turning Paolo into an overworked bottleneck.

Any merge request not changing buildsys (configure/Makefile), adding new (or moving) .c files shouldn't be a problem.

I have that feeling that Meson will have less bottleneck problem than our Perl scripts =)

Quoted 21 lines
Quoted 4 lines

In more detail:

1. Pick a tentative deadline.

I'd suggest we need a bare minimum of half a development cycle to. So if we want it tin 5.2, we need to make a strong push now and over next month to review it and iron out any obvious blocking testing problems.

Quoted 2 lines

2. Cover the testing gaps and get as much review as we can until then. Fix defects as we go.

In terms of testing I'd suggest the minimium bar is likely the GitLab CI and Peter's merge scripts.

Anything beyond that is just nice to have.

Quoted 3 lines

3. If the known defects are expected to disrupt others too much, goto 1. Do not worry about unknown defects at this point.

Quoted 7 lines
Quoted 3 lines

4. Merge.

5. Deal with the fallout.

Yep, there's no substitute for getting it used for real by a wide range of people, which is why we we need leave ourselves at min 1/2 a dev cycle for this.

Just to clarify, does the "dev cycle" include the freeze window?

QEMU produces a release every 17 weeks, the dev cycle is usually 12 weeks then we have 4 (+1) weeks of stabilization for the release.

So the plan is to get this merged approximately 6 weeks after the next release, right?

Regards,

Phil.

Quoted 5 lines

Regards,
Daniel

#204 lore raw
In reply to Daniel P. Berrangé
Quoted 1 line · Daniel P. Berrangé

On Fri, Aug 07, 2020 at 09:56:42AM +0200, Markus Armbruster wrote:

[...]

Quoted 9 lines
Quoted 9 lines

I think it's now time to plan the end game, preferably without even more weeks of intense rebasing.

Do we have consensus to move forward with Meson? If yes, I'd like to propose to aim for merging as early as practical in the 5.2 cycle.
Rationale: rebasing build system changes on top of the Meson work is probably easier than rebasing the Meson work, and avoids turning Paolo into an overworked bottleneck.

Quoted 8 lines
Quoted 3 lines

In more detail:

1. Pick a tentative deadline.

I'd suggest we need a bare minimum of half a development cycle to. So if we want it tin 5.2, we need to make a strong push now and over next month to review it and iron out any obvious blocking testing problems.

I had less than a "now and over next month" (>7 weeks!) in mind.

The choice of deadline is really about how much of Paolo's time we are (and he is!) willing to spend on rebasing vs. how much risk of toothing problems in master we are willing to accept.

"First thing after 5.2 opens" would be ideal from a "avoid more rebasing" point of view, but it may not be practical.

Once the flood gates are open, we can probably just as well wait for the initial flood to subside.

Quoted 7 lines
Quoted 2 lines

2. Cover the testing gaps and get as much review as we can until then. Fix defects as we go.

In terms of testing I'd suggest the minimium bar is likely the GitLab CI and Peter's merge scripts.

Anything beyond that is just nice to have.

Yup. If you want it not to break in master, get it tested in our gating CI.

Quoted 14 lines
Quoted 6 lines

3. If the known defects are expected to disrupt others too much, goto 1. Do not worry about unknown defects at this point.

4. Merge.

5. Deal with the fallout.

Yep, there's no substitute for getting it used for real by a wide range of people, which is why we we need leave ourselves at min 1/2 a dev cycle for this.

Regards,
Daniel

#205 lore raw
Quoted 15 lines · Markus Armbruster
Quoted 1 line · Daniel P. Berrangé

On Fri, Aug 07, 2020 at 09:56:42AM +0200, Markus Armbruster wrote:

[...]

Quoted 11 lines
Quoted 11 lines

I think it's now time to plan the end game, preferably without even more weeks of intense rebasing.

Do we have consensus to move forward with Meson? If yes, I'd like to propose to aim for merging as early as practical in the 5.2 cycle.
Rationale: rebasing build system changes on top of the Meson work is probably easier than rebasing the Meson work, and avoids turning Paolo into an overworked bottleneck.

In more detail:

Quoted 8 lines
Quoted 6 lines
Quoted 1 line

1. Pick a tentative deadline.

I'd suggest we need a bare minimum of half a development cycle to. So if we want it tin 5.2, we need to make a strong push now and over next month to review it and iron out any obvious blocking testing problems.

I had less than a "now and over next month" (>7 weeks!) in mind.

To be clear, I'm not recommending we wait that long - I'm just suggesting that is an upper bound after which we'd really need to wait for the dev cycle after.

Ideally we would make a strong push to get it merged just 2 weeks after this release, ie by early september.

Quoted 9 lines

The choice of deadline is really about how much of Paolo's time we are (and he is!) willing to spend on rebasing vs. how much risk of toothing problems in master we are willing to accept.

"First thing after 5.2 opens" would be ideal from a "avoid more rebasing" point of view, but it may not be practical.

Once the flood gates are open, we can probably just as well wait for the initial flood to subside.

All depends how quickly Paolo thinks it get to mergeable state....

Regards,
Daniel

Signature · 3 lines
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|
#206 lore raw
In reply to Markus Armbruster
Quoted 7 lines · Markus Armbruster
Quoted 1 line · Daniel P. Berrangé

On Fri, Aug 07, 2020 at 09:56:42AM +0200, Markus Armbruster wrote:

[...]

Quoted 3 lines
Quoted 2 lines

2. Cover the testing gaps and get as much review as we can until then. Fix defects as we go.

Quoted 7 lines
Quoted 4 lines

In terms of testing I'd suggest the minimium bar is likely the GitLab CI and Peter's merge scripts.

Anything beyond that is just nice to have.

Yup. If you want it not to break in master, get it tested in our gating CI.

Excellent to catch all the uses not covered by CI!

So if something break but CI didn't catch it, we should add a CI job first.

#207 lore raw
In reply to Daniel P. Berrangé
Quoted 2 lines · Daniel P. Berrangé

In terms of testing I'd suggest the minimium bar is likely the GitLab CI and Peter's merge scripts.

I tried running it through a build test. Fails to build, all hosts:

make: Entering directory '/home/petmay01/linaro/qemu-for-merges/build/alldbg' config-host.mak is out-of-date, running configure

ERROR: Meson not found. Use --meson=/path/to/meson|git|internal

make: Leaving directory '/home/petmay01/linaro/qemu-for-merges/build/alldbg'
make: *** No rule to make target 'config-host.mak', needed by 'meson-private/coredata.dat'. Stop.

Can we make this Just Work ?

thanks
-- PMM

#208 lore raw
Quoted 7 lines · Peter Maydell
Quoted 2 lines

In terms of testing I'd suggest the minimium bar is likely the GitLab CI and Peter's merge scripts.

I tried running it through a build test. Fails to build, all hosts:

make: Entering directory '/home/petmay01/linaro/qemu-for-merges/build/alldbg' config-host.mak is out-of-date, running configure

Quoted 8 lines

ERROR: Meson not found. Use --meson=/path/to/meson|git|internal

make: Leaving directory '/home/petmay01/linaro/qemu-for-merges/build/alldbg'
make: *** No rule to make target 'config-host.mak', needed by 'meson-private/coredata.dat'. Stop.

Can we make this Just Work ?

Yes, looks like configure is not doing "git submodule update" the right way. I'll debug it.

Paolo

#209 lore raw
In reply to Peter Maydell
Quoted 6 lines · Peter Maydell
Quoted 2 lines · Daniel P. Berrangé

In terms of testing I'd suggest the minimium bar is likely the GitLab CI and Peter's merge scripts.

I tried running it through a build test. Fails to build, all hosts:

Quoted 8 lines

make: Entering directory '/home/petmay01/linaro/qemu-for-merges/build/alldbg' config-host.mak is out-of-date, running configure

ERROR: Meson not found. Use --meson=/path/to/meson|git|internal

make: Leaving directory '/home/petmay01/linaro/qemu-for-merges/build/alldbg'
make: *** No rule to make target 'config-host.mak', needed by 'meson-private/coredata.dat'. Stop.

I note all the CI jobs have failed on building as well. I think maybe we should auto-default to --meson=git unless the user makes an explicit choice.

Quoted 6 lines

Can we make this Just Work ?

thanks
-- PMM

Signature · 1 line
Alex Bennée
#210 lore raw
Quoted 3 lines · Alex Bennée

I note all the CI jobs have failed on building as well. I think maybe we should auto-default to --meson=git unless the user makes an explicit choice.

Our usual approach with other submodules is "system version if it's good enough, otherwise use the submodule copy".

-- PMM

#211 lore raw
In reply to Markus Armbruster
Quoted 10 lines · Markus Armbruster
Quoted 3 lines · Paolo Bonzini

This the more or less final version of the Meson conversion. Due to the sheer size of the series you have been CCed only on the cover letter.

Perfect timing: right before I drop off for two weeks of vacation. I'm excused! *Maniacal laughter*

Have you run it through our CI?

Of course not. O:-)

Quoted 1 line

without even more weeks of intense rebasing.

FWIW there were only three hard rebases from 5.0 to 5.2:
qemu-storage-daemon (by far the hardest), linux-user's syscall_nr.h generation, and fuzzing (easiest except it required conversion of qtest). S

I would like to merge this on August 21st. I hope to post a "definitive" verion on August 14th, and hope to work with Peter the next week on getting it to pass his tests. Perhaps that's optimistic though.

Depending on when it's ready, I can pick up the series that gets rid of Texinfo, if Peter and yourself don't want to learn Meson just for that.

Anyway, I think this is the no-return point: if people say no, I'm not going to push it any further. If people say yes, we'd better merge it quickly and be done with it.

I do understand resistance. It's a new tool replacing a 40-year-old standard; build systems are not fancy; and there is a substantial sunken cost. All I can answer is that the line between sunken cost and Stockholm syndrome is a fine one. I cannot say this stuff has been *fun*, but at least the debugging was refreshing compared to Makefiles.
Again not a very high bar, but it's something.

Quoted 6 lines
Quoted 4 lines

It should be more or less bisectable. I have not tried building _all_ steps, but I have tried both before and after each major one.

Build system rebuild rules seem to work reliably.

Is it faster in common build scenarios?

Some oldish numbers:

before after
----------------------------------------------------

../configure                     18s       43s
../configure && make -j18        169s      172s
make -j18 (do nothing)           4s        4s
make -j4 (do nothing)            6.5s      4s
touch ../configure && make -j18  52s       62s (does nothing in make)
touch ../configure && make -j4   71s       62s (does nothing in make)
make clean                       19s       2s
make -j18 clean                  3.5s      2s
----------------------------------------------------
ninja -j18 (do nothing)                    1s
ninja -t clean                             2s
ninja -j18                                 96s (43s+96s=139s)

../configure becomes slower because minikconf.py moved from Make to configure time, and because it has to generate the massive Makefile which it didn't do before. In fact it generates the build rules twice:
Meson first generates build.ninja, and then ninjatool turns it into Makefile.ninja.

Most of the time is recouped during Make though, and a do nothing "make" become faster, especially at lower -j. This is expected because the massive Makefile (while producing essentially the same rules as before) is parsed directly by Make, without having to execute complex Make macros. It is more visible at lower -j because parsing the non-recursive Makefile is serial, while the current build system uses recursive Makefiles for which the work can be parallelized.

ninja is quite a bit faster than Make. It also stores a binary representation of build.ninja, so its do-nothing times are better. We can think of switching to it for the main build, once all tests are converted to Meson. Advantage: it lets us kill large swaths of ninjatool; disadvantage: it introduces an extra dependency. Even before that, developers will be free to alternate between make and ninja. I haven't bothered so far, but then my machine does -j18 and not everyone has that luxury.

tl;dr: for now, not much, but it can only improve. This is consistent with this series reaching the "worst mergeable state". My objective was only maintainability and not performance (without regressing on that front)

Another useful feature, that can be used more in the future, is integration with external tools such as sparse (now) and clang's static analyzer (later). This is because ninja (and ninjatool) are able to produce a compile_commands.json file that summarizes how to produce the object files for the whole build.

Quoted 3 lines

Not a particularly high bar to cross: our Makefiles are full of the kind of black magic that keeps simple things simple (which is quite an achievement; kudos!), and makes not-so-simple things really hard.

Looking back at the goals:

- "it should remain trivial to do things that used to be trivial":
achieved though the syntax is more complicated.

- it should be "easy to do things that are a matter of cut-and-paste from something that already exist": that would be for example adding a new target, or new tools to contrib. I added AVR and RX for this rebase and it was the least of the problems, so I'd say achieved.

- "it should be possible to modify meson.build without knowing [details of the QEMU build system such as ninjatool]": achieved.

- it should be "possible to do everything else". Of course some parts of meson.build (QAPI, tracetool, modules and the building the emulator binaries) are complex. The only part that is worse than before is the forwarding "trace.h" headers (patch 4). I have actually thought of a way to fix that, but I am not 100% sure it works so I don't plan on doing it before the merge.

- "drop Makefile magic in favor of build rule generators written in high-level languages": achieved

Quoted 11 lines
Quoted 7 lines

3) the idea behind using Makefile generators is to have stable code written in a high-level language instead of Makefile magic that tends to grow by accretion. So even though ninjatool is large at 1000 lines of Python, it can already be considered mature or even "done". It had only ~15 lines changed since the last post, and whenever debugging meson.build issues looking at build.ninja has always (literally!) been enough.

The major drawback with generating code is usually having to debug the generated code. Your experience of not having to do that is encouraging.

Yes, that's my point expressed in a succinct way.

Paolo

#212 lore raw
Quoted 16 lines · Paolo Bonzini
Quoted 10 lines · Markus Armbruster
Quoted 3 lines · Paolo Bonzini

This the more or less final version of the Meson conversion. Due to the sheer size of the series you have been CCed only on the cover letter.

Perfect timing: right before I drop off for two weeks of vacation. I'm excused! *Maniacal laughter*

Have you run it through our CI?

Of course not. O:-)

Quoted 1 line

without even more weeks of intense rebasing.

Quoted 7 lines

FWIW there were only three hard rebases from 5.0 to 5.2:
qemu-storage-daemon (by far the hardest), linux-user's syscall_nr.h generation, and fuzzing (easiest except it required conversion of qtest). S

I would like to merge this on August 21st. I hope to post a "definitive" verion on August 14th, and hope to work with Peter the next week on getting it to pass his tests.

Sounds good to me.

Quoted 1 line

Perhaps that's optimistic though.

If it's not ready then, we pick another date and try again.

Quoted 2 lines

Depending on when it's ready, I can pick up the series that gets rid of Texinfo, if Peter and yourself don't want to learn Meson just for that.

I appreciate the offer. I figure I'll eventually have to learn some Meson anyway. Still, having to learn it *now* to unblock that series may be inconvenient.

Quoted 10 lines

Anyway, I think this is the no-return point: if people say no, I'm not going to push it any further. If people say yes, we'd better merge it quickly and be done with it.

I do understand resistance. It's a new tool replacing a 40-year-old standard; build systems are not fancy; and there is a substantial sunken cost. All I can answer is that the line between sunken cost and Stockholm syndrome is a fine one. I cannot say this stuff has been *fun*, but at least the debugging was refreshing compared to Makefiles.
Again not a very high bar, but it's something.

I'm willing to trust your judgement on this one.

I'm notoriously conservative in my choice of tools, and GNU Make is a much better tool than some people give it credit for, but I've long felt we've pushed it beyond its limits.

[...]

#213 lore raw
Quoted 3 lines · Markus Armbruster

I'm notoriously conservative in my choice of tools, and GNU Make is a much better tool than some people give it credit for, but I've long felt we've pushed it beyond its limits.

The thing is, it feels somewhat like we're already pushing Meson beyond *its* limits instead... (it can't do everything we want it to, we've already had to get at least one new feature added upstream for our benefit, and in other places we're having to change our existing conventions to placate Meson). This would be an easier sell if it was "this is all straightforward and Meson has all the functionality we need".

I admit that I'm partly feeling a bit more conservative about tooling right now because we just switched the docs to Sphinx and Sphinx has turned out to have some annoying problems we didn't foresee. So taking another tool from the Python universe isn't hugely appealing.

(This is not a 'nak'; I'm just expressing my unease.)

thanks
-- PMM

#214 lore raw
Quoted 7 lines · Peter Maydell
Quoted 3 lines · Markus Armbruster

I'm notoriously conservative in my choice of tools, and GNU Make is a much better tool than some people give it credit for, but I've long felt we've pushed it beyond its limits.

The thing is, it feels somewhat like we're already pushing Meson beyond *its* limits instead...

We totally are pushing it *to* its limits, though I obviously disagree with "beyond". QEMU would certainly be one of the largest projects using Meson. In fact we had to add more than one new feature.

One important difference between Make and Meson is that Meson is by design limited in what it can do. The idea (which I think has served them well) is that they want projects to show what they need and work with them on how to build it. So:

- with Make you can do everything, it just becomes harder and harder;

- with Meson you cannot do everything, plus you're using software that is opinionated and conservative in some respects with respect to its design decisions. In exchange: 1) you can always propose to add features to the upstream project like Marc-André and I did; 2) you don't have to worry about the minute details of everything.

So that's what makes Shell+Make and Meson substantially different tools.

Stuff like automatically cloning git submodules will never be in Meson, and we can keep Make forever as a small escape hatch for that. However, using Make as a Turing-complete language to build our own DSLs on top of is just a bad idea. Shell+Make can remain simply as a driver for executing commands, which is what Make does best.

We also have parts that have effectively separate build systems: I have no plans to convert the TCG tests at all, the firmware could be converted to Meson or Autotools (yes I am serious :)) or left aside, and so on.

That said, and going back to pushing Make beyond its limits, I am quite positive that unnest-vars has to go even if the solution has some disadvantages. Meson is one solution, our own home-grown DSL and Makefile generator could be another. However, designing our own build system DSL is not something I want to spend time on; I prefer to improve Meson for every other project using it, it's better for the whole open source development community.

The reason why I started thinking about the conversion is that every now and then people entered fights against unnest-vars and I was wondering how those fights would compare to Meson fights. And the result, after about one year of hacking on and off, is that---with one exception---it never felt like I was fighting Meson or the Meson maintainers; any adaptation or concession came naturally, or was even an improvement in retrospect.

That one exception, the one thing that disappoints me of the whole conversion, is the trace.h files. The current solution is one of the first parts I did of the conversion and I have never touched it since; I think it can be improved (I can even think of two ways to do it), but I don't really have the time to do it now. But even that bit is just ugly, not unmaintainable, and I really see nothing in the conversion that is a step back for QEMU's long term maintainability and our ability to develop new features.

/me gets off the soap box

Thanks,

Paolo

Quoted 6 lines

(it can't do everything we want it to, we've
already had to get at least one new feature added upstream for our benefit, and in other places we're having to change our existing conventions to placate Meson). This would be an easier sell if it was "this is all straightforward and Meson has all the functionality we need".

Quoted 6 lines

I admit that I'm partly feeling a bit more conservative about tooling right now because we just switched the docs to Sphinx and Sphinx has turned out to have some annoying problems we didn't foresee. So taking another tool from the Python universe isn't hugely appealing.

(This is not a 'nak'; I'm just expressing my unease.)

Yes, it's totally understandable.

#215 lore raw
Quoted 6 lines · Paolo Bonzini

One important difference between Make and Meson is that Meson is by design limited in what it can do. The idea (which I think has served them well) is that they want projects to show what they need and work with them on how to build it. So:

Quoted 7 lines

- with Make you can do everything, it just becomes harder and harder;

- with Meson you cannot do everything, plus you're using software that is opinionated and conservative in some respects with respect to its design decisions. In exchange: 1) you can always propose to add features to the upstream project like Marc-André and I did; 2) you don't have to worry about the minute details of everything.

Yeah, this is what I don't like. I don't think this philosophy of tool design is one that works well for us as a large project that prefers to rely on the distro packaged versions of our dependencies and build tools. It would be different if the ecosystem we're in was one where it was really natural to declare versioned dependencies on particular packages or tools and have them automatically pulled in as necessary, perhaps.

For instance, I was just glancing through the Meson FAQ, and "tell the compiler not to use RTTI for C++" is apparently something that needed a change to Meson to support, which seems ridiculous. This really feels like we're going to find ourselves in the future boxed into "we're using Meson, but we also need to do X, and Meson's opinion is 'nobody would want X', so we're stuck". This initial attempt at conversion already got stalled for a long time AFAIK because it took a long time to get a feature we wanted into Meson and then for Meson to do a release with the change in it. That seems like a bad sign to me.

thanks
-- PMM

#216 lore raw
Quoted 4 lines · Peter Maydell

For instance, I was just glancing through the Meson FAQ, and "tell the compiler not to use RTTI for C++" is apparently something that needed a change to Meson to support, which seems ridiculous.

I am not sure why they singled that out in the FAQ, but there's actually an explanation for requiring a change to Meson: the Meson option takes care of that for both Visual Studio and GCC. If (as we do) you only care about GCC, you can just add -Wno-exceptions just like you'd do with Shell+make.

I agree that making it a FAQ is sort of ridiculous.

Quoted 7 lines

This really feels like we're going to find ourselves in the future boxed into "we're using Meson, but we also need to do X, and Meson's opinion is 'nobody would want X', so we're stuck". This initial attempt at conversion already got stalled for a long time AFAIK because it took a long time to get a feature we wanted into Meson and then for Meson to do a release with the change in it. That seems like a bad sign to me.

I'd say it was mostly because I had other stuff to do. Rebasing to a new release needed me to have the right amount of free time (a lot) at the right point of the release cycle (during freeze).

What you refer to is the fact that it took a long time for Meson to declare the "keyval" module stable. That module is what we use to load .mak files from configure and minikconf into Meson, and it was a good thing that it took a long time actually.

The initial version was called "kconfig", and the Meson developers were worried about advertising something called "kconfig" when the only user was QEMU and it was not even using kconfig. In the end a user pointed out that QEMU's config-host.mak file is in fact not a valid kconfig files. The Meson developers agreed to keep the code exactly the same, just renaming the module from kconfig to keyval. So I think they made the right call.

This was the only feature that took time to stabilize, and I think they made the right call. For what it's worth, the list of things that were contributed is as follows:

Completely new functionality:
* New "keyval" module
* New module "sourceset" to match source file lists against config

Extensions to existing constructs:
* configure_file(): Allow multiple inputs in command mode
* configure_file(): Add depfile argument

Interoperability:
* Support a NINJA environment variable
* mintro: include test protocol in introspection data
* Add TAP parser (which we don't use, it was only a bait for the previous change :))

Paolo

#217 lore raw
In reply to Paolo Bonzini
Quoted 11 lines · Paolo Bonzini

Stuff like automatically cloning git submodules will never be in Meson,

and we can keep Make forever as a small escape hatch for that. However, using Make as a Turing-complete language to build our own DSLs on top of is just a bad idea. Shell+Make can remain simply as a driver for executing commands, which is what Make does best.

We also have parts that have effectively separate build systems: I have no plans to convert the TCG tests at all, the firmware could be converted to Meson or Autotools (yes I am serious :)) or left aside, and so on.

Using meson for submodules too is potentially appealing, as you can then take advantage of Meson's subproject support. This makes it easy for distro vendors to turn off building of the bundled pieces in favour of the distro provided equivalent.

Quoted 8 lines

That one exception, the one thing that disappoints me of the whole conversion, is the trace.h files. The current solution is one of the first parts I did of the conversion and I have never touched it since; I think it can be improved (I can even think of two ways to do it), but I don't really have the time to do it now. But even that bit is just ugly, not unmaintainable, and I really see nothing in the conversion that is a step back for QEMU's long term maintainability and our ability to develop new features.

I was never entirely happy with the trace.h stuff even in "make". Trying to maintain the "trace.h" name for every generated header was probably a mistake in retrospect. it caused me so much pain trying to get the "make" rules correct so that we resolved the right trace.h in each case. I was deperately trying to avoid updating the #include lines, but I'm not sure it was worth it in the end. Would have been easier to just generate a unique header file name for each dir and update the #includes.

Regards,
Daniel

Signature · 3 lines
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|
#218 lore raw
Quoted 10 lines · Daniel P. Berrangé
Quoted 8 lines · Paolo Bonzini

That one exception, the one thing that disappoints me of the whole conversion, is the trace.h files. The current solution is one of the first parts I did of the conversion and I have never touched it since; I think it can be improved (I can even think of two ways to do it), but I don't really have the time to do it now. But even that bit is just ugly, not unmaintainable, and I really see nothing in the conversion that is a step back for QEMU's long term maintainability and our ability to develop new features.

Quoted 8 lines

I was never entirely happy with the trace.h stuff even in "make". Trying to maintain the "trace.h" name for every generated header was probably a mistake in retrospect. it caused me so much pain trying to get the "make" rules correct so that we resolved the right trace.h in each case. I was deperately trying to avoid updating the #include lines, but I'm not sure it was worth it in the end. Would have been easier to just generate a unique header file name for each dir and update the #includes.

Never too late. Having unique trace headers would allow us to reuse trace functions in different modules.

I.e.:
- hexdump()
- cases where multi-devices not well split in subsystem parts . xen out of i386
. net could reuse mdio
. rocker out of net
. can out of net
. reuse semihosting traces in target/
- cases with buses where the device is target-specific

Quoted 4 lines

Regards,
Daniel

#219 lore raw
In reply to Paolo Bonzini
Quoted 4 lines · Paolo Bonzini

This the more or less final version of the Meson conversion. Due to the sheer size of the series you have been CCed only on the cover letter.

Does this work with actually-released versions of Meson yet? I am still not very enthusiastic about the prospect of having to carry around an entire build system in a submodule. That still seems to me to be living closer to the bleeding edge than I would like...

-- PMM

#220 lore raw
Quoted 9 lines · Peter Maydell
Quoted 3 lines

This the more or less final version of the Meson conversion. Due to the sheer size of the series you have been CCed only on the cover letter.

Does this work with actually-released versions of Meson yet? I am still not very enthusiastic about the prospect of having to carry around an entire build system in a submodule. That still seems to me to be living closer to the bleeding edge than I would like...

Yes it works with 0.55.0, with only a few warnings about possible future incompatibility. Those will be fixed in 0.56.0, where the feature was stabilized without introducing any incompatibility.

Carrying around Meson in a submodule was mostly done to let QEMU build transparently on older distros. Removing it is easy (though it would involve modifying the docker files to install the latest meson, so whatever you throw out of the door comes back through the window).

Paolo

#221 lore raw
Quoted 11 lines · Paolo Bonzini
Quoted 9 lines · Peter Maydell
Quoted 3 lines

This the more or less final version of the Meson conversion. Due to the sheer size of the series you have been CCed only on the cover letter.

Does this work with actually-released versions of Meson yet? I am still not very enthusiastic about the prospect of having to carry around an entire build system in a submodule. That still seems to me to be living closer to the bleeding edge than I would like...

Quoted 8 lines

Yes it works with 0.55.0, with only a few warnings about possible future incompatibility. Those will be fixed in 0.56.0, where the feature was stabilized without introducing any incompatibility.

Carrying around Meson in a submodule was mostly done to let QEMU build transparently on older distros. Removing it is easy (though it would involve modifying the docker files to install the latest meson, so whatever you throw out of the door comes back through the window).

From my point of view, we should keep the meson submodule at least 'till spring next year - then we'll remove support for RHEL7 according to our support policy. Hopefully the other distros will have a recent version of Meson at that point in time.

Thomas

#222 lore raw
Quoted 21 lines · Thomas Huth
Quoted 11 lines · Paolo Bonzini
Quoted 9 lines · Peter Maydell
Quoted 3 lines

This the more or less final version of the Meson conversion. Due to the sheer size of the series you have been CCed only on the cover letter.

Does this work with actually-released versions of Meson yet? I am still not very enthusiastic about the prospect of having to carry around an entire build system in a submodule. That still seems to me to be living closer to the bleeding edge than I would like...

Quoted 8 lines

Yes it works with 0.55.0, with only a few warnings about possible future incompatibility. Those will be fixed in 0.56.0, where the feature was stabilized without introducing any incompatibility.

Carrying around Meson in a submodule was mostly done to let QEMU build transparently on older distros. Removing it is easy (though it would involve modifying the docker files to install the latest meson, so whatever you throw out of the door comes back through the window).

Quoted 4 lines

From my point of view, we should keep the meson submodule at least 'till spring next year - then we'll remove support for RHEL7 according to our support policy. Hopefully the other distros will have a recent version of Meson at that point in time.

I very much doubt that will be the case. None of the distros rebase meson in their stable streams. Given our targetted platforms, it is going to be many years (3-4 years) before Meson is present in all the platforms we target.

This is not the end of the world, as even 3-4 years is short term in the overall lifetime of QEMU going into the future. Also not exactly worse than bundling all the other stuff we bundle for years. If itis a problem, then perhaps we can finally start shipping a 'qemu.tar.gz' with no bundling at all, and a 'qemu-bundled.tar.gz' with all the 3rd party stuff added.

We can, however, expect the distros to have new enough ninja.

If we bundle Meson, there's a risk that we see a new shiny feature in next meson, and bump our sub-module to the next release. And again. And again. And again. If we do that we'll never get to a place where we can rely on distro Meson. That will be bad.

So I think we need to be very mindful of this and strongly resist the urge to further increase our min meson version in future.

FWIW, for libvirt we decided that despite lack of distro support, there was not a compelling reason to bundle meson, because it is really trivial for users to update. e.g. just "pip install".

   pip install meson --user
   meson build
   ninja -C build

(possibly need to set $PATH if you don't already have $HOME/.local/bin in your $PATH).

Regards,
Daniel

Signature · 3 lines
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|
#223 lore raw
Quoted 7 lines · Daniel P. Berrangé

FWIW, for libvirt we decided that despite lack of distro support, there was not a compelling reason to bundle meson, because it is really trivial for users to update. e.g. just "pip install".

   pip install meson --user
   meson build
   ninja -C build

I really hate software build instructions that want me to "just pip install" something. I know nothing about the python out-of-distro packaging process and I don't want the python thing I had to install to build software X to be lurking around on my system forever being picked up and used by random other stuff...

thanks
-- PMM

#224 lore raw
Quoted 9 lines · Peter Maydell
Quoted 7 lines · Daniel P. Berrangé

FWIW, for libvirt we decided that despite lack of distro support, there was not a compelling reason to bundle meson, because it is really trivial for users to update. e.g. just "pip install".

   pip install meson --user
   meson build
   ninja -C build
Quoted 6 lines

I really hate software build instructions that want me to "just pip install" something. I know nothing about the python out-of-distro packaging process and I don't want the python thing I had to install to build software X to be lurking around on my system forever being picked up and used by random other stuff...

I have the same feeling (although I'm a bit of hypocrite given the 7 binaries in .local/bin I have). This was the reason we pushed to have avocado build itself in a venv as part of the build system. I don't see meson can't do something similar if it has to (although the git submodule probably works just as well).

Quoted 3 lines

thanks
-- PMM

Signature · 1 line
Alex Bennée
#225 lore raw
In reply to Daniel P. Berrangé
Quoted 7 lines · Daniel P. Berrangé

If we bundle Meson, there's a risk that we see a new shiny feature in next meson, and bump our sub-module to the next release. And again. And again. And again. If we do that we'll never get to a place where we can rely on distro Meson. That will be bad.

So I think we need to be very mindful of this and strongly resist the urge to further increase our min meson version in future.

Agreed. Marc-André has a couple patches left, but they're just nice to have. Another possibility could be adding first-class Sphinx support to Meson (e.g. parsing the conf.py file to figure out the manpages directly).

Otherwise, 0.55.0 (or 0.56.0 if we want to avoid the warnings) should have all that we need, and we're already doing some pretty complicated things.

Paolo

#226 lore raw
In reply to Peter Maydell
Quoted 11 lines · Peter Maydell
Quoted 4 lines · Paolo Bonzini

This the more or less final version of the Meson conversion. Due to the sheer size of the series you have been CCed only on the cover letter.

Does this work with actually-released versions of Meson yet? I am still not very enthusiastic about the prospect of having to carry around an entire build system in a submodule. That still seems to me to be living closer to the bleeding edge than I would like...

Being on the edge is unavoidable if we actually want to use meson any time soon. If we wait for it to be in even 1/2 of the distros we target, then we will be delaying conversion by 1-2 years. I don't think that's desirable, when updating to new enough meson is not much more than runing "pip install meson --user"

Regards,
Daniel

Signature · 3 lines
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|
#227 lore raw
In reply to Paolo Bonzini
Quoted 57 lines · Paolo Bonzini

This the more or less final version of the Meson conversion. Due to the sheer size of the series you have been CCed only on the cover letter.

The series reaches the point where Makefile.target and unnest-vars can be removed, and all builds become non-recursive. I have also converted parts of the testsuite, notably qtest since it is needed for fuzzing. What's left for _after_ the merge is: 1) unit tests;
2) moving the rest of installation to meson (for which I have patches);
3) moving feature detection from configure to meson.

Things I still haven't tested:
- fuzzing
- non-x86/Linux builds
- static builds
- Docker and VM builds

Things I have checked:
- x86 builds
- modules
- "make install"
- internal slirp/dtc/capstone.

It should be more or less bisectable. I have not tried building _all_ steps, but I have tried both before and after each major one.

Build system rebuild rules seem to work reliably.

After a week or quite intense rebasing, my impression is more or less the same as last December: Meson looks more daunting, but it is actually much nicer to work with.

The diffstat so far is not very favorable, but remember that:

1) the series leaves quite a few nearly-obsolete bits in configure, Makefile and rules.mak (over 200 lines only in the makefiles).

2) configure test conversion will be where meson really shines. I included a couple examples just to show

meson: convert VNC and dependent libraries to meson
4 files changed, 44 insertions(+), 134 deletions(-)

meson: move SDL and SDL-image detection to meson
5 files changed, 30 insertions(+), 144 deletions(-)

meson: replace create-config with meson configure_file
6 files changed, 80 insertions(+), 168 deletions(-)

3) the idea behind using Makefile generators is to have stable code written in a high-level language instead of Makefile magic that tends to grow by accretion. So even though ninjatool is large at 1000 lines of Python, it can already be considered mature or even "done". It had only ~15 lines changed since the last post, and whenever debugging meson.build issues looking at build.ninja has always (literally!) been enough.

Quoted 1 line

Available on git://github.com/bonzini/qemu branch meson-poc-next.

I just threw your meson-poc-next branch at our CI systems. Observations:

1) If no meson is installed, configure quickly aborts with "ERROR: Meson not found. Use --meson=/path/to/meson|git|internal":

https://gitlab.com/huth/qemu/-/jobs/675533520

Could you simply change it to default got git/internal instead (where is the difference between git and internal?), so that we do not have to add a --meson=xxx to all the CI jobs everywhere?

2) With --meson=git added, I also do not get much further:
"./ui/meson.build:77:0: ERROR: Program 'keycodemapdb/tools/keymap-gen'
not found"

https://gitlab.com/huth/qemu/-/jobs/675546229

Any idea what's going wrong here?

3) macOS build fails in a different way:

../meson.build:1:0: ERROR: Value "gnu++03" for combo option "C++
language standard to use" is not one of the choices. Possible choices
are: "none", "c++98", "c++03", "c++11", "c++14", "c++17", "c++1z",
"c++2a", "gnu++11", "gnu++14", "gnu++17", "gnu++1z", "gnu++2a".
A full log can be found at /private/var/folders/3y/l0z1x3693dl_8n0qybp4dqwh0000gn/T/cirrus-ci-build/build/meson-logs/meson-log.txt
ERROR: meson setup failed

https://cirrus-ci.com/task/6514035426328576

Maybe we should use gnu++11 for C++ code nowadays? ... we still used gnu++98 in the past since GCC 4.8 (from CentOS/RHEL 7) has only "experimental" support for c++11 ... but since we're soon (in less than a year) going to drop support for that anyway, maybe we could switch it now already to gnu++11 ... ?

Thomas

#228 lore raw
Quoted 8 lines · Thomas Huth

../meson.build:1:0: ERROR: Value "gnu++03" for combo option "C++
language standard to use" is not one of the choices. Possible choices
are: "none", "c++98", "c++03", "c++11", "c++14", "c++17", "c++1z",
"c++2a", "gnu++11", "gnu++14", "gnu++17", "gnu++1z", "gnu++2a".
A full log can be found at /private/var/folders/3y/l0z1x3693dl_8n0qybp4dqwh0000gn/T/cirrus-ci-build/build/meson-logs/meson-log.txt
ERROR: meson setup failed

Quoted 7 lines

https://cirrus-ci.com/task/6514035426328576

Maybe we should use gnu++11 for C++ code nowadays? ... we still used gnu++98 in the past since GCC 4.8 (from CentOS/RHEL 7) has only "experimental" support for c++11 ... but since we're soon (in less than a year) going to drop support for that anyway, maybe we could switch it now already to gnu++11 ... ?

Yes, I can. And I'll look at the others, thanks!!!

Paolo

#230 lore raw
Quoted 11 lines · Paolo Bonzini
Quoted 7 lines · Thomas Huth

2) With --meson=git added, I also do not get much further:
"./ui/meson.build:77:0: ERROR: Program 'keycodemapdb/tools/keymap-gen'
not found"

https://gitlab.com/huth/qemu/-/jobs/675546229

Any idea what's going wrong here?

This is also a submodule not being initialized, ui/keycodemapdb/tools/keymap-gen comes from a submodule.

Ok. I've added a hack to my configure script to checkout the submodules, but still, it does not compile yet:

../tools/virtiofsd/meson.build:1:0: ERROR: Unknown variable
"libvhost_user".
https://gitlab.com/huth/qemu/-/jobs/675665455

Thomas

#231 lore raw
Quoted 13 lines · Thomas Huth
Quoted 11 lines · Paolo Bonzini
Quoted 7 lines · Thomas Huth

2) With --meson=git added, I also do not get much further:
"./ui/meson.build:77:0: ERROR: Program 'keycodemapdb/tools/keymap-gen'
not found"

https://gitlab.com/huth/qemu/-/jobs/675546229

Any idea what's going wrong here?

This is also a submodule not being initialized, ui/keycodemapdb/tools/keymap-gen comes from a submodule.

Quoted 6 lines

Ok. I've added a hack to my configure script to checkout the submodules, but still, it does not compile yet:

../tools/virtiofsd/meson.build:1:0: ERROR: Unknown variable
"libvhost_user".
https://gitlab.com/huth/qemu/-/jobs/675665455

At least the Debian container started to compile, but then fails here:

../hw/display/virtio-gpu.c:43:10: fatal error: virglrenderer.h: No such
file or directory
https://gitlab.com/huth/qemu/-/jobs/675665451

Thomas

#232 lore raw
Quoted 21 lines · Thomas Huth
Quoted 13 lines · Thomas Huth
Quoted 11 lines · Paolo Bonzini
Quoted 7 lines · Thomas Huth

2) With --meson=git added, I also do not get much further:
"./ui/meson.build:77:0: ERROR: Program 'keycodemapdb/tools/keymap-gen'
not found"

https://gitlab.com/huth/qemu/-/jobs/675546229

Any idea what's going wrong here?

This is also a submodule not being initialized, ui/keycodemapdb/tools/keymap-gen comes from a submodule.

Quoted 6 lines

Ok. I've added a hack to my configure script to checkout the submodules, but still, it does not compile yet:

../tools/virtiofsd/meson.build:1:0: ERROR: Unknown variable
"libvhost_user".
https://gitlab.com/huth/qemu/-/jobs/675665455

Quoted 5 lines

At least the Debian container started to compile, but then fails here:

../hw/display/virtio-gpu.c:43:10: fatal error: virglrenderer.h: No such
file or directory
https://gitlab.com/huth/qemu/-/jobs/675665451

And yet another error, this time on Travis with --disable-system :

../hw/display/meson.build:42:22: ERROR: Unknown variable
"config_all_devices".
https://travis-ci.com/github/huth/qemu/jobs/369657010#L1035

Thomas

#233 lore raw
Quoted 28 lines · Thomas Huth
Quoted 21 lines · Thomas Huth
Quoted 13 lines · Thomas Huth
Quoted 11 lines · Paolo Bonzini
Quoted 7 lines · Thomas Huth

2) With --meson=git added, I also do not get much further:
"./ui/meson.build:77:0: ERROR: Program 'keycodemapdb/tools/keymap-gen'
not found"

https://gitlab.com/huth/qemu/-/jobs/675546229

Any idea what's going wrong here?

This is also a submodule not being initialized, ui/keycodemapdb/tools/keymap-gen comes from a submodule.

Quoted 6 lines

Ok. I've added a hack to my configure script to checkout the submodules, but still, it does not compile yet:

../tools/virtiofsd/meson.build:1:0: ERROR: Unknown variable
"libvhost_user".
https://gitlab.com/huth/qemu/-/jobs/675665455

Quoted 5 lines

At least the Debian container started to compile, but then fails here:

../hw/display/virtio-gpu.c:43:10: fatal error: virglrenderer.h: No such
file or directory
https://gitlab.com/huth/qemu/-/jobs/675665451

Quoted 5 lines

And yet another error, this time on Travis with --disable-system :

../hw/display/meson.build:42:22: ERROR: Unknown variable
"config_all_devices".
https://travis-ci.com/github/huth/qemu/jobs/369657010#L1035

FreeBSD fails since dbus-daemon is not found:

https://cirrus-ci.com/task/6446150314098688?command=main#L203

macOS now stops because the qemu_nbd variable is not set:

https://cirrus-ci.com/task/5038775430545408?command=main#L207

Thomas

#234 lore raw
Quoted 7 lines · Thomas Huth

FreeBSD fails since dbus-daemon is not found:

https://cirrus-ci.com/task/6446150314098688?command=main#L203

macOS now stops because the qemu_nbd variable is not set:

https://cirrus-ci.com/task/5038775430545408?command=main#L207

A little refactoring needed for the latter, while the former is a one-liner.

meson.build +4 -2
index dbe1d08..0a24116 100644
@@ -1051,12 +1051,14 @@ endif
 if have_tools
   qemu_img = executable('qemu-img', [files('qemu-img.c'), hxdep],
              dependencies: [authz, block, crypto, io, qom, qemuutil], install: true)
+  qemu_io = executable('qemu-io', files('qemu-io.c'),
+             dependencies: [block, qemuutil], install: true)
+  qemu_block_tools = [qemu_img, qemu_io]
   if host_machine.system() == 'linux' or host_machine.system() == 'sunos' or host_machine.system().endswith('bsd')
     qemu_nbd = executable('qemu-nbd', files('qemu-nbd.c'),
                dependencies: [block, qemuutil], install: true)
+    qemu_block_tools += [qemu_nbd]
   endif
-  qemu_io = executable('qemu-io', files('qemu-io.c'),
-             dependencies: [block, qemuutil], install: true)
 
   subdir('storage-daemon')
   subdir('contrib/rdmacm-mux')
tests/qemu-iotests/meson.build +6 -4
index 60e81a2..3de09fb 100644
@@ -1,8 +1,10 @@
-dep = [qemu_img, qemu_io, qemu_nbd, emulators]
 if 'CONFIG_LINUX' in config_host
-    dep += executable('socket_scm_helper', 'socket_scm_helper.c',
-                      build_by_default: false)
+    socket_scm_helper = executable('socket_scm_helper', 'socket_scm_helper.c',
+                                    build_by_default: false)
+else
+    socket_scm_helper = []
 endif
-test('qemu-iotests', sh, args: [files('../check-block.sh')], depends: dep,
+test('qemu-iotests', sh, args: [files('../check-block.sh')],
+     depends: [qemu_block_tools, emulators, socket_scm_helper],
      suite: 'block', timeout: 10000)
 
tests/qtest/meson.build +1 -1
index c2601d9..507ee12 100644
@@ -66,7 +66,7 @@ qtests_i386 = \
    'test-x86-cpuid-compat',
    'numa-test']
 
-dbus_daemon = find_program('dbus-daemon')
+dbus_daemon = find_program('dbus-daemon', required: false)
 if dbus_daemon.found() and config_host.has_key('GDBUS_CODEGEN')
   # Temporarily disabled due to Patchew failures:
   #qtests_i386 += ['dbus-vmstate-test']

I pushed again to meson-poc-next, diffstat is

 configure                      |  2 +-
 hw/display/meson.build         |  7 -------
 meson.build                    | 19 +++++++++++--------
 tests/qemu-iotests/meson.build | 10 ++++++----
 tests/qtest/meson.build        |  2 +-
 5 files changed, 19 insertions(+), 21 deletions(-)

Git submodules still not fixed

#235 lore raw
Quoted 10 lines · Paolo Bonzini
Quoted 7 lines · Thomas Huth

FreeBSD fails since dbus-daemon is not found:

https://cirrus-ci.com/task/6446150314098688?command=main#L203

macOS now stops because the qemu_nbd variable is not set:

https://cirrus-ci.com/task/5038775430545408?command=main#L207

A little refactoring needed for the latter, while the former is a one-liner.

Thanks! Now, both, macOS and FreeBSD builds stop with:

../tests/qtest/meson.build:204:0: ERROR: Unknown variable "dbus_vmstate1".
https://cirrus-ci.com/task/6220295902068736?command=main#L210

Thomas

#236 lore raw
Quoted 4 lines · Thomas Huth

Thanks! Now, both, macOS and FreeBSD builds stop with:

../tests/qtest/meson.build:204:0: ERROR: Unknown variable "dbus_vmstate1".
https://cirrus-ci.com/task/6220295902068736?command=main#L210

tests/qtest/meson.build +4 -2
index 507ee126e7..9a7daad59d 100644
@@ -76,7 +76,9 @@ if dbus_daemon.found() and config_host.has_key('GDBUS_CODEGEN')
                                 command: [config_host['GDBUS_CODEGEN'],
                                           '@INPUT@',
                                           '--interface-prefix', 'org.qemu',
-                                          '--generate-c-code', '@BASENAME@'])
+                                          '--generate-c-code', '@BASENAME@']).to_list()
+else
+  dbus_vmstate1 = []
 endif
 
 qtests_x86_64 = qtests_i386
@@ -207,7 +209,7 @@ extra_qtest_srcs = {
   'cdrom-test': files('boot-sector.c'),
   'migration-test': files('migration-helpers.c'),
   'ivshmem-test': files('../../contrib/ivshmem-server/ivshmem-server.c'),
-  'dbus-vmstate-test': files('migration-helpers.c') + dbus_vmstate1.to_list(),
+  'dbus-vmstate-test': files('migration-helpers.c') + dbus_vmstate1,
   'vmgenid-test': files('boot-sector.c', 'acpi-utils.c'),
   'tpm-crb-swtpm-test': files('tpm-emu.c', 'tpm-util.c', 'tpm-tests.c'),
   'tpm-crb-test': files('tpm-emu.c', 'tpm-util.c', 'tpm-tests.c'),

Easy peasy lemon squeezy! :)

Paolo

#237 lore raw
Quoted 7 lines · Paolo Bonzini
Quoted 4 lines · Thomas Huth

Thanks! Now, both, macOS and FreeBSD builds stop with:

../tests/qtest/meson.build:204:0: ERROR: Unknown variable "dbus_vmstate1".
https://cirrus-ci.com/task/6220295902068736?command=main#L210

Easy peasy lemon squeezy! :)

Nice, we're getting there, now macOS starts compiling, but then fails here:

../contrib/libvhost-user/libvhost-user.c:27:10: fatal error:
'sys/eventfd.h' file not found ../contrib/libvhost-user/libvhost-user.h:21:10: fatal error:
'linux/vhost.h' file not found
https://cirrus-ci.com/task/5170197348745216?command=main#L810

(and FWIW, there are some weird "file: ... has no symbols" earlier in the log when running AR on the capstone files)

Thomas

#238 lore raw
Quoted 10 lines · Thomas Huth

Nice, we're getting there, now macOS starts compiling, but then fails here:

../contrib/libvhost-user/libvhost-user.c:27:10: fatal error:
'sys/eventfd.h' file not found ../contrib/libvhost-user/libvhost-user.h:21:10: fatal error:
'linux/vhost.h' file not found
https://cirrus-ci.com/task/5170197348745216?command=main#L810

(and FWIW, there are some weird "file: ... has no symbols" earlier in the log when running AR on the capstone files)

It's not supposed to build at all. I'll check the "AR" errors and Conny's reported zstd failure.

Paolo

#239 lore raw
In reply to Thomas Huth
Quoted 9 lines · Thomas Huth
Quoted 6 lines · Paolo Bonzini
Quoted 4 lines · Thomas Huth

Thanks! Now, both, macOS and FreeBSD builds stop with:

../tests/qtest/meson.build:204:0: ERROR: Unknown variable "dbus_vmstate1".
https://cirrus-ci.com/task/6220295902068736?command=main#L210

Easy peasy lemon squeezy! :)

Nice, we're getting there, now macOS starts compiling, but then fails here:

Quoted 8 lines

../contrib/libvhost-user/libvhost-user.c:27:10: fatal error:
'sys/eventfd.h' file not found ../contrib/libvhost-user/libvhost-user.h:21:10: fatal error:
'linux/vhost.h' file not found
https://cirrus-ci.com/task/5170197348745216?command=main#L810

(and FWIW, there are some weird "file: ... has no symbols" earlier in the log when running AR on the capstone files)

This one is interesting, the vhost-user samples have never been built by default so they have always been broken on macOS. So that will be a bugfix.

Paolo

#240 lore raw
In reply to Thomas Huth
Quoted 5 lines · Thomas Huth
Quoted 5 lines

At least the Debian container started to compile, but then fails here:

../hw/display/virtio-gpu.c:43:10: fatal error: virglrenderer.h: No such
file or directory
https://gitlab.com/huth/qemu/-/jobs/675665451

Likely just a rebase issue:

hw/display/meson.build +0 -7
index efe18f2..ffcccc0 100644
@@ -81,13 +81,6 @@ if config_all_devices.has_key('CONFIG_VIRTIO_GPU')
                      if_true: virtio_gpu_ss)
 endif
 
-specific_ss.add(when: [pixman, 'CONFIG_VIRTIO_GPU'], if_true: [files('virtio-gpu-base.c', 'virtio-gpu.c', 'virtio-gpu-3d.c'), virgl])
-specific_ss.add(when: [pixman, 'CONFIG_VHOST_USER_GPU'], if_true: files('vhost-user-gpu.c'))
-specific_ss.add(when: ['CONFIG_VIRTIO_GPU', 'CONFIG_VIRTIO_PCI'], if_true: files('virtio-gpu-pci.c'))
-specific_ss.add(when: ['CONFIG_VHOST_USER_GPU', 'CONFIG_VIRTIO_PCI'], if_true: files('vhost-user-gpu-pci.c'))
-specific_ss.add(when: 'CONFIG_VIRTIO_VGA', if_true: files('virtio-vga.c'))
-specific_ss.add(when: 'CONFIG_VHOST_USER_VGA', if_true: files('vhost-user-vga.c'))
-
 specific_ss.add(when: [x11, opengl, 'CONFIG_MILKYMIST_TMU2'], if_true: files('milkymist-tmu2.c'))
 specific_ss.add(when: 'CONFIG_OMAP', if_true: files('omap_lcdc.c'))
 
Quoted 5 lines

And yet another error, this time on Travis with --disable-system :

../hw/display/meson.build:42:22: ERROR: Unknown variable
"config_all_devices".
https://travis-ci.com/github/huth/qemu/jobs/369657010#L1035

meson.build +2 -2
index 5635f8e..ddd73d4 100644
@@ -491,10 +491,10 @@ if have_system
     command: [grepy, '@INPUT@'],
   )
   config_all_devices = keyval.load(config_all_devices_mak)
-  config_all = config_all_devices
 else
-  config_all = {}
+  config_all_devices = {}
 endif
+config_all = config_all_devices
 config_all += config_host
 config_all += config_all_disas
 config_all += {

More type checking. I'll finish my current round of testing and push again.

Paolo

#241 lore raw
In reply to Thomas Huth
Quoted 13 lines · Thomas Huth
Quoted 11 lines · Paolo Bonzini
Quoted 7 lines · Thomas Huth

2) With --meson=git added, I also do not get much further:
"./ui/meson.build:77:0: ERROR: Program 'keycodemapdb/tools/keymap-gen'
not found"

https://gitlab.com/huth/qemu/-/jobs/675546229

Any idea what's going wrong here?

This is also a submodule not being initialized, ui/keycodemapdb/tools/keymap-gen comes from a submodule.

Quoted 6 lines

Ok. I've added a hack to my configure script to checkout the submodules, but still, it does not compile yet:

../tools/virtiofsd/meson.build:1:0: ERROR: Unknown variable
"libvhost_user".
https://gitlab.com/huth/qemu/-/jobs/675665455

Fixed, thanks:

meson.build +2 -1
index 38f1f40..cc96d07 100644
@@ -1091,9 +1091,10 @@ if have_tools
     subdir('contrib/ivshmem-client')
     subdir('contrib/ivshmem-server')
   endif
+
+  subdir('tools')
 endif
 
-subdir('tools')
 subdir('scripts')
 subdir('pc-bios')
 subdir('tests')

(This is an example of Meson doing a much stronger check on the validity of the build).

Paolo

#242 lore raw
Quoted 29 lines · Paolo Bonzini
Quoted 13 lines · Thomas Huth
Quoted 11 lines · Paolo Bonzini
Quoted 7 lines · Thomas Huth

2) With --meson=git added, I also do not get much further:
"./ui/meson.build:77:0: ERROR: Program 'keycodemapdb/tools/keymap-gen'
not found"

https://gitlab.com/huth/qemu/-/jobs/675546229

Any idea what's going wrong here?

This is also a submodule not being initialized, ui/keycodemapdb/tools/keymap-gen comes from a submodule.

Quoted 6 lines

Ok. I've added a hack to my configure script to checkout the submodules, but still, it does not compile yet:

../tools/virtiofsd/meson.build:1:0: ERROR: Unknown variable
"libvhost_user".
https://gitlab.com/huth/qemu/-/jobs/675665455

Fixed, thanks:

meson.build +0 -0
index 38f1f40..cc96d07 100644
@@ -1091,9 +1091,10 @@ if have_tools
     subdir('contrib/ivshmem-client')

meson.build if have_tools · line 1100

Quoted 10 lines
meson.build +2 -1
     subdir('contrib/ivshmem-server')
   endif
+
+  subdir('tools')
 endif
 
-subdir('tools')
 subdir('scripts')
 subdir('pc-bios')
 subdir('tests')

Thanks! With the fix, it now gets a little bit further, but then stops with:

../meson.build:1258:3: ERROR: Key CONFIG_QEMU_PRIVATE_XTS is not in dict
https://gitlab.com/huth/qemu/-/jobs/675699330#L130

Thomas

#243 lore raw
Quoted 4 lines · Thomas Huth

Thanks! With the fix, it now gets a little bit further, but then stops with:

../meson.build:1258:3: ERROR: Key CONFIG_QEMU_PRIVATE_XTS is not in dict
https://gitlab.com/huth/qemu/-/jobs/675699330#L130

meson.build +2 -2
index d14d4bb..5bcfa09 100644
@@ -944,12 +944,12 @@ summary_info += {'GNUTLS support':    config_host.has_key('CONFIG_GNUTLS')}
 summary_info += {'libgcrypt':         config_host.has_key('CONFIG_GCRYPT')}
 if config_host.has_key('CONFIG_GCRYPT')
    summary_info += {'  hmac':            config_host.has_key('CONFIG_GCRYPT_HMAC')}
-   summary_info += {'  XTS':             config_host['CONFIG_QEMU_PRIVATE_XTS'] != 'y'}
+   summary_info += {'  XTS':             not config_host.has_key('CONFIG_QEMU_PRIVATE_XTS')}
 endif
 # TODO: add back version
 summary_info += {'nettle':            config_host.has_key('CONFIG_NETTLE')}
 if config_host.has_key('CONFIG_NETTLE')
-   summary_info += {'  XTS':             config_host['CONFIG_QEMU_PRIVATE_XTS'] != 'y'}
+   summary_info += {'  XTS':             not config_host.has_key('CONFIG_QEMU_PRIVATE_XTS')}
 endif
 summary_info += {'libtasn1':          config_host.has_key('CONFIG_TASN1')}
 summary_info += {'PAM':               config_host.has_key('CONFIG_AUTH_PAM')}

:)

Thanks very much. Sorry for the amount of breakage, at least it's all been trivial to fix so far.

Paolo

#244 lore raw
Quoted 15 lines · On Fri, 7 Aug 2020 12:08:17 +0200 Paolo Bonzini <[email protected]> wrote:
Quoted 4 lines · Thomas Huth

Thanks! With the fix, it now gets a little bit further, but then stops with:

../meson.build:1258:3: ERROR: Key CONFIG_QEMU_PRIVATE_XTS is not in dict
https://gitlab.com/huth/qemu/-/jobs/675699330#L130

meson.build +0 -1
index d14d4bb..5bcfa09 100644
@@ -944,12 +944,12 @@ summary_info += {'GNUTLS support':    config_host.has_key('CONFIG_GNUTLS')}
 summary_info += {'libgcrypt':         config_host.has_key('CONFIG_GCRYPT')}
 if config_host.has_key('CONFIG_GCRYPT')
    summary_info += {'  hmac':            config_host.has_key('CONFIG_GCRYPT_HMAC')}
-   summary_info += {'  XTS':             config_host['CONFIG_QEMU_PRIVATE_XTS'] != 'y'}

meson.build summary_info += {'GNUTLS support': config_host.has_key('CONFIG_GNUTLS')} · line 955

Quoted 10 lines
meson.build +2 -1
+   summary_info += {'  XTS':             not config_host.has_key('CONFIG_QEMU_PRIVATE_XTS')}
 endif
 # TODO: add back version
 summary_info += {'nettle':            config_host.has_key('CONFIG_NETTLE')}
 if config_host.has_key('CONFIG_NETTLE')
-   summary_info += {'  XTS':             config_host['CONFIG_QEMU_PRIVATE_XTS'] != 'y'}
+   summary_info += {'  XTS':             not config_host.has_key('CONFIG_QEMU_PRIVATE_XTS')}
 endif
 summary_info += {'libtasn1':          config_host.has_key('CONFIG_TASN1')}
 summary_info += {'PAM':               config_host.has_key('CONFIG_AUTH_PAM')}

That one also seems to have fixed my x86 build woes.

#245 lore raw
Quoted 22 lines · Cornelia Huck
Quoted 19 lines · On Fri, 7 Aug 2020 12:08:17 +0200 Paolo Bonzini <[email protected]> wrote:
Quoted 4 lines · Thomas Huth

Thanks! With the fix, it now gets a little bit further, but then stops with:

../meson.build:1258:3: ERROR: Key CONFIG_QEMU_PRIVATE_XTS is not in dict
https://gitlab.com/huth/qemu/-/jobs/675699330#L130

meson.build +1 -1
index d14d4bb..5bcfa09 100644
@@ -944,12 +944,12 @@ summary_info += {'GNUTLS support':    config_host.has_key('CONFIG_GNUTLS')}
 summary_info += {'libgcrypt':         config_host.has_key('CONFIG_GCRYPT')}
 if config_host.has_key('CONFIG_GCRYPT')
    summary_info += {'  hmac':            config_host.has_key('CONFIG_GCRYPT_HMAC')}
-   summary_info += {'  XTS':             config_host['CONFIG_QEMU_PRIVATE_XTS'] != 'y'}
+   summary_info += {'  XTS':             not config_host.has_key('CONFIG_QEMU_PRIVATE_XTS')}
 endif
 # TODO: add back version
 summary_info += {'nettle':            config_host.has_key('CONFIG_NETTLE')}
Quoted 8 lines

meson.build summary_info += {'GNUTLS support': config_host.has_key('CONFIG_GNUTLS')} · line 955

Quoted 6 lines
meson.build +1 -1
 if config_host.has_key('CONFIG_NETTLE')
-   summary_info += {'  XTS':             config_host['CONFIG_QEMU_PRIVATE_XTS'] != 'y'}
+   summary_info += {'  XTS':             not config_host.has_key('CONFIG_QEMU_PRIVATE_XTS')}
 endif
 summary_info += {'libtasn1':          config_host.has_key('CONFIG_TASN1')}
 summary_info += {'PAM':               config_host.has_key('CONFIG_AUTH_PAM')}

That one also seems to have fixed my x86 build woes.

Great. That was an unusual case of things breaking with *newer* distros (that do have XTS in the system library). Please just pull again as that has many fixes for other things that Thomas reported.

FWIW, impressions on reviewing these mini patches are very welcome. After all reviewing small patches is more common than reviewing the whole 140 patch thing, so it's important that people can quickly get an idea of what's going on in a small patch.

Paolo

#246 lore raw
In reply to Paolo Bonzini
Quoted 12 lines · Paolo Bonzini

This the more or less final version of the Meson conversion. Due to the sheer size of the series you have been CCed only on the cover letter.

The series reaches the point where Makefile.target and unnest-vars can be removed, and all builds become non-recursive. I have also converted parts of the testsuite, notably qtest since it is needed for fuzzing. What's left for _after_ the merge is: 1) unit tests;
2) moving the rest of installation to meson (for which I have patches);
3) moving feature detection from configure to meson.

Quoted 1 line

Available on git://github.com/bonzini/qemu branch meson-poc-next.

I built with ../configure --target-list=x86_64-softmmu on current git master (e1d322c40524d2c544d1fcd37b267d106d16d328) and on meson-poc-next (4877fbc31ecc2dd9705036628b0e53b1b2414045) and compared the binaries.

I'm using Fedora 31 with Meson 0.55.0

-help output has changed in the version string

< QEMU emulator version 5.0.93 (v5.1.0-rc3)
---

Quoted 1 line

QEMU emulator version 5.0.93

New binaries have lost a bunch of libraries they previously linked to. This isn't neccessarily a bug, if the old make code was incorrectly adding too many libraries.

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

qemu-system-x86_64<<<<

< libibumad.so.3
< libxenguest.so.4.12
< libxml2.so.2

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

qemu-bridge-helper<<<<

< libdl.so.2
< libffi.so.6
< libgcc_s.so.1
< libgmp.so.10
< libgnutls.so.30
< libgthread-2.0.so.0
< libhogweed.so.5
< libidn2.so.0
< libm.so.6
< libnettle.so.7
< libp11-kit.so.0
< librt.so.1
< libstdc++.so.6
< libtasn1.so.6
< libunistring.so.2
< libutil.so.1
< libz.so.1

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

qemu-edid<<<<

< libcap-ng.so.0
< libdl.so.2
< libffi.so.6
< libgcc_s.so.1
< libgmp.so.10
< libgnutls.so.30
< libgthread-2.0.so.0
< libhogweed.so.5
< libidn2.so.0
< libnettle.so.7
< libp11-kit.so.0
< librt.so.1
< libstdc++.so.6
< libtasn1.so.6
< libunistring.so.2
< libutil.so.1
< libz.so.1

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

qemu-io<<<<

< libgthread-2.0.so.0
< liblzma.so.5
< libutil.so.1
< libxml2.so.2

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

qemu-nbd<<<<

< libgthread-2.0.so.0
< liblzma.so.5
< libutil.so.1
< libxml2.so.2

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

qemu-pr-helper<<<<

< libgthread-2.0.so.0
< libstdc++.so.6
< libutil.so.1
< libz.so.1

Comparing 'make install', I see some differences:

< /vroot/usr/local/bin/elf2dmp
< /vroot/usr/local/bin/qemu-edid
< /vroot/usr/local/bin/qemu-ga
< /vroot/usr/local/bin/qemu-storage-daemon

Quoted 1 line

/vroot/usr/local/bin/qemu-pr-helper

< /vroot/usr/local/libexec/qemu-pr-helper
< /vroot/usr/local/libexec/vhost-user-gpu
< /vroot/usr/local/libexec/virtfs-proxy-helper
< /vroot/usr/local/libexec/virtiofsd

< /vroot/usr/local/share/locale/sv/LC_MESSAGES/qemu.mo

Some documentation files have moved - gaining a bogus extra directory component, and others are missing...

Quoted 30 lines

/vroot/usr/local/share/doc/qemu/devel/devel/atomics.html /vroot/usr/local/share/doc/qemu/devel/devel/bitops.html /vroot/usr/local/share/doc/qemu/devel/devel/.buildinfo /vroot/usr/local/share/doc/qemu/devel/devel/clocks.html /vroot/usr/local/share/doc/qemu/devel/devel/decodetree.html /vroot/usr/local/share/doc/qemu/devel/devel/genindex.html /vroot/usr/local/share/doc/qemu/devel/devel/index.html /vroot/usr/local/share/doc/qemu/devel/devel/kconfig.html /vroot/usr/local/share/doc/qemu/devel/devel/loads-stores.html /vroot/usr/local/share/doc/qemu/devel/devel/memory.html /vroot/usr/local/share/doc/qemu/devel/devel/migration.html /vroot/usr/local/share/doc/qemu/devel/devel/multi-thread-tcg.html /vroot/usr/local/share/doc/qemu/devel/devel/objects.inv /vroot/usr/local/share/doc/qemu/devel/devel/reset.html /vroot/usr/local/share/doc/qemu/devel/devel/s390-dasd-ipl.html /vroot/usr/local/share/doc/qemu/devel/devel/search.html /vroot/usr/local/share/doc/qemu/devel/devel/searchindex.js /vroot/usr/local/share/doc/qemu/devel/devel/secure-coding-practices.html /vroot/usr/local/share/doc/qemu/devel/devel/stable-process.html /vroot/usr/local/share/doc/qemu/devel/devel/_static/alabaster.css /vroot/usr/local/share/doc/qemu/devel/devel/_static/basic.css /vroot/usr/local/share/doc/qemu/devel/devel/_static/custom.css /vroot/usr/local/share/doc/qemu/devel/devel/_static/doctools.js /vroot/usr/local/share/doc/qemu/devel/devel/_static/documentation_options.js /vroot/usr/local/share/doc/qemu/devel/devel/_static/file.png /vroot/usr/local/share/doc/qemu/devel/devel/_static/jquery-3.2.1.js /vroot/usr/local/share/doc/qemu/devel/devel/_static/jquery.js /vroot/usr/local/share/doc/qemu/devel/devel/_static/language_data.js /vroot/usr/local/share/doc/qemu/devel/devel/_static/minus.png /vroot/usr/local/share/doc/qemu/devel/devel/_static/plus.png

Quoted 8 lines

/vroot/usr/local/share/doc/qemu/devel/devel/_static/pygments.css /vroot/usr/local/share/doc/qemu/devel/devel/_static/searchtools.js /vroot/usr/local/share/doc/qemu/devel/devel/_static/underscore-1.3.1.js /vroot/usr/local/share/doc/qemu/devel/devel/_static/underscore.js /vroot/usr/local/share/doc/qemu/devel/devel/tcg.html /vroot/usr/local/share/doc/qemu/devel/devel/tcg-icount.html /vroot/usr/local/share/doc/qemu/devel/devel/tcg-plugins.html /vroot/usr/local/share/doc/qemu/devel/devel/testing.html

< /vroot/usr/local/share/doc/qemu/interop/bitmaps.html
< /vroot/usr/local/share/doc/qemu/interop/.buildinfo
< /vroot/usr/local/share/doc/qemu/interop/dbus.html
< /vroot/usr/local/share/doc/qemu/interop/dbus-vmstate.html < /vroot/usr/local/share/doc/qemu/interop/genindex.html
< /vroot/usr/local/share/doc/qemu/interop/index.html
< /vroot/usr/local/share/doc/qemu/interop/live-block-operations.html < /vroot/usr/local/share/doc/qemu/interop/objects.inv
< /vroot/usr/local/share/doc/qemu/interop/pr-helper.html < /vroot/usr/local/share/doc/qemu/interop/qemu-ga.html

Quoted 24 lines

/vroot/usr/local/share/doc/qemu/interop/interop/bitmaps.html /vroot/usr/local/share/doc/qemu/interop/interop/.buildinfo /vroot/usr/local/share/doc/qemu/interop/interop/dbus.html /vroot/usr/local/share/doc/qemu/interop/interop/dbus-vmstate.html /vroot/usr/local/share/doc/qemu/interop/interop/genindex.html /vroot/usr/local/share/doc/qemu/interop/interop/index.html /vroot/usr/local/share/doc/qemu/interop/interop/live-block-operations.html /vroot/usr/local/share/doc/qemu/interop/interop/objects.inv /vroot/usr/local/share/doc/qemu/interop/interop/pr-helper.html /vroot/usr/local/share/doc/qemu/interop/interop/qemu-ga.html /vroot/usr/local/share/doc/qemu/interop/interop/search.html /vroot/usr/local/share/doc/qemu/interop/interop/searchindex.js /vroot/usr/local/share/doc/qemu/interop/interop/_static/alabaster.css /vroot/usr/local/share/doc/qemu/interop/interop/_static/basic.css /vroot/usr/local/share/doc/qemu/interop/interop/_static/custom.css /vroot/usr/local/share/doc/qemu/interop/interop/_static/doctools.js /vroot/usr/local/share/doc/qemu/interop/interop/_static/documentation_options.js /vroot/usr/local/share/doc/qemu/interop/interop/_static/file.png /vroot/usr/local/share/doc/qemu/interop/interop/_static/jquery-3.2.1.js /vroot/usr/local/share/doc/qemu/interop/interop/_static/jquery.js /vroot/usr/local/share/doc/qemu/interop/interop/_static/language_data.js /vroot/usr/local/share/doc/qemu/interop/interop/_static/minus.png /vroot/usr/local/share/doc/qemu/interop/interop/_static/plus.png /vroot/usr/local/share/doc/qemu/interop/interop/_static/pygments.css

Quoted 8 lines

/vroot/usr/local/share/doc/qemu/interop/interop/_static/searchtools.js /vroot/usr/local/share/doc/qemu/interop/interop/_static/underscore-1.3.1.js /vroot/usr/local/share/doc/qemu/interop/interop/_static/underscore.js /vroot/usr/local/share/doc/qemu/interop/interop/vhost-user-gpu.html /vroot/usr/local/share/doc/qemu/interop/interop/vhost-user.html /vroot/usr/local/share/doc/qemu/interop/interop/vhost-vdpa.html /vroot/usr/local/share/doc/qemu/interop/qemu-ga-ref.info /vroot/usr/local/share/doc/qemu/interop/qemu-qmp-ref.info

< /vroot/usr/local/share/doc/qemu/interop/search.html
< /vroot/usr/local/share/doc/qemu/interop/searchindex.js
< /vroot/usr/local/share/doc/qemu/interop/_static/alabaster.css < /vroot/usr/local/share/doc/qemu/interop/_static/basic.css
< /vroot/usr/local/share/doc/qemu/interop/_static/custom.css
< /vroot/usr/local/share/doc/qemu/interop/_static/doctools.js < /vroot/usr/local/share/doc/qemu/interop/_static/documentation_options.js < /vroot/usr/local/share/doc/qemu/interop/_static/file.png
< /vroot/usr/local/share/doc/qemu/interop/_static/jquery-3.2.1.js < /vroot/usr/local/share/doc/qemu/interop/_static/jquery.js
< /vroot/usr/local/share/doc/qemu/interop/_static/language_data.js < /vroot/usr/local/share/doc/qemu/interop/_static/minus.png
< /vroot/usr/local/share/doc/qemu/interop/_static/plus.png
< /vroot/usr/local/share/doc/qemu/interop/_static/pygments.css < /vroot/usr/local/share/doc/qemu/interop/_static/searchtools.js < /vroot/usr/local/share/doc/qemu/interop/_static/underscore-1.3.1.js < /vroot/usr/local/share/doc/qemu/interop/_static/underscore.js < /vroot/usr/local/share/doc/qemu/interop/vhost-user-gpu.html < /vroot/usr/local/share/doc/qemu/interop/vhost-user.html
< /vroot/usr/local/share/doc/qemu/interop/vhost-vdpa.html
< /vroot/usr/local/share/doc/qemu/specs/acpi_hest_ghes.html
< /vroot/usr/local/share/doc/qemu/specs/acpi_hw_reduced_hotplug.html < /vroot/usr/local/share/doc/qemu/specs/.buildinfo
< /vroot/usr/local/share/doc/qemu/specs/genindex.html
< /vroot/usr/local/share/doc/qemu/specs/index.html
< /vroot/usr/local/share/doc/qemu/specs/objects.inv
< /vroot/usr/local/share/doc/qemu/specs/ppc-spapr-xive.html
< /vroot/usr/local/share/doc/qemu/specs/ppc-xive.html
< /vroot/usr/local/share/doc/qemu/specs/search.html
< /vroot/usr/local/share/doc/qemu/specs/searchindex.js
< /vroot/usr/local/share/doc/qemu/specs/_static/alabaster.css < /vroot/usr/local/share/doc/qemu/specs/_static/basic.css
< /vroot/usr/local/share/doc/qemu/specs/_static/custom.css
< /vroot/usr/local/share/doc/qemu/specs/_static/doctools.js
< /vroot/usr/local/share/doc/qemu/specs/_static/documentation_options.js < /vroot/usr/local/share/doc/qemu/specs/_static/file.png
< /vroot/usr/local/share/doc/qemu/specs/_static/jquery-3.2.1.js < /vroot/usr/local/share/doc/qemu/specs/_static/jquery.js
< /vroot/usr/local/share/doc/qemu/specs/_static/language_data.js < /vroot/usr/local/share/doc/qemu/specs/_static/minus.png
< /vroot/usr/local/share/doc/qemu/specs/_static/plus.png
< /vroot/usr/local/share/doc/qemu/specs/_static/pygments.css
< /vroot/usr/local/share/doc/qemu/specs/_static/searchtools.js < /vroot/usr/local/share/doc/qemu/specs/_static/underscore-1.3.1.js < /vroot/usr/local/share/doc/qemu/specs/_static/underscore.js < /vroot/usr/local/share/doc/qemu/specs/tpm.html
< /vroot/usr/local/share/doc/qemu/system/arm/aspeed.html
< /vroot/usr/local/share/doc/qemu/system/arm/collie.html
< /vroot/usr/local/share/doc/qemu/system/arm/cpu-features.html < /vroot/usr/local/share/doc/qemu/system/arm/digic.html
< /vroot/usr/local/share/doc/qemu/system/arm/gumstix.html
< /vroot/usr/local/share/doc/qemu/system/arm/integratorcp.html < /vroot/usr/local/share/doc/qemu/system/arm/mps2.html
< /vroot/usr/local/share/doc/qemu/system/arm/musca.html
< /vroot/usr/local/share/doc/qemu/system/arm/musicpal.html
< /vroot/usr/local/share/doc/qemu/system/arm/nseries.html
< /vroot/usr/local/share/doc/qemu/system/arm/orangepi.html
< /vroot/usr/local/share/doc/qemu/system/arm/palm.html
< /vroot/usr/local/share/doc/qemu/system/arm/realview.html
< /vroot/usr/local/share/doc/qemu/system/arm/stellaris.html
< /vroot/usr/local/share/doc/qemu/system/arm/sx1.html
< /vroot/usr/local/share/doc/qemu/system/arm/versatile.html
< /vroot/usr/local/share/doc/qemu/system/arm/vexpress.html
< /vroot/usr/local/share/doc/qemu/system/arm/virt.html
< /vroot/usr/local/share/doc/qemu/system/arm/xscale.html
< /vroot/usr/local/share/doc/qemu/system/.buildinfo
< /vroot/usr/local/share/doc/qemu/system/build-platforms.html < /vroot/usr/local/share/doc/qemu/system/deprecated.html
< /vroot/usr/local/share/doc/qemu/system/gdb.html
< /vroot/usr/local/share/doc/qemu/system/genindex.html
< /vroot/usr/local/share/doc/qemu/system/images.html
< /vroot/usr/local/share/doc/qemu/system/index.html
< /vroot/usr/local/share/doc/qemu/system/invocation.html
< /vroot/usr/local/share/doc/qemu/system/ivshmem.html
< /vroot/usr/local/share/doc/qemu/system/keys.html
< /vroot/usr/local/share/doc/qemu/system/license.html
< /vroot/usr/local/share/doc/qemu/system/linuxboot.html
< /vroot/usr/local/share/doc/qemu/system/managed-startup.html < /vroot/usr/local/share/doc/qemu/system/monitor.html
< /vroot/usr/local/share/doc/qemu/system/mux-chardev.html
< /vroot/usr/local/share/doc/qemu/system/net.html
< /vroot/usr/local/share/doc/qemu/system/objects.inv
< /vroot/usr/local/share/doc/qemu/system/qemu-block-drivers.html < /vroot/usr/local/share/doc/qemu/system/qemu-cpu-models.html < /vroot/usr/local/share/doc/qemu/system/qemu-manpage.html
< /vroot/usr/local/share/doc/qemu/system/quickstart.html
< /vroot/usr/local/share/doc/qemu/system/s390x/3270.html
< /vroot/usr/local/share/doc/qemu/system/s390x/css.html
< /vroot/usr/local/share/doc/qemu/system/s390x/protvirt.html
< /vroot/usr/local/share/doc/qemu/system/s390x/vfio-ap.html
< /vroot/usr/local/share/doc/qemu/system/s390x/vfio-ccw.html
< /vroot/usr/local/share/doc/qemu/system/search.html
< /vroot/usr/local/share/doc/qemu/system/searchindex.js
< /vroot/usr/local/share/doc/qemu/system/security.html
< /vroot/usr/local/share/doc/qemu/system/_static/alabaster.css < /vroot/usr/local/share/doc/qemu/system/_static/basic.css
< /vroot/usr/local/share/doc/qemu/system/_static/custom.css
< /vroot/usr/local/share/doc/qemu/system/_static/doctools.js
< /vroot/usr/local/share/doc/qemu/system/_static/documentation_options.js < /vroot/usr/local/share/doc/qemu/system/_static/file.png
< /vroot/usr/local/share/doc/qemu/system/_static/jquery-3.2.1.js < /vroot/usr/local/share/doc/qemu/system/_static/jquery.js
< /vroot/usr/local/share/doc/qemu/system/_static/language_data.js < /vroot/usr/local/share/doc/qemu/system/_static/minus.png
< /vroot/usr/local/share/doc/qemu/system/_static/plus.png
< /vroot/usr/local/share/doc/qemu/system/_static/pygments.css < /vroot/usr/local/share/doc/qemu/system/_static/searchtools.js < /vroot/usr/local/share/doc/qemu/system/_static/underscore-1.3.1.js < /vroot/usr/local/share/doc/qemu/system/_static/underscore.js < /vroot/usr/local/share/doc/qemu/system/target-arm.html
< /vroot/usr/local/share/doc/qemu/system/target-avr.html
< /vroot/usr/local/share/doc/qemu/system/target-i386.html
< /vroot/usr/local/share/doc/qemu/system/target-m68k.html
< /vroot/usr/local/share/doc/qemu/system/target-mips.html
< /vroot/usr/local/share/doc/qemu/system/target-ppc.html
< /vroot/usr/local/share/doc/qemu/system/target-rx.html
< /vroot/usr/local/share/doc/qemu/system/target-s390x.html
< /vroot/usr/local/share/doc/qemu/system/targets.html
< /vroot/usr/local/share/doc/qemu/system/target-sparc64.html
< /vroot/usr/local/share/doc/qemu/system/target-sparc.html
< /vroot/usr/local/share/doc/qemu/system/target-xtensa.html
< /vroot/usr/local/share/doc/qemu/system/tls.html
< /vroot/usr/local/share/doc/qemu/system/usb.html
< /vroot/usr/local/share/doc/qemu/system/vnc-security.html
< /vroot/usr/local/share/doc/qemu/tools/.buildinfo
< /vroot/usr/local/share/doc/qemu/tools/genindex.html
< /vroot/usr/local/share/doc/qemu/tools/index.html
< /vroot/usr/local/share/doc/qemu/tools/objects.inv
< /vroot/usr/local/share/doc/qemu/tools/qemu-img.html
< /vroot/usr/local/share/doc/qemu/tools/qemu-nbd.html
< /vroot/usr/local/share/doc/qemu/tools/qemu-trace-stap.html
< /vroot/usr/local/share/doc/qemu/tools/search.html
< /vroot/usr/local/share/doc/qemu/tools/searchindex.js
< /vroot/usr/local/share/doc/qemu/tools/_static/alabaster.css < /vroot/usr/local/share/doc/qemu/tools/_static/basic.css
< /vroot/usr/local/share/doc/qemu/tools/_static/custom.css
< /vroot/usr/local/share/doc/qemu/tools/_static/doctools.js
< /vroot/usr/local/share/doc/qemu/tools/_static/documentation_options.js < /vroot/usr/local/share/doc/qemu/tools/_static/file.png
< /vroot/usr/local/share/doc/qemu/tools/_static/jquery-3.2.1.js < /vroot/usr/local/share/doc/qemu/tools/_static/jquery.js
< /vroot/usr/local/share/doc/qemu/tools/_static/language_data.js < /vroot/usr/local/share/doc/qemu/tools/_static/minus.png
< /vroot/usr/local/share/doc/qemu/tools/_static/plus.png
< /vroot/usr/local/share/doc/qemu/tools/_static/pygments.css
< /vroot/usr/local/share/doc/qemu/tools/_static/searchtools.js < /vroot/usr/local/share/doc/qemu/tools/_static/underscore-1.3.1.js < /vroot/usr/local/share/doc/qemu/tools/_static/underscore.js < /vroot/usr/local/share/doc/qemu/tools/virtfs-proxy-helper.html < /vroot/usr/local/share/doc/qemu/tools/virtiofsd.html
< /vroot/usr/local/share/doc/qemu/user/.buildinfo
< /vroot/usr/local/share/doc/qemu/user/genindex.html
< /vroot/usr/local/share/doc/qemu/user/index.html
< /vroot/usr/local/share/doc/qemu/user/main.html
< /vroot/usr/local/share/doc/qemu/user/objects.inv
< /vroot/usr/local/share/doc/qemu/user/search.html
< /vroot/usr/local/share/doc/qemu/user/searchindex.js
< /vroot/usr/local/share/doc/qemu/user/_static/alabaster.css
< /vroot/usr/local/share/doc/qemu/user/_static/basic.css
< /vroot/usr/local/share/doc/qemu/user/_static/custom.css
< /vroot/usr/local/share/doc/qemu/user/_static/doctools.js
< /vroot/usr/local/share/doc/qemu/user/_static/documentation_options.js < /vroot/usr/local/share/doc/qemu/user/_static/file.png
< /vroot/usr/local/share/doc/qemu/user/_static/jquery-3.2.1.js < /vroot/usr/local/share/doc/qemu/user/_static/jquery.js
< /vroot/usr/local/share/doc/qemu/user/_static/language_data.js < /vroot/usr/local/share/doc/qemu/user/_static/minus.png
< /vroot/usr/local/share/doc/qemu/user/_static/plus.png
< /vroot/usr/local/share/doc/qemu/user/_static/pygments.css
< /vroot/usr/local/share/doc/qemu/user/_static/searchtools.js < /vroot/usr/local/share/doc/qemu/user/_static/underscore-1.3.1.js < /vroot/usr/local/share/doc/qemu/user/_static/underscore.js

Quoted 144 lines

/vroot/usr/local/share/doc/qemu/specs/specs/acpi_hest_ghes.html /vroot/usr/local/share/doc/qemu/specs/specs/acpi_hw_reduced_hotplug.html /vroot/usr/local/share/doc/qemu/specs/specs/.buildinfo /vroot/usr/local/share/doc/qemu/specs/specs/genindex.html /vroot/usr/local/share/doc/qemu/specs/specs/index.html /vroot/usr/local/share/doc/qemu/specs/specs/objects.inv /vroot/usr/local/share/doc/qemu/specs/specs/ppc-spapr-xive.html /vroot/usr/local/share/doc/qemu/specs/specs/ppc-xive.html /vroot/usr/local/share/doc/qemu/specs/specs/search.html /vroot/usr/local/share/doc/qemu/specs/specs/searchindex.js /vroot/usr/local/share/doc/qemu/specs/specs/_static/alabaster.css /vroot/usr/local/share/doc/qemu/specs/specs/_static/basic.css /vroot/usr/local/share/doc/qemu/specs/specs/_static/custom.css /vroot/usr/local/share/doc/qemu/specs/specs/_static/doctools.js /vroot/usr/local/share/doc/qemu/specs/specs/_static/documentation_options.js /vroot/usr/local/share/doc/qemu/specs/specs/_static/file.png /vroot/usr/local/share/doc/qemu/specs/specs/_static/jquery-3.2.1.js /vroot/usr/local/share/doc/qemu/specs/specs/_static/jquery.js /vroot/usr/local/share/doc/qemu/specs/specs/_static/language_data.js /vroot/usr/local/share/doc/qemu/specs/specs/_static/minus.png /vroot/usr/local/share/doc/qemu/specs/specs/_static/plus.png /vroot/usr/local/share/doc/qemu/specs/specs/_static/pygments.css /vroot/usr/local/share/doc/qemu/specs/specs/_static/searchtools.js /vroot/usr/local/share/doc/qemu/specs/specs/_static/underscore-1.3.1.js /vroot/usr/local/share/doc/qemu/specs/specs/_static/underscore.js /vroot/usr/local/share/doc/qemu/specs/specs/tpm.html /vroot/usr/local/share/doc/qemu/system/system/arm/aspeed.html /vroot/usr/local/share/doc/qemu/system/system/arm/collie.html /vroot/usr/local/share/doc/qemu/system/system/arm/cpu-features.html /vroot/usr/local/share/doc/qemu/system/system/arm/digic.html /vroot/usr/local/share/doc/qemu/system/system/arm/gumstix.html /vroot/usr/local/share/doc/qemu/system/system/arm/integratorcp.html /vroot/usr/local/share/doc/qemu/system/system/arm/mps2.html /vroot/usr/local/share/doc/qemu/system/system/arm/musca.html /vroot/usr/local/share/doc/qemu/system/system/arm/musicpal.html /vroot/usr/local/share/doc/qemu/system/system/arm/nseries.html /vroot/usr/local/share/doc/qemu/system/system/arm/orangepi.html /vroot/usr/local/share/doc/qemu/system/system/arm/palm.html /vroot/usr/local/share/doc/qemu/system/system/arm/realview.html /vroot/usr/local/share/doc/qemu/system/system/arm/stellaris.html /vroot/usr/local/share/doc/qemu/system/system/arm/sx1.html /vroot/usr/local/share/doc/qemu/system/system/arm/versatile.html /vroot/usr/local/share/doc/qemu/system/system/arm/vexpress.html /vroot/usr/local/share/doc/qemu/system/system/arm/virt.html /vroot/usr/local/share/doc/qemu/system/system/arm/xscale.html /vroot/usr/local/share/doc/qemu/system/system/.buildinfo /vroot/usr/local/share/doc/qemu/system/system/build-platforms.html /vroot/usr/local/share/doc/qemu/system/system/deprecated.html /vroot/usr/local/share/doc/qemu/system/system/gdb.html /vroot/usr/local/share/doc/qemu/system/system/genindex.html /vroot/usr/local/share/doc/qemu/system/system/images.html /vroot/usr/local/share/doc/qemu/system/system/index.html /vroot/usr/local/share/doc/qemu/system/system/invocation.html /vroot/usr/local/share/doc/qemu/system/system/ivshmem.html /vroot/usr/local/share/doc/qemu/system/system/keys.html /vroot/usr/local/share/doc/qemu/system/system/license.html /vroot/usr/local/share/doc/qemu/system/system/linuxboot.html /vroot/usr/local/share/doc/qemu/system/system/managed-startup.html /vroot/usr/local/share/doc/qemu/system/system/monitor.html /vroot/usr/local/share/doc/qemu/system/system/mux-chardev.html /vroot/usr/local/share/doc/qemu/system/system/net.html /vroot/usr/local/share/doc/qemu/system/system/objects.inv /vroot/usr/local/share/doc/qemu/system/system/qemu-block-drivers.html /vroot/usr/local/share/doc/qemu/system/system/qemu-cpu-models.html /vroot/usr/local/share/doc/qemu/system/system/qemu-manpage.html /vroot/usr/local/share/doc/qemu/system/system/quickstart.html /vroot/usr/local/share/doc/qemu/system/system/s390x/3270.html /vroot/usr/local/share/doc/qemu/system/system/s390x/css.html /vroot/usr/local/share/doc/qemu/system/system/s390x/protvirt.html /vroot/usr/local/share/doc/qemu/system/system/s390x/vfio-ap.html /vroot/usr/local/share/doc/qemu/system/system/s390x/vfio-ccw.html /vroot/usr/local/share/doc/qemu/system/system/search.html /vroot/usr/local/share/doc/qemu/system/system/searchindex.js /vroot/usr/local/share/doc/qemu/system/system/security.html /vroot/usr/local/share/doc/qemu/system/system/_static/alabaster.css /vroot/usr/local/share/doc/qemu/system/system/_static/basic.css /vroot/usr/local/share/doc/qemu/system/system/_static/custom.css /vroot/usr/local/share/doc/qemu/system/system/_static/doctools.js /vroot/usr/local/share/doc/qemu/system/system/_static/documentation_options.js /vroot/usr/local/share/doc/qemu/system/system/_static/file.png /vroot/usr/local/share/doc/qemu/system/system/_static/jquery-3.2.1.js /vroot/usr/local/share/doc/qemu/system/system/_static/jquery.js /vroot/usr/local/share/doc/qemu/system/system/_static/language_data.js /vroot/usr/local/share/doc/qemu/system/system/_static/minus.png /vroot/usr/local/share/doc/qemu/system/system/_static/plus.png /vroot/usr/local/share/doc/qemu/system/system/_static/pygments.css /vroot/usr/local/share/doc/qemu/system/system/_static/searchtools.js /vroot/usr/local/share/doc/qemu/system/system/_static/underscore-1.3.1.js /vroot/usr/local/share/doc/qemu/system/system/_static/underscore.js /vroot/usr/local/share/doc/qemu/system/system/target-arm.html /vroot/usr/local/share/doc/qemu/system/system/target-avr.html /vroot/usr/local/share/doc/qemu/system/system/target-i386.html /vroot/usr/local/share/doc/qemu/system/system/target-m68k.html /vroot/usr/local/share/doc/qemu/system/system/target-mips.html /vroot/usr/local/share/doc/qemu/system/system/target-ppc.html /vroot/usr/local/share/doc/qemu/system/system/target-rx.html /vroot/usr/local/share/doc/qemu/system/system/target-s390x.html /vroot/usr/local/share/doc/qemu/system/system/targets.html /vroot/usr/local/share/doc/qemu/system/system/target-sparc64.html /vroot/usr/local/share/doc/qemu/system/system/target-sparc.html /vroot/usr/local/share/doc/qemu/system/system/target-xtensa.html /vroot/usr/local/share/doc/qemu/system/system/tls.html /vroot/usr/local/share/doc/qemu/system/system/usb.html /vroot/usr/local/share/doc/qemu/system/system/vnc-security.html /vroot/usr/local/share/doc/qemu/tools/tools/.buildinfo /vroot/usr/local/share/doc/qemu/tools/tools/genindex.html /vroot/usr/local/share/doc/qemu/tools/tools/index.html /vroot/usr/local/share/doc/qemu/tools/tools/objects.inv /vroot/usr/local/share/doc/qemu/tools/tools/qemu-img.html /vroot/usr/local/share/doc/qemu/tools/tools/qemu-nbd.html /vroot/usr/local/share/doc/qemu/tools/tools/qemu-trace-stap.html /vroot/usr/local/share/doc/qemu/tools/tools/search.html /vroot/usr/local/share/doc/qemu/tools/tools/searchindex.js /vroot/usr/local/share/doc/qemu/tools/tools/_static/alabaster.css /vroot/usr/local/share/doc/qemu/tools/tools/_static/basic.css /vroot/usr/local/share/doc/qemu/tools/tools/_static/custom.css /vroot/usr/local/share/doc/qemu/tools/tools/_static/doctools.js /vroot/usr/local/share/doc/qemu/tools/tools/_static/documentation_options.js /vroot/usr/local/share/doc/qemu/tools/tools/_static/file.png /vroot/usr/local/share/doc/qemu/tools/tools/_static/jquery-3.2.1.js /vroot/usr/local/share/doc/qemu/tools/tools/_static/jquery.js /vroot/usr/local/share/doc/qemu/tools/tools/_static/language_data.js /vroot/usr/local/share/doc/qemu/tools/tools/_static/minus.png /vroot/usr/local/share/doc/qemu/tools/tools/_static/plus.png /vroot/usr/local/share/doc/qemu/tools/tools/_static/pygments.css /vroot/usr/local/share/doc/qemu/tools/tools/_static/searchtools.js /vroot/usr/local/share/doc/qemu/tools/tools/_static/underscore-1.3.1.js /vroot/usr/local/share/doc/qemu/tools/tools/_static/underscore.js /vroot/usr/local/share/doc/qemu/tools/tools/virtfs-proxy-helper.html /vroot/usr/local/share/doc/qemu/tools/tools/virtiofsd.html /vroot/usr/local/share/doc/qemu/user/user/.buildinfo /vroot/usr/local/share/doc/qemu/user/user/genindex.html /vroot/usr/local/share/doc/qemu/user/user/index.html /vroot/usr/local/share/doc/qemu/user/user/main.html /vroot/usr/local/share/doc/qemu/user/user/objects.inv /vroot/usr/local/share/doc/qemu/user/user/search.html /vroot/usr/local/share/doc/qemu/user/user/searchindex.js /vroot/usr/local/share/doc/qemu/user/user/_static/alabaster.css /vroot/usr/local/share/doc/qemu/user/user/_static/basic.css /vroot/usr/local/share/doc/qemu/user/user/_static/custom.css /vroot/usr/local/share/doc/qemu/user/user/_static/doctools.js /vroot/usr/local/share/doc/qemu/user/user/_static/documentation_options.js /vroot/usr/local/share/doc/qemu/user/user/_static/file.png /vroot/usr/local/share/doc/qemu/user/user/_static/jquery-3.2.1.js

Quoted 8 lines

/vroot/usr/local/share/doc/qemu/user/user/_static/jquery.js /vroot/usr/local/share/doc/qemu/user/user/_static/language_data.js /vroot/usr/local/share/doc/qemu/user/user/_static/minus.png /vroot/usr/local/share/doc/qemu/user/user/_static/plus.png /vroot/usr/local/share/doc/qemu/user/user/_static/pygments.css /vroot/usr/local/share/doc/qemu/user/user/_static/searchtools.js /vroot/usr/local/share/doc/qemu/user/user/_static/underscore-1.3.1.js /vroot/usr/local/share/doc/qemu/user/user/_static/underscore.js

Regards,
Daniel

Signature · 3 lines
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|
#247 lore raw
Quoted 3 lines · Daniel P. Berrangé

New binaries have lost a bunch of libraries they previously linked to. This isn't neccessarily a bug, if the old make code was incorrectly adding too many libraries.

Yes this is because Meson uses --as-needed.

Quoted 7 lines

Comparing 'make install', I see some differences:

< /vroot/usr/local/bin/elf2dmp
< /vroot/usr/local/bin/qemu-edid
< /vroot/usr/local/bin/qemu-ga
< /vroot/usr/local/bin/qemu-storage-daemon

Quoted 1 line

/vroot/usr/local/bin/qemu-pr-helper

Quoted 8 lines

< /vroot/usr/local/libexec/qemu-pr-helper
< /vroot/usr/local/libexec/vhost-user-gpu
< /vroot/usr/local/libexec/virtfs-proxy-helper < /vroot/usr/local/libexec/virtiofsd
< /vroot/usr/local/share/locale/sv/LC_MESSAGES/qemu.mo

Some documentation files have moved - gaining a bogus extra directory component, and others are missing...

I see no missing files after removing the extra directory component.

0a1,38

Quoted 30 lines

/vroot/usr/local/share/doc/qemu/devel/atomics.html /vroot/usr/local/share/doc/qemu/devel/bitops.html /vroot/usr/local/share/doc/qemu/devel/.buildinfo /vroot/usr/local/share/doc/qemu/devel/clocks.html /vroot/usr/local/share/doc/qemu/devel/decodetree.html /vroot/usr/local/share/doc/qemu/devel/genindex.html /vroot/usr/local/share/doc/qemu/devel/index.html /vroot/usr/local/share/doc/qemu/devel/kconfig.html /vroot/usr/local/share/doc/qemu/devel/loads-stores.html /vroot/usr/local/share/doc/qemu/devel/memory.html /vroot/usr/local/share/doc/qemu/devel/migration.html /vroot/usr/local/share/doc/qemu/devel/multi-thread-tcg.html /vroot/usr/local/share/doc/qemu/devel/objects.inv /vroot/usr/local/share/doc/qemu/devel/reset.html /vroot/usr/local/share/doc/qemu/devel/s390-dasd-ipl.html /vroot/usr/local/share/doc/qemu/devel/search.html /vroot/usr/local/share/doc/qemu/devel/searchindex.js /vroot/usr/local/share/doc/qemu/devel/secure-coding-practices.html /vroot/usr/local/share/doc/qemu/devel/stable-process.html /vroot/usr/local/share/doc/qemu/devel/_static/alabaster.css /vroot/usr/local/share/doc/qemu/devel/_static/basic.css /vroot/usr/local/share/doc/qemu/devel/_static/custom.css /vroot/usr/local/share/doc/qemu/devel/_static/doctools.js /vroot/usr/local/share/doc/qemu/devel/_static/documentation_options.js /vroot/usr/local/share/doc/qemu/devel/_static/file.png /vroot/usr/local/share/doc/qemu/devel/_static/jquery-3.2.1.js /vroot/usr/local/share/doc/qemu/devel/_static/jquery.js /vroot/usr/local/share/doc/qemu/devel/_static/language_data.js /vroot/usr/local/share/doc/qemu/devel/_static/minus.png /vroot/usr/local/share/doc/qemu/devel/_static/plus.png

Quoted 8 lines

/vroot/usr/local/share/doc/qemu/devel/_static/pygments.css /vroot/usr/local/share/doc/qemu/devel/_static/searchtools.js /vroot/usr/local/share/doc/qemu/devel/_static/underscore-1.3.1.js /vroot/usr/local/share/doc/qemu/devel/_static/underscore.js /vroot/usr/local/share/doc/qemu/devel/tcg.html /vroot/usr/local/share/doc/qemu/devel/tcg-icount.html /vroot/usr/local/share/doc/qemu/devel/tcg-plugins.html /vroot/usr/local/share/doc/qemu/devel/testing.html

10a49,50

Quoted 2 lines

/vroot/usr/local/share/doc/qemu/interop/qemu-ga-ref.info /vroot/usr/local/share/doc/qemu/interop/qemu-qmp-ref.info

I'll stop installing the devel manual and keep the .info file in interop (which hopefully will go away anyway in 5.2).

Paolo

#248 lore raw
Quoted 6 lines · Paolo Bonzini
Quoted 3 lines · Daniel P. Berrangé

New binaries have lost a bunch of libraries they previously linked to. This isn't neccessarily a bug, if the old make code was incorrectly adding too many libraries.

Yes this is because Meson uses --as-needed.

Maybe worth a patch at the beginning of the series, before starting the conversion?

Phil.

#249 lore raw
Quoted 6 lines · Philippe Mathieu-Daudé
Quoted 4 lines
Quoted 3 lines

New binaries have lost a bunch of libraries they previously linked to. This isn't neccessarily a bug, if the old make code was incorrectly adding too many libraries.

Yes this is because Meson uses --as-needed.

Maybe worth a patch at the beginning of the series, before starting the conversion?

Could be, yes. Thanks for the idea!

Paolo