Skip to contentSkip to conversation

Proof of concept for Meson integration

RFC PATCH Superseded Paolo Bonzini 4 participants 142 messages Dec 12, 2019 – Jan 7, 2020 Page 1 of 2

Subsystems (7)

v3 of 4 Superseded Latest is v4 →

lore
Share & tools
lore
#0 lore raw

v3 cover Proof of concept for Meson integration

This is the next version of the Meson conversion which, as you can see from the patch count, has seen quite some progress thanks to Marc-André. I'm posting it until the point where Makefile.target and unnest-vars can be removed, and all builds become non-recursive. He also went ahead and reached the point where rules.mak can be dropped, thus the couple hacks included in this series are temporary, but I have left out that part it because this one is already pretty large. Because of the size, I've CCed interested people only on the cover letter.

It's still based on a pretty old version of QEMU (before 4.2, so missing plugin support), though for the sake of this RFC I've already included a bunch of preparatory patches that went in 4.2 or will be in an early 5.0. pull request Everything needed is included in branch meson-poc at
git://github.com/bonzini/qemu (meson-poc-next includes the tests).

As mentioned at QEMU maintainer summit, this is basically the worst state, where we still have some executables built with Makefiles and the configure script is still full of feature detection.

Testing was a bit light, but again this is just an RFC and the important thing here is to show what the finished meson.build looks like, and to let people can get a feeling for it. My impression is that in general it *looks* more daunting, but it is actually very nice to hack on. For me, the impression is that I am not used to imperative code in a build system and my brain looks at code differently when it's indented like code rather than as a Makefile. Having real associative arrays is very refreshing, especially because they have been improved in Meson 0.53.0 and that allowed a few cleanups.

At this point, we can be quite sure that Meson 0.52.0 will be enough to build QEMU (all of the pull requests from Marc-André and myself were accepted), even though we're going for 0.53.0 because of the associative array improvements.

New from the previous version:
* converted qemu-ga, remaining contrib/ and tools and emulators
* support ui/audio/block modules
* move scripts/create_config invocation from rules.mak to meson
* .stp files are generated from Meson.
* convert installation of data files
* converted pc-bios/*/Makefile
* Meson is included as a submodule
* Meson git (will be 0.53.0) required

Still to be done before merging:
* Test, test, test
* Makefile.ninja rebuild rules are trigger-happy
* rebase to recent QEMU of course
* convert at least some tests (already done, but not very well integrated in make check; PoC makefile generator for next version at
https://gist.github.com/bonzini/a6ced021d9ddc8267007d57cffdbba43)

Left for after merging:
* finish conversion of tests
* convert configure tests (command line parsing and target configuration would remain in configure)

Paolo

Marc-André Lureau (118):
build-sys hack: ensure target directory is there
configure: expand path variables for meson configure
configure: generate Meson cross file
build-sys: add meson submodule
meson: enable pie
meson: use coverage option
meson: add remaining generated tcg trace helpers
meson: add version.o contrib/vhost-user-input: convert to meson contrib/vhost-user-gpu: convert to meson contrib/ivshmem: convert to meson contrib/elf2dmp: convert to meson
meson: convert vss-win32
meson: add msi generation
meson: add qemu-bridge-helper
meson: add qemu-keymap
meson: add qemu-edid
meson: add virtfs-proxy-helper
meson: keymap-gen
meson: generate qemu-version.h
meson: generate shader headers
meson: generate hxtool files
meson: configure 50-qemu-gpu.json
meson: uncompress edk2 bios
build-sys hack: link with whole .fa archives
meson: convert qom directory to Meson
meson: convert authz directory to Meson
meson: convert crypto directory to Meson
meson: convert io directory to Meson
meson: infrastructure for building emulators
meson: add macos dependencies
meson: add modules infrastructure
meson: convert chardev directory to Meson (tools part)
meson: convert block
meson: qemu-{img,io,nbd}
meson: qemu-pr-helper
meson: convert ui directory to Meson
meson: convert trace/
meson: convert qom/
meson: convert block/
meson: convert dump/
meson: convert monitor directory to Meson
meson: convert replay directory to Meson
meson: convert migration directory to Meson
meson: build softmmu-specific migration/ram.c
meson: convert net directory to Meson
meson: convert backends directory to Meson
meson: convert fsdev/
meson: convert disas directory to Meson
meson: convert qapi-specific to meson
meson: convert hw/xen
meson: convert hw/core
meson: convert hw/semihosting
meson: convert hw/smbios
meson: convert hw/mem
meson: convert hw/watchdog
meson: convert hw/virtio
meson: convert hw/vfio
meson: convert hw/usb
meson: convert hw/tpm
meson: convert hw/timer
meson: convert hw/ssi
meson: convert hw/sd
meson: convert hw/scsi
meson: convert hw/pcmcia
meson: convert hw/pci-host
meson: convert hw/pci-bridge
meson: convert hw/pci
meson: convert hw/nvram
meson: convert hw/rdma
meson: convert hw/net
meson: convert hw/misc
meson: convert hw/isa
meson: convert hw/ipmi
meson: convert hw/ipack
meson: convert hw/intc
meson: convert hw/input
meson: convert hw/ide
meson: convert hw/i2c
meson: convert hw/hyperv
meson: convert hw/gpio
meson: convert hw/dma
meson: convert hw/display
meson: convert hw/cpu
meson: convert hw/char
meson: convert hw/bt
meson: convert hw/block
meson: convert hw/audio
meson: convert hw/adc
meson: convert hw/acpi
meson: convert hw/9pfs
meson: convert target/s390x/gen-features.h
meson: convert hw/arch*
meson: target
meson: accel
meson: linux-user
meson: bsd-user
meson: cpu-emu
meson: softmmu
Aaaaallelujah!
systemtap
build-sys/rules.mak: remove version.o
meson: sphinx-build
meson: generate version.texi
meson: build texi doc
meson: add NSIS building
meson: install some scripts
meson: install edk2
meson: install blobs
meson: install edk2 json descriptors
meson: install icons
meson: install desktop file
meson: install keymaps
meson: convert po/
meson: replace pc-bios/keymaps/Makefile
meson: replace mostly useless pc-bios/Makefile
meson: convert pc-bios/s390-ccw
meson: convert pc-bios/optionrom

Paolo Bonzini (14):
configure: do not include $(...) variables in config-host.mak
configure: integrate Meson in the build system
libqemuutil: convert to meson contrib/libvhost-user: convert to Meson contrib/vhost-user-blk: convert to Meson contrib/vhost-user-scsi: convert to Meson contrib/rdmacm-mux: convert to Meson
meson: convert qemu-ga
configure, Makefile; remove TOOLS and HELPERS-y variable
meson: convert chardev directory to Meson (emulator part)
meson: convert audio directory to Meson
meson: convert root directory to Meson
remove Makefile.target
rules.mak: drop unneeded macros
<[email protected]>

 .gitlab-ci.yml                            |    6 +-
 .gitmodules                               |    3 +
 Kconfig.host                              |    1 +
 Makefile                                  |  924 +------------------------
 Makefile.objs                             |  220 +-----
 Makefile.target                           |  256 -------
 accel/Makefile.objs                       |    5 -
 accel/kvm/Makefile.objs                   |    2 -
 accel/kvm/meson.build                     |    5 +
 accel/kvm/trace.h                         |    1 +
 accel/meson.build                         |    6 +
 accel/stubs/Makefile.objs                 |    5 -
 accel/stubs/meson.build                   |    5 +
 accel/tcg/Makefile.objs                   |    8 -
 accel/tcg/meson.build                     |   14 +
 accel/tcg/trace.h                         |    1 +
 audio/Makefile.objs                       |   31 -
 audio/meson.build                         |   30 +
 audio/trace.h                             |    1 +
 authz/Makefile.objs                       |    7 -
 authz/meson.build                         |   20 +
 authz/trace.h                             |    1 +
 backends/Makefile.objs                    |   19 -
 backends/meson.build                      |   16 +
 balloon.c                                 |    2 +-
 block.c                                   |    2 +-
 block/Makefile.objs                       |   65 --
 block/meson.build                         |  103 +++
 block/trace.h                             |    1 +
 bsd-user/Makefile.objs                    |    2 -
 bsd-user/meson.build                      |   10 +
 chardev/Makefile.objs                     |   25 -
 chardev/meson.build                       |   39 ++
 chardev/trace.h                           |    1 +
 configure                                 |  337 +++++----
 contrib/elf2dmp/Makefile.objs             |    4 -
 contrib/elf2dmp/meson.build               |    4 +
 contrib/ivshmem-client/Makefile.objs      |    1 -
 contrib/ivshmem-client/meson.build        |    3 +
 contrib/ivshmem-server/Makefile.objs      |    1 -
 contrib/ivshmem-server/meson.build        |    3 +
 contrib/libvhost-user/Makefile.objs       |    1 -
 contrib/libvhost-user/meson.build         |    2 +
 contrib/rdmacm-mux/Makefile.objs          |    3 -
 contrib/rdmacm-mux/meson.build            |    6 +
 contrib/vhost-user-blk/meson.build        |    3 +
 contrib/vhost-user-gpu/Makefile.objs      |   10 -
 contrib/vhost-user-gpu/meson.build        |   10 +
 contrib/vhost-user-input/Makefile.objs    |    1 -
 contrib/vhost-user-input/meson.build      |    3 +
 contrib/vhost-user-scsi/Makefile.objs     |    1 -
 contrib/vhost-user-scsi/meson.build       |    5 +
 crypto/Makefile.objs                      |   39 --
 crypto/meson.build                        |   58 ++
 crypto/trace.h                            |    1 +
 disas/Makefile.objs                       |   30 -
 disas/libvixl/Makefile.objs               |    5 -
 disas/libvixl/meson.build                 |    7 +
 disas/meson.build                         |   27 +
 dma-helpers.c                             |    2 +-
 docs/devel/blkverify.txt                  |    4 +-
 docs/devel/testing.rst                    |   11 +-
 docs/devel/tracing.txt                    |    2 +-
 docs/interop/live-block-operations.rst    |    4 +-
 docs/interop/qemu-ga-ref.texi             |    2 +-
 docs/interop/qemu-qmp-ref.texi            |    2 +-
 docs/meson.build                          |   80 +++
 docs/version.texi.in                      |    2 +
 dump/Makefile.objs                        |    3 -
 dump/meson.build                          |    4 +
 exec.c                                    |    2 +-
 fsdev/Makefile.objs                       |   12 -
 fsdev/meson.build                         |   14 +
 gdbstub.c                                 |    2 +-
 hw/9pfs/Kconfig                           |    4 +
 hw/9pfs/Makefile.objs                     |    9 -
 hw/9pfs/meson.build                       |   20 +
 hw/9pfs/trace.h                           |    1 +
 hw/Makefile.objs                          |   45 --
 hw/acpi/Makefile.objs                     |   22 -
 hw/acpi/meson.build                       |   21 +
 hw/acpi/trace.h                           |    1 +
 hw/adc/Makefile.objs                      |    1 -
 hw/adc/meson.build                        |    1 +
 hw/alpha/Makefile.objs                    |    1 -
 hw/alpha/meson.build                      |    8 +
 hw/alpha/trace.h                          |    1 +
 hw/arm/Makefile.objs                      |   53 --
 hw/arm/meson.build                        |   56 ++
 hw/arm/trace.h                            |    1 +
 hw/audio/Makefile.objs                    |   18 -
 hw/audio/meson.build                      |   14 +
 hw/audio/trace.h                          |    1 +
 hw/block/Makefile.objs                    |   17 -
 hw/block/dataplane/Makefile.objs          |    2 -
 hw/block/dataplane/meson.build            |    2 +
 hw/block/dataplane/trace.h                |    1 +
 hw/block/meson.build                      |   20 +
 hw/block/trace.h                          |    1 +
 hw/bt/Makefile.objs                       |    3 -
 hw/bt/meson.build                         |    8 +
 hw/char/Makefile.objs                     |   36 -
 hw/char/meson.build                       |   34 +
 hw/char/trace.h                           |    1 +
 hw/core/Makefile.objs                     |   30 -
 hw/core/cpu.c                             |    2 +-
 hw/core/meson.build                       |   39 ++
 hw/cpu/Makefile.objs                      |    5 -
 hw/cpu/meson.build                        |    6 +
 hw/cris/Makefile.objs                     |    2 -
 hw/cris/meson.build                       |    5 +
 hw/display/Makefile.objs                  |   59 --
 hw/display/meson.build                    |   54 ++
 hw/display/trace.h                        |    1 +
 hw/dma/Makefile.objs                      |   16 -
 hw/dma/meson.build                        |   16 +
 hw/dma/trace.h                            |    1 +
 hw/gpio/Makefile.objs                     |   11 -
 hw/gpio/meson.build                       |   11 +
 hw/gpio/trace.h                           |    1 +
 hw/hppa/Makefile.objs                     |    1 -
 hw/hppa/meson.build                       |    4 +
 hw/hppa/trace.h                           |    1 +
 hw/hyperv/Makefile.objs                   |    2 -
 hw/hyperv/meson.build                     |    2 +
 hw/i2c/Makefile.objs                      |   13 -
 hw/i2c/meson.build                        |   18 +
 hw/i2c/trace.h                            |    1 +
 hw/i386/Makefile.objs                     |   15 -
 hw/i386/kvm/Makefile.objs                 |    1 -
 hw/i386/kvm/meson.build                   |    7 +
 hw/i386/meson.build                       |   22 +
 hw/i386/pc.c                              |    2 +-
 hw/i386/pc_piix.c                         |    2 +-
 hw/i386/trace.h                           |    1 +
 hw/i386/xen/Makefile.objs                 |    1 -
 hw/i386/xen/meson.build                   |    7 +
 hw/i386/xen/trace.h                       |    1 +
 hw/ide/Makefile.objs                      |   14 -
 hw/ide/meson.build                        |   14 +
 hw/ide/trace.h                            |    1 +
 hw/input/Makefile.objs                    |   17 -
 hw/input/meson.build                      |   17 +
 hw/input/trace.h                          |    1 +
 hw/intc/Makefile.objs                     |   51 --
 hw/intc/meson.build                       |   52 ++
 hw/intc/trace.h                           |    1 +
 hw/ipack/Makefile.objs                    |    2 -
 hw/ipack/meson.build                      |    1 +
 hw/ipmi/Makefile.objs                     |    5 -
 hw/ipmi/meson.build                       |    8 +
 hw/isa/Makefile.objs                      |   10 -
 hw/isa/meson.build                        |    9 +
 hw/isa/trace.h                            |    1 +
 hw/lm32/Makefile.objs                     |    3 -
 hw/lm32/meson.build                       |    6 +
 hw/m68k/Makefile.objs                     |    2 -
 hw/m68k/meson.build                       |    5 +
 hw/mem/Kconfig                            |    1 +
 hw/mem/Makefile.objs                      |    3 -
 hw/mem/meson.build                        |    3 +
 hw/mem/trace.h                            |    1 +
 hw/meson.build                            |   64 ++
 hw/microblaze/Makefile.objs               |    4 -
 hw/microblaze/meson.build                 |    7 +
 hw/mips/Makefile.objs                     |    8 -
 hw/mips/meson.build                       |   11 +
 hw/mips/trace.h                           |    1 +
 hw/misc/Makefile.objs                     |   82 ---
 hw/misc/macio/Makefile.objs               |    5 -
 hw/misc/macio/meson.build                 |    8 +
 hw/misc/macio/trace.h                     |    1 +
 hw/misc/meson.build                       |   79 +++
 hw/misc/trace.h                           |    1 +
 hw/moxie/Makefile.objs                    |    2 -
 hw/moxie/meson.build                      |    4 +
 hw/net/Makefile.objs                      |   53 --
 hw/net/can/Makefile.objs                  |    4 -
 hw/net/can/meson.build                    |    4 +
 hw/net/meson.build                        |   61 ++
 hw/net/trace.h                            |    1 +
 hw/nios2/Makefile.objs                    |    3 -
 hw/nios2/meson.build                      |    6 +
 hw/nvram/Makefile.objs                    |    8 -
 hw/nvram/meson.build                      |   11 +
 hw/nvram/trace.h                          |    1 +
 hw/openrisc/Makefile.objs                 |    2 -
 hw/openrisc/meson.build                   |    5 +
 hw/pci-bridge/Makefile.objs               |   10 -
 hw/pci-bridge/meson.build                 |   14 +
 hw/pci-host/Makefile.objs                 |   21 -
 hw/pci-host/meson.build                   |   22 +
 hw/pci-host/trace.h                       |    1 +
 hw/pci/Makefile.objs                      |   14 -
 hw/pci/meson.build                        |   19 +
 hw/pci/trace.h                            |    1 +
 hw/pcmcia/Makefile.objs                   |    2 -
 hw/pcmcia/meson.build                     |    2 +
 hw/ppc/Makefile.objs                      |   33 -
 hw/ppc/meson.build                        |   39 ++
 hw/ppc/trace.h                            |    1 +
 hw/rdma/Makefile.objs                     |    3 -
 hw/rdma/meson.build                       |   10 +
 hw/rdma/trace.h                           |    1 +
 hw/rdma/vmw/trace.h                       |    1 +
 hw/riscv/Makefile.objs                    |   13 -
 hw/riscv/meson.build                      |   16 +
 hw/riscv/trace.h                          |    1 +
 hw/s390x/Makefile.objs                    |   36 -
 hw/s390x/meson.build                      |   45 ++
 hw/s390x/trace.h                          |    1 +
 hw/scsi/Makefile.objs                     |   15 -
 hw/scsi/meson.build                       |   26 +
 hw/scsi/trace.h                           |    1 +
 hw/sd/Makefile.objs                       |   10 -
 hw/sd/meson.build                         |   10 +
 hw/sd/trace.h                             |    1 +
 hw/semihosting/Makefile.objs              |    2 -
 hw/semihosting/meson.build                |    4 +
 hw/sh4/Makefile.objs                      |    4 -
 hw/sh4/meson.build                        |   10 +
 hw/smbios/Makefile.objs                   |   10 -
 hw/smbios/meson.build                     |   13 +
 hw/sparc/Makefile.objs                    |    3 -
 hw/sparc/meson.build                      |    6 +
 hw/sparc/trace.h                          |    1 +
 hw/sparc64/Makefile.objs                  |    4 -
 hw/sparc64/meson.build                    |    6 +
 hw/sparc64/trace.h                        |    1 +
 hw/ssi/Makefile.objs                      |   10 -
 hw/ssi/meson.build                        |   10 +
 hw/timer/Makefile.objs                    |   49 --
 hw/timer/meson.build                      |   43 ++
 hw/timer/trace.h                          |    1 +
 hw/tpm/Makefile.objs                      |    6 -
 hw/tpm/meson.build                        |    7 +
 hw/tpm/trace.h                            |    1 +
 hw/tricore/Makefile.objs                  |    1 -
 hw/tricore/meson.build                    |    4 +
 hw/unicore32/Makefile.objs                |    4 -
 hw/unicore32/meson.build                  |    5 +
 hw/usb/Makefile.objs                      |   62 --
 hw/usb/meson.build                        |   54 ++
 hw/usb/trace.h                            |    1 +
 hw/vfio/Makefile.objs                     |    7 -
 hw/vfio/meson.build                       |   17 +
 hw/vfio/trace.h                           |    1 +
 hw/virtio/Makefile.objs                   |   39 --
 hw/virtio/meson.build                     |   42 ++
 hw/virtio/trace.h                         |    1 +
 hw/watchdog/Makefile.objs                 |    6 -
 hw/watchdog/meson.build                   |    6 +
 hw/watchdog/trace.h                       |    1 +
 hw/xen/Makefile.objs                      |    6 -
 hw/xen/meson.build                        |   18 +
 hw/xen/trace.h                            |    1 +
 hw/xenpv/Makefile.objs                    |    2 -
 hw/xenpv/meson.build                      |    1 +
 hw/xtensa/Makefile.objs                   |    5 -
 hw/xtensa/meson.build                     |   10 +
 include/exec/cpu_ldst_template.h          |    2 +-
 include/exec/cpu_ldst_useronly_template.h |    2 +-
 include/qemu/osdep.h                      |    2 +-
 io/Makefile.objs                          |   12 -
 io/meson.build                            |   25 +
 io/trace.h                                |    1 +
 ioport.c                                  |    2 +-
 job-qmp.c                                 |    2 +-
 job.c                                     |    2 +-
 libdecnumber/Makefile.objs                |    5 -
 libdecnumber/meson.build                  |    7 +
 linux-user/Makefile.objs                  |   10 -
 linux-user/arm/nwfpe/Makefile.objs        |    2 -
 linux-user/arm/nwfpe/meson.build          |   10 +
 linux-user/meson.build                    |   22 +
 linux-user/trace.h                        |    1 +
 memory.c                                  |    2 +-
 meson                                     |    1 +
 meson.build                               | 1073 +++++++++++++++++++++++++++++
 migration/Makefile.objs                   |   15 -
 migration/meson.build                     |   26 +
 migration/trace.h                         |    1 +
 monitor/Makefile.objs                     |    3 -
 monitor/meson.build                       |    9 +
 monitor/trace.h                           |    1 +
 nbd/Makefile.objs                         |    1 -
 nbd/meson.build                           |    5 +
 nbd/trace.h                               |    1 +
 net/Makefile.objs                         |   32 -
 net/can/Makefile.objs                     |    2 -
 net/can/meson.build                       |    5 +
 net/meson.build                           |   39 ++
 net/trace.h                               |    1 +
 os-posix.c                                |    2 +-
 pc-bios/Makefile                          |   19 -
 pc-bios/descriptors/meson.build           |   14 +
 pc-bios/keymaps/Makefile                  |   56 --
 pc-bios/keymaps/meson.build               |   58 ++
 pc-bios/meson.build                       |  110 +++
 pc-bios/optionrom/Makefile                |   77 ---
 pc-bios/optionrom/meson.build             |   72 ++
 pc-bios/s390-ccw/Makefile                 |  103 ---
 pc-bios/s390-ccw/meson.build              |  175 +++++
 po/LINGUAS                                |    7 +
 po/Makefile                               |   52 --
 po/POTFILES                               |    1 +
 po/meson.build                            |    5 +
 po/messages.po                            |   74 --
 qapi/Makefile.objs                        |   32 -
 qapi/meson.build                          |  106 +++
 qapi/trace.h                              |    1 +
 qga/Makefile.objs                         |    9 -
 qga/installer/qemu-ga.wxs                 |    2 +-
 qga/meson.build                           |   74 ++
 qga/vss-win32/Makefile.objs               |   23 -
 qga/vss-win32/meson.build                 |   28 +
 qobject/Makefile.objs                     |    3 -
 qobject/meson.build                       |    3 +
 qom/Makefile.objs                         |    4 -
 qom/meson.build                           |   20 +
 qom/trace.h                               |    1 +
 replay/Makefile.objs                      |    9 -
 replay/meson.build                        |   11 +
 rules.mak                                 |  238 +------
 scripts/archive-source.sh                 |    3 +-
 scripts/create_config                     |    2 +
 scripts/decodetree.py                     |    2 +-
 scripts/device-crash-test                 |    2 +-
 scripts/feature_to_c.sh                   |   24 +-
 scripts/grepy.sh                          |    3 +
 scripts/hxtool                            |    2 +-
 scripts/meson.build                       |    3 +
 scripts/minikconf.py                      |    1 +
 scripts/modules/module_block.py           |    0
 scripts/ninjatool.py                      | 1004 +++++++++++++++++++++++++++
 scripts/nsis.sh                           |   58 ++
 scripts/qapi-gen.py                       |    2 +-
 scripts/qemu-version.sh                   |   25 +
 scripts/signrom.py                        |    2 +
 scripts/tracetool.py                      |    2 +-
 scripts/tracetool/backend/dtrace.py       |    2 +-
 scripts/tracetool/backend/ust.py          |    6 +-
 scripts/tracetool/format/c.py             |    5 +-
 scripts/tracetool/format/tcg_h.py         |    2 +-
 scripts/tracetool/format/tcg_helper_c.py  |    2 +-
 scripts/undefsym.sh                       |   20 +
 scsi/Makefile.objs                        |    4 -
 scsi/meson.build                          |    4 +
 scsi/trace.h                              |    1 +
 stubs/Makefile.objs                       |   43 --
 stubs/meson.build                         |   45 ++
 target/alpha/Makefile.objs                |    4 -
 target/alpha/meson.build                  |   18 +
 target/arm/Makefile.objs                  |   45 --
 target/arm/meson.build                    |   53 ++
 target/arm/trace.h                        |    1 +
 target/arm/translate-sve.c                |    2 +-
 target/arm/translate-vfp.inc.c            |    4 +-
 target/cris/Makefile.objs                 |    3 -
 target/cris/meson.build                   |   14 +
 target/hppa/Makefile.objs                 |   11 -
 target/hppa/meson.build                   |   19 +
 target/hppa/trace.h                       |    1 +
 target/hppa/translate.c                   |    2 +-
 target/i386/Makefile.objs                 |   22 -
 target/i386/hvf/Makefile.objs             |    2 -
 target/i386/hvf/meson.build               |   12 +
 target/i386/meson.build                   |   41 ++
 target/i386/trace.h                       |    1 +
 target/lm32/Makefile.objs                 |    4 -
 target/lm32/meson.build                   |   15 +
 target/m68k/Makefile.objs                 |    5 -
 target/m68k/meson.build                   |   17 +
 target/meson.build                        |   21 +
 target/microblaze/Makefile.objs           |    3 -
 target/microblaze/meson.build             |   14 +
 target/mips/Makefile.objs                 |    5 -
 target/mips/meson.build                   |   22 +
 target/mips/trace.h                       |    1 +
 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/ppc/trace.h                        |    1 +
 target/riscv/Makefile.objs                |   23 -
 target/riscv/meson.build                  |   30 +
 target/riscv/trace.h                      |    1 +
 target/riscv/translate.c                  |    4 +-
 target/s390x/Makefile.objs                |   30 -
 target/s390x/cpu_features.h               |    2 +-
 target/s390x/cpu_models.h                 |    2 +-
 target/s390x/meson.build                  |   48 ++
 target/s390x/trace.h                      |    1 +
 target/sh4/Makefile.objs                  |    3 -
 target/sh4/meson.build                    |   14 +
 target/sparc/Makefile.objs                |    7 -
 target/sparc/meson.build                  |   23 +
 target/sparc/trace.h                      |    1 +
 target/tilegx/Makefile.objs               |    1 -
 target/tilegx/meson.build                 |   13 +
 target/tricore/Makefile.objs              |    1 -
 target/tricore/meson.build                |   14 +
 target/unicore32/Makefile.objs            |    8 -
 target/unicore32/meson.build              |   14 +
 target/xtensa/Makefile.objs               |   16 -
 target/xtensa/meson.build                 |   30 +
 tests/Makefile.include                    |   17 +-
 tests/acceptance/avocado_qemu/__init__.py |    3 +-
 tests/data/acpi/rebuild-expected-aml.sh   |    2 +-
 tests/libqos/qgraph.h                     |    2 +-
 tests/multiboot/run_test.sh               |    2 +-
 tests/qemu-iotests/check                  |    6 +-
 tests/rtas-test.c                         |    2 +-
 tests/tcg/Makefile.target                 |    6 +
 tests/test-qga.c                          |    8 +-
 trace/Makefile.objs                       |   59 --
 trace/control-target.c                    |    2 +-
 trace/control.c                           |    2 +-
 trace/meson.build                         |   99 +++
 ui/Makefile.objs                          |   69 --
 ui/icons/meson.build                      |   13 +
 ui/meson.build                            |  114 +++
 ui/shader.c                               |    6 +-
 ui/shader/meson.build                     |   15 +
 ui/trace.h                                |    1 +
 util/Makefile.objs                        |   57 --
 util/meson.build                          |   57 ++
 util/trace.h                              |    1 +
 vl.c                                      |    2 +-
 435 files changed, 6023 insertions(+), 4116 deletions(-)
 delete mode 100644 Makefile.target
 delete mode 100644 accel/Makefile.objs
 delete mode 100644 accel/kvm/Makefile.objs
 create mode 100644 accel/kvm/meson.build
 create mode 100644 accel/kvm/trace.h
 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
 create mode 100644 accel/tcg/trace.h
 delete mode 100644 audio/Makefile.objs
 create mode 100644 audio/meson.build
 create mode 100644 audio/trace.h
 delete mode 100644 authz/Makefile.objs
 create mode 100644 authz/meson.build
 create mode 100644 authz/trace.h
 delete mode 100644 backends/Makefile.objs
 create mode 100644 backends/meson.build
 delete mode 100644 block/Makefile.objs
 create mode 100644 block/meson.build
 create mode 100644 block/trace.h
 delete mode 100644 bsd-user/Makefile.objs
 create mode 100644 bsd-user/meson.build
 delete mode 100644 chardev/Makefile.objs
 create mode 100644 chardev/meson.build
 create mode 100644 chardev/trace.h
 delete mode 100644 contrib/elf2dmp/Makefile.objs
 create mode 100644 contrib/elf2dmp/meson.build
 delete mode 100644 contrib/ivshmem-client/Makefile.objs
 create mode 100644 contrib/ivshmem-client/meson.build
 delete mode 100644 contrib/ivshmem-server/Makefile.objs
 create mode 100644 contrib/ivshmem-server/meson.build
 delete mode 100644 contrib/libvhost-user/Makefile.objs
 create mode 100644 contrib/libvhost-user/meson.build
 delete mode 100644 contrib/rdmacm-mux/Makefile.objs
 create mode 100644 contrib/rdmacm-mux/meson.build
 create mode 100644 contrib/vhost-user-blk/meson.build
 delete mode 100644 contrib/vhost-user-gpu/Makefile.objs
 create mode 100644 contrib/vhost-user-gpu/meson.build
 delete mode 100644 contrib/vhost-user-input/Makefile.objs
 create mode 100644 contrib/vhost-user-input/meson.build
 delete mode 100644 contrib/vhost-user-scsi/Makefile.objs
 create mode 100644 contrib/vhost-user-scsi/meson.build
 delete mode 100644 crypto/Makefile.objs
 create mode 100644 crypto/meson.build
 create mode 100644 crypto/trace.h
 delete mode 100644 disas/Makefile.objs
 delete mode 100644 disas/libvixl/Makefile.objs
 create mode 100644 disas/libvixl/meson.build
 create mode 100644 disas/meson.build
 create mode 100644 docs/meson.build
 create mode 100644 docs/version.texi.in
 delete mode 100644 dump/Makefile.objs
 create mode 100644 dump/meson.build
 delete mode 100644 fsdev/Makefile.objs
 create mode 100644 fsdev/meson.build
 delete mode 100644 hw/9pfs/Makefile.objs
 create mode 100644 hw/9pfs/meson.build
 create mode 100644 hw/9pfs/trace.h
 delete mode 100644 hw/Makefile.objs
 delete mode 100644 hw/acpi/Makefile.objs
 create mode 100644 hw/acpi/meson.build
 create mode 100644 hw/acpi/trace.h
 delete mode 100644 hw/adc/Makefile.objs
 create mode 100644 hw/adc/meson.build
 delete mode 100644 hw/alpha/Makefile.objs
 create mode 100644 hw/alpha/meson.build
 create mode 100644 hw/alpha/trace.h
 delete mode 100644 hw/arm/Makefile.objs
 create mode 100644 hw/arm/meson.build
 create mode 100644 hw/arm/trace.h
 delete mode 100644 hw/audio/Makefile.objs
 create mode 100644 hw/audio/meson.build
 create mode 100644 hw/audio/trace.h
 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/dataplane/trace.h
 create mode 100644 hw/block/meson.build
 create mode 100644 hw/block/trace.h
 delete mode 100644 hw/bt/Makefile.objs
 create mode 100644 hw/bt/meson.build
 delete mode 100644 hw/char/Makefile.objs
 create mode 100644 hw/char/meson.build
 create mode 100644 hw/char/trace.h
 delete mode 100644 hw/core/Makefile.objs
 create mode 100644 hw/core/meson.build
 delete mode 100644 hw/cpu/Makefile.objs
 create mode 100644 hw/cpu/meson.build
 delete mode 100644 hw/cris/Makefile.objs
 create mode 100644 hw/cris/meson.build
 delete mode 100644 hw/display/Makefile.objs
 create mode 100644 hw/display/meson.build
 create mode 100644 hw/display/trace.h
 delete mode 100644 hw/dma/Makefile.objs
 create mode 100644 hw/dma/meson.build
 create mode 100644 hw/dma/trace.h
 delete mode 100644 hw/gpio/Makefile.objs
 create mode 100644 hw/gpio/meson.build
 create mode 100644 hw/gpio/trace.h
 delete mode 100644 hw/hppa/Makefile.objs
 create mode 100644 hw/hppa/meson.build
 create mode 100644 hw/hppa/trace.h
 delete mode 100644 hw/hyperv/Makefile.objs
 create mode 100644 hw/hyperv/meson.build
 delete mode 100644 hw/i2c/Makefile.objs
 create mode 100644 hw/i2c/meson.build
 create mode 100644 hw/i2c/trace.h
 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
 create mode 100644 hw/i386/trace.h
 delete mode 100644 hw/i386/xen/Makefile.objs
 create mode 100644 hw/i386/xen/meson.build
 create mode 100644 hw/i386/xen/trace.h
 delete mode 100644 hw/ide/Makefile.objs
 create mode 100644 hw/ide/meson.build
 create mode 100644 hw/ide/trace.h
 delete mode 100644 hw/input/Makefile.objs
 create mode 100644 hw/input/meson.build
 create mode 100644 hw/input/trace.h
 delete mode 100644 hw/intc/Makefile.objs
 create mode 100644 hw/intc/meson.build
 create mode 100644 hw/intc/trace.h
 delete mode 100644 hw/ipack/Makefile.objs
 create mode 100644 hw/ipack/meson.build
 delete mode 100644 hw/ipmi/Makefile.objs
 create mode 100644 hw/ipmi/meson.build
 delete mode 100644 hw/isa/Makefile.objs
 create mode 100644 hw/isa/meson.build
 create mode 100644 hw/isa/trace.h
 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/mem/Makefile.objs
 create mode 100644 hw/mem/meson.build
 create mode 100644 hw/mem/trace.h
 create mode 100644 hw/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
 create mode 100644 hw/mips/trace.h
 delete mode 100644 hw/misc/Makefile.objs
 delete mode 100644 hw/misc/macio/Makefile.objs
 create mode 100644 hw/misc/macio/meson.build
 create mode 100644 hw/misc/macio/trace.h
 create mode 100644 hw/misc/meson.build
 create mode 100644 hw/misc/trace.h
 delete mode 100644 hw/moxie/Makefile.objs
 create mode 100644 hw/moxie/meson.build
 delete mode 100644 hw/net/Makefile.objs
 delete mode 100644 hw/net/can/Makefile.objs
 create mode 100644 hw/net/can/meson.build
 create mode 100644 hw/net/meson.build
 create mode 100644 hw/net/trace.h
 delete mode 100644 hw/nios2/Makefile.objs
 create mode 100644 hw/nios2/meson.build
 delete mode 100644 hw/nvram/Makefile.objs
 create mode 100644 hw/nvram/meson.build
 create mode 100644 hw/nvram/trace.h
 delete mode 100644 hw/openrisc/Makefile.objs
 create mode 100644 hw/openrisc/meson.build
 delete mode 100644 hw/pci-bridge/Makefile.objs
 create mode 100644 hw/pci-bridge/meson.build
 delete mode 100644 hw/pci-host/Makefile.objs
 create mode 100644 hw/pci-host/meson.build
 create mode 100644 hw/pci-host/trace.h
 delete mode 100644 hw/pci/Makefile.objs
 create mode 100644 hw/pci/meson.build
 create mode 100644 hw/pci/trace.h
 delete mode 100644 hw/pcmcia/Makefile.objs
 create mode 100644 hw/pcmcia/meson.build
 delete mode 100644 hw/ppc/Makefile.objs
 create mode 100644 hw/ppc/meson.build
 create mode 100644 hw/ppc/trace.h
 delete mode 100644 hw/rdma/Makefile.objs
 create mode 100644 hw/rdma/meson.build
 create mode 100644 hw/rdma/trace.h
 create mode 100644 hw/rdma/vmw/trace.h
 delete mode 100644 hw/riscv/Makefile.objs
 create mode 100644 hw/riscv/meson.build
 create mode 100644 hw/riscv/trace.h
 delete mode 100644 hw/s390x/Makefile.objs
 create mode 100644 hw/s390x/meson.build
 create mode 100644 hw/s390x/trace.h
 delete mode 100644 hw/scsi/Makefile.objs
 create mode 100644 hw/scsi/meson.build
 create mode 100644 hw/scsi/trace.h
 delete mode 100644 hw/sd/Makefile.objs
 create mode 100644 hw/sd/meson.build
 create mode 100644 hw/sd/trace.h
 delete mode 100644 hw/semihosting/Makefile.objs
 create mode 100644 hw/semihosting/meson.build
 delete mode 100644 hw/sh4/Makefile.objs
 create mode 100644 hw/sh4/meson.build
 delete mode 100644 hw/smbios/Makefile.objs
 create mode 100644 hw/smbios/meson.build
 delete mode 100644 hw/sparc/Makefile.objs
 create mode 100644 hw/sparc/meson.build
 create mode 100644 hw/sparc/trace.h
 delete mode 100644 hw/sparc64/Makefile.objs
 create mode 100644 hw/sparc64/meson.build
 create mode 100644 hw/sparc64/trace.h
 delete mode 100644 hw/ssi/Makefile.objs
 create mode 100644 hw/ssi/meson.build
 delete mode 100644 hw/timer/Makefile.objs
 create mode 100644 hw/timer/meson.build
 create mode 100644 hw/timer/trace.h
 delete mode 100644 hw/tpm/Makefile.objs
 create mode 100644 hw/tpm/meson.build
 create mode 100644 hw/tpm/trace.h
 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/usb/Makefile.objs
 create mode 100644 hw/usb/meson.build
 create mode 100644 hw/usb/trace.h
 delete mode 100644 hw/vfio/Makefile.objs
 create mode 100644 hw/vfio/meson.build
 create mode 100644 hw/vfio/trace.h
 delete mode 100644 hw/virtio/Makefile.objs
 create mode 100644 hw/virtio/meson.build
 create mode 100644 hw/virtio/trace.h
 delete mode 100644 hw/watchdog/Makefile.objs
 create mode 100644 hw/watchdog/meson.build
 create mode 100644 hw/watchdog/trace.h
 delete mode 100644 hw/xen/Makefile.objs
 create mode 100644 hw/xen/meson.build
 create mode 100644 hw/xen/trace.h
 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
 delete mode 100644 io/Makefile.objs
 create mode 100644 io/meson.build
 create mode 100644 io/trace.h
 delete mode 100644 libdecnumber/Makefile.objs
 create mode 100644 libdecnumber/meson.build
 delete mode 100644 linux-user/Makefile.objs
 delete mode 100644 linux-user/arm/nwfpe/Makefile.objs
 create mode 100644 linux-user/arm/nwfpe/meson.build
 create mode 100644 linux-user/meson.build
 create mode 100644 linux-user/trace.h
 create mode 160000 meson
 create mode 100644 meson.build
 delete mode 100644 migration/Makefile.objs
 create mode 100644 migration/meson.build
 create mode 100644 migration/trace.h
 delete mode 100644 monitor/Makefile.objs
 create mode 100644 monitor/meson.build
 create mode 100644 monitor/trace.h
 delete mode 100644 nbd/Makefile.objs
 create mode 100644 nbd/meson.build
 create mode 100644 nbd/trace.h
 delete mode 100644 net/Makefile.objs
 delete mode 100644 net/can/Makefile.objs
 create mode 100644 net/can/meson.build
 create mode 100644 net/meson.build
 create mode 100644 net/trace.h
 delete mode 100644 pc-bios/Makefile
 create mode 100644 pc-bios/descriptors/meson.build
 delete mode 100644 pc-bios/keymaps/Makefile
 create mode 100644 pc-bios/keymaps/meson.build
 create mode 100644 pc-bios/meson.build
 delete mode 100644 pc-bios/optionrom/Makefile
 create mode 100644 pc-bios/optionrom/meson.build
 delete mode 100644 pc-bios/s390-ccw/Makefile
 create mode 100644 pc-bios/s390-ccw/meson.build
 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
 delete mode 100644 qapi/Makefile.objs
 create mode 100644 qapi/meson.build
 create mode 100644 qapi/trace.h
 delete mode 100644 qga/Makefile.objs
 create mode 100644 qga/meson.build
 delete mode 100644 qga/vss-win32/Makefile.objs
 create mode 100644 qga/vss-win32/meson.build
 delete mode 100644 qobject/Makefile.objs
 create mode 100644 qobject/meson.build
 delete mode 100644 qom/Makefile.objs
 create mode 100644 qom/meson.build
 create mode 100644 qom/trace.h
 delete mode 100644 replay/Makefile.objs
 create mode 100644 replay/meson.build
 create mode 100755 scripts/grepy.sh
 mode change 100644 => 100755 scripts/hxtool
 create mode 100644 scripts/meson.build
 mode change 100644 => 100755 scripts/minikconf.py
 mode change 100644 => 100755 scripts/modules/module_block.py
 create mode 100755 scripts/ninjatool.py
 create mode 100755 scripts/nsis.sh
 create mode 100755 scripts/qemu-version.sh
 mode change 100644 => 100755 scripts/tracetool/backend/dtrace.py
 create mode 100755 scripts/undefsym.sh
 delete mode 100644 scsi/Makefile.objs
 create mode 100644 scsi/meson.build
 create mode 100644 scsi/trace.h
 delete mode 100644 stubs/Makefile.objs
 create mode 100644 stubs/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
 create mode 100644 target/arm/trace.h
 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
 create mode 100644 target/hppa/trace.h
 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
 create mode 100644 target/i386/trace.h
 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
 create mode 100644 target/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
 create mode 100644 target/mips/trace.h
 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
 create mode 100644 target/ppc/trace.h
 delete mode 100644 target/riscv/Makefile.objs
 create mode 100644 target/riscv/meson.build
 create mode 100644 target/riscv/trace.h
 delete mode 100644 target/s390x/Makefile.objs
 create mode 100644 target/s390x/meson.build
 create mode 100644 target/s390x/trace.h
 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
 create mode 100644 target/sparc/trace.h
 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
 delete mode 100644 trace/Makefile.objs
 create mode 100644 trace/meson.build
 delete mode 100644 ui/Makefile.objs
 create mode 100644 ui/icons/meson.build
 create mode 100644 ui/meson.build
 create mode 100644 ui/shader/meson.build
 create mode 100644 ui/trace.h
 delete mode 100644 util/Makefile.objs
 create mode 100644 util/meson.build
 create mode 100644 util/trace.h
Signature · 1 line
1.8.3.1
#1 lore raw

PATCH v3 1/132 build-sys hack: ensure target directory is there

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

By removing some unnest-vars calls, we miss some directory creation that may be required by some/dir/object.d.

This will go away once everything is converted to Meson.

---
 rules.mak | 1 +
 1 file changed, 1 insertion(+)
rules.mak +1 -0
index 967295d..e19ad19 100644
@@ -66,6 +66,7 @@ expand-objs = $(strip $(sort $(filter %.o,$1)) \
                   $(filter-out %.o %.mo,$1))
 
 %.o: %.c
+	@mkdir -p $(dir $@)
 	$(call quiet-command,$(CC) $(QEMU_LOCAL_INCLUDES) $(QEMU_INCLUDES) \
 	       $(QEMU_CFLAGS) $(QEMU_DGFLAGS) $(CFLAGS) $($@-cflags) \
 	       -c -o $@ $<,"CC","$(TARGET_DIR)$@")
Signature · 1 line
1.8.3.1
#2 lore raw

PATCH v3 2/132 configure: do not include $(...) variables in config-host.mak

In reply to Paolo Bonzini

This ensures that Meson will be able to reuse the results of the tests that are performed in the configure script.

---
 configure | 34 +++++++++++++++++-----------------
 1 file changed, 17 insertions(+), 17 deletions(-)
configure +17 -17
index f50314f..9745b87 100755
@@ -589,8 +589,8 @@ QEMU_CFLAGS="-fno-strict-aliasing -fno-common -fwrapv -std=gnu99 $QEMU_CFLAGS"
 QEMU_CFLAGS="-Wall -Wundef -Wwrite-strings -Wmissing-prototypes $QEMU_CFLAGS"
 QEMU_CFLAGS="-Wstrict-prototypes -Wredundant-decls $QEMU_CFLAGS"
 QEMU_CFLAGS="-D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE $QEMU_CFLAGS"
-QEMU_INCLUDES="-iquote . -iquote \$(SRC_PATH) -iquote \$(SRC_PATH)/accel/tcg -iquote \$(SRC_PATH)/include"
-QEMU_INCLUDES="$QEMU_INCLUDES -iquote \$(SRC_PATH)/disas/libvixl"
+QEMU_INCLUDES="-iquote . -iquote ${source_path} -iquote ${source_path}/accel/tcg -iquote ${source_path}/include"
+QEMU_INCLUDES="$QEMU_INCLUDES -iquote ${source_path}/disas/libvixl"
 if test "$debug_info" = "yes"; then
     CFLAGS="-g $CFLAGS"
     LDFLAGS="-g $LDFLAGS"
@@ -881,7 +881,7 @@ Linux)
   linux="yes"
   linux_user="yes"
   kvm="yes"
-  QEMU_INCLUDES="-I\$(SRC_PATH)/linux-headers -I$PWD/linux-headers $QEMU_INCLUDES"
+  QEMU_INCLUDES="-I${source_path}/linux-headers -I$PWD/linux-headers $QEMU_INCLUDES"
   supported_os="yes"
   libudev="yes"
 ;;
@@ -4038,8 +4038,8 @@ EOF
               symlink "$source_path/dtc/Makefile" "dtc/Makefile"
               symlink "$source_path/dtc/scripts" "dtc/scripts"
           fi
-          fdt_cflags="-I\$(SRC_PATH)/dtc/libfdt"
-          fdt_ldflags="-L\$(BUILD_DIR)/dtc/libfdt"
+          fdt_cflags="-I${source_path}/dtc/libfdt"
+          fdt_ldflags="-L$PWD/dtc/libfdt"
           fdt_libs="$fdt_libs"
       elif test "$fdt" = "yes" ; then
           # Not a git build & no libfdt found, prompt for system install
@@ -4988,13 +4988,13 @@ case "$capstone" in
       git_submodules="${git_submodules} capstone"
     fi
     mkdir -p capstone
-    QEMU_CFLAGS="$QEMU_CFLAGS -I\$(SRC_PATH)/capstone/include"
+    QEMU_CFLAGS="$QEMU_CFLAGS -I${source_path}/capstone/include"
     if test "$mingw32" = "yes"; then
       LIBCAPSTONE=capstone.lib
     else
       LIBCAPSTONE=libcapstone.a
     fi
-    libs_cpu="-L\$(BUILD_DIR)/capstone -lcapstone $libs_cpu"
+    libs_cpu="-L$PWD/capstone -lcapstone $libs_cpu"
     ;;
 
   system)
@@ -5888,8 +5888,8 @@ case "$slirp" in
       git_submodules="${git_submodules} slirp"
     fi
     mkdir -p slirp
-    slirp_cflags="-I\$(SRC_PATH)/slirp/src -I\$(BUILD_DIR)/slirp/src"
-    slirp_libs="-L\$(BUILD_DIR)/slirp -lslirp"
+    slirp_cflags="-I${source_path}/slirp/src -I$PWD/slirp/src"
+    slirp_libs="-L$PWD/slirp -lslirp"
     if test "$mingw32" = "yes" ; then
       slirp_libs="$slirp_libs -lws2_32 -liphlpapi"
     fi
@@ -7235,21 +7235,21 @@ if test "$sheepdog" = "yes" ; then
 fi
 
 if test "$tcg_interpreter" = "yes"; then
-  QEMU_INCLUDES="-iquote \$(SRC_PATH)/tcg/tci $QEMU_INCLUDES"
+  QEMU_INCLUDES="-iquote ${source_path}/tcg/tci $QEMU_INCLUDES"
 elif test "$ARCH" = "sparc64" ; then
-  QEMU_INCLUDES="-iquote \$(SRC_PATH)/tcg/sparc $QEMU_INCLUDES"
+  QEMU_INCLUDES="-iquote ${source_path}/tcg/sparc $QEMU_INCLUDES"
 elif test "$ARCH" = "s390x" ; then
-  QEMU_INCLUDES="-iquote \$(SRC_PATH)/tcg/s390 $QEMU_INCLUDES"
+  QEMU_INCLUDES="-iquote ${source_path}/tcg/s390 $QEMU_INCLUDES"
 elif test "$ARCH" = "x86_64" || test "$ARCH" = "x32" ; then
-  QEMU_INCLUDES="-iquote \$(SRC_PATH)/tcg/i386 $QEMU_INCLUDES"
+  QEMU_INCLUDES="-iquote ${source_path}/tcg/i386 $QEMU_INCLUDES"
 elif test "$ARCH" = "ppc64" ; then
-  QEMU_INCLUDES="-iquote \$(SRC_PATH)/tcg/ppc $QEMU_INCLUDES"
+  QEMU_INCLUDES="-iquote ${source_path}/tcg/ppc $QEMU_INCLUDES"
 elif test "$ARCH" = "riscv32" || test "$ARCH" = "riscv64" ; then
-  QEMU_INCLUDES="-I\$(SRC_PATH)/tcg/riscv $QEMU_INCLUDES"
+  QEMU_INCLUDES="-I${source_path}/tcg/riscv $QEMU_INCLUDES"
 else
-  QEMU_INCLUDES="-iquote \$(SRC_PATH)/tcg/\$(ARCH) $QEMU_INCLUDES"
+  QEMU_INCLUDES="-iquote ${source_path}/tcg/\$(ARCH) $QEMU_INCLUDES"
 fi
-QEMU_INCLUDES="-iquote \$(SRC_PATH)/tcg $QEMU_INCLUDES"
+QEMU_INCLUDES="-iquote ${source_path}/tcg $QEMU_INCLUDES"
 
 echo "TOOLS=$tools" >> $config_host_mak
 echo "ROMS=$roms" >> $config_host_mak
Signature · 1 line
1.8.3.1
#3 lore raw

PATCH v3 3/132 configure: expand path variables for meson configure

In reply to Paolo Bonzini

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

---
 configure | 35 ++++++++++++++++++++---------------
 1 file changed, 20 insertions(+), 15 deletions(-)
configure +20 -15
index 9745b87..a444bc3 100755
@@ -404,16 +404,7 @@ DSOSUF=".so"
 LDFLAGS_SHARED="-shared"
 modules="no"
 prefix="/usr/local"
-mandir="\${prefix}/share/man"
-datadir="\${prefix}/share"
 firmwarepath="\${prefix}/share/qemu-firmware"
-qemu_docdir="\${prefix}/share/doc/qemu"
-bindir="\${prefix}/bin"
-libdir="\${prefix}/lib"
-libexecdir="\${prefix}/libexec"
-includedir="\${prefix}/include"
-sysconfdir="\${prefix}/etc"
-local_statedir="\${prefix}/var"
 confsuffix="/qemu"
 slirp=""
 oss_lib=""
@@ -926,12 +917,6 @@ if test "$mingw32" = "yes" ; then
     LIBS="-liberty $LIBS"
   fi
   prefix="c:/Program Files/QEMU"
-  mandir="\${prefix}"
-  datadir="\${prefix}"
-  qemu_docdir="\${prefix}"
-  bindir="\${prefix}"
-  sysconfdir="\${prefix}"
-  local_statedir=
   confsuffix=""
   libs_qga="-lws2_32 -lwinmm -lpowrprof -lwtsapi32 -lwininet -liphlpapi -lnetapi32 $libs_qga"
 fi
@@ -1529,6 +1514,26 @@ for opt do
   esac
 done
 
+libdir="${libdir:-$prefix/lib}"
+libexecdir="${libexecdir:-$prefix/libexec}"
+includedir="${includedir:-$prefix/include}"
+
+if test "$mingw32" = "yes" ; then
+    mandir="$prefix"
+    datadir="$prefix"
+    qemu_docdir="$prefix"
+    bindir="$prefix"
+    sysconfdir="$prefix"
+    local_statedir=
+else
+    mandir="${mandir:-$prefix/share/man}"
+    datadir="${datadir:-$prefix/share}"
+    qemu_docdir="${qemu_docdir:-$prefix/share/doc/qemu}"
+    bindir="${bindir:-$prefix/bin}"
+    sysconfdir="${sysconfdir:-$prefix/etc}"
+    local_statedir="${local_statedir:-$prefix/var}"
+fi
+
 case "$cpu" in
     ppc)
            CPU_CFLAGS="-m32"
Signature · 1 line
1.8.3.1
#4 lore raw

PATCH v3 4/132 configure: integrate Meson in the build system

In reply to Paolo Bonzini

The Meson build system is integrated in the existing configure/make steps by invoking Meson from the configure script and converting Meson's build.ninja rules to an included Makefile.

---
 Makefile             |    9 +
 configure            |   30 ++
 meson.build          |   19 +
 scripts/ninjatool.py | 1004 ++++++++++++++++++++++++++++++++++++++++++++++++++
 4 files changed, 1062 insertions(+)
 create mode 100644 meson.build
 create mode 100755 scripts/ninjatool.py
Makefile +9 -0
index e327df4..44daed6 100644
@@ -52,6 +52,15 @@ git-submodule-update:
 endif
 endif
 
+export NINJA=./ninjatool
+Makefile.ninja: build.ninja ninjatool
+	./ninjatool -t ninja2make --clean --omit dist uninstall < $< > $@
+-include Makefile.ninja
+
+ninjatool: ninjatool.stamp
+ninjatool.stamp: $(SRC_PATH)/scripts/ninjatool.py
+	$(MESON) setup --reconfigure . $(SRC_PATH) && touch $@
+
 .git-submodule-status: git-submodule-update config-host.mak
 
 # Check that we're not trying to do an out-of-tree build from
configure +30 -0
index a444bc3..3e3eb3d 100755
@@ -489,6 +489,7 @@ libxml2=""
 debug_mutex="no"
 libpmem=""
 default_devices="yes"
+meson=meson
 
 supported_cpu="no"
 supported_os="no"
@@ -952,6 +953,8 @@ for opt do
   ;;
   --python=*) python="$optarg"
   ;;
+  --meson=*) meson="$optarg"
+  ;;
   --gcov=*) gcov_tool="$optarg"
   ;;
   --smbd=*) smbd="$optarg"
@@ -1658,6 +1661,7 @@ Advanced options (experts only):
   --make=MAKE              use specified make [$make]
   --install=INSTALL        use specified install [$install]
   --python=PYTHON          use specified python [$python]
+  --meson=MESON            use specified meson [$meson]
   --smbd=SMBD              use specified smbd [$smbd]
   --with-git=GIT           use specified git [$git]
   --static                 enable static build [$static]
@@ -1823,6 +1827,12 @@ then
     error_exit "Python not found. Use --python=/path/to/python"
 fi
 
+if ! has "$meson"
+then
+    error_exit "Meson not found. Use --meson=/path/to/meson"
+fi
+meson=$(command -v $meson)
+
 # Note that if the Python conditional here evaluates True we will exit
 # with status 1 which is a shell 'false' value.
 if ! $python -c 'import sys; sys.exit(sys.version_info < (3,5))'; then
@@ -7266,6 +7276,7 @@ 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 "PYTHON_VERSION=$python_version" >> $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
@@ -7841,6 +7852,25 @@ echo "# Automatically generated by configure - do not modify" > "$iotests_common
 echo >> "$iotests_common_env"
 echo "export PYTHON='$python'" >> "$iotests_common_env"
 
+rm -rf meson-private meson-info meson-logs
+NINJA=$PWD/ninjatool $python $meson setup \
+	--prefix "$prefix" \
+	--libdir "$libdir" \
+	--libexecdir "$libexecdir" \
+	--bindir "$bindir" \
+	--includedir "$includedir" \
+	--datadir "$datadir" \
+	--mandir "$mandir" \
+	--sysconfdir "$sysconfdir" \
+	--localstatedir "$local_statedir" \
+	$(test "$strip_opt" = yes && echo --strip) \
+	--buildtype $(if test "$debug" = yes; then echo debug; else echo debugoptimized; fi) \
+	"$PWD" "$source_path"
+
+if test "$?" -ne 0 ; then
+    error_exit "meson setup failed"
+fi
+
 # Save the configure command line for later reuse.
 cat <<EOD >config.status
 #!/bin/sh
meson.build new file +19 -0
new file mode 100644
index 0000000..5491a6a
@@ -0,0 +1,19 @@
+project('qemu', ['c', 'cpp'], meson_version: '>=0.52.999')
+
+kconfig = import('unstable-kconfig')
+config_host = kconfig.load(meson.current_build_dir() / 'config-host.mak')
+
+add_project_arguments(config_host['CFLAGS'].split(),
+                      language: ['c', 'objc'])
+add_project_arguments(config_host['QEMU_CFLAGS'].split(),
+                      language: 'c')
+add_project_link_arguments(config_host['LDFLAGS'].split(),
+                           language: ['c', 'cpp', 'objc'])
+add_project_link_arguments(config_host['QEMU_LDFLAGS'].split(),
+                           language: ['c', 'cpp', 'objc'])
+add_project_arguments(config_host['QEMU_INCLUDES'].split(),
+                      language: 'c')
+
+configure_file(input: files('scripts/ninjatool.py'),
+               output: 'ninjatool',
+               configuration: config_host)
scripts/ninjatool.py new file +1004 -0

1,004 lines not on this page · raw message

Signature · 1 line
1.8.3.1
#5 lore raw

PATCH v3 5/132 configure: generate Meson cross file

In reply to Paolo Bonzini

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

---
 configure | 41 +++++++++++++++++++++++++++++++++++++++++
 1 file changed, 41 insertions(+)
configure +41 -0
index 3e3eb3d..2f3e231 100755
@@ -7852,6 +7852,46 @@ echo "# Automatically generated by configure - do not modify" > "$iotests_common
 echo >> "$iotests_common_env"
 echo "export PYTHON='$python'" >> "$iotests_common_env"
 
+cross="config-meson.cross"
+cross_arg=
+
+if test -n "$cross_prefix"; then
+    echo "# Automatically generated by configure - do not modify" > $cross
+    echo "[binaries]" >> $cross
+    echo "c = '$cc'" >> $cross
+    echo "cpp = '$cxx'" >> $cross
+    echo "ar = '$ar'" >> $cross
+    echo "nm = '$nm'" >> $cross
+    echo "pkgconfig = '$pkg_config_exe'" >> $cross
+    echo "ranlib = '$ranlib'" >> $cross
+    echo "strip = '$strip'" >> $cross
+    echo "windres = '$windres'" >> $cross
+
+    echo "[properties]" >> $cross
+    echo "root = '$prefix'" >> $cross
+
+    echo "[host_machine]" >> $cross
+if test "$mingw32" = "yes" ; then
+    echo "system = 'windows'" >> $cross
+fi
+case "$ARCH" in
+    i386|x86_64)
+        echo "cpu_family = 'x86'" >> $cross
+        ;;
+    *)
+        echo "cpu_family = '$ARCH'" >> $cross
+        ;;
+esac
+    echo "cpu = '$cpu'" >> $cross
+if test "$bigendian" = "yes" ; then
+    echo "endian = 'big'" >> $cross
+else
+    echo "endian = 'little'" >> $cross
+fi
+
+    cross_arg="--cross-file=$cross"
+fi
+
 rm -rf meson-private meson-info meson-logs
 NINJA=$PWD/ninjatool $python $meson setup \
 	--prefix "$prefix" \
@@ -7865,6 +7905,7 @@ NINJA=$PWD/ninjatool $python $meson setup \
 	--localstatedir "$local_statedir" \
 	$(test "$strip_opt" = yes && echo --strip) \
 	--buildtype $(if test "$debug" = yes; then echo debug; else echo debugoptimized; fi) \
+        $cross_arg \
 	"$PWD" "$source_path"
 
 if test "$?" -ne 0 ; then
Signature · 1 line
1.8.3.1
#6 lore raw

PATCH v3 6/132 build-sys: add meson submodule

In reply to Paolo Bonzini

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

---
 .gitmodules               |  3 +++
 configure                 | 45 +++++++++++++++++++++++++++++++++++++++++----
 meson                     |  1 +
 scripts/archive-source.sh |  3 ++-
 4 files changed, 47 insertions(+), 5 deletions(-)
 create mode 160000 meson
.gitmodules +3 -0
index c5c4741..67f4ed8 100644
@@ -58,3 +58,6 @@
 [submodule "roms/opensbi"]
 	path = roms/opensbi
 	url = 	https://git.qemu.org/git/opensbi.git
+[submodule "meson"]
+	path = meson
+	url = https://github.com/mesonbuild/meson/
configure +41 -4

63 lines not on this page · raw message

meson new file +1 -0
new file mode 160000
index 0000000..5031f49
@@ -0,0 +1 @@
+Subproject commit 5031f4981d4fcf6eb0bc950669a0a77a7df22939
scripts/archive-source.sh +2 -1
index fb5d6b3..c6169db 100755
@@ -26,7 +26,8 @@ sub_file="${sub_tdir}/submodule.tar"
 # independent of what the developer currently has initialized
 # in their checkout, because the build environment is completely
 # different to the host OS.
-submodules="dtc slirp ui/keycodemapdb tests/fp/berkeley-softfloat-3 tests/fp/berkeley-testfloat-3"
+submodules="dtc slirp meson ui/keycodemapdb"
+submodules="$submodules tests/fp/berkeley-softfloat-3 tests/fp/berkeley-testfloat-3"
 sub_deinit=""
 
 function cleanup() {
Signature · 1 line
1.8.3.1
#7 lore raw

PATCH v3 7/132 meson: enable pie

In reply to Paolo Bonzini

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

---
 configure | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
configure +1 -1
index 0eb3d70..80055f1 100755
@@ -2075,7 +2075,6 @@ int main(void) { return tls_var; }
 EOF
   if compile_prog "-fPIE -DPIE" "-pie"; then
     QEMU_CFLAGS="-fPIE -DPIE $QEMU_CFLAGS"
-    LDFLAGS="-pie $LDFLAGS"
     pie="yes"
     if compile_prog "" "-Wl,-z,relro -Wl,-z,now" ; then
       LDFLAGS="-Wl,-z,relro -Wl,-z,now $LDFLAGS"
@@ -7942,6 +7941,7 @@ NINJA=$PWD/ninjatool $python $meson setup \
 	--localstatedir "$local_statedir" \
 	$(test "$strip_opt" = yes && echo --strip) \
 	--buildtype $(if test "$debug" = yes; then echo debug; else echo debugoptimized; fi) \
+        -Db_pie=$(if test "$pie" = yes; then echo true; else echo false; fi) \
         $cross_arg \
 	"$PWD" "$source_path"
 
Signature · 1 line
1.8.3.1
#8 lore raw

PATCH v3 8/132 meson: use coverage option

In reply to Paolo Bonzini

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

---
 Makefile               | 14 --------------
 Makefile.target        | 16 ----------------
 configure              | 10 ++--------
 docs/devel/testing.rst |  7 +++----
 4 files changed, 5 insertions(+), 42 deletions(-)
Makefile +0 -14
index 44daed6..292da1f 100644
@@ -661,14 +661,6 @@ module_block.h: $(SRC_PATH)/scripts/modules/module_block.py config-host.mak
 	$(addprefix $(SRC_PATH)/,$(patsubst %.mo,%.c,$(block-obj-m))), \
 	"GEN","$@")
 
-ifdef CONFIG_GCOV
-.PHONY: clean-coverage
-clean-coverage:
-	$(call quiet-command, \
-		find . \( -name '*.gcda' -o -name '*.gcov' \) -type f -exec rm {} +, \
-		"CLEAN", "coverage files")
-endif
-
 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
@@ -1150,9 +1142,6 @@ endif
 		echo '')
 	@echo  'Cleaning targets:'
 	@echo  '  clean           - Remove most generated files but keep the config'
-ifdef CONFIG_GCOV
-	@echo  '  clean-coverage  - Remove coverage files'
-endif
 	@echo  '  distclean       - Remove all generated files'
 	@echo  '  dist            - Build a distributable tarball'
 	@echo  ''
@@ -1164,9 +1153,6 @@ endif
 	@echo  'Documentation targets:'
 	@echo  '  html info pdf txt'
 	@echo  '                  - Build documentation in specified format'
-ifdef CONFIG_GCOV
-	@echo  '  coverage-report - Create code coverage report'
-endif
 	@echo  ''
 ifdef CONFIG_WIN32
 	@echo  'Windows targets:'
Makefile.target +0 -16
index 532e4ab..f4b44af 100644
@@ -238,19 +238,3 @@ endif
 
 generated-files-y += config-target.h
 Makefile: $(generated-files-y)
-
-# Reports/Analysis
-#
-# The target specific coverage report only cares about target specific
-# blobs and not the shared code.
-#
-
-%/coverage-report.html:
-	@mkdir -p $*
-	$(call quiet-command,\
-		gcovr -r $(SRC_PATH) --object-directory $(CURDIR) \
-		-p --html --html-details -o $@, \
-		"GEN", "coverage-report.html")
-
-.PHONY: coverage-report
-coverage-report: $(CURDIR)/reports/coverage/coverage-report.html
configure +2 -8
index 80055f1..5112683 100755
@@ -417,7 +417,6 @@ tcg_interpreter="no"
 bigendian="no"
 mingw32="no"
 gcov="no"
-gcov_tool="gcov"
 EXESUF=""
 DSOSUF=".so"
 LDFLAGS_SHARED="-shared"
@@ -973,8 +972,6 @@ for opt do
   ;;
   --meson=*) meson="$optarg"
   ;;
-  --gcov=*) gcov_tool="$optarg"
-  ;;
   --smbd=*) smbd="$optarg"
   ;;
   --extra-cflags=*)
@@ -1720,7 +1717,6 @@ Advanced options (experts only):
   --with-coroutine=BACKEND coroutine backend. Supported options:
                            ucontext, sigaltstack, windows
   --enable-gcov            enable test coverage analysis with gcov
-  --gcov=GCOV              use specified gcov [$gcov_tool]
   --disable-blobs          disable installing provided firmware blobs
   --with-vss-sdk=SDK-path  enable Windows VSS support in QEMU Guest Agent
   --with-win-sdk=SDK-path  path to Windows Platform SDK (to build VSS .tlb)
@@ -5967,8 +5963,7 @@ esac
 write_c_skeleton
 
 if test "$gcov" = "yes" ; then
-  CFLAGS="-fprofile-arcs -ftest-coverage -g $CFLAGS"
-  LDFLAGS="-fprofile-arcs -ftest-coverage $LDFLAGS"
+  :
 elif test "$fortify_source" = "yes" ; then
   CFLAGS="-O2 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 $CFLAGS"
 elif test "$debug" = "no"; then
@@ -6434,7 +6429,6 @@ echo "debug stack usage $debug_stack_usage"
 echo "mutex debugging   $debug_mutex"
 echo "crypto afalg      $crypto_afalg"
 echo "GlusterFS support $glusterfs"
-echo "gcov              $gcov_tool"
 echo "gcov enabled      $gcov"
 echo "TPM support       $tpm"
 echo "libssh support    $libssh"
@@ -7359,7 +7353,6 @@ echo "TASN1_CFLAGS=$tasn1_cflags" >> $config_host_mak
 echo "POD2MAN=$POD2MAN" >> $config_host_mak
 if test "$gcov" = "yes" ; then
   echo "CONFIG_GCOV=y" >> $config_host_mak
-  echo "GCOV=$gcov_tool" >> $config_host_mak
 fi
 
 if test "$libudev" != "no"; then
@@ -7942,6 +7935,7 @@ NINJA=$PWD/ninjatool $python $meson setup \
 	$(test "$strip_opt" = yes && echo --strip) \
 	--buildtype $(if test "$debug" = yes; then echo debug; else echo debugoptimized; fi) \
         -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) \
         $cross_arg \
 	"$PWD" "$source_path"
 
docs/devel/testing.rst +3 -4
index bf75675..c81ed35 100644
@@ -163,13 +163,12 @@ instrumenting the tested code. To use it, configure QEMU with
 ``--enable-gcov`` option and build. Then run ``make check`` as usual.
 
 If you want to gather coverage information on a single test the ``make
-clean-coverage`` target can be used to delete any existing coverage
+clean-gcda`` target can be used to delete any existing coverage
 information before running a single test.
 
 You can generate a HTML coverage report by executing ``make
-coverage-report`` which will create
-./reports/coverage/coverage-report.html. If you want to create it
-elsewhere simply execute ``make /foo/bar/baz/coverage-report.html``.
+coverage-html`` which will create
+``meson-logs/coveragereport/index.html``.
 
 Further analysis can be conducted by running the ``gcov`` command
 directly on the various .gcda output files. Please read the ``gcov``
Signature · 1 line
1.8.3.1
#9 lore raw

PATCH v3 9/132 libqemuutil: convert to meson

In reply to Paolo Bonzini

This shows how to do some "computations" in meson.build using its array and dictionary data structures, and also a basic usage of the sourceset module for conditional compilation.

Overall the look of the meson.build code is quite good, however Meson doesn't enjoy the same flexibility we have with Make in choosing the include path. In particular the tracing headers are using $(build_root)/$(<D); for now my solution is to generate headers like "trace/trace-audio.h" and have sixty one-line forwarding headers in the source tree; for example "audio/trace.h" includes "trace/trace-audio.h". I'm not sure if it's possible to instead add a one-line "generate trace headers" directive to each subdirectory's meson.build file. I suspect that it _is_ possible but you'd still have to change the include directives to include the subdirectory name (and then I prefer the forwarding headers).

The overall lines delta would be negative if it weren't for the forwarding headers.

---
 Makefile                                  | 182 ++++++------------------------
 Makefile.objs                             |  93 +--------------
 Makefile.target                           |   8 +-
 accel/kvm/trace.h                         |   1 +
 accel/tcg/trace.h                         |   1 +
 audio/trace.h                             |   1 +
 authz/trace.h                             |   1 +
 balloon.c                                 |   2 +-
 block/trace.h                             |   1 +
 chardev/trace.h                           |   1 +
 configure                                 |   8 ++
 crypto/Makefile.objs                      |   5 -
 crypto/meson.build                        |   9 ++
 crypto/trace.h                            |   1 +
 dma-helpers.c                             |   2 +-
 docs/devel/tracing.txt                    |   2 +-
 exec.c                                    |   2 +-
 gdbstub.c                                 |   2 +-
 hw/9pfs/trace.h                           |   1 +
 hw/acpi/trace.h                           |   1 +
 hw/alpha/trace.h                          |   1 +
 hw/arm/trace.h                            |   1 +
 hw/audio/trace.h                          |   1 +
 hw/block/dataplane/trace.h                |   1 +
 hw/block/trace.h                          |   1 +
 hw/char/trace.h                           |   1 +
 hw/core/cpu.c                             |   2 +-
 hw/display/trace.h                        |   1 +
 hw/dma/trace.h                            |   1 +
 hw/gpio/trace.h                           |   1 +
 hw/hppa/trace.h                           |   1 +
 hw/i2c/trace.h                            |   1 +
 hw/i386/trace.h                           |   1 +
 hw/i386/xen/trace.h                       |   1 +
 hw/ide/trace.h                            |   1 +
 hw/input/trace.h                          |   1 +
 hw/intc/trace.h                           |   1 +
 hw/isa/trace.h                            |   1 +
 hw/mem/trace.h                            |   1 +
 hw/mips/trace.h                           |   1 +
 hw/misc/macio/trace.h                     |   1 +
 hw/misc/trace.h                           |   1 +
 hw/net/trace.h                            |   1 +
 hw/nvram/trace.h                          |   1 +
 hw/pci-host/trace.h                       |   1 +
 hw/pci/trace.h                            |   1 +
 hw/ppc/trace.h                            |   1 +
 hw/rdma/trace.h                           |   1 +
 hw/rdma/vmw/trace.h                       |   1 +
 hw/riscv/trace.h                          |   1 +
 hw/s390x/trace.h                          |   1 +
 hw/scsi/trace.h                           |   1 +
 hw/sd/trace.h                             |   1 +
 hw/sparc/trace.h                          |   1 +
 hw/sparc64/trace.h                        |   1 +
 hw/timer/trace.h                          |   1 +
 hw/tpm/trace.h                            |   1 +
 hw/usb/trace.h                            |   1 +
 hw/vfio/trace.h                           |   1 +
 hw/virtio/trace.h                         |   1 +
 hw/watchdog/trace.h                       |   1 +
 hw/xen/trace.h                            |   1 +
 include/exec/cpu_ldst_template.h          |   2 +-
 include/exec/cpu_ldst_useronly_template.h |   2 +-
 io/trace.h                                |   1 +
 ioport.c                                  |   2 +-
 job-qmp.c                                 |   2 +-
 job.c                                     |   2 +-
 linux-user/trace.h                        |   1 +
 memory.c                                  |   2 +-
 meson.build                               | 161 ++++++++++++++++++++++++++
 migration/trace.h                         |   1 +
 monitor/trace.h                           |   1 +
 nbd/trace.h                               |   1 +
 net/trace.h                               |   1 +
 qapi/Makefile.objs                        |  21 ----
 qapi/meson.build                          |  89 +++++++++++++++
 qapi/trace.h                              |   1 +
 qobject/Makefile.objs                     |   3 -
 qobject/meson.build                       |   3 +
 qom/trace.h                               |   1 +
 rules.mak                                 |   2 +-
 scripts/qapi-gen.py                       |   2 +-
 scripts/tracetool.py                      |   2 +-
 scripts/tracetool/backend/dtrace.py       |   2 +-
 scripts/tracetool/backend/ust.py          |   6 +-
 scripts/tracetool/format/c.py             |   5 +-
 scripts/tracetool/format/tcg_h.py         |   2 +-
 scripts/tracetool/format/tcg_helper_c.py  |   2 +-
 scsi/trace.h                              |   1 +
 stubs/Makefile.objs                       |  43 -------
 stubs/meson.build                         |  45 ++++++++
 target/arm/trace.h                        |   1 +
 target/hppa/trace.h                       |   1 +
 target/i386/trace.h                       |   1 +
 target/mips/trace.h                       |   1 +
 target/ppc/trace.h                        |   1 +
 target/riscv/trace.h                      |   1 +
 target/s390x/trace.h                      |   1 +
 target/sparc/trace.h                      |   1 +
 trace/Makefile.objs                       |  51 ---------
 trace/control-target.c                    |   2 +-
 trace/control.c                           |   2 +-
 trace/meson.build                         |  82 ++++++++++++++
 ui/trace.h                                |   1 +
 util/Makefile.objs                        |  57 ----------
 util/meson.build                          |  57 ++++++++++
 util/trace.h                              |   1 +
 vl.c                                      |   2 +-
 109 files changed, 585 insertions(+), 454 deletions(-)
 create mode 100644 accel/kvm/trace.h
 create mode 100644 accel/tcg/trace.h
 create mode 100644 audio/trace.h
 create mode 100644 authz/trace.h
 create mode 100644 block/trace.h
 create mode 100644 chardev/trace.h
 create mode 100644 crypto/meson.build
 create mode 100644 crypto/trace.h
 create mode 100644 hw/9pfs/trace.h
 create mode 100644 hw/acpi/trace.h
 create mode 100644 hw/alpha/trace.h
 create mode 100644 hw/arm/trace.h
 create mode 100644 hw/audio/trace.h
 create mode 100644 hw/block/dataplane/trace.h
 create mode 100644 hw/block/trace.h
 create mode 100644 hw/char/trace.h
 create mode 100644 hw/display/trace.h
 create mode 100644 hw/dma/trace.h
 create mode 100644 hw/gpio/trace.h
 create mode 100644 hw/hppa/trace.h
 create mode 100644 hw/i2c/trace.h
 create mode 100644 hw/i386/trace.h
 create mode 100644 hw/i386/xen/trace.h
 create mode 100644 hw/ide/trace.h
 create mode 100644 hw/input/trace.h
 create mode 100644 hw/intc/trace.h
 create mode 100644 hw/isa/trace.h
 create mode 100644 hw/mem/trace.h
 create mode 100644 hw/mips/trace.h
 create mode 100644 hw/misc/macio/trace.h
 create mode 100644 hw/misc/trace.h
 create mode 100644 hw/net/trace.h
 create mode 100644 hw/nvram/trace.h
 create mode 100644 hw/pci-host/trace.h
 create mode 100644 hw/pci/trace.h
 create mode 100644 hw/ppc/trace.h
 create mode 100644 hw/rdma/trace.h
 create mode 100644 hw/rdma/vmw/trace.h
 create mode 100644 hw/riscv/trace.h
 create mode 100644 hw/s390x/trace.h
 create mode 100644 hw/scsi/trace.h
 create mode 100644 hw/sd/trace.h
 create mode 100644 hw/sparc/trace.h
 create mode 100644 hw/sparc64/trace.h
 create mode 100644 hw/timer/trace.h
 create mode 100644 hw/tpm/trace.h
 create mode 100644 hw/usb/trace.h
 create mode 100644 hw/vfio/trace.h
 create mode 100644 hw/virtio/trace.h
 create mode 100644 hw/watchdog/trace.h
 create mode 100644 hw/xen/trace.h
 create mode 100644 io/trace.h
 create mode 100644 linux-user/trace.h
 create mode 100644 migration/trace.h
 create mode 100644 monitor/trace.h
 create mode 100644 nbd/trace.h
 create mode 100644 net/trace.h
 create mode 100644 qapi/meson.build
 create mode 100644 qapi/trace.h
 delete mode 100644 qobject/Makefile.objs
 create mode 100644 qobject/meson.build
 create mode 100644 qom/trace.h
 mode change 100644 => 100755 scripts/tracetool/backend/dtrace.py
 create mode 100644 scsi/trace.h
 delete mode 100644 stubs/Makefile.objs
 create mode 100644 stubs/meson.build
 create mode 100644 target/arm/trace.h
 create mode 100644 target/hppa/trace.h
 create mode 100644 target/i386/trace.h
 create mode 100644 target/mips/trace.h
 create mode 100644 target/ppc/trace.h
 create mode 100644 target/riscv/trace.h
 create mode 100644 target/s390x/trace.h
 create mode 100644 target/sparc/trace.h
 create mode 100644 trace/meson.build
 create mode 100644 ui/trace.h
 delete mode 100644 util/Makefile.objs
 create mode 100644 util/meson.build
 create mode 100644 util/trace.h
Makefile +34 -148
index 292da1f..6f97ae9 100644
@@ -112,158 +112,60 @@ FULL_VERSION := $(if $(QEMU_PKGVERSION),$(VERSION) ($(QEMU_PKGVERSION)),$(VERSIO
 
 generated-files-y = qemu-version.h config-host.h qemu-options.def
 
-GENERATED_QAPI_FILES = qapi/qapi-builtin-types.h qapi/qapi-builtin-types.c
-GENERATED_QAPI_FILES += qapi/qapi-types.h qapi/qapi-types.c
-GENERATED_QAPI_FILES += $(QAPI_MODULES:%=qapi/qapi-types-%.h)
-GENERATED_QAPI_FILES += $(QAPI_MODULES:%=qapi/qapi-types-%.c)
-GENERATED_QAPI_FILES += qapi/qapi-builtin-visit.h qapi/qapi-builtin-visit.c
-GENERATED_QAPI_FILES += qapi/qapi-visit.h qapi/qapi-visit.c
-GENERATED_QAPI_FILES += $(QAPI_MODULES:%=qapi/qapi-visit-%.h)
-GENERATED_QAPI_FILES += $(QAPI_MODULES:%=qapi/qapi-visit-%.c)
-GENERATED_QAPI_FILES += qapi/qapi-commands.h qapi/qapi-commands.c
-GENERATED_QAPI_FILES += $(QAPI_MODULES:%=qapi/qapi-commands-%.h)
-GENERATED_QAPI_FILES += $(QAPI_MODULES:%=qapi/qapi-commands-%.c)
-GENERATED_QAPI_FILES += qapi/qapi-emit-events.h qapi/qapi-emit-events.c
-GENERATED_QAPI_FILES += qapi/qapi-events.h qapi/qapi-events.c
-GENERATED_QAPI_FILES += $(QAPI_MODULES:%=qapi/qapi-events-%.h)
-GENERATED_QAPI_FILES += $(QAPI_MODULES:%=qapi/qapi-events-%.c)
-GENERATED_QAPI_FILES += qapi/qapi-introspect.c qapi/qapi-introspect.h
-GENERATED_QAPI_FILES += qapi/qapi-doc.texi
-
-generated-files-y += $(GENERATED_QAPI_FILES)
-
 generated-files-y += trace/generated-tcg-tracers.h
 
 generated-files-y += trace/generated-helpers-wrappers.h
 generated-files-y += trace/generated-helpers.h
 generated-files-y += trace/generated-helpers.c
 
-generated-files-$(CONFIG_TRACE_UST) += trace-ust-all.h
-generated-files-$(CONFIG_TRACE_UST) += trace-ust-all.c
-
 generated-files-y += module_block.h
 
-TRACE_HEADERS = trace-root.h $(trace-events-subdirs:%=%/trace.h)
-TRACE_SOURCES = trace-root.c $(trace-events-subdirs:%=%/trace.c)
-TRACE_DTRACE =
-ifdef CONFIG_TRACE_DTRACE
-TRACE_HEADERS += trace-dtrace-root.h $(trace-events-subdirs:%=%/trace-dtrace.h)
-TRACE_DTRACE += trace-dtrace-root.dtrace $(trace-events-subdirs:%=%/trace-dtrace.dtrace)
-endif
-ifdef CONFIG_TRACE_UST
-TRACE_HEADERS += trace-ust-root.h $(trace-events-subdirs:%=%/trace-ust.h)
-endif
-
-generated-files-y += $(TRACE_HEADERS)
-generated-files-y += $(TRACE_SOURCES)
-generated-files-y += $(BUILD_DIR)/trace-events-all
 generated-files-y += .git-submodule-status
 
-trace-group-name = $(shell dirname $1 | sed -e 's/[^a-zA-Z0-9]/_/g')
-
 tracetool-y = $(SRC_PATH)/scripts/tracetool.py
 tracetool-y += $(shell find $(SRC_PATH)/scripts/tracetool -name "*.py")
 
-%/trace.h: %/trace.h-timestamp
-	@cmp $< $@ >/dev/null 2>&1 || cp $< $@
-%/trace.h-timestamp: $(SRC_PATH)/%/trace-events $(tracetool-y) $(BUILD_DIR)/config-host.mak
-	$(call quiet-command,$(TRACETOOL) \
-		--group=$(call trace-group-name,$@) \
-		--format=h \
-		--backends=$(TRACE_BACKENDS) \
-		$< > $@,"GEN","$(@:%-timestamp=%)")
-
-%/trace.c: %/trace.c-timestamp
-	@cmp $< $@ >/dev/null 2>&1 || cp $< $@
-%/trace.c-timestamp: $(SRC_PATH)/%/trace-events $(tracetool-y) $(BUILD_DIR)/config-host.mak
-	$(call quiet-command,$(TRACETOOL) \
-		--group=$(call trace-group-name,$@) \
-		--format=c \
-		--backends=$(TRACE_BACKENDS) \
-		$< > $@,"GEN","$(@:%-timestamp=%)")
-
-%/trace-ust.h: %/trace-ust.h-timestamp
-	@cmp $< $@ >/dev/null 2>&1 || cp $< $@
-%/trace-ust.h-timestamp: $(SRC_PATH)/%/trace-events $(tracetool-y) $(BUILD_DIR)/config-host.mak
-	$(call quiet-command,$(TRACETOOL) \
-		--group=$(call trace-group-name,$@) \
-		--format=ust-events-h \
-		--backends=$(TRACE_BACKENDS) \
-		$< > $@,"GEN","$(@:%-timestamp=%)")
-
-%/trace-dtrace.dtrace: %/trace-dtrace.dtrace-timestamp
-	@cmp $< $@ >/dev/null 2>&1 || cp $< $@
-%/trace-dtrace.dtrace-timestamp: $(SRC_PATH)/%/trace-events $(BUILD_DIR)/config-host.mak $(tracetool-y)
-	$(call quiet-command,$(TRACETOOL) \
-		--group=$(call trace-group-name,$@) \
-		--format=d \
-		--backends=$(TRACE_BACKENDS) \
-		$< > $@,"GEN","$(@:%-timestamp=%)")
-
-%/trace-dtrace.h: %/trace-dtrace.dtrace $(tracetool-y)
-	$(call quiet-command,dtrace -o $@ -h -s $<, "GEN","$@")
-
-%/trace-dtrace.o: %/trace-dtrace.dtrace $(tracetool-y)
-
-
-trace-root.h: trace-root.h-timestamp
+trace/generated-helpers-wrappers.h: trace/generated-helpers-wrappers.h-timestamp
 	@cmp $< $@ >/dev/null 2>&1 || cp $< $@
-trace-root.h-timestamp: $(SRC_PATH)/trace-events $(tracetool-y) $(BUILD_DIR)/config-host.mak
+trace/generated-helpers-wrappers.h-timestamp: $(SRC_PATH)/trace-events $(BUILD_DIR)/config-host.mak $(tracetool-y)
+	@mkdir -p $(dir $@)
 	$(call quiet-command,$(TRACETOOL) \
 		--group=root \
-		--format=h \
-		--backends=$(TRACE_BACKENDS) \
-		$< > $@,"GEN","$(@:%-timestamp=%)")
+		--format=tcg-helper-wrapper-h \
+		--backend=$(TRACE_BACKENDS) \
+		$< > $@,"GEN","$(patsubst %-timestamp,%,$@)")
 
-trace-root.c: trace-root.c-timestamp
+trace/generated-helpers.h: trace/generated-helpers.h-timestamp
 	@cmp $< $@ >/dev/null 2>&1 || cp $< $@
-trace-root.c-timestamp: $(SRC_PATH)/trace-events $(tracetool-y) $(BUILD_DIR)/config-host.mak
+trace/generated-helpers.h-timestamp: $(SRC_PATH)/trace-events $(BUILD_DIR)/config-host.mak $(tracetool-y)
+	@mkdir -p $(dir $@)
 	$(call quiet-command,$(TRACETOOL) \
 		--group=root \
-		--format=c \
-		--backends=$(TRACE_BACKENDS) \
-		$< > $@,"GEN","$(@:%-timestamp=%)")
+		--format=tcg-helper-h \
+		--backend=$(TRACE_BACKENDS) \
+		$< > $@,"GEN","$(patsubst %-timestamp,%,$@)")
 
-trace-ust-root.h: trace-ust-root.h-timestamp
+trace/generated-helpers.c: trace/generated-helpers.c-timestamp
 	@cmp $< $@ >/dev/null 2>&1 || cp $< $@
-trace-ust-root.h-timestamp: $(SRC_PATH)/trace-events $(tracetool-y) $(BUILD_DIR)/config-host.mak
+trace/generated-helpers.c-timestamp: $(SRC_PATH)/trace-events $(BUILD_DIR)/config-host.mak $(tracetool-y)
+	@mkdir -p $(dir $@)
 	$(call quiet-command,$(TRACETOOL) \
 		--group=root \
-		--format=ust-events-h \
-		--backends=$(TRACE_BACKENDS) \
-		$< > $@,"GEN","$(@:%-timestamp=%)")
-
-trace-ust-all.h: trace-ust-all.h-timestamp
-	@cmp $< $@ >/dev/null 2>&1 || cp $< $@
-trace-ust-all.h-timestamp: $(trace-events-files) $(tracetool-y) $(BUILD_DIR)/config-host.mak
-	$(call quiet-command,$(TRACETOOL) \
-		--group=all \
-		--format=ust-events-h \
-		--backends=$(TRACE_BACKENDS) \
-		$(trace-events-files) > $@,"GEN","$(@:%-timestamp=%)")
+		--format=tcg-helper-c \
+		--backend=$(TRACE_BACKENDS) \
+		$< > $@,"GEN","$(patsubst %-timestamp,%,$@)")
 
-trace-ust-all.c: trace-ust-all.c-timestamp
-	@cmp $< $@ >/dev/null 2>&1 || cp $< $@
-trace-ust-all.c-timestamp: $(trace-events-files) $(tracetool-y) $(BUILD_DIR)/config-host.mak
-	$(call quiet-command,$(TRACETOOL) \
-		--group=all \
-		--format=ust-events-c \
-		--backends=$(TRACE_BACKENDS) \
-		$(trace-events-files) > $@,"GEN","$(@:%-timestamp=%)")
+trace/generated-helpers.o: trace/generated-helpers.c
 
-trace-dtrace-root.dtrace: trace-dtrace-root.dtrace-timestamp
+trace/generated-tcg-tracers.h: trace/generated-tcg-tracers.h-timestamp
 	@cmp $< $@ >/dev/null 2>&1 || cp $< $@
-trace-dtrace-root.dtrace-timestamp: $(SRC_PATH)/trace-events $(BUILD_DIR)/config-host.mak $(tracetool-y)
+trace/generated-tcg-tracers.h-timestamp: $(SRC_PATH)/trace-events $(BUILD_DIR)/config-host.mak $(tracetool-y)
+	@mkdir -p $(dir $@)
 	$(call quiet-command,$(TRACETOOL) \
 		--group=root \
-		--format=d \
-		--backends=$(TRACE_BACKENDS) \
-		$< > $@,"GEN","$(@:%-timestamp=%)")
-
-trace-dtrace-root.h: trace-dtrace-root.dtrace
-	$(call quiet-command,dtrace -o $@ -h -s $<, "GEN","$@")
-
-trace-dtrace-root.o: trace-dtrace-root.dtrace
+		--format=tcg-h \
+		--backend=$(TRACE_BACKENDS) \
+		$< > $@,"GEN","$(patsubst %-timestamp,%,$@)")
 
 KEYCODEMAP_GEN = $(SRC_PATH)/ui/keycodemapdb/tools/keymap-gen
 KEYCODEMAP_CSV = $(SRC_PATH)/ui/keycodemapdb/data/keymaps.csv
@@ -409,10 +311,8 @@ include $(SRC_PATH)/Makefile.objs
 endif
 
 dummy := $(call unnest-vars,, \
-                stub-obj-y \
                 authz-obj-y \
                 chardev-obj-y \
-                util-obj-y \
                 qga-obj-y \
                 elf2dmp-obj-y \
                 ivshmem-client-obj-y \
@@ -430,8 +330,7 @@ dummy := $(call unnest-vars,, \
                 qom-obj-y \
                 io-obj-y \
                 common-obj-y \
-                common-obj-m \
-                trace-obj-y)
+                common-obj-m)
 
 include $(SRC_PATH)/tests/Makefile.include
 
@@ -531,8 +430,7 @@ Makefile: $(version-obj-y)
 ######################################################################
 # Build libraries
 
-libqemuutil.a: $(util-obj-y) $(trace-obj-y) $(stub-obj-y)
-libvhost-user.a: $(libvhost-user-obj-y) $(util-obj-y) $(stub-obj-y)
+libvhost-user.a: $(libvhost-user-obj-y)
 
 ######################################################################
 
@@ -587,16 +485,6 @@ qga/qapi-generated/qapi-gen-timestamp: $(SRC_PATH)/qga/qapi-schema.json $(qapi-p
 		"GEN","$(@:%-timestamp=%)")
 	@>$@
 
-qapi-modules = $(SRC_PATH)/qapi/qapi-schema.json \
-               $(QAPI_MODULES:%=$(SRC_PATH)/qapi/%.json)
-
-$(GENERATED_QAPI_FILES): qapi-gen-timestamp ;
-qapi-gen-timestamp: $(qapi-modules) $(qapi-py)
-	$(call quiet-command,$(PYTHON) $(SRC_PATH)/scripts/qapi-gen.py \
-		-o "qapi" -b $<, \
-		"GEN","$(@:%-timestamp=%)")
-	@>$@
-
 QGALIB_GEN=$(addprefix qga/qapi-generated/, qga-qapi-types.h qga-qapi-visit.h qga-qapi-commands.h)
 $(qga-obj-y): $(QGALIB_GEN)
 
@@ -634,21 +522,21 @@ ivshmem-client$(EXESUF): $(ivshmem-client-obj-y) $(COMMON_LDADDS)
 ivshmem-server$(EXESUF): $(ivshmem-server-obj-y) $(COMMON_LDADDS)
 	$(call LINK, $^)
 endif
-vhost-user-scsi$(EXESUF): $(vhost-user-scsi-obj-y) libvhost-user.a
+vhost-user-scsi$(EXESUF): $(vhost-user-scsi-obj-y) libvhost-user.a $(COMMON_LDADDS)
 	$(call LINK, $^)
-vhost-user-blk$(EXESUF): $(vhost-user-blk-obj-y) libvhost-user.a
+vhost-user-blk$(EXESUF): $(vhost-user-blk-obj-y) libvhost-user.a $(COMMON_LDADDS)
 	$(call LINK, $^)
 
 rdmacm-mux$(EXESUF): LIBS += "-libumad"
 rdmacm-mux$(EXESUF): $(rdmacm-mux-obj-y) $(COMMON_LDADDS)
 	$(call LINK, $^)
 
-vhost-user-gpu$(EXESUF): $(vhost-user-gpu-obj-y) $(libvhost-user-obj-y) libqemuutil.a libqemustub.a
+vhost-user-gpu$(EXESUF): $(vhost-user-gpu-obj-y) $(libvhost-user-obj-y) $(COMMON_LDADDS)
 	$(call LINK, $^)
 
 ifdef CONFIG_VHOST_USER_INPUT
 ifdef CONFIG_LINUX
-vhost-user-input$(EXESUF): $(vhost-user-input-obj-y) libvhost-user.a libqemuutil.a
+vhost-user-input$(EXESUF): $(vhost-user-input-obj-y) libvhost-user.a $(COMMON_LDADDS)
 	$(call LINK, $^)
 
 # build by default, do not install
@@ -900,7 +788,9 @@ endif
 	set -e; for x in $(KEYMAPS); do \
 		$(INSTALL_DATA) $(SRC_PATH)/pc-bios/keymaps/$$x "$(DESTDIR)$(qemu_datadir)/keymaps"; \
 	done
-	$(INSTALL_DATA) $(BUILD_DIR)/trace-events-all "$(DESTDIR)$(qemu_datadir)/trace-events-all"
+	for d in $(TARGET_DIRS); do \
+	$(MAKE) $(SUBDIR_MAKEFLAGS) TARGET_DIR=$$d/ -C $$d $@ || exit 1 ; \
+        done
 
 .PHONY: ctags
 ctags:
@@ -1112,10 +1002,6 @@ Makefile: $(generated-files-y)
 endif
 endif
 
-.SECONDARY: $(TRACE_HEADERS) $(TRACE_HEADERS:%=%-timestamp) \
-	$(TRACE_SOURCES) $(TRACE_SOURCES:%=%-timestamp) \
-	$(TRACE_DTRACE) $(TRACE_DTRACE:%=%-timestamp)
-
 # Include automatically generated dependency files
 # Dependencies in Makefile.objs files come from our recursive subdir rules
 -include $(wildcard *.d tests/*.d)
Makefile.objs +1 -92

106 lines not on this page · raw message

Makefile.target +4 -4
index f4b44af..c5af974 100644
@@ -57,7 +57,7 @@ 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-events-all $(tracetool-y)
+$(QEMU_PROG).stp-installed: $(BUILD_DIR)/trace/trace-events-all $(tracetool-y)
 	$(call quiet-command,$(TRACETOOL) \
 		--group=all \
 		--format=stap \
@@ -67,7 +67,7 @@ $(QEMU_PROG).stp-installed: $(BUILD_DIR)/trace-events-all $(tracetool-y)
 		--target-type=$(TARGET_TYPE) \
 		$< > $@,"GEN","$(TARGET_DIR)$(QEMU_PROG).stp-installed")
 
-$(QEMU_PROG).stp: $(BUILD_DIR)/trace-events-all $(tracetool-y)
+$(QEMU_PROG).stp: $(BUILD_DIR)/trace/trace-events-all $(tracetool-y)
 	$(call quiet-command,$(TRACETOOL) \
 		--group=all \
 		--format=stap \
@@ -77,7 +77,7 @@ $(QEMU_PROG).stp: $(BUILD_DIR)/trace-events-all $(tracetool-y)
 		--target-type=$(TARGET_TYPE) \
 		$< > $@,"GEN","$(TARGET_DIR)$(QEMU_PROG).stp")
 
-$(QEMU_PROG)-simpletrace.stp: $(BUILD_DIR)/trace-events-all $(tracetool-y)
+$(QEMU_PROG)-simpletrace.stp: $(BUILD_DIR)/trace/trace-events-all $(tracetool-y)
 	$(call quiet-command,$(TRACETOOL) \
 		--group=all \
 		--format=simpletrace-stap \
@@ -85,7 +85,7 @@ $(QEMU_PROG)-simpletrace.stp: $(BUILD_DIR)/trace-events-all $(tracetool-y)
 		--probe-prefix=qemu.$(TARGET_TYPE).$(TARGET_NAME) \
 		$< > $@,"GEN","$(TARGET_DIR)$(QEMU_PROG)-simpletrace.stp")
 
-$(QEMU_PROG)-log.stp: $(BUILD_DIR)/trace-events-all $(tracetool-y)
+$(QEMU_PROG)-log.stp: $(BUILD_DIR)/trace/trace-events-all $(tracetool-y)
 	$(call quiet-command,$(TRACETOOL) \
 		--group=all \
 		--format=log-stap \
accel/kvm/trace.h new file +1 -0
new file mode 100644
index 0000000..67c935a
@@ -0,0 +1 @@
+#include "trace/trace-accel_kvm.h"
accel/tcg/trace.h new file +1 -0
new file mode 100644
index 0000000..db61fad
@@ -0,0 +1 @@
+#include "trace/trace-accel_tcg.h"
audio/trace.h new file +1 -0
new file mode 100644
index 0000000..4072a11
@@ -0,0 +1 @@
+#include "trace/trace-audio.h"
authz/trace.h new file +1 -0
new file mode 100644
index 0000000..3176c12
@@ -0,0 +1 @@
+#include "trace/trace-authz.h"
balloon.c +1 -1
index f104b42..db44eb7 100644
@@ -28,7 +28,7 @@
 #include "qemu/atomic.h"
 #include "sysemu/kvm.h"
 #include "sysemu/balloon.h"
-#include "trace-root.h"
+#include "trace/trace-root.h"
 #include "qapi/error.h"
 #include "qapi/qapi-commands-misc.h"
 #include "qapi/qmp/qerror.h"
block/trace.h new file +1 -0
new file mode 100644
index 0000000..3a436e6
@@ -0,0 +1 @@
+#include "trace/trace-block.h"
chardev/trace.h new file +1 -0
new file mode 100644
index 0000000..eb4f902
@@ -0,0 +1 @@
+#include "trace/trace-chardev.h"
configure +8 -0
index 5112683..c27d06f 100755
@@ -6806,6 +6806,8 @@ fi
 echo "CONFIG_TLS_PRIORITY=\"$tls_priority\"" >> $config_host_mak
 if test "$gnutls" = "yes" ; then
   echo "CONFIG_GNUTLS=y" >> $config_host_mak
+  echo "GNUTLS_CFLAGS=$gnutls_cflags" >> $config_host_mak
+  echo "GNUTLS_LIBS=$gnutls_libs" >> $config_host_mak
 fi
 if test "$gcrypt" = "yes" ; then
   echo "CONFIG_GCRYPT=y" >> $config_host_mak
@@ -6816,6 +6818,8 @@ fi
 if test "$nettle" = "yes" ; then
   echo "CONFIG_NETTLE=y" >> $config_host_mak
   echo "CONFIG_NETTLE_VERSION_MAJOR=${nettle_version%%.*}" >> $config_host_mak
+  echo "NETTLE_CFLAGS=$nettle_cflags" >> $config_host_mak
+  echo "NETTLE_LIBS=$nettle_libs" >> $config_host_mak
 fi
 if test "$tasn1" = "yes" ; then
   echo "CONFIG_TASN1=y" >> $config_host_mak
@@ -7155,6 +7159,8 @@ if have_backend "log"; then
 fi
 if have_backend "ust"; then
   echo "CONFIG_TRACE_UST=y" >> $config_host_mak
+  echo "LTTNG_UST_LIBS=$lttng_ust_libs" >> $config_host_mak
+  echo "URCU_BP_LIBS=$urcu_bp_libs" >> $config_host_mak
 fi
 if have_backend "dtrace"; then
   echo "CONFIG_TRACE_DTRACE=y" >> $config_host_mak
@@ -7329,6 +7335,8 @@ echo "CFLAGS_NOPIE=$CFLAGS_NOPIE" >> $config_host_mak
 echo "QEMU_CFLAGS=$QEMU_CFLAGS" >> $config_host_mak
 echo "QEMU_CXXFLAGS=$QEMU_CXXFLAGS" >> $config_host_mak
 echo "QEMU_INCLUDES=$QEMU_INCLUDES" >> $config_host_mak
+echo "GLIB_CFLAGS=$glib_cflags" >> $config_host_mak
+echo "GLIB_LIBS=$glib_libs" >> $config_host_mak
 if test "$sparse" = "yes" ; then
   echo "CC           := REAL_CC=\"\$(CC)\" cgcc"       >> $config_host_mak
   echo "CPP          := REAL_CC=\"\$(CPP)\" cgcc"      >> $config_host_mak
crypto/Makefile.objs +0 -5
index d1d6283..3587f41 100644
@@ -32,8 +32,3 @@ crypto-obj-y += xts.o
 crypto-obj-y += block.o
 crypto-obj-y += block-qcow.o
 crypto-obj-y += block-luks.o
-
-util-obj-$(CONFIG_GCRYPT) += random-gcrypt.o
-util-obj-$(if $(CONFIG_GCRYPT),n,$(CONFIG_GNUTLS)) += random-gnutls.o
-util-obj-$(if $(CONFIG_GCRYPT),n,$(if $(CONFIG_GNUTLS),n,y)) += random-platform.o
-util-obj-y += aes.o init.o
crypto/meson.build new file +9 -0
new file mode 100644
index 0000000..7250ffc
@@ -0,0 +1,9 @@
+util_ss.add(files('aes.c'))
+util_ss.add(files('init.c'))
+if 'CONFIG_GCRYPT' in config_host
+  util_ss.add(files('random-gcrypt.c'))
+elif 'CONFIG_GNUTLS' in config_host
+  util_ss.add(files('random-gnutls.c'), gnutls)
+else
+  util_ss.add(files('random-platform.c'))
+endif
crypto/trace.h new file +1 -0
new file mode 100644
index 0000000..a9af0f3
@@ -0,0 +1 @@
+#include "trace/trace-crypto.h"
dma-helpers.c +1 -1
index d3871dc..578304d 100644
@@ -10,7 +10,7 @@
 #include "qemu/osdep.h"
 #include "sysemu/block-backend.h"
 #include "sysemu/dma.h"
-#include "trace-root.h"
+#include "trace/trace-root.h"
 #include "qemu/thread.h"
 #include "qemu/main-loop.h"
 
docs/devel/tracing.txt +1 -1
index 76e492a..f7f13f9 100644
@@ -60,7 +60,7 @@ general. It is strongly preferred that all events be declared directly in
 the sub-directory that uses them. The only exception is where there are some
 shared trace events defined in the top level directory trace-events file.
 The top level directory generates trace files with a filename prefix of
-"trace-root" instead of just "trace". This is to avoid ambiguity between
+"trace/trace-root" instead of just "trace". This is to avoid ambiguity between
 a trace.h in the current directory, vs the top level directory.
 
 === Using trace events ===
exec.c +1 -1
index 1df966d..107ae75 100644
@@ -49,7 +49,7 @@
 #include "sysemu/hw_accel.h"
 #include "exec/address-spaces.h"
 #include "sysemu/xen-mapcache.h"
-#include "trace-root.h"
+#include "trace/trace-root.h"
 
 #ifdef CONFIG_FALLOCATE_PUNCH_HOLE
 #include <linux/falloc.h>
gdbstub.c +1 -1
index b92ba59..be65d25 100644
@@ -30,7 +30,7 @@
 #include "qemu/ctype.h"
 #include "qemu/cutils.h"
 #include "qemu/module.h"
-#include "trace-root.h"
+#include "trace/trace-root.h"
 #ifdef CONFIG_USER_ONLY
 #include "qemu.h"
 #else
hw/9pfs/trace.h new file +1 -0
new file mode 100644
index 0000000..6104fe2
@@ -0,0 +1 @@
+#include "trace/trace-hw_9pfs.h"
hw/acpi/trace.h new file +1 -0
new file mode 100644
index 0000000..a7f7da7
@@ -0,0 +1 @@
+#include "trace/trace-hw_acpi.h"
hw/alpha/trace.h new file +1 -0
new file mode 100644
index 0000000..20fe698
@@ -0,0 +1 @@
+#include "trace/trace-hw_alpha.h"
hw/arm/trace.h new file +1 -0
new file mode 100644
index 0000000..91337aa
@@ -0,0 +1 @@
+#include "trace/trace-hw_arm.h"
hw/audio/trace.h new file +1 -0
new file mode 100644
index 0000000..5c7516a
@@ -0,0 +1 @@
+#include "trace/trace-hw_audio.h"
hw/block/dataplane/trace.h new file +1 -0
new file mode 100644
index 0000000..240cc59
@@ -0,0 +1 @@
+#include "trace/trace-hw_block_dataplane.h"
hw/block/trace.h new file +1 -0
new file mode 100644
index 0000000..cde210a
@@ -0,0 +1 @@
+#include "trace/trace-hw_block.h"
hw/char/trace.h new file +1 -0
new file mode 100644
index 0000000..c2df66a
@@ -0,0 +1 @@
+#include "trace/trace-hw_char.h"
hw/core/cpu.c +1 -1
index 0035845..bbc115a 100644
@@ -31,7 +31,7 @@
 #include "sysemu/tcg.h"
 #include "hw/boards.h"
 #include "hw/qdev-properties.h"
-#include "trace-root.h"
+#include "trace/trace-root.h"
 
 CPUInterruptHandler cpu_interrupt_handler;
 
hw/display/trace.h new file +1 -0
new file mode 100644
index 0000000..4ed0e91
@@ -0,0 +1 @@
+#include "trace/trace-hw_display.h"
hw/dma/trace.h new file +1 -0
new file mode 100644
index 0000000..4bcb28b
@@ -0,0 +1 @@
+#include "trace/trace-hw_dma.h"
hw/gpio/trace.h new file +1 -0
new file mode 100644
index 0000000..8b13907
@@ -0,0 +1 @@
+#include "trace/trace-hw_gpio.h"
hw/hppa/trace.h new file +1 -0
new file mode 100644
index 0000000..4e8b52d
@@ -0,0 +1 @@
+#include "trace/trace-hw_hppa.h"
hw/i2c/trace.h new file +1 -0
new file mode 100644
index 0000000..4843a8d
@@ -0,0 +1 @@
+#include "trace/trace-hw_i2c.h"
hw/i386/trace.h new file +1 -0
new file mode 100644
index 0000000..37a9f67
@@ -0,0 +1 @@
+#include "trace/trace-hw_i386.h"
hw/i386/xen/trace.h new file +1 -0
new file mode 100644
index 0000000..a02bf75
@@ -0,0 +1 @@
+#include "trace/trace-hw_i386_xen.h"
hw/ide/trace.h new file +1 -0
new file mode 100644
index 0000000..e060e0a
@@ -0,0 +1 @@
+#include "trace/trace-hw_ide.h"
hw/input/trace.h new file +1 -0
new file mode 100644
index 0000000..d1cc5d9
@@ -0,0 +1 @@
+#include "trace/trace-hw_input.h"
hw/intc/trace.h new file +1 -0
new file mode 100644
index 0000000..02394ae
@@ -0,0 +1 @@
+#include "trace/trace-hw_intc.h"
hw/isa/trace.h new file +1 -0
new file mode 100644
index 0000000..501205c
@@ -0,0 +1 @@
+#include "trace/trace-hw_isa.h"
hw/mem/trace.h new file +1 -0
new file mode 100644
index 0000000..2f2c945
@@ -0,0 +1 @@
+#include "trace/trace-hw_mem.h"
hw/mips/trace.h new file +1 -0
new file mode 100644
index 0000000..8d1fd7c
@@ -0,0 +1 @@
+#include "trace/trace-hw_mips.h"
hw/misc/macio/trace.h new file +1 -0
new file mode 100644
index 0000000..34a3cf1
@@ -0,0 +1 @@
+#include "trace/trace-hw_misc_macio.h"
hw/misc/trace.h new file +1 -0
new file mode 100644
index 0000000..1ab6923
@@ -0,0 +1 @@
+#include "trace/trace-hw_misc.h"
hw/net/trace.h new file +1 -0
new file mode 100644
index 0000000..93249af
@@ -0,0 +1 @@
+#include "trace/trace-hw_net.h"
hw/nvram/trace.h new file +1 -0
new file mode 100644
index 0000000..88fa900
@@ -0,0 +1 @@
+#include "trace/trace-hw_nvram.h"
hw/pci-host/trace.h new file +1 -0
new file mode 100644
index 0000000..93ec814
@@ -0,0 +1 @@
+#include "trace/trace-hw_pci_host.h"
hw/pci/trace.h new file +1 -0
new file mode 100644
index 0000000..3dd773e
@@ -0,0 +1 @@
+#include "trace/trace-hw_pci.h"
hw/ppc/trace.h new file +1 -0
new file mode 100644
index 0000000..87c4198
@@ -0,0 +1 @@
+#include "trace/trace-hw_ppc.h"
hw/rdma/trace.h new file +1 -0
new file mode 100644
index 0000000..b3fa8eb
@@ -0,0 +1 @@
+#include "trace/trace-hw_rdma.h"
hw/rdma/vmw/trace.h new file +1 -0
new file mode 100644
index 0000000..3ebc9fb
@@ -0,0 +1 @@
+#include "trace/trace-hw_rdma_vmw.h"
hw/riscv/trace.h new file +1 -0
new file mode 100644
index 0000000..8c0e3ca
@@ -0,0 +1 @@
+#include "trace/trace-hw_riscv.h"
hw/s390x/trace.h new file +1 -0
new file mode 100644
index 0000000..d6568b3
@@ -0,0 +1 @@
+#include "trace/trace-hw_s390x.h"
hw/scsi/trace.h new file +1 -0
new file mode 100644
index 0000000..4ce2673
@@ -0,0 +1 @@
+#include "trace/trace-hw_scsi.h"
hw/sd/trace.h new file +1 -0
new file mode 100644
index 0000000..f3d0c58
@@ -0,0 +1 @@
+#include "trace/trace-hw_sd.h"
hw/sparc/trace.h new file +1 -0
new file mode 100644
index 0000000..625d60c
@@ -0,0 +1 @@
+#include "trace/trace-hw_sparc.h"
hw/sparc64/trace.h new file +1 -0
new file mode 100644
index 0000000..b6ef6e6
@@ -0,0 +1 @@
+#include "trace/trace-hw_sparc64.h"
hw/timer/trace.h new file +1 -0
new file mode 100644
index 0000000..5f72c44
@@ -0,0 +1 @@
+#include "trace/trace-hw_timer.h"
hw/tpm/trace.h new file +1 -0
new file mode 100644
index 0000000..9827c12
@@ -0,0 +1 @@
+#include "trace/trace-hw_tpm.h"
hw/usb/trace.h new file +1 -0
new file mode 100644
index 0000000..f3962f2
@@ -0,0 +1 @@
+#include "trace/trace-hw_usb.h"
hw/vfio/trace.h new file +1 -0
new file mode 100644
index 0000000..5a343aa
@@ -0,0 +1 @@
+#include "trace/trace-hw_vfio.h"
hw/virtio/trace.h new file +1 -0
new file mode 100644
index 0000000..5d70970
@@ -0,0 +1 @@
+#include "trace/trace-hw_virtio.h"
hw/watchdog/trace.h new file +1 -0
new file mode 100644
index 0000000..5d84957
@@ -0,0 +1 @@
+#include "trace/trace-hw_watchdog.h"
hw/xen/trace.h new file +1 -0
new file mode 100644
index 0000000..adba31a
@@ -0,0 +1 @@
+#include "trace/trace-hw_xen.h"
include/exec/cpu_ldst_template.h +1 -1
index af7e0b4..b45b4b9 100644
@@ -25,7 +25,7 @@
  */
 
 #if !defined(SOFTMMU_CODE_ACCESS)
-#include "trace-root.h"
+#include "trace/trace-root.h"
 #endif
 
 #include "trace/mem.h"
include/exec/cpu_ldst_useronly_template.h +1 -1
index 2378f29..3680021 100644
@@ -24,7 +24,7 @@
  */
 
 #if !defined(CODE_ACCESS)
-#include "trace-root.h"
+#include "trace/trace-root.h"
 #endif
 
 #include "trace/mem.h"
io/trace.h new file +1 -0
new file mode 100644
index 0000000..92d63a5
@@ -0,0 +1 @@
+#include "trace/trace-io.h"
ioport.c +1 -1
index 04e360e..a799697 100644
@@ -28,7 +28,7 @@
 #include "qemu/osdep.h"
 #include "cpu.h"
 #include "exec/ioport.h"
-#include "trace-root.h"
+#include "trace/trace-root.h"
 #include "exec/memory.h"
 #include "exec/address-spaces.h"
 
job-qmp.c +1 -1
index fbfed25..b4243b3 100644
@@ -27,7 +27,7 @@
 #include "qemu/job.h"
 #include "qapi/qapi-commands-job.h"
 #include "qapi/error.h"
-#include "trace-root.h"
+#include "trace/trace-root.h"
 
 /* Get a job using its ID and acquire its AioContext */
 static Job *find_job(const char *id, AioContext **aio_context, Error **errp)
job.c +1 -1
index 28dd48f..b3090b2 100644
@@ -29,7 +29,7 @@
 #include "qemu/id.h"
 #include "qemu/main-loop.h"
 #include "block/aio-wait.h"
-#include "trace-root.h"
+#include "trace/trace-root.h"
 #include "qapi/qapi-events-job.h"
 
 static QLIST_HEAD(, Job) jobs = QLIST_HEAD_INITIALIZER(jobs);
linux-user/trace.h new file +1 -0
new file mode 100644
index 0000000..05518e4
@@ -0,0 +1 @@
+#include "trace/trace-linux_user.h"
memory.c +1 -1
index 7fd93b1..7793826 100644
@@ -24,7 +24,7 @@
 #include "qemu/main-loop.h"
 #include "qemu/qemu-print.h"
 #include "qom/object.h"
-#include "trace-root.h"
+#include "trace/trace-root.h"
 
 #include "exec/memory-internal.h"
 #include "exec/ram_addr.h"
meson.build +161 -0

170 lines not on this page · raw message

migration/trace.h new file +1 -0
new file mode 100644
index 0000000..e1a0f4f
@@ -0,0 +1 @@
+#include "trace/trace-migration.h"
monitor/trace.h new file +1 -0
new file mode 100644
index 0000000..f216e31
@@ -0,0 +1 @@
+#include "trace/trace-monitor.h"
nbd/trace.h new file +1 -0
new file mode 100644
index 0000000..233d08f
@@ -0,0 +1 @@
+#include "trace/trace-nbd.h"
net/trace.h new file +1 -0
new file mode 100644
index 0000000..18d42c2
@@ -0,0 +1 @@
+#include "trace/trace-net.h"
qapi/Makefile.objs +0 -21
index dd3f5e6..10ca4f6 100644
@@ -1,25 +1,4 @@
-util-obj-y = qapi-visit-core.o qapi-dealloc-visitor.o qobject-input-visitor.o
-util-obj-y += qobject-output-visitor.o qmp-registry.o qmp-dispatch.o
-util-obj-y += string-input-visitor.o string-output-visitor.o
-util-obj-y += opts-visitor.o qapi-clone-visitor.o
-util-obj-y += qmp-event.o
-util-obj-y += qapi-util.o
-
-QAPI_COMMON_MODULES = audio authz block-core block char common crypto
-QAPI_COMMON_MODULES += dump error introspect job machine migration misc net
-QAPI_COMMON_MODULES += qdev qom rdma rocker run-state sockets tpm
-QAPI_COMMON_MODULES += trace transaction ui
 QAPI_TARGET_MODULES = machine-target misc-target
-QAPI_MODULES = $(QAPI_COMMON_MODULES) $(QAPI_TARGET_MODULES)
-
-util-obj-y += qapi-builtin-types.o
-util-obj-y += $(QAPI_COMMON_MODULES:%=qapi-types-%.o)
-util-obj-y += qapi-builtin-visit.o
-util-obj-y += $(QAPI_COMMON_MODULES:%=qapi-visit-%.o)
-util-obj-y += qapi-emit-events.o
-util-obj-y += $(QAPI_COMMON_MODULES:%=qapi-events-%.o)
-
-common-obj-y = $(QAPI_COMMON_MODULES:%=qapi-commands-%.o)
 
 obj-y = qapi-introspect.o
 obj-y += $(QAPI_TARGET_MODULES:%=qapi-types-%.o)
qapi/meson.build new file +89 -0

89 lines not on this page · raw message

qapi/trace.h new file +1 -0
new file mode 100644
index 0000000..5c3fb67
@@ -0,0 +1 @@
+#include "trace/trace-qapi.h"
qobject/Makefile.objs deleted +0 -3
deleted file mode 100644
index 7b12c9c..0000000
@@ -1,3 +0,0 @@
-util-obj-y = qnull.o qnum.o qstring.o qdict.o qlist.o qbool.o qlit.o
-util-obj-y += qjson.o qobject.o json-lexer.o json-streamer.o json-parser.o
-util-obj-y += block-qdict.o
qobject/meson.build new file +3 -0
new file mode 100644
index 0000000..bb63c06
@@ -0,0 +1,3 @@
+util_ss.add(files('qnull.c', 'qnum.c', 'qstring.c', 'qdict.c', 'qlist.c', 'qbool.c',
+  'qlit.c', 'qjson.c', 'qobject.c', 'json-lexer.c', 'json-streamer.c', 'json-parser.c',
+  'block-qdict.c'))
qom/trace.h new file +1 -0
new file mode 100644
index 0000000..f2895e6
@@ -0,0 +1 @@
+#include "trace/trace-qom.h"
rules.mak +1 -1
index e19ad19..fa9960c 100644
@@ -32,7 +32,7 @@ QEMU_DGFLAGS += -MMD -MP -MT $@ -MF $(@D)/$(*F).d
 # dir, one absolute and the other relative to the compiler working
 # directory. These are the same for target-independent files, but
 # different for target-dependent ones.
-QEMU_LOCAL_INCLUDES = -iquote $(BUILD_DIR)/$(@D) -iquote $(@D)
+QEMU_LOCAL_INCLUDES = -iquote $(BUILD_DIR) -iquote $(BUILD_DIR)/$(@D) -iquote $(@D)
 
 WL_U := -Wl,-u,
 find-symbols = $(if $1, $(sort $(shell $(NM) -P -g $1 | $2)))
scripts/qapi-gen.py +1 -1
index 3d98ca2..c15daac 100755
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 # QAPI generator
 #
 # This work is licensed under the terms of the GNU GPL, version 2 or later.
scripts/tracetool.py +1 -1
index 3beaa66..264cc9e 100755
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 # -*- coding: utf-8 -*-
 
 """
scripts/tracetool/backend/dtrace.py +1 -1
old mode 100644
new mode 100755
index c2f3a4e..35b3c15
@@ -39,7 +39,7 @@ def generate_h_begin(events, group):
     if group == "root":
         header = "trace-dtrace-root.h"
     else:
-        header = "trace-dtrace.h"
+        header = "trace-dtrace-%s.h" % group
 
     out('#include "%s"' % header,
         '')
scripts/tracetool/backend/ust.py +1 -5
index 280cb7c..ba37b9f 100644
@@ -20,11 +20,7 @@ PUBLIC = True
 
 
 def generate_h_begin(events, group):
-    if group == "root":
-        header = "trace-ust-root.h"
-    else:
-        header = "trace-ust.h"
-
+    header = 'trace-ust-' + group + '.h'
     out('#include <lttng/tracepoint.h>',
         '#include "%s"' % header,
         '',
scripts/tracetool/format/c.py +1 -4
index 3120796..bd04798 100644
@@ -20,10 +20,7 @@ def generate(events, backend, group):
     active_events = [e for e in events
                      if "disable" not in e.properties]
 
-    if group == "root":
-        header = "trace-root.h"
-    else:
-        header = "trace.h"
+    header = "trace-" + group + ".h"
 
     out('/* This file is autogenerated by tracetool, do not edit. */',
         '',
scripts/tracetool/format/tcg_h.py +1 -1
index 1651cc3..21a2905 100644
@@ -29,7 +29,7 @@ def vcpu_transform_args(args):
 
 def generate(events, backend, group):
     if group == "root":
-        header = "trace-root.h"
+        header = "trace/trace-root.h"
     else:
         header = "trace.h"
 
scripts/tracetool/format/tcg_helper_c.py +1 -1
index 1b3522a..1a14a29 100644
@@ -42,7 +42,7 @@ def vcpu_transform_args(args, mode):
 
 def generate(events, backend, group):
     if group == "root":
-        header = "trace-root.h"
+        header = "trace/trace-root.h"
     else:
         header = "trace.h"
 
scsi/trace.h new file +1 -0
new file mode 100644
index 0000000..3e4d89a
@@ -0,0 +1 @@
+#include "trace/trace-scsi.h"
stubs/Makefile.objs deleted +0 -43

43 lines not on this page · raw message

stubs/meson.build new file +45 -0

45 lines not on this page · raw message

target/arm/trace.h new file +1 -0
new file mode 100644
index 0000000..60372d8
@@ -0,0 +1 @@
+#include "trace/trace-target_arm.h"
target/hppa/trace.h new file +1 -0
new file mode 100644
index 0000000..810cc09
@@ -0,0 +1 @@
+#include "trace/trace-target_hppa.h"
target/i386/trace.h new file +1 -0
new file mode 100644
index 0000000..781e8ec
@@ -0,0 +1 @@
+#include "trace/trace-target_i386.h"
target/mips/trace.h new file +1 -0
new file mode 100644
index 0000000..f25b88c
@@ -0,0 +1 @@
+#include "trace/trace-target_mips.h"
target/ppc/trace.h new file +1 -0
new file mode 100644
index 0000000..a9e8962
@@ -0,0 +1 @@
+#include "trace/trace-target_ppc.h"
target/riscv/trace.h new file +1 -0
new file mode 100644
index 0000000..03a89fc
@@ -0,0 +1 @@
+#include "trace/trace-target_riscv.h"
target/s390x/trace.h new file +1 -0
new file mode 100644
index 0000000..d7d59d4
@@ -0,0 +1 @@
+#include "trace/trace-target_s390x.h"
target/sparc/trace.h new file +1 -0
new file mode 100644
index 0000000..3b2f5a8
@@ -0,0 +1 @@
+#include "trace/trace-target_sparc.h"
trace/Makefile.objs +0 -51

59 lines not on this page · raw message

trace/control-target.c +1 -1
index ceb55c7..e293eee 100644
@@ -9,7 +9,7 @@
 
 #include "qemu/osdep.h"
 #include "cpu.h"
-#include "trace-root.h"
+#include "trace/trace-root.h"
 #include "trace/control.h"
 
 
trace/control.c +1 -1
index 43fb786..16d66ef 100644
@@ -27,7 +27,7 @@
 #include "qemu/error-report.h"
 #include "qemu/config-file.h"
 #include "monitor/monitor.h"
-#include "trace-root.h"
+#include "trace/trace-root.h"
 
 int trace_events_enabled_count;
 
trace/meson.build new file +82 -0

82 lines not on this page · raw message

ui/trace.h new file +1 -0
new file mode 100644
index 0000000..a89d769
@@ -0,0 +1 @@
+#include "trace/trace-ui.h"
util/Makefile.objs deleted +0 -57

57 lines not on this page · raw message

util/meson.build new file +57 -0

57 lines not on this page · raw message

util/trace.h new file +1 -0
new file mode 100644
index 0000000..86ff7a3
@@ -0,0 +1 @@
+#include "trace/trace-util.h"
vl.c +1 -1
index 630f5c5..8c8a591 100644
@@ -108,7 +108,7 @@ int main(int argc, char **argv)
 
 #include "disas/disas.h"
 
-#include "trace-root.h"
+#include "trace/trace-root.h"
 #include "trace/control.h"
 #include "qemu/queue.h"
 #include "sysemu/arch_init.h"
Signature · 1 line
1.8.3.1
#10 lore raw

PATCH v3 10/132 meson: add remaining generated tcg trace helpers

In reply to Paolo Bonzini

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

---
 Makefile          | 51 ---------------------------------------------------
 trace/meson.build | 14 ++++++++++++++
 2 files changed, 14 insertions(+), 51 deletions(-)
Makefile +0 -51
index 6f97ae9..97f9ffd 100644
@@ -112,61 +112,10 @@ FULL_VERSION := $(if $(QEMU_PKGVERSION),$(VERSION) ($(QEMU_PKGVERSION)),$(VERSIO
 
 generated-files-y = qemu-version.h config-host.h qemu-options.def
 
-generated-files-y += trace/generated-tcg-tracers.h
-
-generated-files-y += trace/generated-helpers-wrappers.h
-generated-files-y += trace/generated-helpers.h
-generated-files-y += trace/generated-helpers.c
-
 generated-files-y += module_block.h
 
 generated-files-y += .git-submodule-status
 
-tracetool-y = $(SRC_PATH)/scripts/tracetool.py
-tracetool-y += $(shell find $(SRC_PATH)/scripts/tracetool -name "*.py")
-
-trace/generated-helpers-wrappers.h: trace/generated-helpers-wrappers.h-timestamp
-	@cmp $< $@ >/dev/null 2>&1 || cp $< $@
-trace/generated-helpers-wrappers.h-timestamp: $(SRC_PATH)/trace-events $(BUILD_DIR)/config-host.mak $(tracetool-y)
-	@mkdir -p $(dir $@)
-	$(call quiet-command,$(TRACETOOL) \
-		--group=root \
-		--format=tcg-helper-wrapper-h \
-		--backend=$(TRACE_BACKENDS) \
-		$< > $@,"GEN","$(patsubst %-timestamp,%,$@)")
-
-trace/generated-helpers.h: trace/generated-helpers.h-timestamp
-	@cmp $< $@ >/dev/null 2>&1 || cp $< $@
-trace/generated-helpers.h-timestamp: $(SRC_PATH)/trace-events $(BUILD_DIR)/config-host.mak $(tracetool-y)
-	@mkdir -p $(dir $@)
-	$(call quiet-command,$(TRACETOOL) \
-		--group=root \
-		--format=tcg-helper-h \
-		--backend=$(TRACE_BACKENDS) \
-		$< > $@,"GEN","$(patsubst %-timestamp,%,$@)")
-
-trace/generated-helpers.c: trace/generated-helpers.c-timestamp
-	@cmp $< $@ >/dev/null 2>&1 || cp $< $@
-trace/generated-helpers.c-timestamp: $(SRC_PATH)/trace-events $(BUILD_DIR)/config-host.mak $(tracetool-y)
-	@mkdir -p $(dir $@)
-	$(call quiet-command,$(TRACETOOL) \
-		--group=root \
-		--format=tcg-helper-c \
-		--backend=$(TRACE_BACKENDS) \
-		$< > $@,"GEN","$(patsubst %-timestamp,%,$@)")
-
-trace/generated-helpers.o: trace/generated-helpers.c
-
-trace/generated-tcg-tracers.h: trace/generated-tcg-tracers.h-timestamp
-	@cmp $< $@ >/dev/null 2>&1 || cp $< $@
-trace/generated-tcg-tracers.h-timestamp: $(SRC_PATH)/trace-events $(BUILD_DIR)/config-host.mak $(tracetool-y)
-	@mkdir -p $(dir $@)
-	$(call quiet-command,$(TRACETOOL) \
-		--group=root \
-		--format=tcg-h \
-		--backend=$(TRACE_BACKENDS) \
-		$< > $@,"GEN","$(patsubst %-timestamp,%,$@)")
-
 KEYCODEMAP_GEN = $(SRC_PATH)/ui/keycodemapdb/tools/keymap-gen
 KEYCODEMAP_CSV = $(SRC_PATH)/ui/keycodemapdb/data/keymaps.csv
 
trace/meson.build +14 -0
index d0e5d17..8ea8db7 100644
@@ -61,6 +61,20 @@ custom_target('trace-events-all',
               install: true,
               install_dir: config_host['qemu_datadir'])
 
+foreach d : [
+  ['generated-tcg-tracers.h', 'tcg-h'],
+  ['generated-helpers.c', 'tcg-helper-c'],
+  ['generated-helpers.h', 'tcg-helper-h'],
+  ['generated-helpers-wrappers.h', 'tcg-helper-wrapper-h'],
+]
+  custom_target(d[0],
+                output: d[0],
+                input: meson.source_root() / 'trace-events',
+                command: [ tracetool, '--group=root', '--format=@0@'.format(d[1]), '@INPUT@' ],
+                build_by_default: true, # to be removed when added to a target
+                capture: true)
+endforeach
+
 if 'CONFIG_TRACE_UST' in config_host
   trace_ust_all_h = custom_target('trace-ust-all.h',
                                   output: 'trace-ust-all.h',
Signature · 1 line
1.8.3.1
#11 lore raw

PATCH v3 11/132 meson: add version.o

In reply to Paolo Bonzini

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

---
 meson.build | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)
meson.build +8 -1
index 18b8710..ba4d891 100644
@@ -23,8 +23,14 @@ configure_file(input: files('scripts/ninjatool.py'),
 m = cc.find_library('m', required: false)
 util = cc.find_library('util', required: false)
 socket = []
+version_res = []
 if host_machine.system() == 'windows'
   socket = cc.find_library('ws2_32')
+
+  win = import('windows')
+  version_res = win.compile_resources('version.rc',
+                                      depend_files: files('pc-bios/qemu-nsis.ico'),
+                                      include_directories: include_directories('.'))
 endif
 glib = declare_dependency(compile_args: config_host['GLIB_CFLAGS'].split(),
                           link_args: config_host['GLIB_LIBS'].split())
@@ -177,4 +183,5 @@ util_ss = util_ss.apply(config_host, strict: false)
 libqemuutil = static_library('qemuutil',
                              sources: util_ss.sources() + stub_ss.sources() + genh,
                              dependencies: [util_ss.dependencies(), m, glib, socket])
-qemuutil = declare_dependency(link_with: libqemuutil)
+qemuutil = declare_dependency(link_with: libqemuutil,
+                              sources: version_res)
Signature · 1 line
1.8.3.1
#12 lore raw

PATCH v3 12/132 contrib/libvhost-user: convert to Meson

In reply to Paolo Bonzini

Since libqemuutil.a has been converted to Meson, the conversion is straightforward.

---
 Makefile                            | 14 ++++----------
 Makefile.objs                       |  1 -
 contrib/libvhost-user/Makefile.objs |  1 -
 contrib/libvhost-user/meson.build   |  2 ++
 meson.build                         |  8 ++++++++
 5 files changed, 14 insertions(+), 12 deletions(-)
 delete mode 100644 contrib/libvhost-user/Makefile.objs
 create mode 100644 contrib/libvhost-user/meson.build
Makefile +4 -10
index 97f9ffd..27e9ea3 100644
@@ -267,7 +267,6 @@ dummy := $(call unnest-vars,, \
                 ivshmem-client-obj-y \
                 ivshmem-server-obj-y \
                 rdmacm-mux-obj-y \
-                libvhost-user-obj-y \
                 vhost-user-scsi-obj-y \
                 vhost-user-blk-obj-y \
                 vhost-user-input-obj-y \
@@ -377,11 +376,6 @@ $(BUILD_DIR)/version.o: $(SRC_PATH)/version.rc config-host.h
 Makefile: $(version-obj-y)
 
 ######################################################################
-# Build libraries
-
-libvhost-user.a: $(libvhost-user-obj-y)
-
-######################################################################
 
 COMMON_LDADDS = libqemuutil.a
 
@@ -471,21 +465,21 @@ ivshmem-client$(EXESUF): $(ivshmem-client-obj-y) $(COMMON_LDADDS)
 ivshmem-server$(EXESUF): $(ivshmem-server-obj-y) $(COMMON_LDADDS)
 	$(call LINK, $^)
 endif
-vhost-user-scsi$(EXESUF): $(vhost-user-scsi-obj-y) libvhost-user.a $(COMMON_LDADDS)
+vhost-user-scsi$(EXESUF): $(vhost-user-scsi-obj-y) contrib/libvhost-user/libvhost-user.a $(COMMON_LDADDS)
 	$(call LINK, $^)
-vhost-user-blk$(EXESUF): $(vhost-user-blk-obj-y) libvhost-user.a $(COMMON_LDADDS)
+vhost-user-blk$(EXESUF): $(vhost-user-blk-obj-y) contrib/libvhost-user/libvhost-user.a $(COMMON_LDADDS)
 	$(call LINK, $^)
 
 rdmacm-mux$(EXESUF): LIBS += "-libumad"
 rdmacm-mux$(EXESUF): $(rdmacm-mux-obj-y) $(COMMON_LDADDS)
 	$(call LINK, $^)
 
-vhost-user-gpu$(EXESUF): $(vhost-user-gpu-obj-y) $(libvhost-user-obj-y) $(COMMON_LDADDS)
+vhost-user-gpu$(EXESUF): $(vhost-user-gpu-obj-y) contrib/libvhost-user/libvhost-user.a $(COMMON_LDADDS)
 	$(call LINK, $^)
 
 ifdef CONFIG_VHOST_USER_INPUT
 ifdef CONFIG_LINUX
-vhost-user-input$(EXESUF): $(vhost-user-input-obj-y) libvhost-user.a $(COMMON_LDADDS)
+vhost-user-input$(EXESUF): $(vhost-user-input-obj-y) contrib/libvhost-user/libvhost-user.a $(COMMON_LDADDS)
 	$(call LINK, $^)
 
 # build by default, do not install
Makefile.objs +0 -1
index f820829..3142dbb 100644
@@ -109,7 +109,6 @@ qga-vss-dll-obj-y = qga/
 elf2dmp-obj-y = contrib/elf2dmp/
 ivshmem-client-obj-$(CONFIG_IVSHMEM) = contrib/ivshmem-client/
 ivshmem-server-obj-$(CONFIG_IVSHMEM) = contrib/ivshmem-server/
-libvhost-user-obj-y = contrib/libvhost-user/
 vhost-user-scsi.o-cflags := $(LIBISCSI_CFLAGS)
 vhost-user-scsi.o-libs := $(LIBISCSI_LIBS)
 vhost-user-scsi-obj-y = contrib/vhost-user-scsi/
contrib/libvhost-user/Makefile.objs deleted +0 -1
deleted file mode 100644
index ef3778e..0000000
@@ -1 +0,0 @@
-libvhost-user-obj-y += libvhost-user.o libvhost-user-glib.o
contrib/libvhost-user/meson.build new file +2 -0
new file mode 100644
index 0000000..03ba2af
@@ -0,0 +1,2 @@
+libvhost_user = static_library('vhost-user',
+                               [files('libvhost-user.c', 'libvhost-user-glib.c')])
meson.build +8 -0
index ba4d891..6b9636d 100644
@@ -185,3 +185,11 @@ libqemuutil = static_library('qemuutil',
                              dependencies: [util_ss.dependencies(), m, glib, socket])
 qemuutil = declare_dependency(link_with: libqemuutil,
                               sources: version_res)
+
+# Other build targets
+
+if have_tools
+  if 'CONFIG_VHOST_USER' in config_host
+    subdir('contrib/libvhost-user')
+  endif
+endif
Signature · 1 line
1.8.3.1
#13 lore raw

PATCH v3 13/132 contrib/vhost-user-blk: convert to Meson

In reply to Paolo Bonzini

The GLib pkg-config information is extracted from config-host.mak and used to link vhost-user-blk.

---
 Makefile                           | 3 ---
 Makefile.objs                      | 1 -
 contrib/vhost-user-blk/meson.build | 3 +++
 meson.build                        | 1 +
 4 files changed, 4 insertions(+), 4 deletions(-)
 create mode 100644 contrib/vhost-user-blk/meson.build
Makefile +0 -3
index 27e9ea3..f15c097 100644
@@ -268,7 +268,6 @@ dummy := $(call unnest-vars,, \
                 ivshmem-server-obj-y \
                 rdmacm-mux-obj-y \
                 vhost-user-scsi-obj-y \
-                vhost-user-blk-obj-y \
                 vhost-user-input-obj-y \
                 vhost-user-gpu-obj-y \
                 qga-vss-dll-obj-y \
@@ -467,8 +466,6 @@ ivshmem-server$(EXESUF): $(ivshmem-server-obj-y) $(COMMON_LDADDS)
 endif
 vhost-user-scsi$(EXESUF): $(vhost-user-scsi-obj-y) contrib/libvhost-user/libvhost-user.a $(COMMON_LDADDS)
 	$(call LINK, $^)
-vhost-user-blk$(EXESUF): $(vhost-user-blk-obj-y) contrib/libvhost-user/libvhost-user.a $(COMMON_LDADDS)
-	$(call LINK, $^)
 
 rdmacm-mux$(EXESUF): LIBS += "-libumad"
 rdmacm-mux$(EXESUF): $(rdmacm-mux-obj-y) $(COMMON_LDADDS)
Makefile.objs +0 -1
index 3142dbb..ba422dd 100644
@@ -112,7 +112,6 @@ ivshmem-server-obj-$(CONFIG_IVSHMEM) = contrib/ivshmem-server/
 vhost-user-scsi.o-cflags := $(LIBISCSI_CFLAGS)
 vhost-user-scsi.o-libs := $(LIBISCSI_LIBS)
 vhost-user-scsi-obj-y = contrib/vhost-user-scsi/
-vhost-user-blk-obj-y = contrib/vhost-user-blk/
 rdmacm-mux-obj-y = contrib/rdmacm-mux/
 vhost-user-input-obj-y = contrib/vhost-user-input/
 vhost-user-gpu-obj-y = contrib/vhost-user-gpu/
contrib/vhost-user-blk/meson.build new file +3 -0
new file mode 100644
index 0000000..3856a9a
@@ -0,0 +1,3 @@
+executable('vhost-user-blk', files('vhost-user-blk.c'),
+           link_with: libvhost_user,
+           dependencies: qemuutil)
meson.build +1 -0
index 6b9636d..4f2fc33 100644
@@ -191,5 +191,6 @@ qemuutil = declare_dependency(link_with: libqemuutil,
 if have_tools
   if 'CONFIG_VHOST_USER' in config_host
     subdir('contrib/libvhost-user')
+    subdir('contrib/vhost-user-blk')
   endif
 endif
Signature · 1 line
1.8.3.1
#14 lore raw

PATCH v3 14/132 contrib/vhost-user-scsi: convert to Meson

In reply to Paolo Bonzini

The libiscsi pkg-config information is extracted from config-host.mak and used to link vhost-user-blk.

---
 Makefile                              | 3 ---
 Makefile.objs                         | 3 ---
 contrib/vhost-user-scsi/Makefile.objs | 1 -
 contrib/vhost-user-scsi/meson.build   | 5 +++++
 meson.build                           | 6 ++++++
 5 files changed, 11 insertions(+), 7 deletions(-)
 delete mode 100644 contrib/vhost-user-scsi/Makefile.objs
 create mode 100644 contrib/vhost-user-scsi/meson.build
Makefile +0 -3
index f15c097..3971171 100644
@@ -267,7 +267,6 @@ dummy := $(call unnest-vars,, \
                 ivshmem-client-obj-y \
                 ivshmem-server-obj-y \
                 rdmacm-mux-obj-y \
-                vhost-user-scsi-obj-y \
                 vhost-user-input-obj-y \
                 vhost-user-gpu-obj-y \
                 qga-vss-dll-obj-y \
@@ -464,8 +463,6 @@ ivshmem-client$(EXESUF): $(ivshmem-client-obj-y) $(COMMON_LDADDS)
 ivshmem-server$(EXESUF): $(ivshmem-server-obj-y) $(COMMON_LDADDS)
 	$(call LINK, $^)
 endif
-vhost-user-scsi$(EXESUF): $(vhost-user-scsi-obj-y) contrib/libvhost-user/libvhost-user.a $(COMMON_LDADDS)
-	$(call LINK, $^)
 
 rdmacm-mux$(EXESUF): LIBS += "-libumad"
 rdmacm-mux$(EXESUF): $(rdmacm-mux-obj-y) $(COMMON_LDADDS)
Makefile.objs +0 -3
index ba422dd..30804f0 100644
@@ -109,9 +109,6 @@ qga-vss-dll-obj-y = qga/
 elf2dmp-obj-y = contrib/elf2dmp/
 ivshmem-client-obj-$(CONFIG_IVSHMEM) = contrib/ivshmem-client/
 ivshmem-server-obj-$(CONFIG_IVSHMEM) = contrib/ivshmem-server/
-vhost-user-scsi.o-cflags := $(LIBISCSI_CFLAGS)
-vhost-user-scsi.o-libs := $(LIBISCSI_LIBS)
-vhost-user-scsi-obj-y = contrib/vhost-user-scsi/
 rdmacm-mux-obj-y = contrib/rdmacm-mux/
 vhost-user-input-obj-y = contrib/vhost-user-input/
 vhost-user-gpu-obj-y = contrib/vhost-user-gpu/
contrib/vhost-user-scsi/Makefile.objs deleted +0 -1
deleted file mode 100644
index e83a38a..0000000
@@ -1 +0,0 @@
-vhost-user-scsi-obj-y = vhost-user-scsi.o
contrib/vhost-user-scsi/meson.build new file +5 -0
new file mode 100644
index 0000000..0bdd5a5
@@ -0,0 +1,5 @@
+if 'CONFIG_LIBISCSI' in config_host
+  executable('vhost-user-scsi', files('vhost-user-scsi.c'),
+             link_with: libvhost_user,
+             dependencies: [qemuutil, libiscsi])
+endif
meson.build +6 -0
index 4f2fc33..7ad5458 100644
@@ -52,6 +52,11 @@ if 'CONFIG_GNUTLS' in config_host
   gnutls = declare_dependency(compile_args: config_host['GNUTLS_CFLAGS'].split(),
                               link_args: config_host['GNUTLS_LIBS'].split())
 endif
+libiscsi = declare_dependency()
+if 'CONFIG_LIBISCSI' in config_host
+  libiscsi = declare_dependency(compile_args: config_host['LIBISCSI_CFLAGS'].split(),
+                                link_args: config_host['LIBISCSI_LIBS'].split())
+endif
 
 target_dirs = config_host['TARGET_DIRS'].split()
 have_user = false
@@ -192,5 +197,6 @@ if have_tools
   if 'CONFIG_VHOST_USER' in config_host
     subdir('contrib/libvhost-user')
     subdir('contrib/vhost-user-blk')
+    subdir('contrib/vhost-user-scsi')
   endif
 endif
Signature · 1 line
1.8.3.1
#15 lore raw

PATCH v3 15/132 contrib/rdmacm-mux: convert to Meson

In reply to Paolo Bonzini

We can use config-host.mak to decide whether the tool has to be built, apart from that the conversion is straightforward.

---
 Makefile                         | 5 -----
 Makefile.objs                    | 1 -
 contrib/rdmacm-mux/Makefile.objs | 3 ---
 contrib/rdmacm-mux/meson.build   | 6 ++++++
 meson.build                      | 2 ++
 5 files changed, 8 insertions(+), 9 deletions(-)
 delete mode 100644 contrib/rdmacm-mux/Makefile.objs
 create mode 100644 contrib/rdmacm-mux/meson.build
Makefile +0 -5
index 3971171..5845a50 100644
@@ -266,7 +266,6 @@ dummy := $(call unnest-vars,, \
                 elf2dmp-obj-y \
                 ivshmem-client-obj-y \
                 ivshmem-server-obj-y \
-                rdmacm-mux-obj-y \
                 vhost-user-input-obj-y \
                 vhost-user-gpu-obj-y \
                 qga-vss-dll-obj-y \
@@ -464,10 +463,6 @@ ivshmem-server$(EXESUF): $(ivshmem-server-obj-y) $(COMMON_LDADDS)
 	$(call LINK, $^)
 endif
 
-rdmacm-mux$(EXESUF): LIBS += "-libumad"
-rdmacm-mux$(EXESUF): $(rdmacm-mux-obj-y) $(COMMON_LDADDS)
-	$(call LINK, $^)
-
 vhost-user-gpu$(EXESUF): $(vhost-user-gpu-obj-y) contrib/libvhost-user/libvhost-user.a $(COMMON_LDADDS)
 	$(call LINK, $^)
 
Makefile.objs +0 -1
index 30804f0..f2e8864 100644
@@ -109,7 +109,6 @@ qga-vss-dll-obj-y = qga/
 elf2dmp-obj-y = contrib/elf2dmp/
 ivshmem-client-obj-$(CONFIG_IVSHMEM) = contrib/ivshmem-client/
 ivshmem-server-obj-$(CONFIG_IVSHMEM) = contrib/ivshmem-server/
-rdmacm-mux-obj-y = contrib/rdmacm-mux/
 vhost-user-input-obj-y = contrib/vhost-user-input/
 vhost-user-gpu-obj-y = contrib/vhost-user-gpu/
 
contrib/rdmacm-mux/Makefile.objs deleted +0 -3
deleted file mode 100644
index 3df744a..0000000
@@ -1,3 +0,0 @@
-ifdef CONFIG_PVRDMA
-rdmacm-mux-obj-y = main.o
-endif
contrib/rdmacm-mux/meson.build new file +6 -0
new file mode 100644
index 0000000..29a9ced
@@ -0,0 +1,6 @@
+if 'CONFIG_PVRDMA' in config_host
+  # if not found, CONFIG_PVRDMA should not be set
+  libumad = cc.find_library('ibumad', required: true)
+  executable('rdmacm-mux', files('main.c'),
+             dependencies: [glib, libumad])
+endif
meson.build +2 -0
index 7ad5458..119fcd4 100644
@@ -194,6 +194,8 @@ qemuutil = declare_dependency(link_with: libqemuutil,
 # Other build targets
 
 if have_tools
+  subdir('contrib/rdmacm-mux')
+
   if 'CONFIG_VHOST_USER' in config_host
     subdir('contrib/libvhost-user')
     subdir('contrib/vhost-user-blk')
Signature · 1 line
1.8.3.1
#16 lore raw

PATCH v3 16/132 contrib/vhost-user-input: convert to meson

In reply to Paolo Bonzini

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

---
 Makefile                               | 11 -----------
 Makefile.objs                          |  1 -
 contrib/vhost-user-input/Makefile.objs |  1 -
 contrib/vhost-user-input/meson.build   |  3 +++
 meson.build                            |  1 +
 5 files changed, 4 insertions(+), 13 deletions(-)
 delete mode 100644 contrib/vhost-user-input/Makefile.objs
 create mode 100644 contrib/vhost-user-input/meson.build
Makefile +0 -11
index 5845a50..9528391 100644
@@ -266,7 +266,6 @@ dummy := $(call unnest-vars,, \
                 elf2dmp-obj-y \
                 ivshmem-client-obj-y \
                 ivshmem-server-obj-y \
-                vhost-user-input-obj-y \
                 vhost-user-gpu-obj-y \
                 qga-vss-dll-obj-y \
                 block-obj-y \
@@ -466,16 +465,6 @@ endif
 vhost-user-gpu$(EXESUF): $(vhost-user-gpu-obj-y) contrib/libvhost-user/libvhost-user.a $(COMMON_LDADDS)
 	$(call LINK, $^)
 
-ifdef CONFIG_VHOST_USER_INPUT
-ifdef CONFIG_LINUX
-vhost-user-input$(EXESUF): $(vhost-user-input-obj-y) contrib/libvhost-user/libvhost-user.a $(COMMON_LDADDS)
-	$(call LINK, $^)
-
-# build by default, do not install
-all: vhost-user-input$(EXESUF)
-endif
-endif
-
 module_block.h: $(SRC_PATH)/scripts/modules/module_block.py config-host.mak
 	$(call quiet-command,$(PYTHON) $< $@ \
 	$(addprefix $(SRC_PATH)/,$(patsubst %.mo,%.c,$(block-obj-m))), \
Makefile.objs +0 -1
index f2e8864..c7f7637 100644
@@ -109,7 +109,6 @@ qga-vss-dll-obj-y = qga/
 elf2dmp-obj-y = contrib/elf2dmp/
 ivshmem-client-obj-$(CONFIG_IVSHMEM) = contrib/ivshmem-client/
 ivshmem-server-obj-$(CONFIG_IVSHMEM) = contrib/ivshmem-server/
-vhost-user-input-obj-y = contrib/vhost-user-input/
 vhost-user-gpu-obj-y = contrib/vhost-user-gpu/
 
 ######################################################################
contrib/vhost-user-input/Makefile.objs deleted +0 -1
deleted file mode 100644
index b1fad90..0000000
@@ -1 +0,0 @@
-vhost-user-input-obj-y = main.o
contrib/vhost-user-input/meson.build new file +3 -0
new file mode 100644
index 0000000..6f79679
@@ -0,0 +1,3 @@
+executable('vhost-user-input', files('main.c'),
+           link_with: libvhost_user,
+           dependencies: qemuutil)
meson.build +1 -0
index 119fcd4..e38c8a9 100644
@@ -199,6 +199,7 @@ if have_tools
   if 'CONFIG_VHOST_USER' in config_host
     subdir('contrib/libvhost-user')
     subdir('contrib/vhost-user-blk')
+    subdir('contrib/vhost-user-input')
     subdir('contrib/vhost-user-scsi')
   endif
 endif
Signature · 1 line
1.8.3.1
#17 lore raw

PATCH v3 17/132 contrib/vhost-user-gpu: convert to meson

In reply to Paolo Bonzini

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

---
 Makefile                             |  5 -----
 Makefile.objs                        |  1 -
 contrib/vhost-user-gpu/Makefile.objs | 10 ----------
 contrib/vhost-user-gpu/meson.build   |  5 +++++
 meson.build                          | 15 +++++++++++++++
 5 files changed, 20 insertions(+), 16 deletions(-)
 delete mode 100644 contrib/vhost-user-gpu/Makefile.objs
 create mode 100644 contrib/vhost-user-gpu/meson.build
Makefile +0 -5
index 9528391..bf24c51 100644
@@ -176,7 +176,6 @@ HELPERS-y =
 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
 
@@ -266,7 +265,6 @@ dummy := $(call unnest-vars,, \
                 elf2dmp-obj-y \
                 ivshmem-client-obj-y \
                 ivshmem-server-obj-y \
-                vhost-user-gpu-obj-y \
                 qga-vss-dll-obj-y \
                 block-obj-y \
                 block-obj-m \
@@ -462,9 +460,6 @@ ivshmem-server$(EXESUF): $(ivshmem-server-obj-y) $(COMMON_LDADDS)
 	$(call LINK, $^)
 endif
 
-vhost-user-gpu$(EXESUF): $(vhost-user-gpu-obj-y) contrib/libvhost-user/libvhost-user.a $(COMMON_LDADDS)
-	$(call LINK, $^)
-
 module_block.h: $(SRC_PATH)/scripts/modules/module_block.py config-host.mak
 	$(call quiet-command,$(PYTHON) $< $@ \
 	$(addprefix $(SRC_PATH)/,$(patsubst %.mo,%.c,$(block-obj-m))), \
Makefile.objs +0 -1
index c7f7637..cae0f1d 100644
@@ -109,6 +109,5 @@ qga-vss-dll-obj-y = qga/
 elf2dmp-obj-y = contrib/elf2dmp/
 ivshmem-client-obj-$(CONFIG_IVSHMEM) = contrib/ivshmem-client/
 ivshmem-server-obj-$(CONFIG_IVSHMEM) = contrib/ivshmem-server/
-vhost-user-gpu-obj-y = contrib/vhost-user-gpu/
 
 ######################################################################
contrib/vhost-user-gpu/Makefile.objs deleted +0 -10
deleted file mode 100644
index 6170c91..0000000
@@ -1,10 +0,0 @@
-vhost-user-gpu-obj-y = main.o virgl.o vugbm.o
-
-main.o-cflags := $(PIXMAN_CFLAGS) $(GBM_CFLAGS)
-main.o-libs := $(PIXMAN_LIBS)
-
-virgl.o-cflags := $(VIRGL_CFLAGS) $(GBM_CFLAGS)
-virgl.o-libs := $(VIRGL_LIBS)
-
-vugbm.o-cflags := $(GBM_CFLAGS)
-vugbm.o-libs := $(GBM_LIBS)
contrib/vhost-user-gpu/meson.build new file +5 -0
new file mode 100644
index 0000000..8778aa7
@@ -0,0 +1,5 @@
+if 'CONFIG_VIRGL' in config_host and 'CONFIG_GBM' in config_host
+  executable('vhost-user-gpu', files('main.c', 'virgl.c', 'vugbm.c'),
+             link_with: libvhost_user,
+             dependencies: [qemuutil, pixman, gbm, virgl])
+endif
meson.build +15 -0
index e38c8a9..b0f3622 100644
@@ -52,11 +52,23 @@ if 'CONFIG_GNUTLS' in config_host
   gnutls = declare_dependency(compile_args: config_host['GNUTLS_CFLAGS'].split(),
                               link_args: config_host['GNUTLS_LIBS'].split())
 endif
+pixman = declare_dependency(compile_args: config_host['PIXMAN_CFLAGS'].split(),
+                            link_args: config_host['PIXMAN_LIBS'].split())
 libiscsi = declare_dependency()
 if 'CONFIG_LIBISCSI' in config_host
   libiscsi = declare_dependency(compile_args: config_host['LIBISCSI_CFLAGS'].split(),
                                 link_args: config_host['LIBISCSI_LIBS'].split())
 endif
+gbm = declare_dependency()
+if 'CONFIG_GBM' in config_host
+  gbm = declare_dependency(compile_args: config_host['GBM_CFLAGS'].split(),
+                           link_args: config_host['GBM_LIBS'].split())
+endif
+virgl = declare_dependency()
+if 'CONFIG_VIRGL' in config_host
+  virgl = declare_dependency(compile_args: config_host['VIRGL_CFLAGS'].split(),
+                             link_args: config_host['VIRGL_LIBS'].split())
+endif
 
 target_dirs = config_host['TARGET_DIRS'].split()
 have_user = false
@@ -199,6 +211,9 @@ if have_tools
   if 'CONFIG_VHOST_USER' in config_host
     subdir('contrib/libvhost-user')
     subdir('contrib/vhost-user-blk')
+    if 'CONFIG_LINUX' in config_host
+      subdir('contrib/vhost-user-gpu')
+    endif
     subdir('contrib/vhost-user-input')
     subdir('contrib/vhost-user-scsi')
   endif
Signature · 1 line
1.8.3.1
#18 lore raw

PATCH v3 18/132 contrib/ivshmem: convert to meson

In reply to Paolo Bonzini

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

---
 Makefile                             | 9 ---------
 Makefile.objs                        | 2 --
 configure                            | 3 ---
 contrib/ivshmem-client/Makefile.objs | 1 -
 contrib/ivshmem-client/meson.build   | 3 +++
 contrib/ivshmem-server/Makefile.objs | 1 -
 contrib/ivshmem-server/meson.build   | 3 +++
 meson.build                          | 6 ++++++
 8 files changed, 12 insertions(+), 16 deletions(-)
 delete mode 100644 contrib/ivshmem-client/Makefile.objs
 create mode 100644 contrib/ivshmem-client/meson.build
 delete mode 100644 contrib/ivshmem-server/Makefile.objs
 create mode 100644 contrib/ivshmem-server/meson.build
Makefile +0 -9
index bf24c51..d697aab 100644
@@ -263,8 +263,6 @@ dummy := $(call unnest-vars,, \
                 chardev-obj-y \
                 qga-obj-y \
                 elf2dmp-obj-y \
-                ivshmem-client-obj-y \
-                ivshmem-server-obj-y \
                 qga-vss-dll-obj-y \
                 block-obj-y \
                 block-obj-m \
@@ -453,13 +451,6 @@ endif
 elf2dmp$(EXESUF): $(elf2dmp-obj-y)
 	$(call LINK, $^)
 
-ifdef CONFIG_IVSHMEM
-ivshmem-client$(EXESUF): $(ivshmem-client-obj-y) $(COMMON_LDADDS)
-	$(call LINK, $^)
-ivshmem-server$(EXESUF): $(ivshmem-server-obj-y) $(COMMON_LDADDS)
-	$(call LINK, $^)
-endif
-
 module_block.h: $(SRC_PATH)/scripts/modules/module_block.py config-host.mak
 	$(call quiet-command,$(PYTHON) $< $@ \
 	$(addprefix $(SRC_PATH)/,$(patsubst %.mo,%.c,$(block-obj-m))), \
Makefile.objs +0 -2
index cae0f1d..919961f 100644
@@ -107,7 +107,5 @@ qga-vss-dll-obj-y = qga/
 ######################################################################
 # contrib
 elf2dmp-obj-y = contrib/elf2dmp/
-ivshmem-client-obj-$(CONFIG_IVSHMEM) = contrib/ivshmem-client/
-ivshmem-server-obj-$(CONFIG_IVSHMEM) = contrib/ivshmem-server/
 
 ######################################################################
configure +0 -3
index c27d06f..d59c831 100755
@@ -6065,9 +6065,6 @@ if test "$want_tools" = "yes" ; then
   if [ "$linux" = "yes" -o "$bsd" = "yes" -o "$solaris" = "yes" ] ; then
     tools="qemu-nbd\$(EXESUF) $tools"
   fi
-  if [ "$ivshmem" = "yes" ]; then
-    tools="ivshmem-client\$(EXESUF) ivshmem-server\$(EXESUF) $tools"
-  fi
   if [ "$curl" = "yes" ]; then
       tools="elf2dmp\$(EXESUF) $tools"
   fi
contrib/ivshmem-client/Makefile.objs deleted +0 -1
deleted file mode 100644
index bfab2d2..0000000
@@ -1 +0,0 @@
-ivshmem-client-obj-y = ivshmem-client.o main.o
contrib/ivshmem-client/meson.build new file +3 -0
new file mode 100644
index 0000000..92ad844
@@ -0,0 +1,3 @@
+executable('ivshmem-client', files('ivshmem-client.c', 'main.c'),
+           dependencies: glib,
+           install: true)
contrib/ivshmem-server/Makefile.objs deleted +0 -1
deleted file mode 100644
index c060dd3..0000000
@@ -1 +0,0 @@
-ivshmem-server-obj-y = ivshmem-server.o main.o
contrib/ivshmem-server/meson.build new file +3 -0
new file mode 100644
index 0000000..6dbe240
@@ -0,0 +1,3 @@
+executable('ivshmem-server', files('ivshmem-server.c', 'main.c'),
+           dependencies: [qemuutil, rt],
+           install: true)
meson.build +6 -0
index b0f3622..e2eee80 100644
@@ -54,6 +54,7 @@ if 'CONFIG_GNUTLS' in config_host
 endif
 pixman = declare_dependency(compile_args: config_host['PIXMAN_CFLAGS'].split(),
                             link_args: config_host['PIXMAN_LIBS'].split())
+rt = cc.find_library('rt', required: false)
 libiscsi = declare_dependency()
 if 'CONFIG_LIBISCSI' in config_host
   libiscsi = declare_dependency(compile_args: config_host['LIBISCSI_CFLAGS'].split(),
@@ -217,4 +218,9 @@ if have_tools
     subdir('contrib/vhost-user-input')
     subdir('contrib/vhost-user-scsi')
   endif
+
+  if 'CONFIG_IVSHMEM' in config_host
+    subdir('contrib/ivshmem-client')
+    subdir('contrib/ivshmem-server')
+  endif
 endif
Signature · 1 line
1.8.3.1
#19 lore raw

PATCH v3 19/132 contrib/elf2dmp: convert to meson

In reply to Paolo Bonzini

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

---
 Makefile                      | 4 ----
 Makefile.objs                 | 6 ------
 configure                     | 3 ---
 contrib/elf2dmp/Makefile.objs | 4 ----
 contrib/elf2dmp/meson.build   | 4 ++++
 meson.build                   | 6 ++++++
 6 files changed, 10 insertions(+), 17 deletions(-)
 delete mode 100644 contrib/elf2dmp/Makefile.objs
 create mode 100644 contrib/elf2dmp/meson.build
Makefile +0 -4
index d697aab..6f2141f 100644
@@ -262,7 +262,6 @@ dummy := $(call unnest-vars,, \
                 authz-obj-y \
                 chardev-obj-y \
                 qga-obj-y \
-                elf2dmp-obj-y \
                 qga-vss-dll-obj-y \
                 block-obj-y \
                 block-obj-m \
@@ -448,9 +447,6 @@ ifneq ($(EXESUF),)
 qemu-ga: qemu-ga$(EXESUF) $(QGA_VSS_PROVIDER) $(QEMU_GA_MSI)
 endif
 
-elf2dmp$(EXESUF): $(elf2dmp-obj-y)
-	$(call LINK, $^)
-
 module_block.h: $(SRC_PATH)/scripts/modules/module_block.py config-host.mak
 	$(call quiet-command,$(PYTHON) $< $@ \
 	$(addprefix $(SRC_PATH)/,$(patsubst %.mo,%.c,$(block-obj-m))), \
Makefile.objs +0 -6
index 919961f..e91cdb9 100644
@@ -103,9 +103,3 @@ util-obj-y +=  trace/
 # extracted into a QAPI schema module, or perhaps a separate schema.
 qga-obj-y = qga/
 qga-vss-dll-obj-y = qga/
-
-######################################################################
-# contrib
-elf2dmp-obj-y = contrib/elf2dmp/
-
-######################################################################
configure +0 -3
index d59c831..b38da39 100755
@@ -6065,9 +6065,6 @@ if test "$want_tools" = "yes" ; then
   if [ "$linux" = "yes" -o "$bsd" = "yes" -o "$solaris" = "yes" ] ; then
     tools="qemu-nbd\$(EXESUF) $tools"
   fi
-  if [ "$curl" = "yes" ]; then
-      tools="elf2dmp\$(EXESUF) $tools"
-  fi
 fi
 if test "$softmmu" = yes ; then
   if test "$linux" = yes; then
contrib/elf2dmp/Makefile.objs deleted +0 -4
deleted file mode 100644
index 1505716..0000000
@@ -1,4 +0,0 @@
-elf2dmp-obj-y = main.o addrspace.o download.o pdb.o qemu_elf.o
-
-download.o-cflags := $(CURL_CFLAGS)
-download.o-libs   := $(CURL_LIBS)
contrib/elf2dmp/meson.build new file +4 -0
new file mode 100644
index 0000000..b9e5199
@@ -0,0 +1,4 @@
+if 'CONFIG_CURL' in config_host
+  executable('elf2dmp', files('main.c', 'addrspace.c', 'download.c', 'pdb.c', 'qemu_elf.c'),
+             dependencies: [glib, curl])
+endif
meson.build +6 -0
index e2eee80..25c3db9 100644
@@ -70,6 +70,11 @@ if 'CONFIG_VIRGL' in config_host
   virgl = declare_dependency(compile_args: config_host['VIRGL_CFLAGS'].split(),
                              link_args: config_host['VIRGL_LIBS'].split())
 endif
+curl = declare_dependency()
+if 'CONFIG_CURL' in config_host
+  curl = declare_dependency(compile_args: config_host['CURL_CFLAGS'].split(),
+                            link_args: config_host['CURL_LIBS'].split())
+endif
 
 target_dirs = config_host['TARGET_DIRS'].split()
 have_user = false
@@ -208,6 +213,7 @@ qemuutil = declare_dependency(link_with: libqemuutil,
 
 if have_tools
   subdir('contrib/rdmacm-mux')
+  subdir('contrib/elf2dmp')
 
   if 'CONFIG_VHOST_USER' in config_host
     subdir('contrib/libvhost-user')
Signature · 1 line
1.8.3.1
#20 lore raw

PATCH v3 20/132 meson: convert qemu-ga

In reply to Paolo Bonzini
---
 Makefile                  | 44 ++++++--------------------------------------
 Makefile.objs             |  1 -
 configure                 |  9 ++++-----
 meson.build               |  8 ++++++++
 qga/Makefile.objs         |  8 --------
 qga/installer/qemu-ga.wxs |  2 +-
 qga/meson.build           | 43 +++++++++++++++++++++++++++++++++++++++++++
 tests/Makefile.include    |  4 ++--
 tests/test-qga.c          |  8 ++++----
 9 files changed, 68 insertions(+), 59 deletions(-)
 create mode 100644 qga/meson.build
Makefile +6 -38
index 6f2141f..a78d5e0 100644
@@ -261,7 +261,6 @@ endif
 dummy := $(call unnest-vars,, \
                 authz-obj-y \
                 chardev-obj-y \
-                qga-obj-y \
                 qga-vss-dll-obj-y \
                 block-obj-y \
                 block-obj-m \
@@ -393,44 +392,15 @@ endif
 qemu-img-cmds.h: $(SRC_PATH)/qemu-img-cmds.hx $(SRC_PATH)/scripts/hxtool
 	$(call quiet-command,sh $(SRC_PATH)/scripts/hxtool -h < $< > $@,"GEN","$@")
 
-qemu-ga$(EXESUF): LIBS = $(LIBS_QGA)
-qemu-ga$(EXESUF): QEMU_CFLAGS += -I qga/qapi-generated
-
 qemu-keymap$(EXESUF): LIBS += $(XKBCOMMON_LIBS)
 qemu-keymap$(EXESUF): QEMU_CFLAGS += $(XKBCOMMON_CFLAGS)
 
-qapi-py = $(SRC_PATH)/scripts/qapi/commands.py \
-$(SRC_PATH)/scripts/qapi/events.py \
-$(SRC_PATH)/scripts/qapi/introspect.py \
-$(SRC_PATH)/scripts/qapi/types.py \
-$(SRC_PATH)/scripts/qapi/visit.py \
-$(SRC_PATH)/scripts/qapi/common.py \
-$(SRC_PATH)/scripts/qapi/doc.py \
-$(SRC_PATH)/scripts/qapi-gen.py
-
-qga/qapi-generated/qga-qapi-types.c qga/qapi-generated/qga-qapi-types.h \
-qga/qapi-generated/qga-qapi-visit.c qga/qapi-generated/qga-qapi-visit.h \
-qga/qapi-generated/qga-qapi-commands.h qga/qapi-generated/qga-qapi-commands.c \
-qga/qapi-generated/qga-qapi-doc.texi: \
-qga/qapi-generated/qapi-gen-timestamp ;
-qga/qapi-generated/qapi-gen-timestamp: $(SRC_PATH)/qga/qapi-schema.json $(qapi-py)
-	$(call quiet-command,$(PYTHON) $(SRC_PATH)/scripts/qapi-gen.py \
-		-o qga/qapi-generated -p "qga-" $<, \
-		"GEN","$(@:%-timestamp=%)")
-	@>$@
-
-QGALIB_GEN=$(addprefix qga/qapi-generated/, qga-qapi-types.h qga-qapi-visit.h qga-qapi-commands.h)
-$(qga-obj-y): $(QGALIB_GEN)
-
-qemu-ga$(EXESUF): $(qga-obj-y) $(COMMON_LDADDS)
-	$(call LINK, $^)
-
 ifdef QEMU_GA_MSI_ENABLED
 QEMU_GA_MSI=qemu-ga-$(ARCH).msi
 
 msi: $(QEMU_GA_MSI)
 
-$(QEMU_GA_MSI): qemu-ga.exe $(QGA_VSS_PROVIDER)
+$(QEMU_GA_MSI): qga/qemu-ga.exe $(QGA_VSS_PROVIDER)
 
 $(QEMU_GA_MSI): config-host.mak
 
@@ -443,8 +413,8 @@ msi:
 endif
 
 ifneq ($(EXESUF),)
-.PHONY: qemu-ga
-qemu-ga: qemu-ga$(EXESUF) $(QGA_VSS_PROVIDER) $(QEMU_GA_MSI)
+.PHONY: qga/qemu-ga
+qga/qemu-ga: qga/qemu-ga$(EXESUF) $(QGA_VSS_PROVIDER) $(QEMU_GA_MSI)
 endif
 
 module_block.h: $(SRC_PATH)/scripts/modules/module_block.py config-host.mak
@@ -471,8 +441,6 @@ clean: recurse-clean
 	rm -f trace/generated-tracers-dtrace.dtrace*
 	rm -f trace/generated-tracers-dtrace.h*
 	rm -f $(foreach f,$(generated-files-y),$(f) $(f)-timestamp)
-	rm -f qapi-gen-timestamp
-	rm -rf qga/qapi-generated
 	rm -f config-all-devices.mak
 
 VERSION ?= $(shell cat VERSION)
@@ -600,7 +568,7 @@ endif
 ifdef CONFIG_TRACE_SYSTEMTAP
 	$(INSTALL_DATA) scripts/qemu-trace-stap.1 "$(DESTDIR)$(mandir)/man1"
 endif
-ifneq (,$(findstring qemu-ga,$(TOOLS)))
+ifeq ($(CONFIG_GUEST_AGENT),y)
 	$(INSTALL_DATA) qemu-ga.8 "$(DESTDIR)$(mandir)/man8"
 	$(INSTALL_DATA) docs/interop/qemu-ga-ref.html "$(DESTDIR)$(qemu_docdir)"
 	$(INSTALL_DATA) docs/interop/qemu-ga-ref.txt "$(DESTDIR)$(qemu_docdir)"
@@ -617,7 +585,7 @@ install-datadir:
 
 install-localstatedir:
 ifdef CONFIG_POSIX
-ifneq (,$(findstring qemu-ga,$(TOOLS)))
+ifeq ($(CONFIG_GUEST_AGENT),y)
 	$(INSTALL_DIR) "$(DESTDIR)$(qemu_localstatedir)"/run
 endif
 endif
@@ -790,7 +758,7 @@ qemu-img-cmds.texi: $(SRC_PATH)/qemu-img-cmds.hx $(SRC_PATH)/scripts/hxtool
 docs/interop/qemu-qmp-qapi.texi: qapi/qapi-doc.texi
 	@cp -p $< $@
 
-docs/interop/qemu-ga-qapi.texi: qga/qapi-generated/qga-qapi-doc.texi
+docs/interop/qemu-ga-qapi.texi: qga/qga-qapi-doc.texi
 	@cp -p $< $@
 
 qemu.1: qemu-doc.texi qemu-options.texi qemu-monitor.texi qemu-monitor-info.texi
Makefile.objs +0 -1
index e91cdb9..736bdaa 100644
@@ -101,5 +101,4 @@ util-obj-y +=  trace/
 # FIXME: a few definitions from qapi/qapi-types.o and
 # qapi/qapi-visit.o are needed by libqemuutil.a.  These should be
 # extracted into a QAPI schema module, or perhaps a separate schema.
-qga-obj-y = qga/
 qga-vss-dll-obj-y = qga/
configure +4 -5
index b38da39..4ed65db 100755
@@ -3664,7 +3664,6 @@ for i in $glib_modules; do
         glib_libs=$($pkg_config --libs $i)
         QEMU_CFLAGS="$glib_cflags $QEMU_CFLAGS"
         LIBS="$glib_libs $LIBS"
-        libs_qga="$glib_libs $libs_qga"
     else
         error_exit "glib-$glib_req_ver $i is required to compile QEMU"
     fi
@@ -4795,7 +4794,6 @@ if compile_prog "" "" ; then
   :
 elif compile_prog "" "-lm" ; then
   LIBS="-lm $LIBS"
-  libs_qga="-lm $libs_qga"
 else
   error_exit "libm check failed"
 fi
@@ -4820,7 +4818,6 @@ if compile_prog "" "" ; then
 # we need pthread for static linking. use previous pthread test result
 elif compile_prog "" "$pthread_lib -lrt" ; then
   LIBS="$LIBS -lrt"
-  libs_qga="$libs_qga -lrt"
 fi
 
 # Check whether we need to link libutil for openpty()
@@ -6107,7 +6104,6 @@ if [ "$guest_agent" != "no" ]; then
   if [ "$softmmu" = no -a "$want_tools" = no ] ; then
       guest_agent=no
   elif [ "$linux" = "yes" -o "$bsd" = "yes" -o "$solaris" = "yes" -o "$mingw32" = "yes" ] ; then
-      tools="qemu-ga\$(EXESUF) $tools"
       guest_agent=yes
   elif [ "$guest_agent" != yes ]; then
       guest_agent=no
@@ -6583,6 +6579,9 @@ fi
 if test "$want_tools" = "yes" ; then
   echo "CONFIG_TOOLS=y" >> $config_host_mak
 fi
+if test "$guest_agent" = "yes" ; then
+  echo "CONFIG_GUEST_AGENT=y" >> $config_host_mak
+fi
 if test "$slirp" != "no"; then
   echo "CONFIG_SLIRP=y" >> $config_host_mak
   echo "CONFIG_SMBD_COMMAND=\"$smbd\"" >> $config_host_mak
@@ -7349,7 +7348,7 @@ echo "PTHREAD_LIB=$PTHREAD_LIB" >> $config_host_mak
 echo "EXESUF=$EXESUF" >> $config_host_mak
 echo "DSOSUF=$DSOSUF" >> $config_host_mak
 echo "LDFLAGS_SHARED=$LDFLAGS_SHARED" >> $config_host_mak
-echo "LIBS_QGA+=$libs_qga" >> $config_host_mak
+echo "LIBS_QGA=$libs_qga" >> $config_host_mak
 echo "TASN1_LIBS=$tasn1_libs" >> $config_host_mak
 echo "TASN1_CFLAGS=$tasn1_cflags" >> $config_host_mak
 echo "POD2MAN=$POD2MAN" >> $config_host_mak
meson.build +8 -0
index 25c3db9..f65ad9d 100644
@@ -75,6 +75,10 @@ if 'CONFIG_CURL' in config_host
   curl = declare_dependency(compile_args: config_host['CURL_CFLAGS'].split(),
                             link_args: config_host['CURL_LIBS'].split())
 endif
+libudev = declare_dependency()
+if 'CONFIG_LIBUDEV' in config_host
+  libudev = declare_dependency(link_args: config_host['LIBUDEV_LIBS'].split())
+endif
 
 target_dirs = config_host['TARGET_DIRS'].split()
 have_user = false
@@ -211,6 +215,10 @@ qemuutil = declare_dependency(link_with: libqemuutil,
 
 # Other build targets
 
+if 'CONFIG_GUEST_AGENT' in config_host
+  subdir('qga')
+endif
+
 if have_tools
   subdir('contrib/rdmacm-mux')
   subdir('contrib/elf2dmp')
qga/Makefile.objs +0 -8
index 80e6bb3..9ecf249 100644
@@ -1,9 +1 @@
-commands-posix.o-libs := $(LIBUDEV_LIBS)
-qga-obj-y = commands.o guest-agent-command-state.o main.o
-qga-obj-$(CONFIG_POSIX) += commands-posix.o channel-posix.o
-qga-obj-$(CONFIG_WIN32) += commands-win32.o channel-win32.o service-win32.o
-qga-obj-$(CONFIG_WIN32) += vss-win32.o
-qga-obj-y += qapi-generated/qga-qapi-types.o qapi-generated/qga-qapi-visit.o
-qga-obj-y += qapi-generated/qga-qapi-commands.o
-
 qga-vss-dll-obj-$(CONFIG_QGA_VSS) += vss-win32/
qga/installer/qemu-ga.wxs +1 -1
index 64bf90b..ca2ac86 100644
@@ -66,7 +66,7 @@
       <Directory Id="$(var.GaProgramFilesFolder)" Name="QEMU Guest Agent">
         <Directory Id="qemu_ga_directory" Name="Qemu-ga">
           <Component Id="qemu_ga" Guid="{908B7199-DE2A-4DC6-A8D0-27A5AE444FEA}">
-            <File Id="qemu_ga.exe" Name="qemu-ga.exe" Source="$(env.BUILD_DIR)/qemu-ga.exe" KeyPath="yes" DiskId="1"/>
+            <File Id="qemu_ga.exe" Name="qemu-ga.exe" Source="$(env.BUILD_DIR)/qga/qemu-ga.exe" KeyPath="yes" DiskId="1"/>
             <ServiceInstall
               Id="ServiceInstaller"
               Type="ownProcess"
qga/meson.build new file +43 -0

43 lines not on this page · raw message

tests/Makefile.include +2 -2
index f3943de..9fd6a48 100644
@@ -113,7 +113,7 @@ check-speed-$(CONFIG_BLOCK) += tests/benchmark-crypto-cipher$(EXESUF)
 check-unit-$(CONFIG_BLOCK) += tests/test-crypto-secret$(EXESUF)
 check-unit-$(call land,$(CONFIG_BLOCK),$(CONFIG_GNUTLS)) += tests/test-crypto-tlscredsx509$(EXESUF)
 check-unit-$(call land,$(CONFIG_BLOCK),$(CONFIG_GNUTLS)) += tests/test-crypto-tlssession$(EXESUF)
-ifneq (,$(findstring qemu-ga,$(TOOLS)))
+ifeq ($(CONFIG_GUEST_AGENT),y)
 check-unit-$(call land,$(CONFIG_LINUX),$(CONFIG_VIRTIO_SERIAL)) += tests/test-qga$(EXESUF)
 endif
 check-unit-y += tests/test-timed-average$(EXESUF)
@@ -855,7 +855,7 @@ endif
 qtest-obj-y = tests/libqtest.o $(test-util-obj-y)
 $(check-qtest-y): $(qtest-obj-y)
 
-tests/test-qga$(EXESUF): qemu-ga$(EXESUF)
+tests/test-qga$(EXESUF): qga/qemu-ga$(EXESUF)
 tests/test-qga$(EXESUF): tests/test-qga.o $(qtest-obj-y)
 
 SPEED = quick
tests/test-qga.c +4 -4
index 41d4fc0..ef4d0b4 100644
@@ -61,8 +61,8 @@ fixture_setup(TestFixture *fixture, gconstpointer data, gchar **envp)
 
     path = g_build_filename(fixture->test_dir, "sock", NULL);
     cwd = g_get_current_dir();
-    cmd = g_strdup_printf("%s%cqemu-ga -m unix-listen -t %s -p %s %s %s",
-                          cwd, G_DIR_SEPARATOR,
+    cmd = g_strdup_printf("%s%cqga%cqemu-ga -m unix-listen -t %s -p %s %s %s",
+                          cwd, G_DIR_SEPARATOR, G_DIR_SEPARATOR,
                           fixture->test_dir, path,
                           getenv("QTEST_LOG") ? "-v" : "",
                           extra_arg ?: "");
@@ -705,8 +705,8 @@ static void test_qga_config(gconstpointer data)
     GKeyFile *kf;
 
     cwd = g_get_current_dir();
-    cmd = g_strdup_printf("%s%cqemu-ga -D",
-                          cwd, G_DIR_SEPARATOR);
+    cmd = g_strdup_printf("%s%cqga%cqemu-ga -D",
+                          cwd, G_DIR_SEPARATOR, G_DIR_SEPARATOR);
     g_free(cwd);
     g_shell_parse_argv(cmd, NULL, &argv, &error);
     g_free(cmd);
Signature · 1 line
1.8.3.1
#21 lore raw

PATCH v3 21/132 meson: convert vss-win32

In reply to Paolo Bonzini

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

---
 Makefile                    |  1 -
 Makefile.objs               |  8 --------
 meson.build                 |  4 +++-
 qga/Makefile.objs           |  1 -
 qga/meson.build             |  6 ++++++
 qga/vss-win32/Makefile.objs | 23 -----------------------
 qga/vss-win32/meson.build   | 28 ++++++++++++++++++++++++++++
 7 files changed, 37 insertions(+), 34 deletions(-)
 delete mode 100644 qga/Makefile.objs
 delete mode 100644 qga/vss-win32/Makefile.objs
 create mode 100644 qga/vss-win32/meson.build
Makefile +0 -1
index a78d5e0..4f20bf7 100644
@@ -261,7 +261,6 @@ endif
 dummy := $(call unnest-vars,, \
                 authz-obj-y \
                 chardev-obj-y \
-                qga-vss-dll-obj-y \
                 block-obj-y \
                 block-obj-m \
                 crypto-obj-y \
Makefile.objs +0 -8
index 736bdaa..38e3604 100644
@@ -94,11 +94,3 @@ version-obj-$(CONFIG_WIN32) += $(BUILD_DIR)/version.o
 ######################################################################
 # tracing
 util-obj-y +=  trace/
-
-######################################################################
-# guest agent
-
-# FIXME: a few definitions from qapi/qapi-types.o and
-# qapi/qapi-visit.o are needed by libqemuutil.a.  These should be
-# extracted into a QAPI schema module, or perhaps a separate schema.
-qga-vss-dll-obj-y = qga/
meson.build +3 -1
index f65ad9d..7e772c1 100644
@@ -9,12 +9,14 @@ add_project_arguments(config_host['CFLAGS'].split(),
                       language: ['c', 'objc'])
 add_project_arguments(config_host['QEMU_CFLAGS'].split(),
                       language: 'c')
+add_project_arguments(config_host['QEMU_CXXFLAGS'].split(),
+                      language: 'cpp')
 add_project_link_arguments(config_host['LDFLAGS'].split(),
                            language: ['c', 'cpp', 'objc'])
 add_project_link_arguments(config_host['QEMU_LDFLAGS'].split(),
                            language: ['c', 'cpp', 'objc'])
 add_project_arguments(config_host['QEMU_INCLUDES'].split(),
-                      language: 'c')
+                      language: ['c', 'cpp'])
 
 configure_file(input: files('scripts/ninjatool.py'),
                output: 'ninjatool',
qga/Makefile.objs deleted +0 -1
deleted file mode 100644
index 9ecf249..0000000
@@ -1 +0,0 @@
-qga-vss-dll-obj-$(CONFIG_QGA_VSS) += vss-win32/
qga/meson.build +6 -0
index 116102b..f0ec8cf 100644
@@ -41,3 +41,9 @@ qga_ss = qga_ss.apply(config_host, strict: false)
 qga = executable('qemu-ga', qga_ss.sources(),
                  link_args: config_host['LIBS_QGA'].split(),
                  dependencies: [qemuutil, libudev])
+
+if host_machine.system() == 'windows'
+  if 'CONFIG_QGA_VSS' in config_host
+    subdir('vss-win32')
+  endif
+endif
qga/vss-win32/Makefile.objs deleted +0 -23
deleted file mode 100644
index fd3ba18..0000000
@@ -1,23 +0,0 @@
-# rules to build qga-vss.dll
-
-qga-vss-dll-obj-y += requester.o provider.o install.o
-
-obj-qga-vss-dll-obj-y = $(addprefix $(obj)/, $(qga-vss-dll-obj-y))
-$(obj-qga-vss-dll-obj-y): QEMU_CXXFLAGS := $(filter-out -fstack-protector-all -fstack-protector-strong, $(QEMU_CXXFLAGS)) -Wno-unknown-pragmas -Wno-delete-non-virtual-dtor
-
-$(obj)/qga-vss.dll: LDFLAGS = -shared -Wl,--add-stdcall-alias,--enable-stdcall-fixup -lglib-2.0 -lole32 -loleaut32 -lshlwapi -luuid -lintl -lws2_32 -static
-$(obj)/qga-vss.dll: $(obj-qga-vss-dll-obj-y) $(SRC_PATH)/$(obj)/qga-vss.def
-	$(call quiet-command,$(CXX) -o $@ $(qga-vss-dll-obj-y) $(SRC_PATH)/qga/vss-win32/qga-vss.def $(CXXFLAGS) $(LDFLAGS),"LINK","$(TARGET_DIR)$@")
-
-
-# rules to build qga-provider.tlb
-# Currently, only native build is supported because building .tlb
-# (TypeLibrary) from .idl requires WindowsSDK and MIDL (and cl.exe in VC++).
-MIDL=$(WIN_SDK)/Bin/midl
-
-$(obj)/qga-vss.tlb: $(SRC_PATH)/$(obj)/qga-vss.idl
-ifeq ($(WIN_SDK),"")
-	$(call quiet-command,cp $(dir $<)qga-vss.tlb $@,"COPY","$(TARGET_DIR)$@")
-else
-	$(call quiet-command,$(MIDL) -tlb $@ -I $(WIN_SDK)/Include $<,"MIDL","$(TARGET_DIR)$@")
-endif
qga/vss-win32/meson.build new file +28 -0
new file mode 100644
index 0000000..a7c865f
@@ -0,0 +1,28 @@
+if add_languages('cpp', required: false)
+  glib_static = dependency('glib-2.0', static: true)
+  link_args = cc.get_supported_link_arguments(['-fstack-protector-all', '-fstack-protector-strong', '-Wl,--add-stdcall-alias', '-Wl,--enable-stdcall-fixup'])
+
+  shared_module('qga-vss', ['requester.cpp', 'provider.cpp', 'install.cpp'],
+                name_prefix: '',
+                cpp_args: ['-Wno-unknown-pragmas', '-Wno-delete-non-virtual-dtor', '-Wno-non-virtual-dtor'],
+                link_args: link_args,
+                vs_module_defs: 'qga-vss.def',
+                dependencies: glib_static)
+endif
+
+# rules to build qga-vss.tlb
+# Currently, only native build is supported because building .tlb
+# (TypeLibrary) from .idl requires WindowsSDK and MIDL (and cl.exe in VC++).
+midl = find_program('midl', required: false)
+if midl.found()
+  gen_tlb = custom_target('gen-tlb',
+                          input: 'qga-vss.idl',
+                          output: 'qga-vss.tlb',
+                          command: [midl, '-tlb', '-I' + config_host['WIN_SDK'],
+                                     '@INPUT@', '@OUTPUT@'])
+else
+  gen_tlb = custom_target('gen-tlb',
+                          input: 'qga-vss.tlb',
+                          output: 'qga-vss.tlb',
+                          command: ['cp', '@INPUT@', '@OUTPUT@'])
+endif
Signature · 1 line
1.8.3.1
#22 lore raw

PATCH v3 22/132 meson: add msi generation

In reply to Paolo Bonzini

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

---
 Makefile                  | 18 ------------------
 qga/meson.build           | 25 +++++++++++++++++++++++++
 qga/vss-win32/meson.build |  2 +-
 3 files changed, 26 insertions(+), 19 deletions(-)
Makefile +0 -18
index 4f20bf7..328b3c3 100644
@@ -394,23 +394,6 @@ qemu-img-cmds.h: $(SRC_PATH)/qemu-img-cmds.hx $(SRC_PATH)/scripts/hxtool
 qemu-keymap$(EXESUF): LIBS += $(XKBCOMMON_LIBS)
 qemu-keymap$(EXESUF): QEMU_CFLAGS += $(XKBCOMMON_CFLAGS)
 
-ifdef QEMU_GA_MSI_ENABLED
-QEMU_GA_MSI=qemu-ga-$(ARCH).msi
-
-msi: $(QEMU_GA_MSI)
-
-$(QEMU_GA_MSI): qga/qemu-ga.exe $(QGA_VSS_PROVIDER)
-
-$(QEMU_GA_MSI): config-host.mak
-
-$(QEMU_GA_MSI):  $(SRC_PATH)/qga/installer/qemu-ga.wxs
-	$(call quiet-command,QEMU_GA_VERSION="$(QEMU_GA_VERSION)" QEMU_GA_MANUFACTURER="$(QEMU_GA_MANUFACTURER)" QEMU_GA_DISTRO="$(QEMU_GA_DISTRO)" BUILD_DIR="$(BUILD_DIR)" \
-	wixl -o $@ $(QEMU_GA_MSI_ARCH) $(QEMU_GA_MSI_WITH_VSS) $(QEMU_GA_MSI_MINGW_DLL_PATH) $<,"WIXL","$@")
-else
-msi:
-	@echo "MSI build not configured or dependency resolution failed (reconfigure with --enable-guest-agent-msi option)"
-endif
-
 ifneq ($(EXESUF),)
 .PHONY: qga/qemu-ga
 qga/qemu-ga: qga/qemu-ga$(EXESUF) $(QGA_VSS_PROVIDER) $(QEMU_GA_MSI)
@@ -425,7 +408,6 @@ 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
 	rm -f qemu-options.def
-	rm -f *.msi
 	find . \( -name '*.so' -o -name '*.dll' -o -name '*.mo' -o -name '*.[oda]' \) -type f \
 		! -path ./roms/edk2/ArmPkg/Library/GccLto/liblto-aarch64.a \
 		! -path ./roms/edk2/ArmPkg/Library/GccLto/liblto-arm.a \
qga/meson.build +25 -0
index f0ec8cf..e0e5344 100644
@@ -45,5 +45,30 @@ qga = executable('qemu-ga', qga_ss.sources(),
 if host_machine.system() == 'windows'
   if 'CONFIG_QGA_VSS' in config_host
     subdir('vss-win32')
+  else
+    gen_tlb = []
+  endif
+
+  wixl = find_program('wixl', required: false)
+  if wixl.found()
+    deps = [gen_tlb, qga]
+    if 'QEMU_GA_MSI_WITH_VSS' in config_host
+      deps += qga_vss
+    endif
+    qga_msi = custom_target('QGA MSI',
+                            input: files('installer/qemu-ga.wxs'),
+                            output: 'qemu-ga-@[email protected]'.format(config_host['ARCH']),
+                            depends: deps,
+                            command: [
+                              'QEMU_GA_VERSION=' + config_host['QEMU_GA_VERSION'],
+                              'QEMU_GA_MANUFACTURER=' + config_host['QEMU_GA_MANUFACTURER'],
+                              'QEMU_GA_DISTRO=' + config_host['QEMU_GA_DISTRO'],
+                              'BUILD_DIR=' + meson.build_root(),
+                              wixl, '-o', '@OUTPUT0@', '@INPUT0@',
+                              config_host['QEMU_GA_MSI_ARCH'].split(),
+                              config_host['QEMU_GA_MSI_WITH_VSS'].split(),
+                              config_host['QEMU_GA_MSI_MINGW_DLL_PATH'].split(),
+                            ])
+    alias_target('msi', qga_msi)
   endif
 endif
qga/vss-win32/meson.build +1 -1
index a7c865f..147a680 100644
@@ -2,7 +2,7 @@ if add_languages('cpp', required: false)
   glib_static = dependency('glib-2.0', static: true)
   link_args = cc.get_supported_link_arguments(['-fstack-protector-all', '-fstack-protector-strong', '-Wl,--add-stdcall-alias', '-Wl,--enable-stdcall-fixup'])
 
-  shared_module('qga-vss', ['requester.cpp', 'provider.cpp', 'install.cpp'],
+  qga_vss = shared_module('qga-vss', ['requester.cpp', 'provider.cpp', 'install.cpp'],
                 name_prefix: '',
                 cpp_args: ['-Wno-unknown-pragmas', '-Wno-delete-non-virtual-dtor', '-Wno-non-virtual-dtor'],
                 link_args: link_args,
Signature · 1 line
1.8.3.1
#23 lore raw

PATCH v3 23/132 meson: add qemu-bridge-helper

In reply to Paolo Bonzini

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

---
 Makefile    |  4 ----
 configure   |  1 +
 meson.build | 12 +++++++++++-
 3 files changed, 12 insertions(+), 5 deletions(-)
Makefile +0 -4
index 328b3c3..d153186 100644
@@ -173,8 +173,6 @@ LIBS+=-lz $(LIBS_TOOLS)
 vhost-user-json-y =
 HELPERS-y =
 
-HELPERS-$(call land,$(CONFIG_SOFTMMU),$(CONFIG_LINUX)) = qemu-bridge-helper$(EXESUF)
-
 ifeq ($(CONFIG_LINUX)$(CONFIG_VIRGL)$(CONFIG_GBM)$(CONFIG_TOOLS),yyyy)
 vhost-user-json-y += contrib/vhost-user-gpu/50-qemu-gpu.json
 endif
@@ -374,8 +372,6 @@ qemu-img$(EXESUF): qemu-img.o $(authz-obj-y) $(block-obj-y) $(crypto-obj-y) $(io
 qemu-nbd$(EXESUF): qemu-nbd.o $(authz-obj-y) $(block-obj-y) $(crypto-obj-y) $(io-obj-y) $(qom-obj-y) $(COMMON_LDADDS)
 qemu-io$(EXESUF): qemu-io.o $(authz-obj-y) $(block-obj-y) $(crypto-obj-y) $(io-obj-y) $(qom-obj-y) $(COMMON_LDADDS)
 
-qemu-bridge-helper$(EXESUF): qemu-bridge-helper.o $(COMMON_LDADDS)
-
 qemu-keymap$(EXESUF): qemu-keymap.o ui/input-keymap.o $(COMMON_LDADDS)
 
 qemu-edid$(EXESUF): qemu-edid.o hw/display/edid-generate.o $(COMMON_LDADDS)
configure +1 -0
index 4ed65db..9615d63 100755
@@ -6603,6 +6603,7 @@ if test "$l2tpv3" = "yes" ; then
 fi
 if test "$cap_ng" = "yes" ; then
   echo "CONFIG_LIBCAP_NG=y" >> $config_host_mak
+  echo "LIBCAP_NG_LIBS=$cap_libs" >> $config_host_mak
 fi
 echo "CONFIG_AUDIO_DRIVERS=$audio_drv_list" >> $config_host_mak
 for drv in $audio_drv_list; do
meson.build +11 -1
index 7e772c1..854b1cb 100644
@@ -56,6 +56,10 @@ if 'CONFIG_GNUTLS' in config_host
 endif
 pixman = declare_dependency(compile_args: config_host['PIXMAN_CFLAGS'].split(),
                             link_args: config_host['PIXMAN_LIBS'].split())
+libcap_ng = declare_dependency()
+if 'CONFIG_LIBCAP_NG' in config_host
+  libcap_ng = declare_dependency(link_args: config_host['LIBCAP_NG_LIBS'].split())
+endif
 rt = cc.find_library('rt', required: false)
 libiscsi = declare_dependency()
 if 'CONFIG_LIBISCSI' in config_host
@@ -216,7 +220,6 @@ qemuutil = declare_dependency(link_with: libqemuutil,
                               sources: version_res)
 
 # Other build targets
-
 if 'CONFIG_GUEST_AGENT' in config_host
   subdir('qga')
 endif
@@ -235,6 +238,13 @@ if have_tools
     subdir('contrib/vhost-user-scsi')
   endif
 
+  if host_machine.system() == 'linux'
+    executable('qemu-bridge-helper', files('qemu-bridge-helper.c'),
+               dependencies: [qemuutil, libcap_ng],
+               install: true,
+               install_dir: get_option('libexecdir'))
+  endif
+
   if 'CONFIG_IVSHMEM' in config_host
     subdir('contrib/ivshmem-client')
     subdir('contrib/ivshmem-server')
Signature · 1 line
1.8.3.1
#24 lore raw

PATCH v3 24/132 meson: add qemu-keymap

In reply to Paolo Bonzini

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

---
 Makefile    |  5 -----
 configure   | 24 ------------------------
 meson.build |  6 ++++++
 3 files changed, 6 insertions(+), 29 deletions(-)
Makefile +0 -5
index d153186..fe4df0d 100644
@@ -372,8 +372,6 @@ qemu-img$(EXESUF): qemu-img.o $(authz-obj-y) $(block-obj-y) $(crypto-obj-y) $(io
 qemu-nbd$(EXESUF): qemu-nbd.o $(authz-obj-y) $(block-obj-y) $(crypto-obj-y) $(io-obj-y) $(qom-obj-y) $(COMMON_LDADDS)
 qemu-io$(EXESUF): qemu-io.o $(authz-obj-y) $(block-obj-y) $(crypto-obj-y) $(io-obj-y) $(qom-obj-y) $(COMMON_LDADDS)
 
-qemu-keymap$(EXESUF): qemu-keymap.o ui/input-keymap.o $(COMMON_LDADDS)
-
 qemu-edid$(EXESUF): qemu-edid.o hw/display/edid-generate.o $(COMMON_LDADDS)
 
 fsdev/virtfs-proxy-helper$(EXESUF): fsdev/virtfs-proxy-helper.o fsdev/9p-marshal.o fsdev/9p-iov-marshal.o $(COMMON_LDADDS)
@@ -387,9 +385,6 @@ endif
 qemu-img-cmds.h: $(SRC_PATH)/qemu-img-cmds.hx $(SRC_PATH)/scripts/hxtool
 	$(call quiet-command,sh $(SRC_PATH)/scripts/hxtool -h < $< > $@,"GEN","$@")
 
-qemu-keymap$(EXESUF): LIBS += $(XKBCOMMON_LIBS)
-qemu-keymap$(EXESUF): QEMU_CFLAGS += $(XKBCOMMON_CFLAGS)
-
 ifneq ($(EXESUF),)
 .PHONY: qga/qemu-ga
 qga/qemu-ga: qga/qemu-ga$(EXESUF) $(QGA_VSS_PROVIDER) $(QEMU_GA_MSI)
configure +0 -24
index 9615d63..d05c0de 100755
@@ -385,7 +385,6 @@ vde=""
 vnc_sasl=""
 vnc_jpeg=""
 vnc_png=""
-xkbcommon=""
 xen=""
 xen_ctrl_version=""
 xen_pci_passthrough=""
@@ -3292,22 +3291,6 @@ EOF
 fi
 
 ##########################################
-# xkbcommon probe
-if test "$xkbcommon" != "no" ; then
-  if $pkg_config xkbcommon --exists; then
-    xkbcommon_cflags=$($pkg_config xkbcommon --cflags)
-    xkbcommon_libs=$($pkg_config xkbcommon --libs)
-    xkbcommon=yes
-  else
-    if test "$xkbcommon" = "yes" ; then
-      feature_not_found "xkbcommon" "Install libxkbcommon-devel"
-    fi
-    xkbcommon=no
-  fi
-fi
-
-
-##########################################
 # xfsctl() probe, used for file-posix.c
 if test "$xfs" != "no" ; then
   cat > $TMPC << EOF
@@ -6093,9 +6076,6 @@ if test "$softmmu" = yes ; then
     fi
     mpath=no
   fi
-  if test "$xkbcommon" = "yes"; then
-    tools="qemu-keymap\$(EXESUF) $tools"
-  fi
 fi
 
 # Probe for guest agent support/options
@@ -6640,10 +6620,6 @@ fi
 if test "$vnc_png" = "yes" ; then
   echo "CONFIG_VNC_PNG=y" >> $config_host_mak
 fi
-if test "$xkbcommon" = "yes" ; then
-  echo "XKBCOMMON_CFLAGS=$xkbcommon_cflags" >> $config_host_mak
-  echo "XKBCOMMON_LIBS=$xkbcommon_libs" >> $config_host_mak
-fi
 if test "$xfs" = "yes" ; then
   echo "CONFIG_XFS=y" >> $config_host_mak
 fi
meson.build +6 -0
index 854b1cb..14a8a9a 100644
@@ -60,6 +60,7 @@ libcap_ng = declare_dependency()
 if 'CONFIG_LIBCAP_NG' in config_host
   libcap_ng = declare_dependency(link_args: config_host['LIBCAP_NG_LIBS'].split())
 endif
+xkbcommon = dependency('xkbcommon', required: false)
 rt = cc.find_library('rt', required: false)
 libiscsi = declare_dependency()
 if 'CONFIG_LIBISCSI' in config_host
@@ -228,6 +229,11 @@ if have_tools
   subdir('contrib/rdmacm-mux')
   subdir('contrib/elf2dmp')
 
+  if xkbcommon.found()
+    executable('qemu-keymap', files('qemu-keymap.c', 'ui/input-keymap.c'),
+               dependencies: [qemuutil, xkbcommon], install: true)
+  endif
+
   if 'CONFIG_VHOST_USER' in config_host
     subdir('contrib/libvhost-user')
     subdir('contrib/vhost-user-blk')
Signature · 1 line
1.8.3.1
#25 lore raw

PATCH v3 25/132 meson: add qemu-edid

In reply to Paolo Bonzini

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

---
 Makefile    | 2 --
 configure   | 2 +-
 meson.build | 3 +++
 3 files changed, 4 insertions(+), 3 deletions(-)
Makefile +0 -2
index fe4df0d..6a888b0 100644
@@ -372,8 +372,6 @@ qemu-img$(EXESUF): qemu-img.o $(authz-obj-y) $(block-obj-y) $(crypto-obj-y) $(io
 qemu-nbd$(EXESUF): qemu-nbd.o $(authz-obj-y) $(block-obj-y) $(crypto-obj-y) $(io-obj-y) $(qom-obj-y) $(COMMON_LDADDS)
 qemu-io$(EXESUF): qemu-io.o $(authz-obj-y) $(block-obj-y) $(crypto-obj-y) $(io-obj-y) $(qom-obj-y) $(COMMON_LDADDS)
 
-qemu-edid$(EXESUF): qemu-edid.o hw/display/edid-generate.o $(COMMON_LDADDS)
-
 fsdev/virtfs-proxy-helper$(EXESUF): fsdev/virtfs-proxy-helper.o fsdev/9p-marshal.o fsdev/9p-iov-marshal.o $(COMMON_LDADDS)
 fsdev/virtfs-proxy-helper$(EXESUF): LIBS += -lcap
 
configure +1 -1
index d05c0de..0b294bb 100755
@@ -6041,7 +6041,7 @@ fi
 
 tools=""
 if test "$want_tools" = "yes" ; then
-  tools="qemu-img\$(EXESUF) qemu-io\$(EXESUF) qemu-edid\$(EXESUF) $tools"
+  tools="qemu-img\$(EXESUF) qemu-io\$(EXESUF) $tools"
   if [ "$linux" = "yes" -o "$bsd" = "yes" -o "$solaris" = "yes" ] ; then
     tools="qemu-nbd\$(EXESUF) $tools"
   fi
meson.build +3 -0
index 14a8a9a..e5b0e31 100644
@@ -234,6 +234,9 @@ if have_tools
                dependencies: [qemuutil, xkbcommon], install: true)
   endif
 
+  executable('qemu-edid', files('qemu-edid.c', 'hw/display/edid-generate.c'),
+             dependencies: qemuutil)
+
   if 'CONFIG_VHOST_USER' in config_host
     subdir('contrib/libvhost-user')
     subdir('contrib/vhost-user-blk')
Signature · 1 line
1.8.3.1
#26 lore raw

PATCH v3 26/132 meson: add virtfs-proxy-helper

In reply to Paolo Bonzini

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

---
 Makefile          | 3 ---
 configure         | 6 ++++--
 fsdev/meson.build | 4 ++++
 meson.build       | 6 ++++++
 4 files changed, 14 insertions(+), 5 deletions(-)
 create mode 100644 fsdev/meson.build
Makefile +0 -3
index 6a888b0..9110115 100644
@@ -372,9 +372,6 @@ qemu-img$(EXESUF): qemu-img.o $(authz-obj-y) $(block-obj-y) $(crypto-obj-y) $(io
 qemu-nbd$(EXESUF): qemu-nbd.o $(authz-obj-y) $(block-obj-y) $(crypto-obj-y) $(io-obj-y) $(qom-obj-y) $(COMMON_LDADDS)
 qemu-io$(EXESUF): qemu-io.o $(authz-obj-y) $(block-obj-y) $(crypto-obj-y) $(io-obj-y) $(qom-obj-y) $(COMMON_LDADDS)
 
-fsdev/virtfs-proxy-helper$(EXESUF): fsdev/virtfs-proxy-helper.o fsdev/9p-marshal.o fsdev/9p-iov-marshal.o $(COMMON_LDADDS)
-fsdev/virtfs-proxy-helper$(EXESUF): LIBS += -lcap
-
 scsi/qemu-pr-helper$(EXESUF): scsi/qemu-pr-helper.o scsi/utils.o $(authz-obj-y) $(crypto-obj-y) $(io-obj-y) $(qom-obj-y) $(COMMON_LDADDS)
 ifdef CONFIG_MPATH
 scsi/qemu-pr-helper$(EXESUF): LIBS += -ludev -lmultipath -lmpathpersist
configure +4 -2
index 0b294bb..ca91a76 100755
@@ -3969,6 +3969,7 @@ fi
 ##########################################
 # attr probe
 
+libattr_libs=
 if test "$attr" != "no" ; then
   cat > $TMPC <<EOF
 #include <stdio.h>
@@ -3985,7 +3986,8 @@ EOF
   # Older distros have <attr/xattr.h>, and need -lattr:
   elif compile_prog "-DCONFIG_LIBATTR" "-lattr" ; then
     attr=yes
-    LIBS="-lattr $LIBS"
+    libattr_libs="-lattr"
+    LIBS="$libattr_libs $LIBS"
     libattr=yes
   else
     if test "$attr" = "yes" ; then
@@ -6050,7 +6052,6 @@ if test "$softmmu" = yes ; then
   if test "$linux" = yes; then
     if test "$virtfs" != no && test "$cap_ng" = yes && test "$attr" = yes ; then
       virtfs=yes
-      tools="$tools fsdev/virtfs-proxy-helper\$(EXESUF)"
     else
       if test "$virtfs" = yes; then
         error_exit "VirtFS requires libcap devel and libattr devel"
@@ -6833,6 +6834,7 @@ if test "$linux_aio" = "yes" ; then
 fi
 if test "$attr" = "yes" ; then
   echo "CONFIG_ATTR=y" >> $config_host_mak
+  echo "LIBATTR_LIBS=$libattr_libs" >> $config_host_mak
 fi
 if test "$libattr" = "yes" ; then
   echo "CONFIG_LIBATTR=y" >> $config_host_mak
fsdev/meson.build new file +4 -0
new file mode 100644
index 0000000..eee8507
@@ -0,0 +1,4 @@
+if have_tools and libattr.found() and libcap_ng.found() and 'CONFIG_VIRTFS' in config_host
+  executable('virtfs-proxy-helper', files('virtfs-proxy-helper.c', '9p-marshal.c', '9p-iov-marshal.c'),
+             dependencies: [qemuutil, libattr, libcap_ng])
+endif
meson.build +6 -0
index e5b0e31..b53c2dc 100644
@@ -56,6 +56,10 @@ if 'CONFIG_GNUTLS' in config_host
 endif
 pixman = declare_dependency(compile_args: config_host['PIXMAN_CFLAGS'].split(),
                             link_args: config_host['PIXMAN_LIBS'].split())
+libattr = declare_dependency()
+if 'CONFIG_ATTR' in config_host
+  libattr = declare_dependency(link_args: config_host['LIBATTR_LIBS'].split())
+endif
 libcap_ng = declare_dependency()
 if 'CONFIG_LIBCAP_NG' in config_host
   libcap_ng = declare_dependency(link_args: config_host['LIBCAP_NG_LIBS'].split())
@@ -220,6 +224,8 @@ libqemuutil = static_library('qemuutil',
 qemuutil = declare_dependency(link_with: libqemuutil,
                               sources: version_res)
 
+subdir('fsdev')
+
 # Other build targets
 if 'CONFIG_GUEST_AGENT' in config_host
   subdir('qga')
Signature · 1 line
1.8.3.1
#27 lore raw

PATCH v3 27/132 meson: keymap-gen

In reply to Paolo Bonzini

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

---
 Makefile       | 38 --------------------------------------
 meson.build    |  1 +
 ui/meson.build | 34 ++++++++++++++++++++++++++++++++++
 3 files changed, 35 insertions(+), 38 deletions(-)
 create mode 100644 ui/meson.build
Makefile +0 -38
index 9110115..d4ebbbf 100644
@@ -116,44 +116,6 @@ generated-files-y += module_block.h
 
 generated-files-y += .git-submodule-status
 
-KEYCODEMAP_GEN = $(SRC_PATH)/ui/keycodemapdb/tools/keymap-gen
-KEYCODEMAP_CSV = $(SRC_PATH)/ui/keycodemapdb/data/keymaps.csv
-
-KEYCODEMAP_FILES = \
-		 ui/input-keymap-atset1-to-qcode.c \
-		 ui/input-keymap-linux-to-qcode.c \
-		 ui/input-keymap-qcode-to-atset1.c \
-		 ui/input-keymap-qcode-to-atset2.c \
-		 ui/input-keymap-qcode-to-atset3.c \
-		 ui/input-keymap-qcode-to-linux.c \
-		 ui/input-keymap-qcode-to-qnum.c \
-		 ui/input-keymap-qcode-to-sun.c \
-		 ui/input-keymap-qnum-to-qcode.c \
-		 ui/input-keymap-usb-to-qcode.c \
-		 ui/input-keymap-win32-to-qcode.c \
-		 ui/input-keymap-x11-to-qcode.c \
-		 ui/input-keymap-xorgevdev-to-qcode.c \
-		 ui/input-keymap-xorgkbd-to-qcode.c \
-		 ui/input-keymap-xorgxquartz-to-qcode.c \
-		 ui/input-keymap-xorgxwin-to-qcode.c \
-		 ui/input-keymap-osx-to-qcode.c \
-		 $(NULL)
-
-generated-files-$(CONFIG_SOFTMMU) += $(KEYCODEMAP_FILES)
-
-ui/input-keymap-%.c: $(KEYCODEMAP_GEN) $(KEYCODEMAP_CSV) $(SRC_PATH)/ui/Makefile.objs
-	$(call quiet-command,\
-	    stem=$* && src=$${stem%-to-*} dst=$${stem#*-to-} && \
-	    test -e $(KEYCODEMAP_GEN) && \
-	    $(PYTHON) $(KEYCODEMAP_GEN) \
-	          --lang glib2 \
-	          --varname qemu_input_map_$${src}_to_$${dst} \
-	          code-map $(KEYCODEMAP_CSV) $${src} $${dst} \
-	        > $@ || rm -f $@, "GEN", "$@")
-
-$(KEYCODEMAP_GEN): .git-submodule-status
-$(KEYCODEMAP_CSV): .git-submodule-status
-
 edk2-decompressed = $(basename $(wildcard pc-bios/edk2-*.fd.bz2))
 pc-bios/edk2-%.fd: pc-bios/edk2-%.fd.bz2
 	$(call quiet-command,bzip2 -d -c $< > $@,"BUNZIP2",$<)
meson.build +1 -0
index b53c2dc..8a4a90b 100644
@@ -211,6 +211,7 @@ subdir('stubs')
 subdir('trace')
 subdir('util')
 subdir('crypto')
+subdir('ui')
 
 # Build targets from sourcesets
 
ui/meson.build new file +34 -0
new file mode 100644
index 0000000..cad9763
@@ -0,0 +1,34 @@
+keymap_gen = find_program('keycodemapdb/tools/keymap-gen')
+
+keymaps = [
+  ['atset1', 'qcode'],
+  ['linux', 'qcode'],
+  ['qcode', 'atset1'],
+  ['qcode', 'atset2'],
+  ['qcode', 'atset3'],
+  ['qcode', 'linux'],
+  ['qcode', 'qnum'],
+  ['qcode', 'sun'],
+  ['qnum', 'qcode'],
+  ['usb', 'qcode'],
+  ['win32', 'qcode'],
+  ['x11', 'qcode'],
+  ['xorgevdev', 'qcode'],
+  ['xorgkbd', 'qcode'],
+  ['xorgxquartz', 'qcode'],
+  ['xorgxwin', 'qcode'],
+  ['osx', 'qcode'],
+]
+
+foreach e : keymaps
+  output = 'input-keymap-@0@-to-@[email protected]'.format(e[0], e[1])
+  custom_target(output,
+                output: output,
+                capture: true,
+                build_by_default: true, # to be removed when added to a target
+                input: files('keycodemapdb/data/keymaps.csv'),
+                command: [keymap_gen,
+                          '--lang', 'glib2',
+                          '--varname', 'qemu_input_map_@0@_to_@1@'.format(e[0], e[1]),
+                          'code-map', '@INPUT0@', e[0], e[1]])
+endforeach
Signature · 1 line
1.8.3.1
#28 lore raw

PATCH v3 28/132 meson: generate qemu-version.h

In reply to Paolo Bonzini

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

---
 Makefile                | 27 +--------------------------
 meson.build             | 10 ++++++++++
 scripts/qemu-version.sh | 25 +++++++++++++++++++++++++
 3 files changed, 36 insertions(+), 26 deletions(-)
 create mode 100755 scripts/qemu-version.sh
Makefile +1 -26
index d4ebbbf..5d0be7b 100644
@@ -96,21 +96,7 @@ include $(SRC_PATH)/rules.mak
 # lor is defined in rules.mak
 CONFIG_BLOCK := $(call lor,$(CONFIG_SOFTMMU),$(CONFIG_TOOLS))
 
-# Create QEMU_PKGVERSION and FULL_VERSION strings
-# If PKGVERSION is set, use that; otherwise get version and -dirty status from git
-QEMU_PKGVERSION := $(if $(PKGVERSION),$(PKGVERSION),$(shell \
-  cd $(SRC_PATH); \
-  if test -e .git; then \
-    git describe --match 'v*' 2>/dev/null | tr -d '\n'; \
-    if ! git diff-index --quiet HEAD &>/dev/null; then \
-      echo "-dirty"; \
-    fi; \
-  fi))
-
-# Either "version (pkgversion)", or just "version" if pkgversion not set
-FULL_VERSION := $(if $(QEMU_PKGVERSION),$(VERSION) ($(QEMU_PKGVERSION)),$(VERSION))
-
-generated-files-y = qemu-version.h config-host.h qemu-options.def
+generated-files-y = config-host.h qemu-options.def
 
 generated-files-y += module_block.h
 
@@ -233,17 +219,6 @@ include $(SRC_PATH)/tests/Makefile.include
 
 all: $(DOCS) $(if $(BUILD_DOCS),sphinxdocs) $(TOOLS) $(HELPERS-y) recurse-all modules $(vhost-user-json-y)
 
-qemu-version.h: FORCE
-	$(call quiet-command, \
-                (printf '#define QEMU_PKGVERSION "$(QEMU_PKGVERSION)"\n'; \
-		printf '#define QEMU_FULL_VERSION "$(FULL_VERSION)"\n'; \
-		) > [email protected])
-	$(call quiet-command, if ! cmp -s $@ [email protected]; then \
-	  mv [email protected] $@; \
-	 else \
-	  rm [email protected]; \
-	 fi)
-
 config-host.h: config-host.h-timestamp
 config-host.h-timestamp: config-host.mak
 qemu-options.def: $(SRC_PATH)/qemu-options.hx $(SRC_PATH)/scripts/hxtool
meson.build +10 -0
index 8a4a90b..6d4bf27 100644
@@ -18,6 +18,16 @@ add_project_link_arguments(config_host['QEMU_LDFLAGS'].split(),
 add_project_arguments(config_host['QEMU_INCLUDES'].split(),
                       language: ['c', 'cpp'])
 
+qemu_version_cmd = [find_program('scripts/qemu-version.sh'),
+                    meson.current_source_dir(),
+                    config_host['PKGVERSION'], config_host['VERSION']]
+qemu_version = custom_target('QEMU version',
+                             output: 'qemu-version.h',
+                             command: qemu_version_cmd,
+                             capture: true,
+                             build_by_default: true,
+                             build_always_stale: true)
+
 configure_file(input: files('scripts/ninjatool.py'),
                output: 'ninjatool',
                configuration: config_host)
scripts/qemu-version.sh new file +25 -0
new file mode 100755
index 0000000..4847385
@@ -0,0 +1,25 @@
+#!/bin/sh
+
+set -eu
+
+dir="$1"
+pkgversion="$2"
+version="$3"
+
+if [ -z "$pkgversion"]; then
+    cd "$dir"
+    if [ -e .git ]; then
+        pkgversion=$(git describe --match 'v*' --dirty | echo "")
+    fi
+fi
+
+if [ -n "$pkgversion" ]; then
+    fullversion="$version ($pkgversion)"
+else
+    fullversion="$version"
+fi
+
+cat <<EOF
+#define QEMU_PKGVERSION "$pkgversion"
+#define QEMU_FULL_VERSION "$fullversion"
+EOF
Signature · 1 line
1.8.3.1
#29 lore raw

PATCH v3 29/132 meson: generate shader headers

In reply to Paolo Bonzini

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

---
 Makefile              | 18 ------------------
 meson.build           |  1 +
 ui/meson.build        |  2 ++
 ui/shader/meson.build | 15 +++++++++++++++
 4 files changed, 18 insertions(+), 18 deletions(-)
 create mode 100644 ui/shader/meson.build
Makefile +0 -18
index 5d0be7b..472962d 100644
@@ -582,24 +582,6 @@ cscope:
 	find "$(SRC_PATH)/" -name "*.[chsS]" -print | sed 's,^\./,,' > "$(SRC_PATH)/cscope.files"
 	cscope -b -i"$(SRC_PATH)/cscope.files"
 
-# opengl shader programs
-ui/shader/%-vert.h: $(SRC_PATH)/ui/shader/%.vert $(SRC_PATH)/scripts/shaderinclude.pl
-	@mkdir -p $(dir $@)
-	$(call quiet-command,\
-		perl $(SRC_PATH)/scripts/shaderinclude.pl $< > $@,\
-		"VERT","$@")
-
-ui/shader/%-frag.h: $(SRC_PATH)/ui/shader/%.frag $(SRC_PATH)/scripts/shaderinclude.pl
-	@mkdir -p $(dir $@)
-	$(call quiet-command,\
-		perl $(SRC_PATH)/scripts/shaderinclude.pl $< > $@,\
-		"FRAG","$@")
-
-ui/shader.o: $(SRC_PATH)/ui/shader.c \
-	ui/shader/texture-blit-vert.h \
-	ui/shader/texture-blit-flip-vert.h \
-	ui/shader/texture-blit-frag.h
-
 # documentation
 MAKEINFO=makeinfo
 MAKEINFOINCLUDES= -I docs -I $(<D) -I $(@D)
meson.build +1 -0
index 6d4bf27..447a32c 100644
@@ -113,6 +113,7 @@ have_block = have_system or have_tools
 
 # Generators
 
+shaderinclude = find_program('scripts/shaderinclude.pl')
 qapi_gen = find_program('scripts/qapi-gen.py')
 qapi_gen_depends = [ meson.source_root() / 'scripts/qapi/events.py',
                      meson.source_root() / 'scripts/qapi/introspect.py',
ui/meson.build +2 -0
index cad9763..8157754 100644
@@ -32,3 +32,5 @@ foreach e : keymaps
                           '--varname', 'qemu_input_map_@0@_to_@1@'.format(e[0], e[1]),
                           'code-map', '@INPUT0@', e[0], e[1]])
 endforeach
+
+subdir('shader')
ui/shader/meson.build new file +15 -0
new file mode 100644
index 0000000..26c7a18
@@ -0,0 +1,15 @@
+shaders = [
+  ['texture-blit', 'frag'],
+  ['texture-blit', 'vert'],
+  ['texture-blit-flip', 'vert'],
+]
+
+foreach e : shaders
+  output = '@0@-@[email protected]'.format(e[0], e[1])
+  custom_target(output,
+                output: output,
+                capture: true,
+                build_by_default: true, # to be removed when added to a target
+                input: files('@0@.@1@'.format(e[0], e[1])),
+                command: [shaderinclude, '@INPUT0@'])
+endforeach
Signature · 1 line
1.8.3.1
#30 lore raw

PATCH v3 30/132 meson: generate hxtool files

In reply to Paolo Bonzini

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

---
 Makefile        | 19 +------------------
 Makefile.target |  6 ------
 meson.build     | 35 +++++++++++++++++++++++++++++++++++
 scripts/hxtool  |  2 +-
 4 files changed, 37 insertions(+), 25 deletions(-)
 mode change 100644 => 100755 scripts/hxtool
Makefile +1 -18
index 472962d..7588467 100644
@@ -96,7 +96,7 @@ include $(SRC_PATH)/rules.mak
 # lor is defined in rules.mak
 CONFIG_BLOCK := $(call lor,$(CONFIG_SOFTMMU),$(CONFIG_TOOLS))
 
-generated-files-y = config-host.h qemu-options.def
+generated-files-y = config-host.h
 
 generated-files-y += module_block.h
 
@@ -221,8 +221,6 @@ all: $(DOCS) $(if $(BUILD_DOCS),sphinxdocs) $(TOOLS) $(HELPERS-y) recurse-all mo
 
 config-host.h: config-host.h-timestamp
 config-host.h-timestamp: config-host.mak
-qemu-options.def: $(SRC_PATH)/qemu-options.hx $(SRC_PATH)/scripts/hxtool
-	$(call quiet-command,sh $(SRC_PATH)/scripts/hxtool -h < $< > $@,"GEN","$@")
 
 TARGET_DIRS_RULES := $(foreach t, all clean install, $(addsuffix /$(t), $(TARGET_DIRS)))
 
@@ -314,9 +312,6 @@ ifdef CONFIG_MPATH
 scsi/qemu-pr-helper$(EXESUF): LIBS += -ludev -lmultipath -lmpathpersist
 endif
 
-qemu-img-cmds.h: $(SRC_PATH)/qemu-img-cmds.hx $(SRC_PATH)/scripts/hxtool
-	$(call quiet-command,sh $(SRC_PATH)/scripts/hxtool -h < $< > $@,"GEN","$@")
-
 ifneq ($(EXESUF),)
 .PHONY: qga/qemu-ga
 qga/qemu-ga: qga/qemu-ga$(EXESUF) $(QGA_VSS_PROVIDER) $(QEMU_GA_MSI)
@@ -629,18 +624,6 @@ $(MANUAL_BUILDDIR)/interop/index.html: $(call manual-deps,interop)
 $(MANUAL_BUILDDIR)/specs/index.html: $(call manual-deps,specs)
 	$(call build-manual,specs)
 
-qemu-options.texi: $(SRC_PATH)/qemu-options.hx $(SRC_PATH)/scripts/hxtool
-	$(call quiet-command,sh $(SRC_PATH)/scripts/hxtool -t < $< > $@,"GEN","$@")
-
-qemu-monitor.texi: $(SRC_PATH)/hmp-commands.hx $(SRC_PATH)/scripts/hxtool
-	$(call quiet-command,sh $(SRC_PATH)/scripts/hxtool -t < $< > $@,"GEN","$@")
-
-qemu-monitor-info.texi: $(SRC_PATH)/hmp-commands-info.hx $(SRC_PATH)/scripts/hxtool
-	$(call quiet-command,sh $(SRC_PATH)/scripts/hxtool -t < $< > $@,"GEN","$@")
-
-qemu-img-cmds.texi: $(SRC_PATH)/qemu-img-cmds.hx $(SRC_PATH)/scripts/hxtool
-	$(call quiet-command,sh $(SRC_PATH)/scripts/hxtool -t < $< > $@,"GEN","$@")
-
 docs/interop/qemu-qmp-qapi.texi: qapi/qapi-doc.texi
 	@cp -p $< $@
 
Makefile.target +0 -6
index c5af974..1f19d68 100644
@@ -210,12 +210,6 @@ 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)$@")
 
-hmp-commands.h: $(SRC_PATH)/hmp-commands.hx $(SRC_PATH)/scripts/hxtool
-	$(call quiet-command,sh $(SRC_PATH)/scripts/hxtool -h < $< > $@,"GEN","$(TARGET_DIR)$@")
-
-hmp-commands-info.h: $(SRC_PATH)/hmp-commands-info.hx $(SRC_PATH)/scripts/hxtool
-	$(call quiet-command,sh $(SRC_PATH)/scripts/hxtool -h < $< > $@,"GEN","$(TARGET_DIR)$@")
-
 clean: clean-target
 	rm -f *.a *~ $(PROGS)
 	rm -f $(shell find . -name '*.[od]')
meson.build +35 -0
index 447a32c..de5a26e 100644
@@ -113,6 +113,7 @@ have_block = have_system or have_tools
 
 # Generators
 
+hxtool = find_program('scripts/hxtool')
 shaderinclude = find_program('scripts/shaderinclude.pl')
 qapi_gen = find_program('scripts/qapi-gen.py')
 qapi_gen_depends = [ meson.source_root() / 'scripts/qapi/events.py',
@@ -123,6 +124,40 @@ qapi_gen_depends = [ meson.source_root() / 'scripts/qapi/events.py',
                      meson.source_root() / 'scripts/qapi/doc.py',
                      meson.source_root() / 'scripts/qapi-gen.py' ]
 
+hxdep = []
+hx_headers = [
+  ['qemu-options.hx', 'qemu-options.def'],
+  ['qemu-img-cmds.hx', 'qemu-img-cmds.h'],
+]
+if have_system
+  hx_headers += [
+    ['hmp-commands.hx', 'hmp-commands.h'],
+    ['hmp-commands-info.hx', 'hmp-commands-info.h'],
+  ]
+endif
+foreach d : hx_headers
+  custom_target(d[1],
+                input: files(d[0]),
+                output: d[1],
+                capture: true,
+                build_by_default: true, # to be removed when added to a target
+                command: [hxtool, '-h', '@INPUT0@'])
+endforeach
+
+foreach d : [
+  ['qemu-options.hx', 'qemu-options.texi'],
+  ['hmp-commands.hx', 'qemu-monitor.texi'],
+  ['hmp-commands-info.hx', 'qemu-monitor-info.texi'],
+  ['qemu-img-cmds.hx', 'qemu-img-cmds.texi'],
+]
+  custom_target(d[1],
+                input: files(d[0]),
+                output: d[1],
+                capture: true,
+                build_by_default: true, # to be removed when added to a target
+                command: [hxtool, '-t', '@INPUT0@'])
+endforeach
+
 # Collect sourcesets.
 
 util_ss = ss.source_set()
scripts/hxtool +1 -1
old mode 100644
new mode 100755
index 7d7c428..27cbab5
@@ -64,6 +64,6 @@ case "$1" in
 "-h") hxtoh ;;
 "-t") hxtotexi ;;
 *) exit 1 ;;
-esac
+esac < "$2"
 
 exit 0
Signature · 1 line
1.8.3.1
#31 lore raw

PATCH v3 31/132 meson: configure 50-qemu-gpu.json

In reply to Paolo Bonzini

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

---
 Makefile                           | 7 +------
 contrib/vhost-user-gpu/meson.build | 5 +++++
 rules.mak                          | 7 -------
 3 files changed, 6 insertions(+), 13 deletions(-)
Makefile +1 -6
index 7588467..0a6615c 100644
@@ -118,13 +118,8 @@ $(call set-vpath, $(SRC_PATH))
 
 LIBS+=-lz $(LIBS_TOOLS)
 
-vhost-user-json-y =
 HELPERS-y =
 
-ifeq ($(CONFIG_LINUX)$(CONFIG_VIRGL)$(CONFIG_GBM)$(CONFIG_TOOLS),yyyy)
-vhost-user-json-y += contrib/vhost-user-gpu/50-qemu-gpu.json
-endif
-
 ifdef BUILD_DOCS
 DOCS=qemu-doc.html qemu-doc.txt qemu.1 qemu-img.1 qemu-nbd.8 qemu-ga.8
 DOCS+=docs/interop/qemu-qmp-ref.html docs/interop/qemu-qmp-ref.txt docs/interop/qemu-qmp-ref.7
@@ -217,7 +212,7 @@ dummy := $(call unnest-vars,, \
 
 include $(SRC_PATH)/tests/Makefile.include
 
-all: $(DOCS) $(if $(BUILD_DOCS),sphinxdocs) $(TOOLS) $(HELPERS-y) recurse-all modules $(vhost-user-json-y)
+all: $(DOCS) $(if $(BUILD_DOCS),sphinxdocs) $(TOOLS) $(HELPERS-y) recurse-all modules
 
 config-host.h: config-host.h-timestamp
 config-host.h-timestamp: config-host.mak
contrib/vhost-user-gpu/meson.build +5 -0
index 8778aa7..7303b6d 100644
@@ -2,4 +2,9 @@ if 'CONFIG_VIRGL' in config_host and 'CONFIG_GBM' in config_host
   executable('vhost-user-gpu', files('main.c', 'virgl.c', 'vugbm.c'),
              link_with: libvhost_user,
              dependencies: [qemuutil, pixman, gbm, virgl])
+
+  configure_file(input: '50-qemu-gpu.json.in',
+                 output: '50-qemu-gpu.json',
+                 configuration: config_host,
+                 install_dir: config_host['qemu_datadir'] / 'vhost-user')
 endif
rules.mak +0 -7
index fa9960c..5289184 100644
@@ -393,10 +393,3 @@ TEXI2MAN = $(call quiet-command, \
 	$(call TEXI2MAN)
 %.8:
 	$(call TEXI2MAN)
-
-GEN_SUBST = $(call quiet-command, \
-	sed -e "s!@libexecdir@!$(libexecdir)!g" < $< > $@, \
-	"GEN","$@")
-
-%.json: %.json.in
-	$(call GEN_SUBST)
Signature · 1 line
1.8.3.1
#32 lore raw

PATCH v3 32/132 meson: uncompress edk2 bios

In reply to Paolo Bonzini

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

---
 Makefile            |  4 ----
 meson.build         |  2 ++
 pc-bios/meson.build | 21 +++++++++++++++++++++
 3 files changed, 23 insertions(+), 4 deletions(-)
 create mode 100644 pc-bios/meson.build
Makefile +0 -4
index 0a6615c..b880265 100644
@@ -103,9 +103,6 @@ generated-files-y += module_block.h
 generated-files-y += .git-submodule-status
 
 edk2-decompressed = $(basename $(wildcard pc-bios/edk2-*.fd.bz2))
-pc-bios/edk2-%.fd: pc-bios/edk2-%.fd.bz2
-	$(call quiet-command,bzip2 -d -c $< > $@,"BUNZIP2",$<)
-
 # Don't try to regenerate Makefile or configure
 # We don't generate any of them
 Makefile: ;
@@ -226,7 +223,6 @@ $(SOFTMMU_ALL_RULES): $(chardev-obj-y)
 $(SOFTMMU_ALL_RULES): $(crypto-obj-y)
 $(SOFTMMU_ALL_RULES): $(io-obj-y)
 $(SOFTMMU_ALL_RULES): config-all-devices.mak
-$(SOFTMMU_ALL_RULES): $(edk2-decompressed)
 
 .PHONY: $(TARGET_DIRS_RULES)
 # The $(TARGET_DIRS_RULES) are of the form SUBDIR/GOAL, so that
meson.build +2 -0
index de5a26e..00c0767 100644
@@ -312,3 +312,5 @@ if have_tools
     subdir('contrib/ivshmem-server')
   endif
 endif
+
+subdir('pc-bios')
pc-bios/meson.build new file +21 -0
new file mode 100644
index 0000000..5524b95
@@ -0,0 +1,21 @@
+bzip2 = find_program('bzip2')
+
+fds = [
+  'edk2-aarch64-code.fd',
+  'edk2-arm-code.fd',
+  'edk2-arm-vars.fd',
+  'edk2-i386-code.fd',
+  'edk2-i386-secure-code.fd',
+  'edk2-i386-vars.fd',
+  'edk2-x86_64-code.fd',
+  'edk2-x86_64-secure-code.fd',
+]
+
+foreach f : fds
+  custom_target(f,
+                output: f,
+                input: '@[email protected]'.format(f),
+                capture: true,
+                build_by_default: true,
+                command: [ bzip2, '-dc', '@INPUT0@' ])
+endforeach
Signature · 1 line
1.8.3.1
#33 lore raw

Re: [PATCH 032/132] meson: uncompress edk2 bios

Quoted 49 lines · Paolo Bonzini

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

---
  Makefile            |  4 ----
  meson.build         |  2 ++
  pc-bios/meson.build | 21 +++++++++++++++++++++
  3 files changed, 23 insertions(+), 4 deletions(-)

create mode 100644 pc-bios/meson.build

Makefile +0 -4
index 0a6615c..b880265 100644
@@ -103,9 +103,6 @@ generated-files-y += module_block.h
  generated-files-y += .git-submodule-status
 
  edk2-decompressed = $(basename $(wildcard pc-bios/edk2-*.fd.bz2))
-pc-bios/edk2-%.fd: pc-bios/edk2-%.fd.bz2
-	$(call quiet-command,bzip2 -d -c $< > $@,"BUNZIP2",$<)
-
  # Don't try to regenerate Makefile or configure
  # We don't generate any of them
  Makefile: ;
@@ -226,7 +223,6 @@ $(SOFTMMU_ALL_RULES): $(chardev-obj-y)
  $(SOFTMMU_ALL_RULES): $(crypto-obj-y)
  $(SOFTMMU_ALL_RULES): $(io-obj-y)
  $(SOFTMMU_ALL_RULES): config-all-devices.mak
-$(SOFTMMU_ALL_RULES): $(edk2-decompressed)
 
  .PHONY: $(TARGET_DIRS_RULES)
  # The $(TARGET_DIRS_RULES) are of the form SUBDIR/GOAL, so that
meson.build +2 -0
index de5a26e..00c0767 100644
@@ -312,3 +312,5 @@ if have_tools
      subdir('contrib/ivshmem-server')
    endif
  endif
+
+subdir('pc-bios')
pc-bios/meson.build new file +0 -0
new file mode 100644
index 0000000..5524b95

pc-bios/meson.build line 6

Quoted 6 lines
pc-bios/meson.build new file +6 -0
@@ -0,0 +1,21 @@
+bzip2 = find_program('bzip2')
+
+fds = [
+  'edk2-aarch64-code.fd',
+  'edk2-arm-code.fd',
+  'edk2-arm-vars.fd',

Can we split this in 2 arrays ...

pc-bios/meson.build line 13

Quoted 7 lines
pc-bios/meson.build new file +7 -0
+  'edk2-i386-code.fd',
+  'edk2-i386-secure-code.fd',
+  'edk2-i386-vars.fd',
+  'edk2-x86_64-code.fd',
+  'edk2-x86_64-secure-code.fd',
+]
+

... then for each array ...

pc-bios/meson.build line 19

Quoted 6 lines
pc-bios/meson.build new file +6 -0
+foreach f : fds
+  custom_target(f,
+                output: f,
+                input: '@[email protected]'.format(f),
+                capture: true,
+                build_by_default: true,

... use:

build_by_default: if 'i386' in target_arch

                    or if 'x86_64' in target_arch,

Ah, different that this patch intent, so for later.

Quoted 3 lines
pc-bios/meson.build new file +2 -0
+                command: [ bzip2, '-dc', '@INPUT0@' ])
+endforeach
Reviewed-by on v3 32/132
#34 lore raw

Re: [PATCH 032/132] meson: uncompress edk2 bios

In reply to Paolo Bonzini
Quoted 53 lines · Paolo Bonzini

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

---
  Makefile            |  4 ----
  meson.build         |  2 ++
  pc-bios/meson.build | 21 +++++++++++++++++++++
  3 files changed, 23 insertions(+), 4 deletions(-)

create mode 100644 pc-bios/meson.build

Makefile +0 -4
index 0a6615c..b880265 100644
@@ -103,9 +103,6 @@ generated-files-y += module_block.h
  generated-files-y += .git-submodule-status
 
  edk2-decompressed = $(basename $(wildcard pc-bios/edk2-*.fd.bz2))
-pc-bios/edk2-%.fd: pc-bios/edk2-%.fd.bz2
-	$(call quiet-command,bzip2 -d -c $< > $@,"BUNZIP2",$<)
-
  # Don't try to regenerate Makefile or configure
  # We don't generate any of them
  Makefile: ;
@@ -226,7 +223,6 @@ $(SOFTMMU_ALL_RULES): $(chardev-obj-y)
  $(SOFTMMU_ALL_RULES): $(crypto-obj-y)
  $(SOFTMMU_ALL_RULES): $(io-obj-y)
  $(SOFTMMU_ALL_RULES): config-all-devices.mak
-$(SOFTMMU_ALL_RULES): $(edk2-decompressed)
 
  .PHONY: $(TARGET_DIRS_RULES)
  # The $(TARGET_DIRS_RULES) are of the form SUBDIR/GOAL, so that
meson.build +2 -0
index de5a26e..00c0767 100644
@@ -312,3 +312,5 @@ if have_tools
      subdir('contrib/ivshmem-server')
    endif
  endif
+
+subdir('pc-bios')
pc-bios/meson.build new file +4 -0
new file mode 100644
index 0000000..5524b95
@@ -0,0 +1,21 @@
+bzip2 = find_program('bzip2')
+
+fds = [
+  'edk2-aarch64-code.fd',

pc-bios/meson.build line 14

Quoted 10 lines
pc-bios/meson.build new file +10 -0
+  'edk2-arm-code.fd',
+  'edk2-arm-vars.fd',
+  'edk2-i386-code.fd',
+  'edk2-i386-secure-code.fd',
+  'edk2-i386-vars.fd',
+  'edk2-x86_64-code.fd',
+  'edk2-x86_64-secure-code.fd',
+]
+
+foreach f : fds

Can strip space between f/column.

Quoted 8 lines
pc-bios/meson.build new file +7 -0
+  custom_target(f,
+                output: f,
+                input: '@[email protected]'.format(f),
+                capture: true,
+                build_by_default: true,
+                command: [ bzip2, '-dc', '@INPUT0@' ])
+endforeach
#35 lore raw

Re: [PATCH 032/132] meson: uncompress edk2 bios

Quoted 2 lines · Philippe Mathieu-Daudé
Quoted 1 line

+foreach f : fds

Can strip space between f/column.

Could, but it seems like other meson.build files usually leave a space in.

Paolo

#36 lore raw

PATCH v3 33/132 build-sys hack: link with whole .fa archives

In reply to Paolo Bonzini

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

In order to link the *-obj-y files into tests, we will make static libraries of them in Meson, and then link them as whole archives into the tests. To separate regular static libraries from link-whole libraries, give them a different file extension.

---
 rules.mak | 18 +++++++++++++-----
 1 file changed, 13 insertions(+), 5 deletions(-)
rules.mak +13 -5
index 5289184..a10a972 100644
@@ -39,6 +39,13 @@ find-symbols = $(if $1, $(sort $(shell $(NM) -P -g $1 | $2)))
 defined-symbols = $(call find-symbols,$1,awk '$$2!="U"{print $$1}')
 undefined-symbols = $(call find-symbols,$1,awk '$$2=="U"{print $$1}')
 
+WL := -Wl,
+ifdef CONFIG_DARWIN
+whole-archive = $(WL)-force_load,$1
+else
+whole-archive = $(WL)--whole-archive $1 $(WL)--no-whole-archive
+endif
+
 # All the .mo objects in -m variables are also added into corresponding -y
 # variable in unnest-vars, but filtered out here, when LINK is called.
 #
@@ -54,11 +61,12 @@ undefined-symbols = $(call find-symbols,$1,awk '$$2=="U"{print $$1}')
 # This is necessary because the exectuable itself may not use the function, in
 # which case the function would not be linked in. Then the DSO loading will
 # fail because of the missing symbol.
-process-archive-undefs = $(filter-out %.a %.mo,$1) \
+process-archive-undefs = $(filter-out %.a %.fa %.mo,$1) \
                 $(addprefix $(WL_U), \
-                     $(filter $(call defined-symbols,$(filter %.a, $1)), \
+                     $(filter $(call defined-symbols,$(filter %.a %.fa, $1)), \
                               $(call undefined-symbols,$(filter %.mo,$1)))) \
-                $(filter %.a,$1)
+		$(foreach l,$(filter %.fa,$1),$(call whole-archive,$l)) \
+		$(filter %.a,$1)
 
 extract-libs = $(strip $(foreach o,$(filter-out %.mo,$1),$($o-libs)))
 expand-objs = $(strip $(sort $(filter %.o,$1)) \
@@ -122,7 +130,7 @@ LD_REL := $(CC) -nostdlib $(LD_REL_FLAGS)
 modules:
 
 %$(EXESUF): %.o
-	$(call LINK,$(filter %.o %.a %.mo, $^))
+	$(call LINK,$(filter %.o %.a %.mo %.fa, $^))
 
 %.a:
 	$(call quiet-command,rm -f $@ && $(AR) rcs $@ $^,"AR","$(TARGET_DIR)$@")
@@ -378,7 +386,7 @@ define unnest-vars
                 $(error $o added in $v but $o-objs is not set)))
         $(shell mkdir -p ./ $(sort $(dir $($v))))
         # Include all the .d files
-        $(eval -include $(patsubst %.o,%.d,$(patsubst %.mo,%.d,$($v))))
+        $(eval -include $(patsubst %.o,%.d,$(patsubst %.mo,%.d,$(filter %.o,$($v)))))
         $(eval $v := $(filter-out %/,$($v))))
 endef
 
Signature · 1 line
1.8.3.1
#37 lore raw

PATCH v3 34/132 meson: convert qom directory to Meson

In reply to Paolo Bonzini

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

---
 Makefile               |  2 +-
 Makefile.objs          |  4 ++--
 Makefile.target        |  3 ++-
 meson.build            |  1 +
 qom/Makefile.objs      |  3 ---
 qom/meson.build        | 15 +++++++++++++++
 tests/Makefile.include |  2 +-
 7 files changed, 22 insertions(+), 8 deletions(-)
 create mode 100644 qom/meson.build
Makefile +1 -1
index b880265..9e9b2cf 100644
@@ -202,7 +202,6 @@ dummy := $(call unnest-vars,, \
                 block-obj-y \
                 block-obj-m \
                 crypto-obj-y \
-                qom-obj-y \
                 io-obj-y \
                 common-obj-y \
                 common-obj-m)
@@ -222,6 +221,7 @@ $(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
 
 .PHONY: $(TARGET_DIRS_RULES)
Makefile.objs +2 -2
index 38e3604..b695319 100644
@@ -24,9 +24,9 @@ block-obj-m = block/
 crypto-obj-y = crypto/
 
 #######################################################################
-# qom-obj-y is code used by both qemu system emulation and qemu-img
+# libraries built entirely from meson
 
-qom-obj-y = qom/
+qom-obj-y = qom/libqom.fa
 
 #######################################################################
 # io-obj-y is code used by both qemu system emulation and qemu-img
Makefile.target +2 -1
index 1f19d68..df3b14a 100644
@@ -176,13 +176,14 @@ dummy := $(call unnest-vars,,obj-y)
 all-obj-y := $(obj-y)
 
 include $(SRC_PATH)/Makefile.objs
+dummy := $(call fix-paths,../,, \
+              qom-obj-y)
 dummy := $(call unnest-vars,.., \
                authz-obj-y \
                block-obj-y \
                block-obj-m \
                chardev-obj-y \
                crypto-obj-y \
-               qom-obj-y \
                io-obj-y \
                common-obj-y \
                common-obj-m)
meson.build +1 -0
index 00c0767..36094fe 100644
@@ -271,6 +271,7 @@ libqemuutil = static_library('qemuutil',
 qemuutil = declare_dependency(link_with: libqemuutil,
                               sources: version_res)
 
+subdir('qom')
 subdir('fsdev')
 
 # Other build targets
qom/Makefile.objs +0 -3
index f9d7735..fc1248e 100644
@@ -1,4 +1 @@
-qom-obj-y = object.o container.o qom-qobject.o
-qom-obj-y += object_interfaces.o
-
 common-obj-$(CONFIG_SOFTMMU) += qom-hmp-cmds.o qom-qmp-cmds.o
qom/meson.build new file +15 -0
new file mode 100644
index 0000000..3c41ed3
@@ -0,0 +1,15 @@
+qom_ss = ss.source_set()
+qom_ss.add(files(
+  'container.c',
+  'object.c',
+  'object_interfaces.c',
+  'qom-qobject.c',
+))
+
+qom_ss = qom_ss.apply(config_host, strict: false)
+libqom = static_library('qom', qom_ss.sources(),
+                        dependencies: [qom_ss.dependencies()],
+                        link_with: [libqemuutil],
+                        name_suffix: 'fa')
+
+qom = declare_dependency(link_whole: libqom)
tests/Makefile.include +1 -1
index 9fd6a48..659f087 100644
@@ -498,7 +498,7 @@ QEMU_CFLAGS += -I$(SRC_PATH)/tests
 
 # Deps that are common to various different sets of tests below
 test-util-obj-y = libqemuutil.a
-test-qom-obj-y = $(qom-obj-y) $(test-util-obj-y)
+test-qom-obj-y = qom/libqom.fa $(test-util-obj-y)
 test-qapi-obj-y = tests/test-qapi-types.o \
 	tests/include/test-qapi-types-sub-module.o \
 	tests/test-qapi-types-sub-sub-module.o \
Signature · 1 line
1.8.3.1
#38 lore raw

PATCH v3 35/132 meson: convert authz directory to Meson

In reply to Paolo Bonzini

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

---
 Makefile            |  1 -
 Makefile.objs       |  8 +++-----
 Makefile.target     |  2 +-
 authz/Makefile.objs |  7 -------
 authz/meson.build   | 20 ++++++++++++++++++++
 meson.build         |  5 +++++
 6 files changed, 29 insertions(+), 14 deletions(-)
 delete mode 100644 authz/Makefile.objs
 create mode 100644 authz/meson.build
Makefile +0 -1
index 9e9b2cf..4da605e 100644
@@ -197,7 +197,6 @@ include $(SRC_PATH)/Makefile.objs
 endif
 
 dummy := $(call unnest-vars,, \
-                authz-obj-y \
                 chardev-obj-y \
                 block-obj-y \
                 block-obj-m \
Makefile.objs +3 -5
index b695319..9201eca 100644
@@ -3,11 +3,6 @@
 chardev-obj-y = chardev/
 
 #######################################################################
-# authz-obj-y is code used by both qemu system emulation and qemu-img
-
-authz-obj-y = authz/
-
-#######################################################################
 # block-obj-y is code used by both qemu system emulation and qemu-img
 
 block-obj-y = nbd/
@@ -26,6 +21,9 @@ crypto-obj-y = crypto/
 #######################################################################
 # libraries built entirely from meson
 
+authz-obj-y = authz/libauthz.fa
+authz/libauthz.fa-libs = $(if $(CONFIG_AUTH_PAM),-lpam)
+
 qom-obj-y = qom/libqom.fa
 
 #######################################################################
Makefile.target +1 -1
index df3b14a..d243e52 100644
@@ -177,9 +177,9 @@ all-obj-y := $(obj-y)
 
 include $(SRC_PATH)/Makefile.objs
 dummy := $(call fix-paths,../,, \
+              authz-obj-y \
               qom-obj-y)
 dummy := $(call unnest-vars,.., \
-               authz-obj-y \
                block-obj-y \
                block-obj-m \
                chardev-obj-y \
authz/Makefile.objs deleted +0 -7
deleted file mode 100644
index ed7b273..0000000
@@ -1,7 +0,0 @@
-authz-obj-y += base.o
-authz-obj-y += simple.o
-authz-obj-y += list.o
-authz-obj-y += listfile.o
-authz-obj-$(CONFIG_AUTH_PAM) += pamacct.o
-
-pamacct.o-libs = -lpam
authz/meson.build new file +20 -0
new file mode 100644
index 0000000..a3de3d0
@@ -0,0 +1,20 @@
+authz_ss = ss.source_set()
+authz_ss.add(genh)
+authz_ss.add(files(
+  'base.c',
+  'list.c',
+  'listfile.c',
+  'simple.c',
+))
+
+authz_ss.add(when: ['CONFIG_AUTH_PAM', pam], if_true: files('pamacct.c'))
+
+authz_ss = authz_ss.apply(config_host, strict: false)
+libauthz = static_library('authz', authz_ss.sources(),
+                          dependencies: [qom, authz_ss.dependencies()],
+                          name_suffix: 'fa',
+                          build_by_default: false)
+
+authz = declare_dependency(link_whole: libauthz)
+
+softmmu_ss.add(authz)
meson.build +5 -0
index 36094fe..9ae2699 100644
@@ -66,6 +66,10 @@ if 'CONFIG_GNUTLS' in config_host
 endif
 pixman = declare_dependency(compile_args: config_host['PIXMAN_CFLAGS'].split(),
                             link_args: config_host['PIXMAN_LIBS'].split())
+pam = declare_dependency()
+if 'CONFIG_AUTH_PAM' in config_host
+  pam = cc.find_library('pam')
+endif
 libattr = declare_dependency()
 if 'CONFIG_ATTR' in config_host
   libattr = declare_dependency(link_args: config_host['LIBATTR_LIBS'].split())
@@ -272,6 +276,7 @@ qemuutil = declare_dependency(link_with: libqemuutil,
                               sources: version_res)
 
 subdir('qom')
+subdir('authz')
 subdir('fsdev')
 
 # Other build targets
Signature · 1 line
1.8.3.1
#39 lore raw

PATCH v3 36/132 meson: convert crypto directory to Meson

In reply to Paolo Bonzini

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

---
 Makefile             |  1 -
 Makefile.objs        |  7 ++-----
 Makefile.target      |  2 +-
 crypto/Makefile.objs | 34 ----------------------------------
 crypto/meson.build   | 49 +++++++++++++++++++++++++++++++++++++++++++++++++
 meson.build          |  4 ++--
 qom/meson.build      |  2 +-
 7 files changed, 55 insertions(+), 44 deletions(-)
 delete mode 100644 crypto/Makefile.objs
Makefile +0 -1
index 4da605e..d070335 100644
@@ -200,7 +200,6 @@ dummy := $(call unnest-vars,, \
                 chardev-obj-y \
                 block-obj-y \
                 block-obj-m \
-                crypto-obj-y \
                 io-obj-y \
                 common-obj-y \
                 common-obj-m)
Makefile.objs +2 -5
index 9201eca..a5dd228 100644
@@ -14,16 +14,13 @@ block-obj-$(CONFIG_REPLICATION) += replication.o
 block-obj-m = block/
 
 #######################################################################
-# crypto-obj-y is code used by both qemu system emulation and qemu-img
-
-crypto-obj-y = crypto/
-
-#######################################################################
 # libraries built entirely from meson
 
 authz-obj-y = authz/libauthz.fa
 authz/libauthz.fa-libs = $(if $(CONFIG_AUTH_PAM),-lpam)
 
+crypto-obj-y = crypto/libcrypto.fa
+
 qom-obj-y = qom/libqom.fa
 
 #######################################################################
Makefile.target +1 -1
index d243e52..d8a6491 100644
@@ -178,12 +178,12 @@ all-obj-y := $(obj-y)
 include $(SRC_PATH)/Makefile.objs
 dummy := $(call fix-paths,../,, \
               authz-obj-y \
+              crypto-obj-y \
               qom-obj-y)
 dummy := $(call unnest-vars,.., \
                block-obj-y \
                block-obj-m \
                chardev-obj-y \
-               crypto-obj-y \
                io-obj-y \
                common-obj-y \
                common-obj-m)
crypto/Makefile.objs deleted +0 -34
deleted file mode 100644
index 3587f41..0000000
@@ -1,34 +0,0 @@
-crypto-obj-y = init.o
-crypto-obj-y += hash.o
-crypto-obj-$(CONFIG_NETTLE) += hash-nettle.o
-crypto-obj-$(if $(CONFIG_NETTLE),n,$(CONFIG_GCRYPT)) += hash-gcrypt.o
-crypto-obj-$(if $(CONFIG_NETTLE),n,$(if $(CONFIG_GCRYPT),n,y)) += hash-glib.o
-crypto-obj-y += hmac.o
-crypto-obj-$(CONFIG_NETTLE) += hmac-nettle.o
-crypto-obj-$(CONFIG_GCRYPT_HMAC) += hmac-gcrypt.o
-crypto-obj-$(if $(CONFIG_NETTLE),n,$(if $(CONFIG_GCRYPT_HMAC),n,y)) += hmac-glib.o
-crypto-obj-y += aes.o
-crypto-obj-y += desrfb.o
-crypto-obj-y += cipher.o
-crypto-obj-$(CONFIG_AF_ALG) += afalg.o
-crypto-obj-$(CONFIG_AF_ALG) += cipher-afalg.o
-crypto-obj-$(CONFIG_AF_ALG) += hash-afalg.o
-crypto-obj-y += tlscreds.o
-crypto-obj-y += tlscredsanon.o
-crypto-obj-y += tlscredspsk.o
-crypto-obj-y += tlscredsx509.o
-crypto-obj-y += tlssession.o
-crypto-obj-y += secret.o
-crypto-obj-y += pbkdf.o
-crypto-obj-$(CONFIG_NETTLE) += pbkdf-nettle.o
-crypto-obj-$(if $(CONFIG_NETTLE),n,$(CONFIG_GCRYPT)) += pbkdf-gcrypt.o
-crypto-obj-$(if $(CONFIG_NETTLE),n,$(if $(CONFIG_GCRYPT),n,y)) += pbkdf-stub.o
-crypto-obj-y += ivgen.o
-crypto-obj-y += ivgen-essiv.o
-crypto-obj-y += ivgen-plain.o
-crypto-obj-y += ivgen-plain64.o
-crypto-obj-y += afsplit.o
-crypto-obj-y += xts.o
-crypto-obj-y += block.o
-crypto-obj-y += block-qcow.o
-crypto-obj-y += block-luks.o
crypto/meson.build +49 -0

52 lines not on this page · raw message

meson.build +2 -2
index 9ae2699..e8bd526 100644
@@ -260,6 +260,8 @@ subdir('qobject')
 subdir('stubs')
 subdir('trace')
 subdir('util')
+subdir('qom')
+subdir('authz')
 subdir('crypto')
 subdir('ui')
 
@@ -275,8 +277,6 @@ libqemuutil = static_library('qemuutil',
 qemuutil = declare_dependency(link_with: libqemuutil,
                               sources: version_res)
 
-subdir('qom')
-subdir('authz')
 subdir('fsdev')
 
 # Other build targets
qom/meson.build +1 -1
index 3c41ed3..4af044d 100644
@@ -1,4 +1,5 @@
 qom_ss = ss.source_set()
+qom_ss.add(genh)
 qom_ss.add(files(
   'container.c',
   'object.c',
@@ -9,7 +10,6 @@ qom_ss.add(files(
 qom_ss = qom_ss.apply(config_host, strict: false)
 libqom = static_library('qom', qom_ss.sources(),
                         dependencies: [qom_ss.dependencies()],
-                        link_with: [libqemuutil],
                         name_suffix: 'fa')
 
 qom = declare_dependency(link_whole: libqom)
Signature · 1 line
1.8.3.1
#40 lore raw

PATCH v3 37/132 meson: convert io directory to Meson

In reply to Paolo Bonzini

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

---
 Makefile         |  1 -
 Makefile.objs    |  7 ++-----
 Makefile.target  |  2 +-
 io/Makefile.objs | 12 ------------
 io/meson.build   | 25 +++++++++++++++++++++++++
 meson.build      |  1 +
 6 files changed, 29 insertions(+), 19 deletions(-)
 delete mode 100644 io/Makefile.objs
 create mode 100644 io/meson.build
Makefile +0 -1
index d070335..77ac1ea 100644
@@ -200,7 +200,6 @@ dummy := $(call unnest-vars,, \
                 chardev-obj-y \
                 block-obj-y \
                 block-obj-m \
-                io-obj-y \
                 common-obj-y \
                 common-obj-m)
 
Makefile.objs +2 -5
index a5dd228..75d4355c 100644
@@ -21,12 +21,9 @@ authz/libauthz.fa-libs = $(if $(CONFIG_AUTH_PAM),-lpam)
 
 crypto-obj-y = crypto/libcrypto.fa
 
-qom-obj-y = qom/libqom.fa
-
-#######################################################################
-# io-obj-y is code used by both qemu system emulation and qemu-img
+io-obj-y = io/libio.fa
 
-io-obj-y = io/
+qom-obj-y = qom/libqom.fa
 
 ######################################################################
 # Target independent part of system emulation. The long term path is to
Makefile.target +1 -1
index d8a6491..f912ba0 100644
@@ -179,12 +179,12 @@ include $(SRC_PATH)/Makefile.objs
 dummy := $(call fix-paths,../,, \
               authz-obj-y \
               crypto-obj-y \
+              io-obj-y \
               qom-obj-y)
 dummy := $(call unnest-vars,.., \
                block-obj-y \
                block-obj-m \
                chardev-obj-y \
-               io-obj-y \
                common-obj-y \
                common-obj-m)
 all-obj-y += $(common-obj-y)
io/Makefile.objs deleted +0 -12
deleted file mode 100644
index 9a20fce..0000000
@@ -1,12 +0,0 @@
-io-obj-y = channel.o
-io-obj-y += channel-buffer.o
-io-obj-y += channel-command.o
-io-obj-y += channel-file.o
-io-obj-y += channel-socket.o
-io-obj-y += channel-tls.o
-io-obj-y += channel-watch.o
-io-obj-y += channel-websock.o
-io-obj-y += channel-util.o
-io-obj-y += dns-resolver.o
-io-obj-y += net-listener.o
-io-obj-y += task.o
io/meson.build new file +25 -0
new file mode 100644
index 0000000..5737709
@@ -0,0 +1,25 @@
+io_ss = ss.source_set()
+io_ss.add(genh)
+io_ss.add(files(
+  'channel-buffer.c',
+  'channel-command.c',
+  'channel-file.c',
+  'channel-socket.c',
+  'channel-tls.c',
+  'channel-util.c',
+  'channel-watch.c',
+  'channel-websock.c',
+  'channel.c',
+  'dns-resolver.c',
+  'net-listener.c',
+  'task.c',
+))
+
+io_ss = io_ss.apply(config_host, strict: false)
+libio = static_library('io', io_ss.sources(),
+                       dependencies: [crypto, qom, io_ss.dependencies()],
+                       link_with: libqemuutil,
+                       name_suffix: 'fa',
+                       build_by_default: false)
+
+io = declare_dependency(link_whole: libio)
meson.build +1 -0
index e8bd526..bdc2f3e 100644
@@ -277,6 +277,7 @@ libqemuutil = static_library('qemuutil',
 qemuutil = declare_dependency(link_with: libqemuutil,
                               sources: version_res)
 
+subdir('io')
 subdir('fsdev')
 
 # Other build targets
Signature · 1 line
1.8.3.1
#41 lore raw

PATCH v3 38/132 meson: infrastructure for building emulators

In reply to Paolo Bonzini

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

---
 Makefile              |  72 +++-----------------
 Makefile.target       |  19 +++---
 configure             |   6 --
 hw/i386/pc.c          |   2 +-
 hw/i386/pc_piix.c     |   2 +-
 include/qemu/osdep.h  |   2 +-
 meson.build           | 182 +++++++++++++++++++++++++++++++++++++++++++++++++-
 rules.mak             |   8 ---
 scripts/create_config |   2 +
 scripts/grepy.sh      |   3 +
 scripts/minikconf.py  |   1 +
 11 files changed, 207 insertions(+), 92 deletions(-)
 create mode 100755 scripts/grepy.sh
 mode change 100644 => 100755 scripts/minikconf.py
Makefile +9 -63
index 77ac1ea..bae96ec 100644
@@ -134,63 +134,6 @@ DOCS=
 endif
 
 SUBDIR_MAKEFLAGS=$(if $(V),,--no-print-directory --quiet) BUILD_DIR=$(BUILD_DIR)
-SUBDIR_DEVICES_MAK=$(patsubst %, %/config-devices.mak, $(filter %-softmmu, $(TARGET_DIRS)))
-SUBDIR_DEVICES_MAK_DEP=$(patsubst %, %.d, $(SUBDIR_DEVICES_MAK))
-
-ifeq ($(SUBDIR_DEVICES_MAK),)
-config-all-devices.mak: config-host.mak
-	$(call quiet-command,echo '# no devices' > $@,"GEN","$@")
-else
-config-all-devices.mak: $(SUBDIR_DEVICES_MAK) config-host.mak
-	$(call quiet-command, sed -n \
-             's|^\([^=]*\)=\(.*\)$$|\1:=$$(findstring y,$$(\1)\2)|p' \
-             $(SUBDIR_DEVICES_MAK) | sort -u > $@, \
-             "GEN","$@")
-endif
-
--include $(SUBDIR_DEVICES_MAK_DEP)
-
-# This has to be kept in sync with Kconfig.host.
-MINIKCONF_ARGS = \
-    $(CONFIG_MINIKCONF_MODE) \
-    $@ $*/config-devices.mak.d $< $(MINIKCONF_INPUTS) \
-    CONFIG_KVM=$(CONFIG_KVM) \
-    CONFIG_SPICE=$(CONFIG_SPICE) \
-    CONFIG_IVSHMEM=$(CONFIG_IVSHMEM) \
-    CONFIG_TPM=$(CONFIG_TPM) \
-    CONFIG_XEN=$(CONFIG_XEN) \
-    CONFIG_OPENGL=$(CONFIG_OPENGL) \
-    CONFIG_X11=$(CONFIG_X11) \
-    CONFIG_VHOST_USER=$(CONFIG_VHOST_USER) \
-    CONFIG_VIRTFS=$(CONFIG_VIRTFS) \
-    CONFIG_LINUX=$(CONFIG_LINUX) \
-    CONFIG_PVRDMA=$(CONFIG_PVRDMA)
-
-MINIKCONF_INPUTS = $(SRC_PATH)/Kconfig.host $(SRC_PATH)/hw/Kconfig
-MINIKCONF = $(PYTHON) $(SRC_PATH)/scripts/minikconf.py \
-
-$(SUBDIR_DEVICES_MAK): %/config-devices.mak: default-configs/%.mak $(MINIKCONF_INPUTS) $(BUILD_DIR)/config-host.mak
-	$(call quiet-command, $(MINIKCONF) $(MINIKCONF_ARGS) > [email protected], "GEN", "[email protected]")
-	$(call quiet-command, if test -f $@; then \
-	  if cmp -s [email protected] $@; then \
-	    mv [email protected] $@; \
-	    cp -p $@ [email protected]; \
-	  else \
-	    if test -f [email protected]; then \
-	      echo "WARNING: $@ (user modified) out of date.";\
-	    else \
-	      echo "WARNING: $@ out of date.";\
-	    fi; \
-	    echo "Run \"$(MAKE) defconfig\" to regenerate."; \
-	    rm [email protected]; \
-	  fi; \
-	 else \
-	  mv [email protected] $@; \
-	  cp -p $@ [email protected]; \
-	 fi,"GEN","$@");
-
-defconfig:
-	rm -f config-all-devices.mak $(SUBDIR_DEVICES_MAK)
 
 ifneq ($(wildcard config-host.mak),)
 include $(SRC_PATH)/Makefile.objs
@@ -207,10 +150,9 @@ include $(SRC_PATH)/tests/Makefile.include
 
 all: $(DOCS) $(if $(BUILD_DOCS),sphinxdocs) $(TOOLS) $(HELPERS-y) recurse-all modules
 
-config-host.h: config-host.h-timestamp
-config-host.h-timestamp: config-host.mak
-
 TARGET_DIRS_RULES := $(foreach t, all clean install, $(addsuffix /$(t), $(TARGET_DIRS)))
+SUBDIR_RULES=$(patsubst %,subdir-%, $(TARGET_DIRS))
+SOFTMMU_SUBDIR_RULES=$(filter %-softmmu,$(SUBDIR_RULES))
 
 SOFTMMU_ALL_RULES=$(filter %-softmmu/all, $(TARGET_DIRS_RULES))
 $(SOFTMMU_ALL_RULES): $(authz-obj-y)
@@ -221,10 +163,15 @@ $(SOFTMMU_ALL_RULES): $(io-obj-y)
 $(SOFTMMU_ALL_RULES): $(qom-obj-y)
 $(SOFTMMU_ALL_RULES): config-all-devices.mak
 
+# 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
-$(TARGET_DIRS_RULES):
+$(TARGET_DIRS_RULES): $(TARGET_DEPS)
 	$(call quiet-command,$(MAKE) $(SUBDIR_MAKEFLAGS) -C $(dir $@) V="$(V)" TARGET_DIR="$(dir $@)" $(notdir $@),)
 
 DTC_MAKE_ARGS=-I$(SRC_PATH)/dtc VPATH=$(SRC_PATH)/dtc -C dtc V="$(V)" LIBFDT_srcdir=$(SRC_PATH)/dtc/libfdt
@@ -356,8 +303,7 @@ endef
 distclean: clean
 	rm -f config-host.mak config-host.h* config-host.ld $(DOCS) qemu-options.texi qemu-img-cmds.texi qemu-monitor.texi qemu-monitor-info.texi
 	rm -f tests/tcg/config-*.mak
-	rm -f config-all-devices.mak config-all-disas.mak config.status
-	rm -f $(SUBDIR_DEVICES_MAK)
+	rm -f config-all-disas.mak config.status
 	rm -f po/*.mo tests/qemu-iotests/common.env
 	rm -f roms/seabios/config.mak roms/vgabios/config.mak
 	rm -f qemu-doc.info qemu-doc.aux qemu-doc.cp qemu-doc.cps
Makefile.target +9 -10
index f912ba0..74e8295 100644
@@ -6,8 +6,10 @@ include ../config-host.mak
 include config-target.mak
 include $(SRC_PATH)/rules.mak
 
+FULL_TARGET_NAME=$(TARGET_NAME)-$(if $(CONFIG_SOFTMMU),softmmu,linux-user)
+
 ifdef CONFIG_SOFTMMU
-include config-devices.mak
+include ../$(FULL_TARGET_NAME)-config-devices.mak
 endif
 
 $(call set-vpath, $(SRC_PATH):$(BUILD_DIR))
@@ -18,6 +20,9 @@ QEMU_CFLAGS += -iquote .. -iquote $(SRC_PATH)/target/$(TARGET_BASE_ARCH) -DNEED_
 
 QEMU_CFLAGS+=-iquote $(SRC_PATH)/include
 
+QEMU_CFLAGS += -DCONFIG_TARGET=\"../$(FULL_TARGET_NAME)-config-target.h\"
+QEMU_CFLAGS += -DCONFIG_DEVICES=\"../$(FULL_TARGET_NAME)-config-devices.h\"
+
 ifdef CONFIG_USER_ONLY
 # user emulator name
 QEMU_PROG=qemu-$(TARGET_NAME)
@@ -36,15 +41,10 @@ QEMU_PROG_BUILD = $(QEMU_PROG)
 endif
 endif
 
+LIBQEMU = ../libqemu-$(FULL_TARGET_NAME).fa
 PROGS=$(QEMU_PROG) $(QEMU_PROGW)
 STPFILES=
 
-config-target.h: config-target.h-timestamp
-config-target.h-timestamp: config-target.mak
-
-config-devices.h: config-devices.h-timestamp
-config-devices.h-timestamp: config-devices.mak
-
 ifdef CONFIG_TRACE_SYSTEMTAP
 stap: $(QEMU_PROG).stp-installed $(QEMU_PROG).stp $(QEMU_PROG)-simpletrace.stp $(QEMU_PROG)-log.stp
 
@@ -103,6 +103,7 @@ all: $(PROGS) stap
 # Dummy command so that make thinks it has done something
 	@true
 
+obj-y += $(LIBQEMU)
 obj-y += trace/
 
 #########################################################
@@ -168,7 +169,6 @@ obj-y += hw/$(TARGET_BASE_ARCH)/
 endif
 
 generated-files-y += hmp-commands.h hmp-commands-info.h
-generated-files-y += config-devices.h
 
 endif # CONFIG_SOFTMMU
 
@@ -195,7 +195,7 @@ all-obj-$(CONFIG_SOFTMMU) += $(crypto-obj-y)
 all-obj-$(CONFIG_SOFTMMU) += $(io-obj-y)
 
 ifdef CONFIG_SOFTMMU
-$(QEMU_PROG_BUILD): config-devices.mak
+$(QEMU_PROG_BUILD): ../$(FULL_TARGET_NAME)-config-devices.mak
 endif
 
 COMMON_LDADDS = ../libqemuutil.a
@@ -231,5 +231,4 @@ ifdef CONFIG_TRACE_SYSTEMTAP
 	$(INSTALL_DATA) $(QEMU_PROG)-log.stp "$(DESTDIR)$(qemu_datadir)/../systemtap/tapset/$(QEMU_PROG)-log.stp"
 endif
 
-generated-files-y += config-target.h
 Makefile: $(generated-files-y)
configure +0 -6
index ca91a76..d65b79e 100755
@@ -7582,18 +7582,12 @@ fi
 
 if supported_xen_target $target; then
     echo "CONFIG_XEN=y" >> $config_target_mak
-    echo "$target/config-devices.mak: CONFIG_XEN=y" >> $config_host_mak
     if test "$xen_pci_passthrough" = yes; then
         echo "CONFIG_XEN_PCI_PASSTHROUGH=y" >> "$config_target_mak"
     fi
-else
-    echo "$target/config-devices.mak: CONFIG_XEN=n" >> $config_host_mak
 fi
 if supported_kvm_target $target; then
     echo "CONFIG_KVM=y" >> $config_target_mak
-    echo "$target/config-devices.mak: CONFIG_KVM=y" >> $config_host_mak
-else
-    echo "$target/config-devices.mak: CONFIG_KVM=n" >> $config_host_mak
 fi
 if supported_hax_target $target; then
     echo "CONFIG_HAX=y" >> $config_target_mak
hw/i386/pc.c +1 -1
index c14ed86..87aef3c 100644
@@ -86,7 +86,7 @@
 #include "hw/mem/memory-device.h"
 #include "sysemu/replay.h"
 #include "qapi/qmp/qerror.h"
-#include "config-devices.h"
+#include CONFIG_DEVICES
 
 /* debug PC/ISA interrupts */
 //#define DEBUG_IRQ
hw/i386/pc_piix.c +1 -1
index 2362675..46cfb16 100644
@@ -23,7 +23,7 @@
  */
 
 #include "qemu/osdep.h"
-#include "config-devices.h"
+#include CONFIG_DEVICES
 
 #include "qemu/units.h"
 #include "hw/loader.h"
include/qemu/osdep.h +1 -1
index af2b91f..280fd40 100644
@@ -29,7 +29,7 @@
 
 #include "config-host.h"
 #ifdef NEED_CPU_H
-#include "config-target.h"
+#include CONFIG_TARGET
 #else
 #include "exec/poison.h"
 #endif
meson.build +180 -2

227 lines not on this page · raw message

rules.mak +0 -8
index a10a972..9dd3b7e 100644
@@ -203,14 +203,6 @@ notempty = $(if $1,y,n)
 # Generate files with tracetool
 TRACETOOL=$(PYTHON) $(SRC_PATH)/scripts/tracetool.py
 
-# Generate timestamp files for .h include files
-
-config-%.h: config-%.h-timestamp
-	@cmp $< $@ >/dev/null 2>&1 || cp $< $@
-
-config-%.h-timestamp: config-%.mak $(SRC_PATH)/scripts/create_config
-	$(call quiet-command, sh $(SRC_PATH)/scripts/create_config < $< > $@,"GEN","$(TARGET_DIR)config-$*.h")
-
 .PHONY: clean-timestamp
 clean-timestamp:
 	rm -f *.timestamp
scripts/create_config +2 -0
index 6d8f08b..bc82661 100755
@@ -1,5 +1,7 @@
 #!/bin/sh
 
+test $# -gt 0 && exec < $1
+
 echo "/* Automatically generated by create_config - do not modify */"
 
 while read line; do
scripts/grepy.sh new file +3 -0
new file mode 100755
index 0000000..33c74c6
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+grep --no-filename '=y$' "$@" | sort -u
scripts/minikconf.py +1 -0
old mode 100644
new mode 100755
index febd9a4..e4cbd57
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
 #
 # Mini-Kconfig parser
 #
Signature · 1 line
1.8.3.1
#42 lore raw

PATCH v3 39/132 meson: add macos dependencies

In reply to Paolo Bonzini

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

There is no probing in configure, so no need to pass them as variables to meson. Do a regular meson dependency() instead.

---
 meson.build | 14 ++++++++++++--
 1 file changed, 12 insertions(+), 2 deletions(-)
meson.build +12 -2
index 5949e6d..8d5b28b 100644
@@ -9,7 +9,7 @@ config_all_disas = kconfig.load(meson.current_build_dir() / 'config-all-disas.ma
 add_project_arguments(config_host['CFLAGS'].split(),
                       language: ['c', 'objc'])
 add_project_arguments(config_host['QEMU_CFLAGS'].split(),
-                      language: 'c')
+                      language: ['c', 'objc'])
 add_project_arguments(config_host['QEMU_CXXFLAGS'].split(),
                       language: 'cpp')
 add_project_link_arguments(config_host['LDFLAGS'].split(),
@@ -17,7 +17,7 @@ add_project_link_arguments(config_host['LDFLAGS'].split(),
 add_project_link_arguments(config_host['QEMU_LDFLAGS'].split(),
                            language: ['c', 'cpp', 'objc'])
 add_project_arguments(config_host['QEMU_INCLUDES'].split(),
-                      language: ['c', 'cpp'])
+                      language: ['c', 'cpp', 'objc'])
 
 qemu_version_cmd = [find_program('scripts/qemu-version.sh'),
                     meson.current_source_dir(),
@@ -37,6 +37,10 @@ m = cc.find_library('m', required: false)
 util = cc.find_library('util', required: false)
 socket = []
 version_res = []
+coref = []
+iokit = []
+cocoa = []
+hvf = []
 if host_machine.system() == 'windows'
   socket = cc.find_library('ws2_32')
 
@@ -44,6 +48,12 @@ if host_machine.system() == 'windows'
   version_res = win.compile_resources('version.rc',
                                       depend_files: files('pc-bios/qemu-nsis.ico'),
                                       include_directories: include_directories('.'))
+elif host_machine.system() == 'darwin'
+  add_languages('objc', required: false)
+  coref = dependency('appleframeworks', modules: 'CoreFoundation')
+  iokit = dependency('appleframeworks', modules: 'IOKit')
+  cocoa = dependency('appleframeworks', modules: 'Cocoa')
+  hvf = dependency('appleframeworks', modules: 'Hypervisor')
 endif
 glib = declare_dependency(compile_args: config_host['GLIB_CFLAGS'].split(),
                           link_args: config_host['GLIB_LIBS'].split())
Signature · 1 line
1.8.3.1
#43 lore raw

PATCH v3 40/132 meson: add modules infrastructure

In reply to Paolo Bonzini

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

---
 Makefile            | 10 +---------
 Makefile.target     |  6 ++++++
 meson.build         | 53 +++++++++++++++++++++++++++++++++++++++++++++++++++++
 rules.mak           | 10 +++++-----
 scripts/undefsym.sh | 20 ++++++++++++++++++++
 5 files changed, 85 insertions(+), 14 deletions(-)
 create mode 100755 scripts/undefsym.sh
Makefile +1 -9
index bae96ec..c8c402a 100644
@@ -212,7 +212,7 @@ subdir-capstone: capstone/all
 subdir-slirp: slirp/all
 
 $(filter %/all, $(TARGET_DIRS_RULES)): libqemuutil.a $(common-obj-y) \
-	$(qom-obj-y)
+	$(qom-obj-y) block.syms qemu.syms
 
 ROM_DIRS = $(addprefix pc-bios/, $(ROMS))
 ROM_DIRS_RULES=$(foreach t, all clean, $(addsuffix /$(t), $(ROM_DIRS)))
@@ -431,14 +431,6 @@ install: all $(if $(BUILD_DOCS),install-doc) install-datadir install-localstated
 ifneq ($(TOOLS),)
 	$(call install-prog,$(TOOLS),$(DESTDIR)$(bindir))
 endif
-ifneq ($(CONFIG_MODULES),)
-	$(INSTALL_DIR) "$(DESTDIR)$(qemu_moddir)"
-	for s in $(modules-m:.mo=$(DSOSUF)); do \
-		t="$(DESTDIR)$(qemu_moddir)/$$(echo $$s | tr / -)"; \
-		$(INSTALL_LIB) $$s "$$t"; \
-		test -z "$(STRIP)" || $(STRIP) "$$t"; \
-	done
-endif
 ifneq ($(HELPERS-y),)
 	$(call install-prog,$(HELPERS-y),$(DESTDIR)$(libexecdir))
 endif
Makefile.target +6 -0
index 74e8295..a0eb332 100644
@@ -161,6 +161,12 @@ obj-y += memory_mapping.o
 obj-y += migration/ram.o
 LIBS := $(libs_softmmu) $(LIBS)
 
+# Temporary until emulators are linked by Meson
+LIBS := $(LIBS) @../block.syms @../qemu.syms
+ifneq ($(CONFIG_MODULES),y)
+LIBS := $(LIBS)
+endif
+
 # Hardware support
 ifeq ($(TARGET_NAME), sparc64)
 obj-y += hw/sparc64/
meson.build +53 -0

83 lines not on this page · raw message

rules.mak +5 -5
index 9dd3b7e..8571aec 100644
@@ -61,17 +61,17 @@ endif
 # This is necessary because the exectuable itself may not use the function, in
 # which case the function would not be linked in. Then the DSO loading will
 # fail because of the missing symbol.
-process-archive-undefs = $(filter-out %.a %.fa %.mo,$1) \
+process-archive-undefs = $(filter-out %.a %.fa %.mo %$(DSOSUF),$1) \
                 $(addprefix $(WL_U), \
                      $(filter $(call defined-symbols,$(filter %.a %.fa, $1)), \
-                              $(call undefined-symbols,$(filter %.mo,$1)))) \
+		$(call undefined-symbols,$(filter %.mo %$(DSOSUF),$1)))) \
 		$(foreach l,$(filter %.fa,$1),$(call whole-archive,$l)) \
 		$(filter %.a,$1)
 
-extract-libs = $(strip $(foreach o,$(filter-out %.mo,$1),$($o-libs)))
+extract-libs = $(strip $(foreach o,$(filter-out %.mo %$(DSOSUF),$1),$($o-libs)))
 expand-objs = $(strip $(sort $(filter %.o,$1)) \
-                  $(foreach o,$(filter %.mo,$1),$($o-objs)) \
-                  $(filter-out %.o %.mo,$1))
+		$(foreach o,$(filter %.mo %$(DSOSUF),$1),$($o-objs)) \
+		$(filter-out %.o %.mo %$(DSOSUF),$1))
 
 %.o: %.c
 	@mkdir -p $(dir $@)
scripts/undefsym.sh new file +20 -0
new file mode 100755
index 0000000..d4871f0
@@ -0,0 +1,20 @@
+#! /bin/bash
+
+# Before a shared module's DSO is produced, a static library is built for it
+# and passed to this script.  The script generates -Wl,-u options to force
+# the inclusion of symbol from libqemuutil.a if the shared modules need them,
+# This is necessary because the modules may use functions not needed by the
+# executable itself, which would cause the function to not be linked in.
+# Then the DSO loading would fail because of the missing symbol.
+
+if test $# -le 2; then
+  exit 0
+fi
+
+NM=$1
+staticlib=$2
+shift 2
+# Find symbols defined in static libraries and undefined in shared modules
+comm -12 \
+  <( $NM -P -g $staticlib | awk '$2!="U"{print "-Wl,-u," $1}' | sort -u) \
+  <( $NM -P -g "$@" | awk '$2=="U"{print "-Wl,-u," $1}' | sort -u)
Signature · 1 line
1.8.3.1
#44 lore raw

PATCH v3 41/132 meson: convert chardev directory to Meson (tools part)

In reply to Paolo Bonzini

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

---
 Makefile              |  1 -
 Makefile.objs         |  6 ++----
 Makefile.target       |  2 +-
 chardev/Makefile.objs | 19 -------------------
 chardev/meson.build   | 34 ++++++++++++++++++++++++++++++++++
 meson.build           |  1 +
 6 files changed, 38 insertions(+), 25 deletions(-)
 create mode 100644 chardev/meson.build
Makefile +0 -1
index c8c402a..42077ae 100644
@@ -140,7 +140,6 @@ include $(SRC_PATH)/Makefile.objs
 endif
 
 dummy := $(call unnest-vars,, \
-                chardev-obj-y \
                 block-obj-y \
                 block-obj-m \
                 common-obj-y \
Makefile.objs +2 -4
index 75d4355c..39e1d41 100644
@@ -1,8 +1,4 @@
 #######################################################################
-# chardev-obj-y is code used by both qemu system emulation and some tests
-chardev-obj-y = chardev/
-
-#######################################################################
 # block-obj-y is code used by both qemu system emulation and qemu-img
 
 block-obj-y = nbd/
@@ -19,6 +15,8 @@ block-obj-m = block/
 authz-obj-y = authz/libauthz.fa
 authz/libauthz.fa-libs = $(if $(CONFIG_AUTH_PAM),-lpam)
 
+chardev-obj-y = chardev/libchardev.fa
+
 crypto-obj-y = crypto/libcrypto.fa
 
 io-obj-y = io/libio.fa
Makefile.target +1 -1
index a0eb332..95823da 100644
@@ -184,13 +184,13 @@ all-obj-y := $(obj-y)
 include $(SRC_PATH)/Makefile.objs
 dummy := $(call fix-paths,../,, \
               authz-obj-y \
+              chardev-obj-y \
               crypto-obj-y \
               io-obj-y \
               qom-obj-y)
 dummy := $(call unnest-vars,.., \
                block-obj-y \
                block-obj-m \
-               chardev-obj-y \
                common-obj-y \
                common-obj-m)
 all-obj-y += $(common-obj-y)
chardev/Makefile.objs +0 -19
index d68e134..8049d82 100644
@@ -1,22 +1,3 @@
-chardev-obj-y += char.o
-chardev-obj-$(CONFIG_WIN32) += char-console.o
-chardev-obj-$(CONFIG_POSIX) += char-fd.o
-chardev-obj-y += char-fe.o
-chardev-obj-y += char-file.o
-chardev-obj-y += char-io.o
-chardev-obj-y += char-mux.o
-chardev-obj-y += char-null.o
-chardev-obj-$(CONFIG_POSIX) += char-parallel.o
-chardev-obj-y += char-pipe.o
-chardev-obj-$(CONFIG_POSIX) += char-pty.o
-chardev-obj-y += char-ringbuf.o
-chardev-obj-y += char-serial.o
-chardev-obj-y += char-socket.o
-chardev-obj-y += char-stdio.o
-chardev-obj-y += char-udp.o
-chardev-obj-$(CONFIG_WIN32) += char-win.o
-chardev-obj-$(CONFIG_WIN32) += char-win-stdio.o
-
 common-obj-y += msmouse.o wctablet.o testdev.o
 common-obj-$(CONFIG_BRLAPI) += baum.o
 baum.o-cflags := $(SDL_CFLAGS)
chardev/meson.build new file +34 -0
new file mode 100644
index 0000000..18850b3
@@ -0,0 +1,34 @@
+chardev_ss = ss.source_set()
+chardev_ss.add(files(
+  'char-fe.c',
+  'char-file.c',
+  'char-io.c',
+  'char-mux.c',
+  'char-null.c',
+  'char-pipe.c',
+  'char-ringbuf.c',
+  'char-serial.c',
+  'char-socket.c',
+  'char-stdio.c',
+  'char-udp.c',
+  'char.c',
+))
+chardev_ss.add(when: 'CONFIG_POSIX', if_true: files(
+  'char-fd.c',
+  'char-parallel.c',
+  'char-pty.c',
+))
+chardev_ss.add(when: 'CONFIG_WIN32', if_true: files(
+  'char-console.c',
+  'char-win-stdio.c',
+  'char-win.c',
+))
+
+chardev_ss = chardev_ss.apply(config_host, strict: false)
+libchardev = static_library('chardev', chardev_ss.sources(),
+                            dependencies: [crypto, io, qom],
+                            link_with: libqemuutil,
+                            name_suffix: 'fa',
+                            build_by_default: false)
+
+chardev = declare_dependency(link_with: libchardev)
meson.build +1 -0
index 3c292c6..b5aa6a2 100644
@@ -395,6 +395,7 @@ qemuutil = declare_dependency(link_with: libqemuutil,
                               sources: version_res)
 
 subdir('io')
+subdir('chardev')
 subdir('fsdev')
 
 mods = []
Signature · 1 line
1.8.3.1
#45 lore raw

PATCH v3 42/132 meson: convert block

In reply to Paolo Bonzini

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

---
 Makefile                        |   9 ----
 Makefile.objs                   |  30 +++++++++---
 Makefile.target                 |   3 +-
 block.c                         |   2 +-
 block/Makefile.objs             |  64 -------------------------
 block/meson.build               | 101 ++++++++++++++++++++++++++++++++++++++++
 configure                       |  10 ++--
 meson.build                     |  63 +++++++++++++++++++++++++
 nbd/Makefile.objs               |   1 -
 nbd/meson.build                 |   5 ++
 rules.mak                       |   3 +-
 scripts/modules/module_block.py |   0
 scsi/Makefile.objs              |   4 --
 scsi/meson.build                |   4 ++
 14 files changed, 206 insertions(+), 93 deletions(-)
 create mode 100644 block/meson.build
 delete mode 100644 nbd/Makefile.objs
 create mode 100644 nbd/meson.build
 mode change 100644 => 100755 scripts/modules/module_block.py
 delete mode 100644 scsi/Makefile.objs
 create mode 100644 scsi/meson.build
Makefile +0 -9
index 42077ae..cdd9d14 100644
@@ -98,8 +98,6 @@ CONFIG_BLOCK := $(call lor,$(CONFIG_SOFTMMU),$(CONFIG_TOOLS))
 
 generated-files-y = config-host.h
 
-generated-files-y += module_block.h
-
 generated-files-y += .git-submodule-status
 
 edk2-decompressed = $(basename $(wildcard pc-bios/edk2-*.fd.bz2))
@@ -140,8 +138,6 @@ include $(SRC_PATH)/Makefile.objs
 endif
 
 dummy := $(call unnest-vars,, \
-                block-obj-y \
-                block-obj-m \
                 common-obj-y \
                 common-obj-m)
 
@@ -251,11 +247,6 @@ ifneq ($(EXESUF),)
 qga/qemu-ga: qga/qemu-ga$(EXESUF) $(QGA_VSS_PROVIDER) $(QEMU_GA_MSI)
 endif
 
-module_block.h: $(SRC_PATH)/scripts/modules/module_block.py config-host.mak
-	$(call quiet-command,$(PYTHON) $< $@ \
-	$(addprefix $(SRC_PATH)/,$(patsubst %.mo,%.c,$(block-obj-m))), \
-	"GEN","$@")
-
 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 +23 -7
index 39e1d41..56d0c60 100644
@@ -1,13 +1,19 @@
 #######################################################################
 # block-obj-y is code used by both qemu system emulation and qemu-img
 
-block-obj-y = nbd/
-block-obj-y += block.o blockjob.o job.o
-block-obj-y += block/ scsi/
-block-obj-y += qemu-io-cmds.o
-block-obj-$(CONFIG_REPLICATION) += replication.o
-
-block-obj-m = block/
+block-obj-y += libblock.fa
+
+libblock.fa-libs = $(LIBNFS_LIBS)
+libblock.fa-libs += $(LIBISCSI_LIBS)
+libblock.fa-libs += $(CURL_LIBS)
+libblock.fa-libs += $(RBD_LIBS)
+libblock.fa-libs += $(GLUSTERFS_LIBS)
+libblock.fa-libs += $(VXHS_LIBS)
+libblock.fa-libs += $(LIBSSH_LIBS)
+libblock.fa-libs += $(BZIP2_LIBS)
+libblock.fa-libs += $(LZFSE_LIBS)
+libblock.fa-libs += $(if $(CONFIG_LINUX_AIO),-laio)
+libblock.fa-libs += $(LIBXML2_LIBS)
 
 #######################################################################
 # libraries built entirely from meson
@@ -43,6 +49,16 @@ common-obj-$(CONFIG_LINUX) += fsdev/
 
 common-obj-y += migration/
 
+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 += audio/
 common-obj-m += audio/
 common-obj-y += hw/
Makefile.target +1 -2
index 95823da..1cb7bc2 100644
@@ -184,13 +184,12 @@ all-obj-y := $(obj-y)
 include $(SRC_PATH)/Makefile.objs
 dummy := $(call fix-paths,../,, \
               authz-obj-y \
+              block-obj-y \
               chardev-obj-y \
               crypto-obj-y \
               io-obj-y \
               qom-obj-y)
 dummy := $(call unnest-vars,.., \
-               block-obj-y \
-               block-obj-m \
                common-obj-y \
                common-obj-m)
 all-obj-y += $(common-obj-y)
block.c +1 -1
index 874a29a..f69d6ef 100644
@@ -29,7 +29,7 @@
 #include "block/nbd.h"
 #include "block/qdict.h"
 #include "qemu/error-report.h"
-#include "module_block.h"
+#include "block/module_block.h"
 #include "qemu/main-loop.h"
 #include "qemu/module.h"
 #include "qapi/error.h"
block/Makefile.objs +0 -64

65 lines not on this page · raw message

block/meson.build new file +101 -0

101 lines not on this page · raw message

configure +7 -3
index d65b79e..7be08f3 100755
@@ -3711,7 +3711,8 @@ if test "$zlib" != "no" ; then
 int main(void) { zlibVersion(); return 0; }
 EOF
         if compile_prog "" "-lz" ; then
-            LIBS="$LIBS -lz"
+            zlib_libs=-lz
+            LIBS="$LIBS $zlib_libs"
         else
             error_exit "zlib check failed" \
                 "Make sure to have the zlib libs and headers installed."
@@ -6908,7 +6909,11 @@ fi
 if test "$posix_memalign" = "yes" ; then
   echo "CONFIG_POSIX_MEMALIGN=y" >> $config_host_mak
 fi
-
+if test "$zlib" != "no" ; then
+    echo "CONFIG_ZLIB=y" >> $config_host_mak
+    echo "ZLIB_CFLAGS=$zlib_cflags" >> $config_host_mak
+    echo "ZLIB_LIBS=$zlib_libs" >> $config_host_mak
+fi
 if test "$spice" = "yes" ; then
   echo "CONFIG_SPICE=y" >> $config_host_mak
 fi
@@ -7002,7 +7007,6 @@ if test "$qom_cast_debug" = "yes" ; then
 fi
 if test "$rbd" = "yes" ; then
   echo "CONFIG_RBD=m" >> $config_host_mak
-  echo "RBD_CFLAGS=$rbd_cflags" >> $config_host_mak
   echo "RBD_LIBS=$rbd_libs" >> $config_host_mak
 fi
 
meson.build +63 -0

93 lines not on this page · raw message

nbd/Makefile.objs deleted +0 -1
deleted file mode 100644
index eb3dd44..0000000
@@ -1 +0,0 @@
-block-obj-y += server.o client.o common.o
nbd/meson.build new file +5 -0
new file mode 100644
index 0000000..0c00a77
@@ -0,0 +1,5 @@
+block_ss.add(files(
+  'client.c',
+  'common.c',
+  'server.c',
+))
rules.mak +1 -2
index 8571aec..162ecb5 100644
@@ -374,8 +374,7 @@ define unnest-vars
             # Find all the .mo objects in variables and add dependency rules
             # according to .mo-objs. Report error if not set
             $(if $($o-objs),
-                $(eval $(o:%.mo=%$(DSOSUF)): module-common.o $($o-objs)),
-                $(error $o added in $v but $o-objs is not set)))
+                $(eval $(o:%.mo=%$(DSOSUF)): module-common.o $($o-objs))))
         $(shell mkdir -p ./ $(sort $(dir $($v))))
         # Include all the .d files
         $(eval -include $(patsubst %.o,%.d,$(patsubst %.mo,%.d,$(filter %.o,$($v)))))
scripts/modules/module_block.py +0 -0
old mode 100644
new mode 100755
scsi/Makefile.objs deleted +0 -4
deleted file mode 100644
index bb8789c..0000000
@@ -1,4 +0,0 @@
-block-obj-y += utils.o
-
-block-obj-$(CONFIG_LINUX) += pr-manager.o pr-manager-helper.o
-block-obj-$(call lnot,$(CONFIG_LINUX)) += pr-manager-stub.o
scsi/meson.build new file +4 -0
new file mode 100644
index 0000000..53f3a1f
@@ -0,0 +1,4 @@
+block_ss.add(files('utils.c'))
+block_ss.add(when: 'CONFIG_LINUX',
+             if_true: files('pr-manager.c', 'pr-manager-helper.c'),
+             if_false: files('pr-manager-stub.c'))
Signature · 1 line
1.8.3.1
#46 lore raw

PATCH v3 43/132 meson: qemu-{img,io,nbd}

In reply to Paolo Bonzini

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

---
 Makefile    | 6 ------
 configure   | 6 ------
 meson.build | 8 +++++++-
 3 files changed, 7 insertions(+), 13 deletions(-)
Makefile +0 -6
index cdd9d14..764981d 100644
@@ -231,12 +231,6 @@ Makefile: $(version-obj-y)
 
 COMMON_LDADDS = libqemuutil.a
 
-qemu-img.o: qemu-img-cmds.h
-
-qemu-img$(EXESUF): qemu-img.o $(authz-obj-y) $(block-obj-y) $(crypto-obj-y) $(io-obj-y) $(qom-obj-y) $(COMMON_LDADDS)
-qemu-nbd$(EXESUF): qemu-nbd.o $(authz-obj-y) $(block-obj-y) $(crypto-obj-y) $(io-obj-y) $(qom-obj-y) $(COMMON_LDADDS)
-qemu-io$(EXESUF): qemu-io.o $(authz-obj-y) $(block-obj-y) $(crypto-obj-y) $(io-obj-y) $(qom-obj-y) $(COMMON_LDADDS)
-
 scsi/qemu-pr-helper$(EXESUF): scsi/qemu-pr-helper.o scsi/utils.o $(authz-obj-y) $(crypto-obj-y) $(io-obj-y) $(qom-obj-y) $(COMMON_LDADDS)
 ifdef CONFIG_MPATH
 scsi/qemu-pr-helper$(EXESUF): LIBS += -ludev -lmultipath -lmpathpersist
configure +0 -6
index 7be08f3..964897c 100755
@@ -6043,12 +6043,6 @@ if [ "$eventfd" = "yes" ]; then
 fi
 
 tools=""
-if test "$want_tools" = "yes" ; then
-  tools="qemu-img\$(EXESUF) qemu-io\$(EXESUF) $tools"
-  if [ "$linux" = "yes" -o "$bsd" = "yes" -o "$solaris" = "yes" ] ; then
-    tools="qemu-nbd\$(EXESUF) $tools"
-  fi
-fi
 if test "$softmmu" = yes ; then
   if test "$linux" = yes; then
     if test "$virtfs" != no && test "$cap_ng" = yes && test "$attr" = yes ; then
meson.build +7 -1
index a46b671..2b4b36d 100644
@@ -280,7 +280,7 @@ if have_system
   ]
 endif
 foreach d : hx_headers
-  custom_target(d[1],
+  hxdep += custom_target(d[1],
                 input: files(d[0]),
                 output: d[1],
                 capture: true,
@@ -591,6 +591,12 @@ if 'CONFIG_GUEST_AGENT' in config_host
 endif
 
 if have_tools
+  executable('qemu-img', [files('qemu-img.c'), hxdep], dependencies: [block, qemuutil], install: true)
+  if host_machine.system() == 'linux' or host_machine.system() == 'sunos' or host_machine.system().endswith('bsd')
+    executable('qemu-nbd', files('qemu-nbd.c'), dependencies: [block, qemuutil], install: true)
+  endif
+  executable('qemu-io', files('qemu-io.c'), dependencies: [block, qemuutil], install: true)
+
   subdir('contrib/rdmacm-mux')
   subdir('contrib/elf2dmp')
 
Signature · 1 line
1.8.3.1
#47 lore raw

PATCH v3 44/132 meson: qemu-pr-helper

In reply to Paolo Bonzini

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

---
 Makefile    |  5 -----
 configure   |  1 -
 meson.build | 10 ++++++++++
 3 files changed, 10 insertions(+), 6 deletions(-)
Makefile +0 -5
index 764981d..0cbdc34 100644
@@ -231,11 +231,6 @@ Makefile: $(version-obj-y)
 
 COMMON_LDADDS = libqemuutil.a
 
-scsi/qemu-pr-helper$(EXESUF): scsi/qemu-pr-helper.o scsi/utils.o $(authz-obj-y) $(crypto-obj-y) $(io-obj-y) $(qom-obj-y) $(COMMON_LDADDS)
-ifdef CONFIG_MPATH
-scsi/qemu-pr-helper$(EXESUF): LIBS += -ludev -lmultipath -lmpathpersist
-endif
-
 ifneq ($(EXESUF),)
 .PHONY: qga/qemu-ga
 qga/qemu-ga: qga/qemu-ga$(EXESUF) $(QGA_VSS_PROVIDER) $(QEMU_GA_MSI)
configure +0 -1
index 964897c..4757e45 100755
@@ -6061,7 +6061,6 @@ if test "$softmmu" = yes ; then
       fi
       mpath=no
     fi
-    tools="$tools scsi/qemu-pr-helper\$(EXESUF)"
   else
     if test "$virtfs" = yes; then
       error_exit "VirtFS is supported only on Linux"
meson.build +10 -0
index 2b4b36d..b16ab72 100644
@@ -108,6 +108,10 @@ if 'CONFIG_LIBCAP_NG' in config_host
 endif
 xkbcommon = dependency('xkbcommon', required: false)
 rt = cc.find_library('rt', required: false)
+libmpathpersist = declare_dependency()
+if config_host.has_key('CONFIG_MPATH')
+  libmpathpersist = cc.find_library('mpathpersist')
+endif
 libiscsi = declare_dependency()
 if 'CONFIG_LIBISCSI' in config_host
   libiscsi = declare_dependency(compile_args: config_host['LIBISCSI_CFLAGS'].split(),
@@ -586,6 +590,7 @@ foreach target : target_dirs
 endforeach
 
 # Other build targets
+
 if 'CONFIG_GUEST_AGENT' in config_host
   subdir('qga')
 endif
@@ -623,6 +628,11 @@ if have_tools
                dependencies: [qemuutil, libcap_ng],
                install: true,
                install_dir: get_option('libexecdir'))
+
+    executable('qemu-pr-helper', files('scsi/qemu-pr-helper.c', 'scsi/utils.c'),
+               dependencies: [authz, crypto, io, qom, qemuutil,
+                              libcap_ng, libudev, libmpathpersist],
+               install: true)
   endif
 
   if 'CONFIG_IVSHMEM' in config_host
Signature · 1 line
1.8.3.1
#48 lore raw

PATCH v3 45/132 configure, Makefile; remove TOOLS and HELPERS-y variable

In reply to Paolo Bonzini

Everything involving tools is now done by meson.

---
 Makefile  | 12 ++----------
 configure |  2 --
 2 files changed, 2 insertions(+), 12 deletions(-)
Makefile +2 -10
index 0cbdc34..c4cfca9 100644
@@ -113,8 +113,6 @@ $(call set-vpath, $(SRC_PATH))
 
 LIBS+=-lz $(LIBS_TOOLS)
 
-HELPERS-y =
-
 ifdef BUILD_DOCS
 DOCS=qemu-doc.html qemu-doc.txt qemu.1 qemu-img.1 qemu-nbd.8 qemu-ga.8
 DOCS+=docs/interop/qemu-qmp-ref.html docs/interop/qemu-qmp-ref.txt docs/interop/qemu-qmp-ref.7
@@ -143,7 +141,7 @@ dummy := $(call unnest-vars,, \
 
 include $(SRC_PATH)/tests/Makefile.include
 
-all: $(DOCS) $(if $(BUILD_DOCS),sphinxdocs) $(TOOLS) $(HELPERS-y) recurse-all modules
+all: $(DOCS) $(if $(BUILD_DOCS),sphinxdocs) recurse-all modules
 
 TARGET_DIRS_RULES := $(foreach t, all clean install, $(addsuffix /$(t), $(TARGET_DIRS)))
 SUBDIR_RULES=$(patsubst %,subdir-%, $(TARGET_DIRS))
@@ -246,7 +244,7 @@ clean: recurse-clean
 		! -path ./roms/edk2/BaseTools/Source/Python/UPT/Dll/sqlite3.dll \
 		-exec rm {} +
 	rm -f $(edk2-decompressed)
-	rm -f $(filter-out %.tlb,$(TOOLS)) $(HELPERS-y) TAGS cscope.* *.pod *~ */*~
+	rm -f TAGS cscope.* *.pod *~ */*~
 	rm -f fsdev/*.pod scsi/*.pod
 	rm -f qemu-img-cmds.h
 	rm -f ui/shader/*-vert.h ui/shader/*-frag.h
@@ -407,12 +405,6 @@ ICON_SIZES=16x16 24x24 32x32 48x48 64x64 128x128 256x256 512x512
 install: all $(if $(BUILD_DOCS),install-doc) install-datadir install-localstatedir \
 	$(if $(INSTALL_BLOBS),$(edk2-decompressed)) \
 	recurse-install
-ifneq ($(TOOLS),)
-	$(call install-prog,$(TOOLS),$(DESTDIR)$(bindir))
-endif
-ifneq ($(HELPERS-y),)
-	$(call install-prog,$(HELPERS-y),$(DESTDIR)$(libexecdir))
-endif
 ifneq ($(vhost-user-json-y),)
 	$(INSTALL_DIR) "$(DESTDIR)$(qemu_datadir)/vhost-user/"
 	for x in $(vhost-user-json-y); do \
configure +0 -2
index 4757e45..658b062 100755
@@ -6042,7 +6042,6 @@ if [ "$eventfd" = "yes" ]; then
   ivshmem=yes
 fi
 
-tools=""
 if test "$softmmu" = yes ; then
   if test "$linux" = yes; then
     if test "$virtfs" != no && test "$cap_ng" = yes && test "$attr" = yes ; then
@@ -7271,7 +7270,6 @@ else
 fi
 QEMU_INCLUDES="-iquote ${source_path}/tcg $QEMU_INCLUDES"
 
-echo "TOOLS=$tools" >> $config_host_mak
 echo "ROMS=$roms" >> $config_host_mak
 echo "MAKE=$make" >> $config_host_mak
 echo "INSTALL=$install" >> $config_host_mak
Signature · 1 line
1.8.3.1
#49 lore raw

PATCH v3 46/132 meson: convert chardev directory to Meson (emulator part)

In reply to Paolo Bonzini
---
 Makefile.objs         |  1 -
 Makefile.target       |  2 ++
 chardev/Makefile.objs |  6 ------
 chardev/meson.build   |  7 ++++++-
 configure             |  2 ++
 meson.build           | 14 ++++++++++++++
 6 files changed, 24 insertions(+), 8 deletions(-)
 delete mode 100644 chardev/Makefile.objs
Makefile.objs +0 -1
index 56d0c60..8d14390 100644
@@ -76,7 +76,6 @@ vl.o-cflags := $(GPROF_CFLAGS) $(SDL_CFLAGS)
 common-obj-$(CONFIG_TPM) += tpm.o
 
 common-obj-y += backends/
-common-obj-y += chardev/
 
 common-obj-$(CONFIG_SECCOMP) += qemu-seccomp.o
 qemu-seccomp.o-cflags := $(SECCOMP_CFLAGS)
Makefile.target +2 -0
index 1cb7bc2..702e6f8 100644
@@ -104,6 +104,7 @@ all: $(PROGS) stap
 	@true
 
 obj-y += $(LIBQEMU)
+
 obj-y += trace/
 
 #########################################################
@@ -166,6 +167,7 @@ LIBS := $(LIBS) @../block.syms @../qemu.syms
 ifneq ($(CONFIG_MODULES),y)
 LIBS := $(LIBS)
 endif
+LIBS := $(LIBS) $(BRLAPI_LIBS) $(SDL_LIBS) $(SPICE_LIBS)
 
 # Hardware support
 ifeq ($(TARGET_NAME), sparc64)
chardev/Makefile.objs deleted +0 -6
deleted file mode 100644
index 8049d82..0000000
@@ -1,6 +0,0 @@
-common-obj-y += msmouse.o wctablet.o testdev.o
-common-obj-$(CONFIG_BRLAPI) += baum.o
-baum.o-cflags := $(SDL_CFLAGS)
-baum.o-libs := $(BRLAPI_LIBS)
-
-common-obj-$(CONFIG_SPICE) += spice.o
chardev/meson.build +6 -1
index 18850b3..c4a2bb0 100644
@@ -31,4 +31,9 @@ libchardev = static_library('chardev', chardev_ss.sources(),
                             name_suffix: 'fa',
                             build_by_default: false)
 
-chardev = declare_dependency(link_with: libchardev)
+chardev = declare_dependency(link_whole: libchardev)
+
+softmmu_ss.add(files('msmouse.c', 'wctablet.c', 'testdev.c'))
+softmmu_ss.add(when: ['CONFIG_SDL', 'CONFIG_BRLAPI', sdl, brlapi], if_true: files('baum.c'))
+softmmu_ss.add(when: ['CONFIG_SPICE', spice], if_true: files('spice.c'))
+softmmu_ss.add(chardev)
configure +2 -0
index 658b062..9d33df3 100755
@@ -6908,6 +6908,8 @@ if test "$zlib" != "no" ; then
 fi
 if test "$spice" = "yes" ; then
   echo "CONFIG_SPICE=y" >> $config_host_mak
+  echo "SPICE_CFLAGS=$spice_cflags" >> $config_host_mak
+  echo "SPICE_LIBS=$spice_libs" >> $config_host_mak
 fi
 
 if test "$smartcard" = "yes" ; then
meson.build +14 -0
index b16ab72..df16b58 100644
@@ -107,6 +107,11 @@ if 'CONFIG_LIBCAP_NG' in config_host
   libcap_ng = declare_dependency(link_args: config_host['LIBCAP_NG_LIBS'].split())
 endif
 xkbcommon = dependency('xkbcommon', required: false)
+spice = declare_dependency()
+if 'CONFIG_SPICE' in config_host
+  spice = declare_dependency(compile_args: config_host['SPICE_CFLAGS'].split(),
+                             link_args: config_host['SPICE_LIBS'].split())
+endif
 rt = cc.find_library('rt', required: false)
 libmpathpersist = declare_dependency()
 if config_host.has_key('CONFIG_MPATH')
@@ -136,6 +141,15 @@ libudev = declare_dependency()
 if 'CONFIG_LIBUDEV' in config_host
   libudev = declare_dependency(link_args: config_host['LIBUDEV_LIBS'].split())
 endif
+brlapi = declare_dependency()
+if 'CONFIG_BRLAPI' in config_host
+  brlapi = declare_dependency(link_args: config_host['BRLAPI_LIBS'].split())
+endif
+sdl = declare_dependency()
+if 'CONFIG_SDL' in config_host
+  sdl = declare_dependency(compile_args: config_host['SDL_CFLAGS'].split(),
+                           link_args: config_host['SDL_LIBS'].split())
+endif
 rbd = declare_dependency()
 if 'CONFIG_RBD' in config_host
   rbd = declare_dependency(link_args: config_host['RBD_LIBS'].split())
Signature · 1 line
1.8.3.1
#50 lore raw

PATCH v3 47/132 meson: convert audio directory to Meson

In reply to Paolo Bonzini
---
 Makefile.objs       |  8 ++++++--
 Makefile.target     |  6 ++++--
 audio/Makefile.objs | 31 -------------------------------
 audio/meson.build   | 30 ++++++++++++++++++++++++++++++
 configure           | 12 ++++++++++++
 meson.build         | 25 ++++++++++++++++++++++++-
 6 files changed, 76 insertions(+), 36 deletions(-)
 delete mode 100644 audio/Makefile.objs
 create mode 100644 audio/meson.build
Makefile.objs +6 -2
index 8d14390..cea6f9a 100644
@@ -36,6 +36,7 @@ qom-obj-y = qom/libqom.fa
 
 ifeq ($(CONFIG_SOFTMMU),y)
 common-obj-y = blockdev.o blockdev-nbd.o block/
+
 common-obj-y += bootdevice.o iothread.o
 common-obj-y += dump/
 common-obj-y += job-qmp.o
@@ -49,6 +50,11 @@ common-obj-$(CONFIG_LINUX) += fsdev/
 
 common-obj-y += migration/
 
+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_CURL),m) += block-curl$(DSOSUF)
 common-obj-$(if $(CONFIG_GLUSTERFS),m) += block-gluster$(DSOSUF)
 common-obj-$(if $(CONFIG_LIBISCSI),m) += block-iscsi$(DSOSUF)
@@ -59,8 +65,6 @@ 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 += audio/
-common-obj-m += audio/
 common-obj-y += hw/
 
 common-obj-y += replay/
Makefile.target +4 -2
index 702e6f8..65f1312 100644
@@ -165,9 +165,11 @@ LIBS := $(libs_softmmu) $(LIBS)
 # Temporary until emulators are linked by Meson
 LIBS := $(LIBS) @../block.syms @../qemu.syms
 ifneq ($(CONFIG_MODULES),y)
-LIBS := $(LIBS)
+LIBS := $(LIBS) $(ALSA_LIBS) $(OSS_LIBS) $(PULSE_LIBS) $(SDL_LIBS)
 endif
 LIBS := $(LIBS) $(BRLAPI_LIBS) $(SDL_LIBS) $(SPICE_LIBS)
+LIBS := $(LIBS) $(COREAUDIO_LIBS) $(DSOUND_LIBS)
+
 
 # Hardware support
 ifeq ($(TARGET_NAME), sparc64)
@@ -193,7 +195,7 @@ dummy := $(call fix-paths,../,, \
               qom-obj-y)
 dummy := $(call unnest-vars,.., \
                common-obj-y \
-               common-obj-m)
+	       common-obj-m)
 all-obj-y += $(common-obj-y)
 all-obj-y += $(qom-obj-y)
 all-obj-$(CONFIG_SOFTMMU) += $(authz-obj-y)
audio/Makefile.objs deleted +0 -31
deleted file mode 100644
index dca87f6..0000000
@@ -1,31 +0,0 @@
-common-obj-y = audio.o audio_legacy.o noaudio.o wavaudio.o mixeng.o
-common-obj-$(CONFIG_SPICE) += spiceaudio.o
-common-obj-$(CONFIG_AUDIO_COREAUDIO) += coreaudio.o
-common-obj-$(CONFIG_AUDIO_DSOUND) += dsoundaudio.o
-common-obj-$(CONFIG_AUDIO_PT_INT) += audio_pt_int.o
-common-obj-$(CONFIG_AUDIO_WIN_INT) += audio_win_int.o
-common-obj-y += wavcapture.o
-
-coreaudio.o-libs := $(COREAUDIO_LIBS)
-dsoundaudio.o-libs := $(DSOUND_LIBS)
-
-# alsa module
-common-obj-$(CONFIG_AUDIO_ALSA) += alsa.mo
-alsa.mo-objs = alsaaudio.o
-alsa.mo-libs := $(ALSA_LIBS)
-
-# oss module
-common-obj-$(CONFIG_AUDIO_OSS) += oss.mo
-oss.mo-objs = ossaudio.o
-oss.mo-libs := $(OSS_LIBS)
-
-# pulseaudio module
-common-obj-$(CONFIG_AUDIO_PA) += pa.mo
-pa.mo-objs = paaudio.o
-pa.mo-libs := $(PULSE_LIBS)
-
-# sdl module
-common-obj-$(CONFIG_AUDIO_SDL) += sdl.mo
-sdl.mo-objs = sdlaudio.o
-sdl.mo-cflags := $(SDL_CFLAGS)
-sdl.mo-libs := $(SDL_LIBS)
audio/meson.build new file +30 -0
new file mode 100644
index 0000000..e58a936
@@ -0,0 +1,30 @@
+softmmu_ss.add(files(
+  'audio.c',
+  'audio_legacy.c',
+  'mixeng.c',
+  'noaudio.c',
+  'wavaudio.c',
+  'wavcapture.c',
+))
+
+softmmu_ss.add(when: [spice, 'CONFIG_SPICE'], if_true: files('spiceaudio.c'))
+softmmu_ss.add(when: [coreaudio, 'CONFIG_AUDIO_COREAUDIO'], if_true: files('coreaudio.c'))
+softmmu_ss.add(when: [dsound, 'CONFIG_AUDIO_DSOUND'], if_true: files('dsoundaudio.c'))
+softmmu_ss.add(when: ['CONFIG_AUDIO_PT_INT'], if_true: files('audio_pt_int.c'))
+softmmu_ss.add(when: ['CONFIG_AUDIO_WIN_INT'], if_true: files('audio_win_int.c'))
+
+audio_modules = []
+if 'CONFIG_AUDIO_ALSA' in config_host
+  audio_modules += [['alsa', files('alsaaudio.c'), alsa]]
+endif
+if 'CONFIG_AUDIO_OSS' in config_host
+  audio_modules += [['oss', files('ossaudio.c'), oss]]
+endif
+if 'CONFIG_AUDIO_PA' in config_host
+  audio_modules += [['pa', files('paaudio.c'), pulse]]
+endif
+if 'CONFIG_AUDIO_SDL' in config_host
+  audio_modules += [['sdl', files('sdlaudio.c'), sdl]]
+endif
+
+modules += {'audio': audio_modules}
configure +12 -0
index 9d33df3..0be0735 100755
@@ -3396,6 +3396,8 @@ for drv in $audio_drv_list; do
     alsa | try-alsa)
     if $pkg_config alsa --exists; then
         alsa_libs=$($pkg_config alsa --libs)
+        alsa_cflags=$($pkg_config alsa --cflags)
+        alsa=yes
         if test "$drv" = "try-alsa"; then
             audio_drv_list=$(echo "$audio_drv_list" | sed -e 's/try-alsa/alsa/')
         fi
@@ -3411,7 +3413,9 @@ for drv in $audio_drv_list; do
 
     pa | try-pa)
     if $pkg_config libpulse --exists; then
+        libpulse=yes
         pulse_libs=$($pkg_config libpulse --libs)
+        pulse_cflags=$($pkg_config libpulse --cflags)
         audio_pt_int="yes"
         if test "$drv" = "try-pa"; then
             audio_drv_list=$(echo "$audio_drv_list" | sed -e 's/try-pa/pa/')
@@ -6589,8 +6593,16 @@ for drv in $audio_drv_list; do
 	    echo "$def=y" >> $config_host_mak ;;
     esac
 done
+if test "$alsa" = "yes" ; then
+    echo "CONFIG_ALSA=y" >> $config_host_mak
+fi
 echo "ALSA_LIBS=$alsa_libs" >> $config_host_mak
+echo "ALSA_CFLAGS=$alsa_cflags" >> $config_host_mak
+if test "$libpulse" = "yes" ; then
+    echo "CONFIG_LIBPULSE=y" >> $config_host_mak
+fi
 echo "PULSE_LIBS=$pulse_libs" >> $config_host_mak
+echo "PULSE_CFLAGS=$pulse_cflags" >> $config_host_mak
 echo "COREAUDIO_LIBS=$coreaudio_libs" >> $config_host_mak
 echo "DSOUND_LIBS=$dsound_libs" >> $config_host_mak
 echo "OSS_LIBS=$oss_libs" >> $config_host_mak
meson.build +24 -1
index df16b58..90a15ad 100644
@@ -107,6 +107,16 @@ if 'CONFIG_LIBCAP_NG' in config_host
   libcap_ng = declare_dependency(link_args: config_host['LIBCAP_NG_LIBS'].split())
 endif
 xkbcommon = dependency('xkbcommon', required: false)
+pulse = declare_dependency()
+if 'CONFIG_LIBPULSE' in config_host
+  pulse = declare_dependency(compile_args: config_host['PULSE_CFLAGS'].split(),
+                             link_args: config_host['PULSE_LIBS'].split())
+endif
+alsa = declare_dependency()
+if 'CONFIG_ALSA' in config_host
+  alsa = declare_dependency(compile_args: config_host['ALSA_CFLAGS'].split(),
+                            link_args: config_host['ALSA_LIBS'].split())
+endif
 spice = declare_dependency()
 if 'CONFIG_SPICE' in config_host
   spice = declare_dependency(compile_args: config_host['SPICE_CFLAGS'].split(),
@@ -176,6 +186,18 @@ liblzfse = declare_dependency()
 if 'CONFIG_LZFSE' in config_host
   liblzfse = declare_dependency(link_args: config_host['LZFSE_LIBS'].split())
 endif
+oss = declare_dependency()
+if 'CONFIG_AUDIO_OSS' in config_host
+  oss = declare_dependency(link_args: config_host['OSS_LIBS'].split())
+endif
+dsound = declare_dependency()
+if 'CONFIG_AUDIO_DSOUND' in config_host
+  dsound = declare_dependency(link_args: config_host['DSOUND_LIBS'].split())
+endif
+coreaudio = declare_dependency()
+if 'CONFIG_AUDIO_COREAUDIO' in config_host
+  coreaudio = declare_dependency(link_args: config_host['COREAUDIO_LIBS'].split())
+endif
 
 create_config = find_program('scripts/create_config')
 minikconf = find_program('scripts/minikconf.py')
@@ -453,6 +475,7 @@ libqemuutil = static_library('qemuutil',
 qemuutil = declare_dependency(link_with: libqemuutil,
                               sources: version_res)
 
+subdir('audio')
 subdir('io')
 subdir('chardev')
 subdir('fsdev')
@@ -481,7 +504,7 @@ foreach d, list : modules
       else
         softmmu_mods += sl
       endif
-      mods += {'dir': d, 'name': m[0], 'lib': sl, 'deps': m[2]}
+      mods += {'dir': d, 'name': m[0], 'lib': [sl, libmodulecommon], 'deps': m[2]}
     else
       if d == 'block'
         block_ss.add(when: m[2], if_true: m[1])
Signature · 1 line
1.8.3.1
#51 lore raw

PATCH v3 48/132 meson: convert ui directory to Meson

In reply to Paolo Bonzini

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

---
 Makefile         |  4 +--
 Makefile.objs    |  7 ++++--
 Makefile.target  |  7 +++---
 configure        |  6 +++++
 meson.build      | 50 +++++++++++++++++++++++++++++++++++++
 ui/Makefile.objs | 69 ---------------------------------------------------
 ui/meson.build   | 75 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 ui/shader.c      |  6 ++---
 8 files changed, 143 insertions(+), 81 deletions(-)
 delete mode 100644 ui/Makefile.objs
Makefile +1 -3
index c4cfca9..5bdd400 100644
@@ -135,9 +135,7 @@ ifneq ($(wildcard config-host.mak),)
 include $(SRC_PATH)/Makefile.objs
 endif
 
-dummy := $(call unnest-vars,, \
-                common-obj-y \
-                common-obj-m)
+dummy := $(call unnest-vars,, common-obj-y)
 
 include $(SRC_PATH)/tests/Makefile.include
 
Makefile.objs +5 -2
index cea6f9a..1319ba2 100644
@@ -55,6 +55,11 @@ 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)
@@ -69,8 +74,6 @@ common-obj-y += hw/
 
 common-obj-y += replay/
 
-common-obj-y += ui/
-common-obj-m += ui/
 common-obj-y += bt-host.o bt-vhci.o
 bt-host.o-cflags := $(BLUEZ_CFLAGS)
 
Makefile.target +3 -4
index 65f1312..265b596 100644
@@ -166,11 +166,11 @@ LIBS := $(libs_softmmu) $(LIBS)
 LIBS := $(LIBS) @../block.syms @../qemu.syms
 ifneq ($(CONFIG_MODULES),y)
 LIBS := $(LIBS) $(ALSA_LIBS) $(OSS_LIBS) $(PULSE_LIBS) $(SDL_LIBS)
+LIBS := $(LIBS) $(GTK_LIBS) $(VTE_LIBS) $(X11_LIBS) $(CURSES_LIBS) $(ICONV_LIBS) $(GIO_LIBS)
 endif
-LIBS := $(LIBS) $(BRLAPI_LIBS) $(SDL_LIBS) $(SPICE_LIBS)
+LIBS := $(LIBS) $(BRLAPI_LIBS) $(SDL_LIBS) $(SPICE_LIBS) $(OPENGL_LIBS)
 LIBS := $(LIBS) $(COREAUDIO_LIBS) $(DSOUND_LIBS)
 
-
 # Hardware support
 ifeq ($(TARGET_NAME), sparc64)
 obj-y += hw/sparc64/
@@ -194,8 +194,7 @@ dummy := $(call fix-paths,../,, \
               io-obj-y \
               qom-obj-y)
 dummy := $(call unnest-vars,.., \
-               common-obj-y \
-	       common-obj-m)
+               common-obj-y)
 all-obj-y += $(common-obj-y)
 all-obj-y += $(qom-obj-y)
 all-obj-$(CONFIG_SOFTMMU) += $(authz-obj-y)
configure +6 -0
index 0be0735..a18fe24 100755
@@ -6620,12 +6620,18 @@ 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 "$xfs" = "yes" ; then
   echo "CONFIG_XFS=y" >> $config_host_mak
 fi
meson.build +50 -0

56 lines not on this page · raw message

ui/Makefile.objs deleted +0 -69

69 lines not on this page · raw message

ui/meson.build +75 -0

81 lines not on this page · raw message

ui/shader.c +3 -3
index d78829f..e8b8d32 100644
@@ -27,9 +27,9 @@
 #include "qemu/osdep.h"
 #include "ui/shader.h"
 
-#include "shader/texture-blit-vert.h"
-#include "shader/texture-blit-flip-vert.h"
-#include "shader/texture-blit-frag.h"
+#include "ui/shader/texture-blit-vert.h"
+#include "ui/shader/texture-blit-flip-vert.h"
+#include "ui/shader/texture-blit-frag.h"
 
 struct QemuGLShader {
     GLint texture_blit_prog;
Signature · 1 line
1.8.3.1
#52 lore raw

PATCH v3 49/132 meson: convert root directory to Meson

In reply to Paolo Bonzini
---
 Makefile.objs   | 29 ++---------------------------
 Makefile.target |  2 +-
 configure       |  3 +++
 meson.build     | 39 +++++++++++++++++++++++++++++++++++++++
 4 files changed, 45 insertions(+), 28 deletions(-)
Makefile.objs +2 -27
index 1319ba2..307e27c 100644
@@ -35,19 +35,11 @@ qom-obj-y = qom/libqom.fa
 # single QEMU executable should support all CPUs and machines.
 
 ifeq ($(CONFIG_SOFTMMU),y)
-common-obj-y = blockdev.o blockdev-nbd.o block/
-
-common-obj-y += bootdevice.o iothread.o
+common-obj-y = block/
 common-obj-y += dump/
-common-obj-y += job-qmp.o
 common-obj-y += monitor/
 common-obj-y += net/
-common-obj-y += qdev-monitor.o device-hotplug.o
-common-obj-$(CONFIG_WIN32) += os-win32.o
-common-obj-$(CONFIG_POSIX) += os-posix.o
-
 common-obj-$(CONFIG_LINUX) += fsdev/
-
 common-obj-y += migration/
 
 common-obj-$(CONFIG_AUDIO_ALSA) += audio-alsa$(DSOSUF)
@@ -71,30 +63,13 @@ 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-y += replay/
-
-common-obj-y += bt-host.o bt-vhci.o
-bt-host.o-cflags := $(BLUEZ_CFLAGS)
-
-common-obj-y += dma-helpers.o
-common-obj-y += vl.o
-vl.o-cflags := $(GPROF_CFLAGS) $(SDL_CFLAGS)
-common-obj-$(CONFIG_TPM) += tpm.o
-
 common-obj-y += backends/
-
-common-obj-$(CONFIG_SECCOMP) += qemu-seccomp.o
-qemu-seccomp.o-cflags := $(SECCOMP_CFLAGS)
-qemu-seccomp.o-libs := $(SECCOMP_LIBS)
-
-common-obj-$(CONFIG_FDT) += device_tree.o
-
 endif
 
 #######################################################################
 # Target-independent parts used in system and user emulation
-common-obj-y += cpus-common.o
+
 common-obj-y += hw/
 common-obj-y += qom/
 common-obj-y += disas/
Makefile.target +1 -1
index 265b596..bad50ce 100644
@@ -168,7 +168,7 @@ ifneq ($(CONFIG_MODULES),y)
 LIBS := $(LIBS) $(ALSA_LIBS) $(OSS_LIBS) $(PULSE_LIBS) $(SDL_LIBS)
 LIBS := $(LIBS) $(GTK_LIBS) $(VTE_LIBS) $(X11_LIBS) $(CURSES_LIBS) $(ICONV_LIBS) $(GIO_LIBS)
 endif
-LIBS := $(LIBS) $(BRLAPI_LIBS) $(SDL_LIBS) $(SPICE_LIBS) $(OPENGL_LIBS)
+LIBS := $(LIBS) $(BRLAPI_LIBS) $(SDL_LIBS) $(SPICE_LIBS) $(OPENGL_LIBS) $(SECCOMP_LIBS)
 LIBS := $(LIBS) $(COREAUDIO_LIBS) $(DSOUND_LIBS)
 
 # Hardware support
configure +3 -0
index a18fe24..c4b50a7 100755
@@ -6771,6 +6771,7 @@ fi
 if test "$bluez" = "yes" ; then
   echo "CONFIG_BLUEZ=y" >> $config_host_mak
   echo "BLUEZ_CFLAGS=$bluez_cflags" >> $config_host_mak
+  echo "BLUEZ_LIBS=$bluez_libs" >> $config_host_mak
 fi
 if test "$gtk" = "yes" ; then
   echo "CONFIG_GTK=m" >> $config_host_mak
@@ -6891,6 +6892,8 @@ if test "$preadv" = "yes" ; then
 fi
 if test "$fdt" != "no" ; then
   echo "CONFIG_FDT=y" >> $config_host_mak
+  echo "FDT_CFLAGS=$fdt_cflags" >> $config_host_mak
+  echo "FDT_LIBS=$fdt_ldflags $fdt_libs" >> $config_host_mak
 fi
 if test "$membarrier" = "yes" ; then
   echo "CONFIG_MEMBARRIER=y" >> $config_host_mak
meson.build +39 -0
index cb164e0..cb60aac 100644
@@ -37,6 +37,7 @@ configure_file(input: files('scripts/ninjatool.py'),
 
 m = cc.find_library('m', required: false)
 util = cc.find_library('util', required: false)
+winmm = []
 socket = []
 version_res = []
 coref = []
@@ -45,6 +46,7 @@ cocoa = []
 hvf = []
 if host_machine.system() == 'windows'
   socket = cc.find_library('ws2_32')
+  winmm = cc.find_library('winmm')
 
   win = import('windows')
   version_res = win.compile_resources('version.rc',
@@ -248,6 +250,21 @@ if 'CONFIG_VNC_SASL' in config_host
   sasl = declare_dependency(compile_args: config_host['SASL_CFLAGS'].split(),
                             link_args: config_host['SASL_LIBS'].split())
 endif
+bluez = declare_dependency()
+if 'CONFIG_BLUEZ' in config_host
+  bluez = declare_dependency(compile_args: config_host['BLUEZ_CFLAGS'].split(),
+                             link_args: config_host['BLUEZ_LIBS'].split())
+endif
+seccomp = declare_dependency()
+if 'CONFIG_SECCOMP' in config_host
+  seccomp = declare_dependency(compile_args: config_host['SECCOMP_CFLAGS'].split(),
+                               link_args: config_host['SECCOMP_LIBS'].split())
+endif
+fdt = declare_dependency()
+if 'CONFIG_FDT' in config_host
+  fdt = declare_dependency(compile_args: config_host['FDT_CFLAGS'].split(),
+                           link_args: config_host['FDT_LIBS'].split())
+endif
 
 create_config = find_program('scripts/create_config')
 minikconf = find_program('scripts/minikconf.py')
@@ -542,6 +559,28 @@ subdir('nbd')
 subdir('scsi')
 subdir('block')
 
+softmmu_ss.add(files(
+  'blockdev-nbd.c',
+  'blockdev.c',
+  'bootdevice.c',
+  'device-hotplug.c',
+  'dma-helpers.c',
+  'iothread.c',
+  'job-qmp.c',
+  'qdev-monitor.c',
+  'vl.c',
+), sdl)
+
+softmmu_ss.add(files('bt-host.c', 'bt-vhci.c'), bluez)
+
+softmmu_ss.add(when: 'CONFIG_WIN32', if_true: [files('os-win32.c'), winmm])
+softmmu_ss.add(when: 'CONFIG_POSIX', if_true: files('os-posix.c'))
+softmmu_ss.add(when: 'CONFIG_TPM', if_true: files('tpm.c'))
+softmmu_ss.add(when: 'CONFIG_SECCOMP', if_true: [files('qemu-seccomp.c'), seccomp])
+softmmu_ss.add(when: ['CONFIG_FDT', fdt],  if_true: [files('device_tree.c')])
+
+common_ss.add(files('cpus-common.c'))
+
 mods = []
 block_mods = []
 softmmu_mods = []
Signature · 1 line
1.8.3.1
#53 lore raw

PATCH v3 50/132 meson: convert trace/

In reply to Paolo Bonzini

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

---
 Makefile.objs       | 4 ----
 trace/Makefile.objs | 8 --------
 trace/meson.build   | 5 ++++-
 3 files changed, 4 insertions(+), 13 deletions(-)
 delete mode 100644 trace/Makefile.objs
Makefile.objs +0 -4
index 307e27c..e9ae889 100644
@@ -77,7 +77,3 @@ common-obj-y += disas/
 ######################################################################
 # Resource file for Windows executables
 version-obj-$(CONFIG_WIN32) += $(BUILD_DIR)/version.o
-
-######################################################################
-# tracing
-util-obj-y +=  trace/
trace/Makefile.objs deleted +0 -8
deleted file mode 100644
index a429474..0000000
@@ -1,8 +0,0 @@
-# -*- mode: makefile -*-
-
-
-##################################################
-# Translation level
-
-obj-y += generated-helpers.o
-obj-y += control-target.o
trace/meson.build +4 -1
index 8ea8db7..b113425 100644
@@ -1,3 +1,5 @@
+specific_ss.add(files('control-target.c'))
+
 # common options
 tracetool = [
   find_program('scripts/tracetool.py'),
@@ -67,12 +69,13 @@ foreach d : [
   ['generated-helpers.h', 'tcg-helper-h'],
   ['generated-helpers-wrappers.h', 'tcg-helper-wrapper-h'],
 ]
-  custom_target(d[0],
+  gen = custom_target(d[0],
                 output: d[0],
                 input: meson.source_root() / 'trace-events',
                 command: [ tracetool, '--group=root', '--format=@0@'.format(d[1]), '@INPUT@' ],
                 build_by_default: true, # to be removed when added to a target
                 capture: true)
+  specific_ss.add(gen)
 endforeach
 
 if 'CONFIG_TRACE_UST' in config_host
Signature · 1 line
1.8.3.1
#54 lore raw

PATCH v3 51/132 meson: convert qom/

In reply to Paolo Bonzini

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

---
 Makefile.objs     | 1 -
 qom/Makefile.objs | 1 -
 qom/meson.build   | 5 +++++
 3 files changed, 5 insertions(+), 2 deletions(-)
 delete mode 100644 qom/Makefile.objs
Makefile.objs +0 -1
index e9ae889..0bc9167 100644
@@ -71,7 +71,6 @@ endif
 # Target-independent parts used in system and user emulation
 
 common-obj-y += hw/
-common-obj-y += qom/
 common-obj-y += disas/
 
 ######################################################################
qom/Makefile.objs deleted +0 -1
deleted file mode 100644
index fc1248e..0000000
@@ -1 +0,0 @@
-common-obj-$(CONFIG_SOFTMMU) += qom-hmp-cmds.o qom-qmp-cmds.o
qom/meson.build +5 -0
index 4af044d..3875663 100644
@@ -13,3 +13,8 @@ libqom = static_library('qom', qom_ss.sources(),
                         name_suffix: 'fa')
 
 qom = declare_dependency(link_whole: libqom)
+
+softmmu_ss.add(files(
+  'qom-hmp-cmds.c',
+  'qom-qmp-cmds.c',
+))
Signature · 1 line
1.8.3.1
#55 lore raw

PATCH v3 52/132 meson: convert block/

In reply to Paolo Bonzini

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

---
 Makefile.objs       | 3 +--
 block/Makefile.objs | 1 -
 block/meson.build   | 2 ++
 3 files changed, 3 insertions(+), 3 deletions(-)
 delete mode 100644 block/Makefile.objs
Makefile.objs +1 -2
index 0bc9167..4c7ae48 100644
@@ -35,8 +35,7 @@ qom-obj-y = qom/libqom.fa
 # single QEMU executable should support all CPUs and machines.
 
 ifeq ($(CONFIG_SOFTMMU),y)
-common-obj-y = block/
-common-obj-y += dump/
+common-obj-y = dump/
 common-obj-y += monitor/
 common-obj-y += net/
 common-obj-$(CONFIG_LINUX) += fsdev/
block/Makefile.objs deleted +0 -1
deleted file mode 100644
index 83e87b3..0000000
@@ -1 +0,0 @@
-common-obj-y += stream.o
block/meson.build +2 -0
index a68689b..ca62992 100644
@@ -98,4 +98,6 @@ module_block_h = custom_target('module_block.h',
                                command: [module_block_py, '@OUTPUT0@', modsrc])
 block_ss.add(module_block_h)
 
+softmmu_ss.add(files('stream.c'))
+
 modules += {'block': block_modules}
Signature · 1 line
1.8.3.1
#56 lore raw

PATCH v3 53/132 meson: convert dump/

In reply to Paolo Bonzini

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

---
 Makefile.objs      | 3 +--
 Makefile.target    | 1 -
 configure          | 4 ++++
 dump/Makefile.objs | 3 ---
 dump/meson.build   | 4 ++++
 meson.build        | 9 +++++++++
 6 files changed, 18 insertions(+), 6 deletions(-)
 delete mode 100644 dump/Makefile.objs
 create mode 100644 dump/meson.build
Makefile.objs +1 -2
index 4c7ae48..1b1eff5 100644
@@ -35,8 +35,7 @@ qom-obj-y = qom/libqom.fa
 # single QEMU executable should support all CPUs and machines.
 
 ifeq ($(CONFIG_SOFTMMU),y)
-common-obj-y = dump/
-common-obj-y += monitor/
+common-obj-y = monitor/
 common-obj-y += net/
 common-obj-$(CONFIG_LINUX) += fsdev/
 common-obj-y += migration/
Makefile.target +0 -1
index bad50ce..569f2d9 100644
@@ -153,7 +153,6 @@ endif #CONFIG_BSD_USER
 ifdef CONFIG_SOFTMMU
 obj-y += arch_init.o cpus.o gdbstub.o balloon.o ioport.o
 obj-y += qtest.o
-obj-y += dump/
 obj-y += hw/
 obj-y += monitor/
 obj-y += qapi/
configure +4 -0
index c4b50a7..8e55f3a 100755
@@ -2351,6 +2351,7 @@ int main(void) { lzo_version(); return 0; }
 EOF
     if compile_prog "" "-llzo2" ; then
         libs_softmmu="$libs_softmmu -llzo2"
+        lzo_libs="-llzo2"
         lzo="yes"
     else
         if test "$lzo" = "yes"; then
@@ -2370,6 +2371,7 @@ int main(void) { snappy_max_compressed_length(4096); return 0; }
 EOF
     if compile_prog "" "-lsnappy" ; then
         libs_softmmu="$libs_softmmu -lsnappy"
+        snappy_libs='-lsnappy'
         snappy="yes"
     else
         if test "$snappy" = "yes"; then
@@ -6976,10 +6978,12 @@ fi
 
 if test "$lzo" = "yes" ; then
   echo "CONFIG_LZO=y" >> $config_host_mak
+  echo "LZO_LIBS=$lzo_libs" >> $config_host_mak
 fi
 
 if test "$snappy" = "yes" ; then
   echo "CONFIG_SNAPPY=y" >> $config_host_mak
+  echo "SNAPPY_LIBS=$snappy_libs" >> $config_host_mak
 fi
 
 if test "$bzip2" = "yes" ; then
dump/Makefile.objs deleted +0 -3
deleted file mode 100644
index d2a5db3..0000000
@@ -1,3 +0,0 @@
-obj-y += dump.o
-common-obj-y += dump-hmp-cmds.o
-obj-$(TARGET_X86_64) += win_dump.o
dump/meson.build new file +4 -0
new file mode 100644
index 0000000..2eff29c
@@ -0,0 +1,4 @@
+softmmu_ss.add(files('dump-hmp-cmds.c'))
+
+specific_ss.add(when: 'CONFIG_SOFTMMU', if_true: [files('dump.c'), snappy, lzo])
+specific_ss.add(when: ['CONFIG_SOFTMMU', 'TARGET_X86_64'], if_true: files('win_dump.c'))
meson.build +9 -0
index cb60aac..804a9bc 100644
@@ -265,6 +265,14 @@ if 'CONFIG_FDT' in config_host
   fdt = declare_dependency(compile_args: config_host['FDT_CFLAGS'].split(),
                            link_args: config_host['FDT_LIBS'].split())
 endif
+snappy = declare_dependency()
+if 'CONFIG_SNAPPY' in config_host
+  snappy = declare_dependency(link_args: config_host['SNAPPY_LIBS'].split())
+endif
+lzo = declare_dependency()
+if 'CONFIG_LZO' in config_host
+  lzo = declare_dependency(link_args: config_host['LZO_LIBS'].split())
+endif
 
 create_config = find_program('scripts/create_config')
 minikconf = find_program('scripts/minikconf.py')
@@ -546,6 +554,7 @@ subdir('audio')
 subdir('io')
 subdir('chardev')
 subdir('fsdev')
+subdir('dump')
 
 block_ss.add(files(
   'block.c',
Signature · 1 line
1.8.3.1
#57 lore raw

PATCH v3 54/132 meson: convert monitor directory to Meson

In reply to Paolo Bonzini

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

---
 Makefile.objs         | 3 +--
 Makefile.target       | 1 -
 meson.build           | 2 ++
 monitor/Makefile.objs | 3 ---
 monitor/meson.build   | 9 +++++++++
 5 files changed, 12 insertions(+), 6 deletions(-)
 delete mode 100644 monitor/Makefile.objs
 create mode 100644 monitor/meson.build
Makefile.objs +1 -2
index 1b1eff5..98c16c5 100644
@@ -35,8 +35,7 @@ qom-obj-y = qom/libqom.fa
 # single QEMU executable should support all CPUs and machines.
 
 ifeq ($(CONFIG_SOFTMMU),y)
-common-obj-y = monitor/
-common-obj-y += net/
+common-obj-y = net/
 common-obj-$(CONFIG_LINUX) += fsdev/
 common-obj-y += migration/
 
Makefile.target +0 -1
index 569f2d9..8628e25 100644
@@ -154,7 +154,6 @@ ifdef CONFIG_SOFTMMU
 obj-y += arch_init.o cpus.o gdbstub.o balloon.o ioport.o
 obj-y += qtest.o
 obj-y += hw/
-obj-y += monitor/
 obj-y += qapi/
 obj-y += memory.o
 obj-y += memory_mapping.o
meson.build +2 -0
index 804a9bc..2355a99 100644
@@ -590,6 +590,8 @@ softmmu_ss.add(when: ['CONFIG_FDT', fdt],  if_true: [files('device_tree.c')])
 
 common_ss.add(files('cpus-common.c'))
 
+subdir('monitor')
+
 mods = []
 block_mods = []
 softmmu_mods = []
monitor/Makefile.objs deleted +0 -3
deleted file mode 100644
index e91a858..0000000
@@ -1,3 +0,0 @@
-obj-y += misc.o
-common-obj-y += monitor.o qmp.o hmp.o
-common-obj-y += qmp-cmds.o hmp-cmds.o
monitor/meson.build new file +9 -0
new file mode 100644
index 0000000..1eabfd5
@@ -0,0 +1,9 @@
+softmmu_ss.add(files(
+  'hmp-cmds.c',
+  'hmp.c',
+  'monitor.c',
+  'qmp-cmds.c',
+  'qmp.c',
+))
+
+specific_ss.add(when: 'CONFIG_SOFTMMU', if_true: files('misc.c'))
Signature · 1 line
1.8.3.1
#58 lore raw

PATCH v3 55/132 meson: convert replay directory to Meson

In reply to Paolo Bonzini

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

---
 Makefile.objs        |  1 -
 meson.build          |  1 +
 replay/Makefile.objs |  9 ---------
 replay/meson.build   | 11 +++++++++++
 4 files changed, 12 insertions(+), 10 deletions(-)
 delete mode 100644 replay/Makefile.objs
 create mode 100644 replay/meson.build
Makefile.objs +0 -1
index 98c16c5..542d8e8 100644
@@ -60,7 +60,6 @@ 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-y += replay/
 common-obj-y += backends/
 endif
 
meson.build +1 -0
index 2355a99..29c68cd 100644
@@ -591,6 +591,7 @@ softmmu_ss.add(when: ['CONFIG_FDT', fdt],  if_true: [files('device_tree.c')])
 common_ss.add(files('cpus-common.c'))
 
 subdir('monitor')
+subdir('replay')
 
 mods = []
 block_mods = []
replay/Makefile.objs deleted +0 -9
deleted file mode 100644
index cee6539..0000000
@@ -1,9 +0,0 @@
-common-obj-y += replay.o
-common-obj-y += replay-internal.o
-common-obj-y += replay-events.o
-common-obj-y += replay-time.o
-common-obj-y += replay-input.o
-common-obj-y += replay-char.o
-common-obj-y += replay-snapshot.o
-common-obj-y += replay-net.o
-common-obj-y += replay-audio.o
\ No newline at end of file
replay/meson.build new file +11 -0
new file mode 100644
index 0000000..b532189
@@ -0,0 +1,11 @@
+softmmu_ss.add(files(
+  'replay.c',
+  'replay-internal.c',
+  'replay-events.c',
+  'replay-time.c',
+  'replay-input.c',
+  'replay-char.c',
+  'replay-snapshot.c',
+  'replay-net.c',
+  'replay-audio.c',
+))
Signature · 1 line
1.8.3.1
#59 lore raw

PATCH v3 56/132 meson: convert migration directory to Meson

In reply to Paolo Bonzini

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

---
 Makefile.objs           |  1 -
 meson.build             |  5 +++++
 migration/Makefile.objs | 15 ---------------
 migration/meson.build   | 24 ++++++++++++++++++++++++
 4 files changed, 29 insertions(+), 16 deletions(-)
 delete mode 100644 migration/Makefile.objs
 create mode 100644 migration/meson.build
Makefile.objs +0 -1
index 542d8e8..5f2a644 100644
@@ -37,7 +37,6 @@ qom-obj-y = qom/libqom.fa
 ifeq ($(CONFIG_SOFTMMU),y)
 common-obj-y = net/
 common-obj-$(CONFIG_LINUX) += fsdev/
-common-obj-y += migration/
 
 common-obj-$(CONFIG_AUDIO_ALSA) += audio-alsa$(DSOSUF)
 common-obj-$(CONFIG_AUDIO_OSS) += audio-oss$(DSOSUF)
meson.build +5 -0
index 29c68cd..74837ff 100644
@@ -273,6 +273,10 @@ lzo = declare_dependency()
 if 'CONFIG_LZO' in config_host
   lzo = declare_dependency(link_args: config_host['LZO_LIBS'].split())
 endif
+rdma = declare_dependency()
+if 'CONFIG_RDMA' in config_host
+  rdma = declare_dependency(link_args: config_host['RDMA_LIBS'].split())
+endif
 
 create_config = find_program('scripts/create_config')
 minikconf = find_program('scripts/minikconf.py')
@@ -590,6 +594,7 @@ softmmu_ss.add(when: ['CONFIG_FDT', fdt],  if_true: [files('device_tree.c')])
 
 common_ss.add(files('cpus-common.c'))
 
+subdir('migration')
 subdir('monitor')
 subdir('replay')
 
migration/Makefile.objs deleted +0 -15
deleted file mode 100644
index a4f3baf..0000000
@@ -1,15 +0,0 @@
-common-obj-y += migration.o socket.o fd.o exec.o
-common-obj-y += tls.o channel.o savevm.o
-common-obj-y += colo.o colo-failover.o
-common-obj-y += vmstate.o vmstate-types.o page_cache.o
-common-obj-y += qemu-file.o global_state.o
-common-obj-y += qemu-file-channel.o
-common-obj-y += xbzrle.o postcopy-ram.o
-common-obj-y += qjson.o
-common-obj-y += block-dirty-bitmap.o
-
-common-obj-$(CONFIG_RDMA) += rdma.o
-
-common-obj-$(CONFIG_LIVE_BLOCK_MIGRATION) += block.o
-
-rdma.o-libs := $(RDMA_LIBS)
migration/meson.build new file +24 -0
new file mode 100644
index 0000000..ee5a713
@@ -0,0 +1,24 @@
+softmmu_ss.add(files(
+  'block-dirty-bitmap.c',
+  'channel.c',
+  'colo-failover.c',
+  'colo.c',
+  'exec.c',
+  'fd.c',
+  'global_state.c',
+  'migration.c',
+  'page_cache.c',
+  'postcopy-ram.c',
+  'qemu-file-channel.c',
+  'qemu-file.c',
+  'qjson.c',
+  'savevm.c',
+  'socket.c',
+  'tls.c',
+  'vmstate-types.c',
+  'vmstate.c',
+  'xbzrle.c',
+))
+
+softmmu_ss.add(when: ['CONFIG_RDMA', rdma], if_true: files('rdma.c'))
+softmmu_ss.add(when: 'CONFIG_LIVE_BLOCK_MIGRATION', if_true: files('block.c'))
Signature · 1 line
1.8.3.1
#60 lore raw

PATCH v3 57/132 meson: build softmmu-specific migration/ram.c

In reply to Paolo Bonzini

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

---
 Makefile.target       | 1 -
 configure             | 2 ++
 meson.build           | 5 +++++
 migration/meson.build | 2 ++
 4 files changed, 9 insertions(+), 1 deletion(-)
Makefile.target +0 -1
index 8628e25..cc0c038 100644
@@ -157,7 +157,6 @@ obj-y += hw/
 obj-y += qapi/
 obj-y += memory.o
 obj-y += memory_mapping.o
-obj-y += migration/ram.o
 LIBS := $(libs_softmmu) $(LIBS)
 
 # Temporary until emulators are linked by Meson
configure +2 -0
index 8e55f3a..fc57ec5 100755
@@ -7250,6 +7250,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 "$bochs" = "yes" ; then
meson.build +5 -0
index 74837ff..2961c44 100644
@@ -277,6 +277,11 @@ rdma = declare_dependency()
 if 'CONFIG_RDMA' in config_host
   rdma = declare_dependency(link_args: config_host['RDMA_LIBS'].split())
 endif
+libpmem = declare_dependency()
+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')
migration/meson.build +2 -0
index ee5a713..1231e43 100644
@@ -22,3 +22,5 @@ softmmu_ss.add(files(
 
 softmmu_ss.add(when: ['CONFIG_RDMA', rdma], if_true: files('rdma.c'))
 softmmu_ss.add(when: 'CONFIG_LIVE_BLOCK_MIGRATION', if_true: files('block.c'))
+
+specific_ss.add(when: 'CONFIG_SOFTMMU', if_true: [files('ram.c'), libpmem])
Signature · 1 line
1.8.3.1
#61 lore raw

PATCH v3 58/132 meson: convert net directory to Meson

In reply to Paolo Bonzini

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

---
 Makefile.objs         |  3 +--
 Makefile.target       |  1 +
 meson.build           | 10 ++++++++++
 net/Makefile.objs     | 32 --------------------------------
 net/can/Makefile.objs |  2 --
 net/can/meson.build   |  5 +++++
 net/meson.build       | 39 +++++++++++++++++++++++++++++++++++++++
 7 files changed, 56 insertions(+), 36 deletions(-)
 delete mode 100644 net/Makefile.objs
 delete mode 100644 net/can/Makefile.objs
 create mode 100644 net/can/meson.build
 create mode 100644 net/meson.build
Makefile.objs +1 -2
index 5f2a644..e316e96 100644
@@ -35,8 +35,7 @@ qom-obj-y = qom/libqom.fa
 # single QEMU executable should support all CPUs and machines.
 
 ifeq ($(CONFIG_SOFTMMU),y)
-common-obj-y = net/
-common-obj-$(CONFIG_LINUX) += fsdev/
+common-obj-$(CONFIG_LINUX) = fsdev/
 
 common-obj-$(CONFIG_AUDIO_ALSA) += audio-alsa$(DSOSUF)
 common-obj-$(CONFIG_AUDIO_OSS) += audio-oss$(DSOSUF)
Makefile.target +1 -0
index cc0c038..e025246 100644
@@ -167,6 +167,7 @@ LIBS := $(LIBS) $(GTK_LIBS) $(VTE_LIBS) $(X11_LIBS) $(CURSES_LIBS) $(ICONV_LIBS)
 endif
 LIBS := $(LIBS) $(BRLAPI_LIBS) $(SDL_LIBS) $(SPICE_LIBS) $(OPENGL_LIBS) $(SECCOMP_LIBS)
 LIBS := $(LIBS) $(COREAUDIO_LIBS) $(DSOUND_LIBS)
+LIBS := $(LIBS) $(VDE_LIBS) $(SLIRP_LIBS)
 
 # Hardware support
 ifeq ($(TARGET_NAME), sparc64)
meson.build +10 -0
index 2961c44..2333a87 100644
@@ -109,6 +109,15 @@ if 'CONFIG_LIBCAP_NG' in config_host
   libcap_ng = declare_dependency(link_args: config_host['LIBCAP_NG_LIBS'].split())
 endif
 xkbcommon = dependency('xkbcommon', required: false)
+slirp = declare_dependency()
+if config_host.has_key('CONFIG_SLIRP')
+  slirp = declare_dependency(compile_args: config_host['SLIRP_CFLAGS'].split(),
+                             link_args: config_host['SLIRP_LIBS'].split())
+endif
+vde = declare_dependency()
+if config_host.has_key('CONFIG_VDE')
+  vde = declare_dependency(link_args: config_host['VDE_LIBS'].split())
+endif
 pulse = declare_dependency()
 if 'CONFIG_LIBPULSE' in config_host
   pulse = declare_dependency(compile_args: config_host['PULSE_CFLAGS'].split(),
@@ -601,6 +610,7 @@ common_ss.add(files('cpus-common.c'))
 
 subdir('migration')
 subdir('monitor')
+subdir('net')
 subdir('replay')
 
 mods = []
net/Makefile.objs deleted +0 -32
deleted file mode 100644
index c5d076d..0000000
@@ -1,32 +0,0 @@
-common-obj-y = net.o queue.o checksum.o util.o hub.o
-common-obj-y += socket.o
-common-obj-y += dump.o
-common-obj-y += eth.o
-common-obj-y += announce.o
-common-obj-$(CONFIG_L2TPV3) += l2tpv3.o
-common-obj-$(call land,$(CONFIG_VIRTIO_NET),$(CONFIG_VHOST_NET_USER)) += vhost-user.o
-common-obj-$(call land,$(call lnot,$(CONFIG_VIRTIO_NET)),$(CONFIG_VHOST_NET_USER)) += vhost-user-stub.o
-common-obj-$(CONFIG_ALL) += vhost-user-stub.o
-common-obj-$(CONFIG_SLIRP) += slirp.o
-slirp.o-cflags := $(SLIRP_CFLAGS)
-slirp.o-libs := $(SLIRP_LIBS)
-common-obj-$(CONFIG_VDE) += vde.o
-common-obj-$(CONFIG_NETMAP) += netmap.o
-common-obj-y += filter.o
-common-obj-y += filter-buffer.o
-common-obj-y += filter-mirror.o
-common-obj-y += colo-compare.o
-common-obj-y += colo.o
-common-obj-y += filter-rewriter.o
-common-obj-y += filter-replay.o
-
-tap-obj-$(CONFIG_LINUX) = tap-linux.o
-tap-obj-$(CONFIG_BSD) = tap-bsd.o
-tap-obj-$(CONFIG_SOLARIS) = tap-solaris.o
-tap-obj-y ?= tap-stub.o
-common-obj-$(CONFIG_POSIX) += tap.o $(tap-obj-y)
-common-obj-$(CONFIG_WIN32) += tap-win32.o
-
-vde.o-libs = $(VDE_LIBS)
-
-common-obj-$(CONFIG_CAN_BUS) += can/
net/can/Makefile.objs deleted +0 -2
deleted file mode 100644
index 9f35dc5..0000000
@@ -1,2 +0,0 @@
-common-obj-y += can_core.o can_host.o
-common-obj-$(CONFIG_LINUX) += can_socketcan.o
net/can/meson.build new file +5 -0
new file mode 100644
index 0000000..f53d9ec
@@ -0,0 +1,5 @@
+can_ss = ss.source_set()
+can_ss.add(files('can_core.c', 'can_host.c'))
+can_ss.add(when: 'CONFIG_LINUX', if_true: files('can_socketcan.c'))
+
+softmmu_ss.add_all(when: 'CONFIG_CAN_BUS', if_true: can_ss)
net/meson.build new file +39 -0
new file mode 100644
index 0000000..a67f5af
@@ -0,0 +1,39 @@
+softmmu_ss.add(files(
+  'announce.c',
+  'checksum.c',
+  'colo-compare.c',
+  'colo.c',
+  'dump.c',
+  'eth.c',
+  'filter-buffer.c',
+  'filter-mirror.c',
+  'filter-replay.c',
+  'filter-rewriter.c',
+  'filter.c',
+  'hub.c',
+  'net.c',
+  'queue.c',
+  'socket.c',
+  'util.c',
+))
+
+softmmu_ss.add(when: 'CONFIG_L2TPV3', if_true: files('l2tpv3.c'))
+softmmu_ss.add(when: ['CONFIG_SLIRP', slirp], if_true: files('slirp.c'))
+softmmu_ss.add(when: ['CONFIG_VDE', vde], if_true: files('vde.c'))
+softmmu_ss.add(when: 'CONFIG_NETMAP', if_true: files('netmap.c'))
+vhost_user_ss = ss.source_set()
+vhost_user_ss.add(when: 'CONFIG_VIRTIO_NET', if_true: files('vhost-user.c'), if_false: files('vhost-user-stub.c'))
+softmmu_ss.add_all(when: 'CONFIG_VHOST_NET_USER', if_true: vhost_user_ss)
+softmmu_ss.add(when: 'CONFIG_ALL', if_true: files('vhost-user-stub.c'))
+
+softmmu_ss.add(when: 'CONFIG_LINUX', if_true: files('tap-linux.c'))
+softmmu_ss.add(when: 'CONFIG_BSD', if_true: files('tap-bsd.c'))
+softmmu_ss.add(when: 'CONFIG_SOLARIS', if_true: files('tap-solaris.c'))
+tap_posix = ['tap.c']
+if not config_host.has_key('CONFIG_LINUX') and not config_host.has_key('CONFIG_BSD') and not config_host.has_key('CONFIG_SOLARIS')
+  tap_posix += 'tap-stub.c'
+endif
+softmmu_ss.add(when: 'CONFIG_POSIX', if_true: files(tap_posix))
+softmmu_ss.add(when: 'CONFIG_WIN32', if_true: files('tap-win32.c'))
+
+subdir('can')
Signature · 1 line
1.8.3.1
#62 lore raw

PATCH v3 59/132 meson: convert backends directory to Meson

In reply to Paolo Bonzini

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

---
 Makefile.objs          |  1 -
 backends/Makefile.objs | 19 -------------------
 backends/meson.build   | 16 ++++++++++++++++
 configure              |  2 ++
 meson.build            |  5 +++++
 5 files changed, 23 insertions(+), 20 deletions(-)
 delete mode 100644 backends/Makefile.objs
 create mode 100644 backends/meson.build
Makefile.objs +0 -1
index e316e96..12d0a78 100644
@@ -58,7 +58,6 @@ 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-y += backends/
 endif
 
 #######################################################################
backends/Makefile.objs deleted +0 -19
deleted file mode 100644
index 981e8e1..0000000
@@ -1,19 +0,0 @@
-common-obj-y += rng.o rng-egd.o
-common-obj-$(CONFIG_POSIX) += rng-random.o
-
-common-obj-$(CONFIG_TPM) += tpm.o
-
-common-obj-y += hostmem.o hostmem-ram.o
-common-obj-$(CONFIG_POSIX) += hostmem-file.o
-
-common-obj-y += cryptodev.o
-common-obj-y += cryptodev-builtin.o
-
-ifeq ($(CONFIG_VIRTIO_CRYPTO),y)
-common-obj-y += cryptodev-vhost.o
-common-obj-$(CONFIG_VHOST_CRYPTO) += cryptodev-vhost-user.o
-endif
-
-common-obj-$(call land,$(CONFIG_VHOST_USER),$(CONFIG_VIRTIO)) += vhost-user.o
-
-common-obj-$(CONFIG_LINUX) += hostmem-memfd.o
backends/meson.build new file +16 -0
new file mode 100644
index 0000000..b47864f
@@ -0,0 +1,16 @@
+softmmu_ss.add([files(
+  'cryptodev-builtin.c',
+  'cryptodev.c',
+  'hostmem-ram.c',
+  'hostmem.c',
+  'rng-egd.c',
+  'rng.c',
+), numa])
+
+softmmu_ss.add(when: 'CONFIG_POSIX', if_true: files('rng-random.c'))
+softmmu_ss.add(when: 'CONFIG_POSIX', if_true: files('hostmem-file.c'))
+softmmu_ss.add(when: 'CONFIG_TPM', if_true: files('tpm.c'))
+softmmu_ss.add(when: 'CONFIG_LINUX', if_true: files('hostmem-memfd.c'))
+softmmu_ss.add(when: ['CONFIG_VHOST_USER', 'CONFIG_VIRTIO'], if_true: files('vhost-user.c'))
+softmmu_ss.add(when: 'CONFIG_VIRTIO_CRYPTO', if_true: files('cryptodev-vhost.c'))
+softmmu_ss.add(when: ['CONFIG_VIRTIO_CRYPTO', 'CONFIG_VHOST_CRYPTO'], if_true: files('cryptodev-vhost-user.c'))
configure +2 -0
index fc57ec5..28746c1 100755
@@ -4317,6 +4317,7 @@ EOF
   if compile_prog "" "-lnuma" ; then
     numa=yes
     libs_softmmu="-lnuma $libs_softmmu"
+    numa_libs="-lnuma"
   else
     if test "$numa" = "yes" ; then
       feature_not_found "numa" "install numactl devel"
@@ -7798,6 +7799,7 @@ fi
 
 if test "$numa" = "yes"; then
   echo "CONFIG_NUMA=y" >> $config_host_mak
+  echo "NUMA_LIBS=$numa_libs" >> $config_host_mak
 fi
 
 if test "$ccache_cpp2" = "yes"; then
meson.build +5 -0
index 2333a87..94bc696 100644
@@ -291,6 +291,10 @@ if 'CONFIG_LIBPMEM' in config_host
   libpmem = declare_dependency(compile_args: config_host['LIBPMEM_CFLAGS'].split(),
                                link_args: config_host['LIBPMEM_LIBS'].split())
 endif
+numa = declare_dependency()
+if 'CONFIG_NUMA' in config_host
+  numa = declare_dependency(link_args: config_host['NUMA_LIBS'].split())
+endif
 
 create_config = find_program('scripts/create_config')
 minikconf = find_program('scripts/minikconf.py')
@@ -608,6 +612,7 @@ softmmu_ss.add(when: ['CONFIG_FDT', fdt],  if_true: [files('device_tree.c')])
 
 common_ss.add(files('cpus-common.c'))
 
+subdir('backends')
 subdir('migration')
 subdir('monitor')
 subdir('net')
Signature · 1 line
1.8.3.1
#63 lore raw

PATCH v3 60/132 meson: convert fsdev/

In reply to Paolo Bonzini

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

---
 Makefile.objs       |  6 +-----
 fsdev/Makefile.objs | 12 ------------
 fsdev/meson.build   | 10 ++++++++++
 3 files changed, 11 insertions(+), 17 deletions(-)
 delete mode 100644 fsdev/Makefile.objs
Makefile.objs +1 -5
index 12d0a78..00289b6 100644
@@ -35,8 +35,6 @@ qom-obj-y = qom/libqom.fa
 # single QEMU executable should support all CPUs and machines.
 
 ifeq ($(CONFIG_SOFTMMU),y)
-common-obj-$(CONFIG_LINUX) = fsdev/
-
 common-obj-$(CONFIG_AUDIO_ALSA) += audio-alsa$(DSOSUF)
 common-obj-$(CONFIG_AUDIO_OSS) += audio-oss$(DSOSUF)
 common-obj-$(CONFIG_AUDIO_PA) += audio-pa$(DSOSUF)
@@ -56,14 +54,12 @@ 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/
 endif
 
 #######################################################################
 # Target-independent parts used in system and user emulation
 
-common-obj-y += hw/
+common-obj-y = hw/
 common-obj-y += disas/
 
 ######################################################################
fsdev/Makefile.objs deleted +0 -12
deleted file mode 100644
index 42cd70c..0000000
@@ -1,12 +0,0 @@
-# Lots of the fsdev/9pcode is pulled in by vl.c via qemu_fsdev_add.
-# only pull in the actual 9p backend if we also enabled virtio or xen.
-ifeq ($(CONFIG_FSDEV_9P),y)
-common-obj-y = qemu-fsdev.o 9p-marshal.o 9p-iov-marshal.o
-else
-common-obj-y = qemu-fsdev-dummy.o
-endif
-common-obj-y += qemu-fsdev-opts.o qemu-fsdev-throttle.o
-
-# Toplevel always builds this; targets without virtio will put it in
-# common-obj-y
-common-obj-$(CONFIG_ALL) += qemu-fsdev-dummy.o
fsdev/meson.build +10 -0
index eee8507..ae84c13 100644
@@ -1,3 +1,13 @@
+fsdev_ss = ss.source_set()
+fsdev_ss.add(files('qemu-fsdev-opts.c', 'qemu-fsdev-throttle.c'))
+fsdev_ss.add(when: 'CONFIG_ALL', if_true: files('qemu-fsdev-dummy.c'))
+fsdev_ss.add(when: ['CONFIG_FSDEV_9P'], if_true: files(
+  '9p-iov-marshal.c',
+  '9p-marshal.c',
+  'qemu-fsdev.c',
+), if_false: files('qemu-fsdev-dummy.c'))
+softmmu_ss.add_all(when: 'CONFIG_LINUX', if_true: fsdev_ss)
+
 if have_tools and libattr.found() and libcap_ng.found() and 'CONFIG_VIRTFS' in config_host
   executable('virtfs-proxy-helper', files('virtfs-proxy-helper.c', '9p-marshal.c', '9p-iov-marshal.c'),
              dependencies: [qemuutil, libattr, libcap_ng])
Signature · 1 line
1.8.3.1
#64 lore raw

PATCH v3 61/132 meson: convert disas directory to Meson

In reply to Paolo Bonzini

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

---
 Makefile.objs               |  1 -
 disas/Makefile.objs         | 30 ------------------------------
 disas/libvixl/Makefile.objs |  5 -----
 disas/libvixl/meson.build   |  7 +++++++
 disas/meson.build           | 27 +++++++++++++++++++++++++++
 meson.build                 |  1 +
 6 files changed, 35 insertions(+), 36 deletions(-)
 delete mode 100644 disas/Makefile.objs
 delete mode 100644 disas/libvixl/Makefile.objs
 create mode 100644 disas/libvixl/meson.build
 create mode 100644 disas/meson.build
Makefile.objs +0 -1
index 00289b6..c27b527 100644
@@ -60,7 +60,6 @@ endif
 # Target-independent parts used in system and user emulation
 
 common-obj-y = hw/
-common-obj-y += disas/
 
 ######################################################################
 # Resource file for Windows executables
disas/Makefile.objs deleted +0 -30
deleted file mode 100644
index 3c1cdce..0000000
@@ -1,30 +0,0 @@
-
-common-obj-$(CONFIG_ALPHA_DIS) += alpha.o
-common-obj-$(CONFIG_ARM_DIS) += arm.o
-common-obj-$(CONFIG_ARM_A64_DIS) += arm-a64.o
-common-obj-$(CONFIG_ARM_A64_DIS) += libvixl/
-libvixldir = $(SRC_PATH)/disas/libvixl
-# The -Wno-sign-compare is needed only for gcc 4.6, which complains about
-# some signed-unsigned equality comparisons in libvixl which later gcc
-# versions do not.
-arm-a64.o-cflags := -I$(libvixldir) -Wno-sign-compare
-common-obj-$(CONFIG_CRIS_DIS) += cris.o
-common-obj-$(CONFIG_HPPA_DIS) += hppa.o
-common-obj-$(CONFIG_I386_DIS) += i386.o
-common-obj-$(CONFIG_M68K_DIS) += m68k.o
-common-obj-$(CONFIG_MICROBLAZE_DIS) += microblaze.o
-common-obj-$(CONFIG_MIPS_DIS) += mips.o
-common-obj-$(CONFIG_NANOMIPS_DIS) += nanomips.o
-common-obj-$(CONFIG_NIOS2_DIS) += nios2.o
-common-obj-$(CONFIG_MOXIE_DIS) += moxie.o
-common-obj-$(CONFIG_PPC_DIS) += ppc.o
-common-obj-$(CONFIG_RISCV_DIS) += riscv.o
-common-obj-$(CONFIG_S390_DIS) += s390.o
-common-obj-$(CONFIG_SH4_DIS) += sh4.o
-common-obj-$(CONFIG_SPARC_DIS) += sparc.o
-common-obj-$(CONFIG_LM32_DIS) += lm32.o
-common-obj-$(CONFIG_XTENSA_DIS) += xtensa.o
-
-# TODO: As long as the TCG interpreter and its generated code depend
-# on the QEMU target, we cannot compile the disassembler here.
-#common-obj-$(CONFIG_TCI_DIS) += tci.o
disas/libvixl/Makefile.objs deleted +0 -5
deleted file mode 100644
index 99a637f..0000000
@@ -1,5 +0,0 @@
-common-obj-$(CONFIG_ARM_A64_DIS) = vixl/utils.o \
-               vixl/compiler-intrinsics.o \
-               vixl/a64/instructions-a64.o \
-               vixl/a64/decoder-a64.o \
-               vixl/a64/disasm-a64.o
disas/libvixl/meson.build new file +7 -0
new file mode 100644
index 0000000..5e2eb33
@@ -0,0 +1,7 @@
+libvixl_ss.add(files(
+  'vixl/a64/decoder-a64.cc',
+  'vixl/a64/disasm-a64.cc',
+  'vixl/a64/instructions-a64.cc',
+  'vixl/compiler-intrinsics.cc',
+  'vixl/utils.cc',
+))
disas/meson.build new file +27 -0
new file mode 100644
index 0000000..0527d69
@@ -0,0 +1,27 @@
+libvixl_ss = ss.source_set()
+subdir('libvixl')
+
+common_ss.add(when: 'CONFIG_ALPHA_DIS', if_true: files('alpha.c'))
+common_ss.add(when: 'CONFIG_ARM_A64_DIS', if_true: files('arm-a64.cc'))
+common_ss.add_all(when: 'CONFIG_ARM_A64_DIS', if_true: libvixl_ss)
+common_ss.add(when: 'CONFIG_ARM_DIS', if_true: files('arm.c'))
+common_ss.add(when: 'CONFIG_CRIS_DIS', if_true: files('cris.c'))
+common_ss.add(when: 'CONFIG_HPPA_DIS', if_true: files('hppa.c'))
+common_ss.add(when: 'CONFIG_I386_DIS', if_true: files('i386.c'))
+common_ss.add(when: 'CONFIG_LM32_DIS', if_true: files('lm32.c'))
+common_ss.add(when: 'CONFIG_M68K_DIS', if_true: files('m68k.c'))
+common_ss.add(when: 'CONFIG_MICROBLAZE_DIS', if_true: files('microblaze.c'))
+common_ss.add(when: 'CONFIG_MIPS_DIS', if_true: files('mips.c'))
+common_ss.add(when: 'CONFIG_MOXIE_DIS', if_true: files('moxie.c'))
+common_ss.add(when: 'CONFIG_NANOMIPS_DIS', if_true: files('nanomips.cpp'))
+common_ss.add(when: 'CONFIG_NIOS2_DIS', if_true: files('nios2.c'))
+common_ss.add(when: 'CONFIG_PPC_DIS', if_true: files('ppc.c'))
+common_ss.add(when: 'CONFIG_RISCV_DIS', if_true: files('riscv.c'))
+common_ss.add(when: 'CONFIG_S390_DIS', if_true: files('s390.c'))
+common_ss.add(when: 'CONFIG_SH4_DIS', if_true: files('sh4.c'))
+common_ss.add(when: 'CONFIG_SPARC_DIS', if_true: files('sparc.c'))
+common_ss.add(when: 'CONFIG_XTENSA_DIS', if_true: files('xtensa.c'))
+
+# TODO: As long as the TCG interpreter and its generated code depend
+# on the QEMU target, we cannot compile the disassembler here.
+#common_ss.add(when: 'CONFIG_TCI_DIS', if_true: files('tci.c'))
meson.build +1 -0
index 94bc696..68a5f6e 100644
@@ -613,6 +613,7 @@ softmmu_ss.add(when: ['CONFIG_FDT', fdt],  if_true: [files('device_tree.c')])
 common_ss.add(files('cpus-common.c'))
 
 subdir('backends')
+subdir('disas')
 subdir('migration')
 subdir('monitor')
 subdir('net')
Signature · 1 line
1.8.3.1
#65 lore raw

PATCH v3 62/132 meson: convert qapi-specific to meson

In reply to Paolo Bonzini

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

---
 Makefile.target    |  1 -
 qapi/Makefile.objs | 11 -----------
 qapi/meson.build   | 21 +++++++++++++++++++--
 3 files changed, 19 insertions(+), 14 deletions(-)
 delete mode 100644 qapi/Makefile.objs
Makefile.target +0 -1
index e025246..c2fcb22 100644
@@ -154,7 +154,6 @@ ifdef CONFIG_SOFTMMU
 obj-y += arch_init.o cpus.o gdbstub.o balloon.o ioport.o
 obj-y += qtest.o
 obj-y += hw/
-obj-y += qapi/
 obj-y += memory.o
 obj-y += memory_mapping.o
 LIBS := $(libs_softmmu) $(LIBS)
qapi/Makefile.objs deleted +0 -11
deleted file mode 100644
index 10ca4f6..0000000
@@ -1,11 +0,0 @@
-QAPI_TARGET_MODULES = machine-target misc-target
-
-obj-y = qapi-introspect.o
-obj-y += $(QAPI_TARGET_MODULES:%=qapi-types-%.o)
-obj-y += qapi-types.o
-obj-y += $(QAPI_TARGET_MODULES:%=qapi-visit-%.o)
-obj-y += qapi-visit.o
-obj-y += $(QAPI_TARGET_MODULES:%=qapi-events-%.o)
-obj-y += qapi-events.o
-obj-y += $(QAPI_TARGET_MODULES:%=qapi-commands-%.o)
-obj-y += qapi-commands.o
qapi/meson.build +19 -2
index 8431f26..4a335d9 100644
@@ -67,11 +67,17 @@ foreach module : qapi_common_modules + qapi_target_modules
   endif
 endforeach
 
-qapi_all_outputs += [
+qapi_specific_outputs = [
   'qapi-introspect.c', 'qapi-introspect.h',
-  'qapi-doc.texi'
+  'qapi-types.c', 'qapi-types.h',
+  'qapi-visit.c', 'qapi-visit.h',
+  'qapi-events.c', 'qapi-events.h',
+  'qapi-commands.c', 'qapi-commands.h',
 ]
 
+qapi_all_outputs += qapi_specific_outputs
+qapi_all_outputs += 'qapi-doc.texi'
+
 qapi_files = custom_target('QAPI files',
   output: qapi_all_outputs,
   input: [ files('qapi-schema.json') ],
@@ -87,3 +93,14 @@ foreach output : qapi_util_outputs
   endif
   i = i + 1
 endforeach
+
+i = 0
+foreach output : qapi_all_outputs
+  if output in qapi_specific_outputs
+    specific_ss.add(when: 'CONFIG_SOFTMMU', if_true: qapi_files[i])
+  endif
+  if output.endswith('-target.c')
+    specific_ss.add(when: 'CONFIG_SOFTMMU', if_true: qapi_files[i])
+  endif
+  i = i + 1
+endforeach
Signature · 1 line
1.8.3.1
#66 lore raw

PATCH v3 63/132 meson: convert hw/xen

In reply to Paolo Bonzini

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

---
 configure            |  4 ++++
 hw/Makefile.objs     |  1 -
 hw/meson.build       |  1 +
 hw/xen/Makefile.objs |  6 ------
 hw/xen/meson.build   | 18 ++++++++++++++++++
 meson.build          |  6 ++++++
 6 files changed, 29 insertions(+), 7 deletions(-)
 create mode 100644 hw/meson.build
 delete mode 100644 hw/xen/Makefile.objs
 create mode 100644 hw/xen/meson.build
configure +4 -0
index 28746c1..c53df48 100755
@@ -2454,6 +2454,8 @@ if test "$xen" != "no" ; then
     fi
     QEMU_CFLAGS="$QEMU_CFLAGS $($pkg_config --cflags $xen_pc)"
     libs_softmmu="$($pkg_config --libs $xen_pc) $libs_softmmu"
+    xen_cflags="$($pkg_config --cflags $xen_pc)"
+    xen_libs="$($pkg_config --libs $xen_pc)"
   else
 
     xen_libs="-lxenstore -lxenctrl -lxenguest"
@@ -6843,6 +6845,8 @@ fi
 if test "$xen" = "yes" ; then
   echo "CONFIG_XEN_BACKEND=y" >> $config_host_mak
   echo "CONFIG_XEN_CTRL_INTERFACE_VERSION=$xen_ctrl_version" >> $config_host_mak
+  echo "XEN_CFLAGS=$xen_cflags" >> $config_host_mak
+  echo "XEN_LIBS=$xen_libs" >> $config_host_mak
 fi
 if test "$linux_aio" = "yes" ; then
   echo "CONFIG_LINUX_AIO=y" >> $config_host_mak
hw/Makefile.objs +0 -1
index ece6cc3..793d55b 100644
@@ -35,7 +35,6 @@ devices-dirs-y += usb/
 devices-dirs-$(CONFIG_VFIO) += vfio/
 devices-dirs-y += virtio/
 devices-dirs-y += watchdog/
-devices-dirs-y += xen/
 devices-dirs-$(CONFIG_MEM_DEVICE) += mem/
 devices-dirs-y += semihosting/
 devices-dirs-y += smbios/
hw/meson.build new file +1 -0
new file mode 100644
index 0000000..08112a5
@@ -0,0 +1 @@
+subdir('xen')
hw/xen/Makefile.objs deleted +0 -6
deleted file mode 100644
index 84df60a..0000000
@@ -1,6 +0,0 @@
-# xen backend driver support
-common-obj-$(CONFIG_XEN) += xen-legacy-backend.o xen_devconfig.o xen_pvdev.o xen-common.o xen-bus.o xen-bus-helper.o xen-backend.o
-
-obj-$(CONFIG_XEN_PCI_PASSTHROUGH) += xen-host-pci-device.o
-obj-$(CONFIG_XEN_PCI_PASSTHROUGH) += xen_pt.o xen_pt_config_init.o xen_pt_graphics.o xen_pt_msi.o
-obj-$(CONFIG_XEN_PCI_PASSTHROUGH) += xen_pt_load_rom.o
hw/xen/meson.build new file +18 -0
new file mode 100644
index 0000000..e9587b6
@@ -0,0 +1,18 @@
+softmmu_ss.add(when: ['CONFIG_XEN', xen], if_true: files(
+  'xen-backend.c',
+  'xen-bus-helper.c',
+  'xen-bus.c',
+  'xen-common.c',
+  'xen-legacy-backend.c',
+  'xen_devconfig.c',
+  'xen_pvdev.c',
+))
+
+specific_ss.add(when: 'CONFIG_XEN_PCI_PASSTHROUGH', if_true: files(
+  'xen-host-pci-device.c',
+  'xen_pt.c',
+  'xen_pt_config_init.c',
+  'xen_pt_graphics.c',
+  'xen_pt_load_rom.c',
+  'xen_pt_msi.c',
+))
meson.build +6 -0
index 68a5f6e..f1c5e7a 100644
@@ -295,6 +295,11 @@ numa = declare_dependency()
 if 'CONFIG_NUMA' in config_host
   numa = declare_dependency(link_args: config_host['NUMA_LIBS'].split())
 endif
+xen = declare_dependency()
+if 'CONFIG_XEN_BACKEND' in config_host
+  xen = declare_dependency(compile_args: config_host['XEN_CFLAGS'].split(),
+                           link_args: config_host['XEN_LIBS'].split())
+endif
 
 create_config = find_program('scripts/create_config')
 minikconf = find_program('scripts/minikconf.py')
@@ -618,6 +623,7 @@ subdir('migration')
 subdir('monitor')
 subdir('net')
 subdir('replay')
+subdir('hw')
 
 mods = []
 block_mods = []
Signature · 1 line
1.8.3.1
#67 lore raw

PATCH v3 64/132 meson: convert hw/core

In reply to Paolo Bonzini

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

---
 hw/Makefile.objs      |  1 -
 hw/core/Makefile.objs | 30 ------------------------------
 hw/core/meson.build   | 39 +++++++++++++++++++++++++++++++++++++++
 hw/meson.build        |  1 +
 4 files changed, 40 insertions(+), 31 deletions(-)
 delete mode 100644 hw/core/Makefile.objs
 create mode 100644 hw/core/meson.build
hw/Makefile.objs +0 -1
index 793d55b..2ef93e7 100644
@@ -1,4 +1,3 @@
-devices-dirs-y = core/
 ifeq ($(CONFIG_SOFTMMU), y)
 devices-dirs-$(call lor,$(CONFIG_VIRTIO_9P),$(call land,$(CONFIG_VIRTFS),$(CONFIG_XEN))) += 9pfs/
 devices-dirs-y += acpi/
hw/core/Makefile.objs deleted +0 -30
deleted file mode 100644
index fd0550d..0000000
@@ -1,30 +0,0 @@
-# core qdev-related obj files, also used by *-user:
-common-obj-y += qdev.o qdev-properties.o
-common-obj-y += bus.o reset.o
-common-obj-$(CONFIG_SOFTMMU) += qdev-fw.o
-common-obj-$(CONFIG_SOFTMMU) += fw-path-provider.o
-# irq.o needed for qdev GPIO handling:
-common-obj-y += irq.o
-common-obj-y += hotplug.o
-common-obj-$(CONFIG_SOFTMMU) += nmi.o
-common-obj-$(CONFIG_SOFTMMU) += vm-change-state-handler.o
-common-obj-y += cpu.o
-
-common-obj-$(CONFIG_EMPTY_SLOT) += empty_slot.o
-common-obj-$(CONFIG_XILINX_AXI) += stream.o
-common-obj-$(CONFIG_PTIMER) += ptimer.o
-common-obj-$(CONFIG_SOFTMMU) += sysbus.o
-common-obj-$(CONFIG_SOFTMMU) += machine.o
-common-obj-$(CONFIG_SOFTMMU) += loader.o
-common-obj-$(CONFIG_FITLOADER) += loader-fit.o
-common-obj-$(CONFIG_SOFTMMU) += qdev-properties-system.o
-common-obj-$(CONFIG_REGISTER) += register.o
-common-obj-$(CONFIG_OR_IRQ) += or-irq.o
-common-obj-$(CONFIG_SPLIT_IRQ) += split-irq.o
-common-obj-$(CONFIG_PLATFORM_BUS) += platform-bus.o
-common-obj-$(CONFIG_GENERIC_LOADER) += generic-loader.o
-common-obj-$(CONFIG_SOFTMMU) += null-machine.o
-
-obj-$(CONFIG_SOFTMMU) += machine-qmp-cmds.o
-obj-$(CONFIG_SOFTMMU) += numa.o
-common-obj-$(CONFIG_SOFTMMU) += machine-hmp-cmds.o
hw/core/meson.build new file +39 -0
new file mode 100644
index 0000000..70bdff6
@@ -0,0 +1,39 @@
+common_ss.add(files(
+  # core qdev-related obj files, also used by *-user:
+  'bus.c',
+  'cpu.c',
+  'hotplug.c',
+  'qdev-properties.c',
+  'qdev.c',
+  'reset.c',
+  # irq.c needed for qdev GPIO handling:
+  'irq.c',
+))
+
+common_ss.add(when: 'CONFIG_EMPTY_SLOT', if_true: files('empty_slot.c'))
+common_ss.add(when: 'CONFIG_FITLOADER', if_true: files('loader-fit.c'))
+common_ss.add(when: 'CONFIG_GENERIC_LOADER', if_true: files('generic-loader.c'))
+common_ss.add(when: 'CONFIG_OR_IRQ', if_true: files('or-irq.c'))
+common_ss.add(when: 'CONFIG_PLATFORM_BUS', if_true: files('platform-bus.c'))
+common_ss.add(when: 'CONFIG_PTIMER', if_true: files('ptimer.c'))
+common_ss.add(when: 'CONFIG_REGISTER', if_true: files('register.c'))
+common_ss.add(when: 'CONFIG_SPLIT_IRQ', if_true: files('split-irq.c'))
+common_ss.add(when: 'CONFIG_XILINX_AXI', if_true: files('stream.c'))
+
+softmmu_ss.add(files(
+  'fw-path-provider.c',
+  'loader.c',
+  'machine-hmp-cmds.c',
+  'machine.c',
+  'nmi.c',
+  'null-machine.c',
+  'qdev-fw.c',
+  'qdev-properties-system.c',
+  'sysbus.c',
+  'vm-change-state-handler.c',
+))
+
+specific_ss.add(when: 'CONFIG_SOFTMMU', if_true: files(
+  'machine-qmp-cmds.c',
+  'numa.c',
+))
hw/meson.build +1 -0
index 08112a5..fe7c466 100644
@@ -1 +1,2 @@
+subdir('core')
 subdir('xen')
Signature · 1 line
1.8.3.1
#68 lore raw

PATCH v3 65/132 meson: convert hw/semihosting

In reply to Paolo Bonzini

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

---
 hw/Makefile.objs             | 1 -
 hw/meson.build               | 1 +
 hw/semihosting/Makefile.objs | 2 --
 hw/semihosting/meson.build   | 4 ++++
 4 files changed, 5 insertions(+), 3 deletions(-)
 delete mode 100644 hw/semihosting/Makefile.objs
 create mode 100644 hw/semihosting/meson.build
hw/Makefile.objs +0 -1
index 2ef93e7..1e23cb9 100644
@@ -35,7 +35,6 @@ devices-dirs-$(CONFIG_VFIO) += vfio/
 devices-dirs-y += virtio/
 devices-dirs-y += watchdog/
 devices-dirs-$(CONFIG_MEM_DEVICE) += mem/
-devices-dirs-y += semihosting/
 devices-dirs-y += smbios/
 endif
 
hw/meson.build +1 -0
index fe7c466..66a2f6c 100644
@@ -1,2 +1,3 @@
 subdir('core')
+subdir('semihosting')
 subdir('xen')
hw/semihosting/Makefile.objs deleted +0 -2
deleted file mode 100644
index 4ad47c0..0000000
@@ -1,2 +0,0 @@
-obj-$(CONFIG_SEMIHOSTING) += config.o
-obj-$(CONFIG_SEMIHOSTING) += console.o
hw/semihosting/meson.build new file +4 -0
new file mode 100644
index 0000000..f40ac57
@@ -0,0 +1,4 @@
+specific_ss.add(when: 'CONFIG_SEMIHOSTING', if_true: files(
+  'config.c',
+  'console.c',
+))
Signature · 1 line
1.8.3.1
#69 lore raw

PATCH v3 66/132 meson: convert hw/smbios

In reply to Paolo Bonzini

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

---
 hw/Makefile.objs        |  1 -
 hw/meson.build          |  1 +
 hw/smbios/Makefile.objs | 10 ----------
 hw/smbios/meson.build   | 13 +++++++++++++
 4 files changed, 14 insertions(+), 11 deletions(-)
 delete mode 100644 hw/smbios/Makefile.objs
 create mode 100644 hw/smbios/meson.build
hw/Makefile.objs +0 -1
index 1e23cb9..f5c2ab4 100644
@@ -35,7 +35,6 @@ devices-dirs-$(CONFIG_VFIO) += vfio/
 devices-dirs-y += virtio/
 devices-dirs-y += watchdog/
 devices-dirs-$(CONFIG_MEM_DEVICE) += mem/
-devices-dirs-y += smbios/
 endif
 
 common-obj-y += $(devices-dirs-y)
hw/meson.build +1 -0
index 66a2f6c..80da62d 100644
@@ -1,3 +1,4 @@
 subdir('core')
 subdir('semihosting')
+subdir('smbios')
 subdir('xen')
hw/smbios/Makefile.objs deleted +0 -10
deleted file mode 100644
index 23bb2ba..0000000
@@ -1,10 +0,0 @@
-ifeq ($(CONFIG_SMBIOS),y)
-common-obj-y += smbios.o
-common-obj-$(CONFIG_IPMI) += smbios_type_38.o
-common-obj-$(call lnot,$(CONFIG_IPMI)) += smbios_type_38-stub.o
-else
-common-obj-y += smbios-stub.o
-endif
-
-common-obj-$(CONFIG_ALL) += smbios-stub.o
-common-obj-$(CONFIG_ALL) += smbios_type_38-stub.o
hw/smbios/meson.build new file +13 -0
new file mode 100644
index 0000000..9e762c7
@@ -0,0 +1,13 @@
+smbios_ss = ss.source_set()
+smbios_ss.add(files('smbios.c'))
+smbios_ss.add(when: 'CONFIG_IPMI',
+              if_true: files('smbios_type_38.c'),
+              if_false: files('smbios_type_38-stub.c'))
+
+softmmu_ss.add_all(when: 'CONFIG_SMBIOS', if_true: smbios_ss)
+softmmu_ss.add(when: 'CONFIG_SMBIOS', if_false: files('smbios-stub.c'))
+
+softmmu_ss.add(when: 'CONFIG_ALL', if_true: files(
+  'smbios-stub.c',
+  'smbios_type_38-stub.c',
+))
Signature · 1 line
1.8.3.1
#70 lore raw

PATCH v3 67/132 meson: convert hw/mem

In reply to Paolo Bonzini

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

---
 hw/Makefile.objs     | 1 -
 hw/mem/Kconfig       | 1 +
 hw/mem/Makefile.objs | 3 ---
 hw/mem/meson.build   | 3 +++
 hw/meson.build       | 1 +
 5 files changed, 5 insertions(+), 4 deletions(-)
 delete mode 100644 hw/mem/Makefile.objs
 create mode 100644 hw/mem/meson.build
hw/Makefile.objs +0 -1
index f5c2ab4..b91472b 100644
@@ -34,7 +34,6 @@ devices-dirs-y += usb/
 devices-dirs-$(CONFIG_VFIO) += vfio/
 devices-dirs-y += virtio/
 devices-dirs-y += watchdog/
-devices-dirs-$(CONFIG_MEM_DEVICE) += mem/
 endif
 
 common-obj-y += $(devices-dirs-y)
hw/mem/Kconfig +1 -0
index 620fd4c..9e6c6b8 100644
@@ -9,3 +9,4 @@ config NVDIMM
     bool
     default y
     depends on PC
+    select MEM_DEVICE
hw/mem/Makefile.objs deleted +0 -3
deleted file mode 100644
index 3e2f7c5..0000000
@@ -1,3 +0,0 @@
-common-obj-$(CONFIG_DIMM) += pc-dimm.o
-common-obj-$(CONFIG_MEM_DEVICE) += memory-device.o
-common-obj-$(CONFIG_NVDIMM) += nvdimm.o
hw/mem/meson.build new file +3 -0
new file mode 100644
index 0000000..f9adc45
@@ -0,0 +1,3 @@
+common_ss.add(when: 'CONFIG_MEM_DEVICE', if_true: files('memory-device.c'))
+common_ss.add(when: 'CONFIG_DIMM', if_true: files('pc-dimm.c'))
+common_ss.add(when: 'CONFIG_NVDIMM', if_true: files('nvdimm.c'))
hw/meson.build +1 -0
index 80da62d..d788be4 100644
@@ -1,4 +1,5 @@
 subdir('core')
+subdir('mem')
 subdir('semihosting')
 subdir('smbios')
 subdir('xen')
Signature · 1 line
1.8.3.1
#71 lore raw

PATCH v3 68/132 meson: convert hw/watchdog

In reply to Paolo Bonzini

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

---
 hw/Makefile.objs          | 1 -
 hw/meson.build            | 1 +
 hw/watchdog/Makefile.objs | 6 ------
 hw/watchdog/meson.build   | 6 ++++++
 4 files changed, 7 insertions(+), 7 deletions(-)
 delete mode 100644 hw/watchdog/Makefile.objs
 create mode 100644 hw/watchdog/meson.build
hw/Makefile.objs +0 -1
index b91472b..a1d3f07 100644
@@ -33,7 +33,6 @@ devices-dirs-$(CONFIG_TPM) += tpm/
 devices-dirs-y += usb/
 devices-dirs-$(CONFIG_VFIO) += vfio/
 devices-dirs-y += virtio/
-devices-dirs-y += watchdog/
 endif
 
 common-obj-y += $(devices-dirs-y)
hw/meson.build +1 -0
index d788be4..376dbef 100644
@@ -2,4 +2,5 @@ subdir('core')
 subdir('mem')
 subdir('semihosting')
 subdir('smbios')
+subdir('watchdog')
 subdir('xen')
hw/watchdog/Makefile.objs deleted +0 -6
deleted file mode 100644
index 3f536d1..0000000
@@ -1,6 +0,0 @@
-common-obj-y += watchdog.o
-common-obj-$(CONFIG_CMSDK_APB_WATCHDOG) += cmsdk-apb-watchdog.o
-common-obj-$(CONFIG_WDT_IB6300ESB) += wdt_i6300esb.o
-common-obj-$(CONFIG_WDT_IB700) += wdt_ib700.o
-common-obj-$(CONFIG_WDT_DIAG288) += wdt_diag288.o
-common-obj-$(CONFIG_ASPEED_SOC) += wdt_aspeed.o
hw/watchdog/meson.build new file +6 -0
new file mode 100644
index 0000000..eafb57b
@@ -0,0 +1,6 @@
+softmmu_ss.add(files('watchdog.c'))
+softmmu_ss.add(when: 'CONFIG_CMSDK_APB_WATCHDOG', if_true: files('cmsdk-apb-watchdog.c'))
+softmmu_ss.add(when: 'CONFIG_WDT_IB6300ESB', if_true: files('wdt_i6300esb.c'))
+softmmu_ss.add(when: 'CONFIG_WDT_IB700', if_true: files('wdt_ib700.c'))
+softmmu_ss.add(when: 'CONFIG_WDT_DIAG288', if_true: files('wdt_diag288.c'))
+softmmu_ss.add(when: 'CONFIG_ASPEED_SOC', if_true: files('wdt_aspeed.c'))
Signature · 1 line
1.8.3.1
#72 lore raw

PATCH v3 69/132 meson: convert hw/virtio

In reply to Paolo Bonzini

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

---
 hw/Makefile.objs        |  1 -
 hw/meson.build          |  1 +
 hw/virtio/Makefile.objs | 39 ---------------------------------------
 hw/virtio/meson.build   | 42 ++++++++++++++++++++++++++++++++++++++++++
 4 files changed, 43 insertions(+), 40 deletions(-)
 delete mode 100644 hw/virtio/Makefile.objs
 create mode 100644 hw/virtio/meson.build
hw/Makefile.objs +0 -1
index a1d3f07..3f528b5 100644
@@ -32,7 +32,6 @@ devices-dirs-y += timer/
 devices-dirs-$(CONFIG_TPM) += tpm/
 devices-dirs-y += usb/
 devices-dirs-$(CONFIG_VFIO) += vfio/
-devices-dirs-y += virtio/
 endif
 
 common-obj-y += $(devices-dirs-y)
hw/meson.build +1 -0
index 376dbef..a8e9acd 100644
@@ -2,5 +2,6 @@ subdir('core')
 subdir('mem')
 subdir('semihosting')
 subdir('smbios')
+subdir('virtio')
 subdir('watchdog')
 subdir('xen')
hw/virtio/Makefile.objs deleted +0 -39
deleted file mode 100644
index e0d7cd3..0000000
@@ -1,39 +0,0 @@
-ifeq ($(CONFIG_VIRTIO),y)
-common-obj-y += virtio-bus.o
-obj-y += virtio.o
-
-obj-$(CONFIG_VHOST) += vhost.o vhost-backend.o
-common-obj-$(call lnot,$(CONFIG_VHOST)) += vhost-stub.o
-obj-$(CONFIG_VHOST_USER) += vhost-user.o
-
-common-obj-$(CONFIG_VIRTIO_RNG) += virtio-rng.o
-common-obj-$(CONFIG_VIRTIO_PCI) += virtio-pci.o
-common-obj-$(CONFIG_VIRTIO_MMIO) += virtio-mmio.o
-obj-$(CONFIG_VIRTIO_BALLOON) += virtio-balloon.o
-obj-$(CONFIG_VIRTIO_CRYPTO) += virtio-crypto.o
-obj-$(call land,$(CONFIG_VIRTIO_CRYPTO),$(CONFIG_VIRTIO_PCI)) += virtio-crypto-pci.o
-obj-$(CONFIG_VIRTIO_PMEM) += virtio-pmem.o
-common-obj-$(call land,$(CONFIG_VIRTIO_PMEM),$(CONFIG_VIRTIO_PCI)) += virtio-pmem-pci.o
-obj-$(CONFIG_VHOST_VSOCK) += vhost-vsock.o
-
-ifeq ($(CONFIG_VIRTIO_PCI),y)
-obj-$(CONFIG_VHOST_VSOCK) += vhost-vsock-pci.o
-obj-$(CONFIG_VHOST_USER_BLK) += vhost-user-blk-pci.o
-obj-$(CONFIG_VHOST_USER_INPUT) += vhost-user-input-pci.o
-obj-$(CONFIG_VHOST_USER_SCSI) += vhost-user-scsi-pci.o
-obj-$(CONFIG_VHOST_SCSI) += vhost-scsi-pci.o
-obj-$(CONFIG_VIRTIO_INPUT_HOST) += virtio-input-host-pci.o
-obj-$(CONFIG_VIRTIO_INPUT) += virtio-input-pci.o
-obj-$(CONFIG_VIRTIO_RNG) += virtio-rng-pci.o
-obj-$(CONFIG_VIRTIO_BALLOON) += virtio-balloon-pci.o
-obj-$(CONFIG_VIRTIO_9P) += virtio-9p-pci.o
-obj-$(CONFIG_VIRTIO_SCSI) += virtio-scsi-pci.o
-obj-$(CONFIG_VIRTIO_BLK) += virtio-blk-pci.o
-obj-$(CONFIG_VIRTIO_NET) += virtio-net-pci.o
-obj-$(CONFIG_VIRTIO_SERIAL) += virtio-serial-pci.o
-endif
-else
-common-obj-y += vhost-stub.o
-endif
-
-common-obj-$(CONFIG_ALL) += vhost-stub.o
hw/virtio/meson.build new file +42 -0

42 lines not on this page · raw message

Signature · 1 line
1.8.3.1
#73 lore raw

PATCH v3 70/132 meson: convert hw/vfio

In reply to Paolo Bonzini

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

---
 hw/Makefile.objs      |  1 -
 hw/meson.build        |  1 +
 hw/vfio/Makefile.objs |  7 -------
 hw/vfio/meson.build   | 17 +++++++++++++++++
 4 files changed, 18 insertions(+), 8 deletions(-)
 delete mode 100644 hw/vfio/Makefile.objs
 create mode 100644 hw/vfio/meson.build
hw/Makefile.objs +0 -1
index 3f528b5..d0c817b 100644
@@ -31,7 +31,6 @@ devices-dirs-y += ssi/
 devices-dirs-y += timer/
 devices-dirs-$(CONFIG_TPM) += tpm/
 devices-dirs-y += usb/
-devices-dirs-$(CONFIG_VFIO) += vfio/
 endif
 
 common-obj-y += $(devices-dirs-y)
hw/meson.build +1 -0
index a8e9acd..16c0abd 100644
@@ -2,6 +2,7 @@ subdir('core')
 subdir('mem')
 subdir('semihosting')
 subdir('smbios')
+subdir('vfio')
 subdir('virtio')
 subdir('watchdog')
 subdir('xen')
hw/vfio/Makefile.objs deleted +0 -7
deleted file mode 100644
index abad8b8..0000000
@@ -1,7 +0,0 @@
-obj-y += common.o spapr.o
-obj-$(CONFIG_VFIO_PCI) += pci.o pci-quirks.o display.o
-obj-$(CONFIG_VFIO_CCW) += ccw.o
-obj-$(CONFIG_VFIO_PLATFORM) += platform.o
-obj-$(CONFIG_VFIO_XGMAC) += calxeda-xgmac.o
-obj-$(CONFIG_VFIO_AMD_XGBE) += amd-xgbe.o
-obj-$(CONFIG_VFIO_AP) += ap.o
hw/vfio/meson.build new file +17 -0
new file mode 100644
index 0000000..b9a31ca
@@ -0,0 +1,17 @@
+vfio_ss = ss.source_set()
+vfio_ss.add(files(
+  'common.c',
+  'spapr.c',
+))
+vfio_ss.add(when: 'CONFIG_VFIO_PCI', if_true: files(
+  'display.c',
+  'pci-quirks.c',
+  'pci.c',
+))
+vfio_ss.add(when: 'CONFIG_VFIO_CCW', if_true: files('ccw.c'))
+vfio_ss.add(when: 'CONFIG_VFIO_PLATFORM', if_true: files('platform.c'))
+vfio_ss.add(when: 'CONFIG_VFIO_XGMAC', if_true: files('calxeda-xgmac.c'))
+vfio_ss.add(when: 'CONFIG_VFIO_AMD_XGBE', if_true: files('amd-xgbe.c'))
+vfio_ss.add(when: 'CONFIG_VFIO_AP', if_true: files('ap.c'))
+
+specific_ss.add_all(when: 'CONFIG_VFIO', if_true: vfio_ss)
Signature · 1 line
1.8.3.1
#74 lore raw

PATCH v3 71/132 meson: convert hw/usb

In reply to Paolo Bonzini

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

---
 Makefile.target      |  1 +
 hw/Makefile.objs     |  1 -
 hw/meson.build       |  1 +
 hw/usb/Makefile.objs | 62 ----------------------------------------------------
 hw/usb/meson.build   | 54 +++++++++++++++++++++++++++++++++++++++++++++
 meson.build          | 15 +++++++++++++
 6 files changed, 71 insertions(+), 63 deletions(-)
 delete mode 100644 hw/usb/Makefile.objs
 create mode 100644 hw/usb/meson.build
Makefile.target +1 -0
index c2fcb22..a41e4e5 100644
@@ -167,6 +167,7 @@ endif
 LIBS := $(LIBS) $(BRLAPI_LIBS) $(SDL_LIBS) $(SPICE_LIBS) $(OPENGL_LIBS) $(SECCOMP_LIBS)
 LIBS := $(LIBS) $(COREAUDIO_LIBS) $(DSOUND_LIBS)
 LIBS := $(LIBS) $(VDE_LIBS) $(SLIRP_LIBS)
+LIBS := $(LIBS) $(LIBUSB_LIBS) $(SMARTCARD_LIBS) $(USB_REDIR_LIBS)
 
 # Hardware support
 ifeq ($(TARGET_NAME), sparc64)
hw/Makefile.objs +0 -1
index d0c817b..df804a0 100644
@@ -30,7 +30,6 @@ devices-dirs-y += sd/
 devices-dirs-y += ssi/
 devices-dirs-y += timer/
 devices-dirs-$(CONFIG_TPM) += tpm/
-devices-dirs-y += usb/
 endif
 
 common-obj-y += $(devices-dirs-y)
hw/meson.build +1 -0
index 16c0abd..43797f9 100644
@@ -2,6 +2,7 @@ subdir('core')
 subdir('mem')
 subdir('semihosting')
 subdir('smbios')
+subdir('usb')
 subdir('vfio')
 subdir('virtio')
 subdir('watchdog')
hw/usb/Makefile.objs deleted +0 -62

62 lines not on this page · raw message

hw/usb/meson.build new file +54 -0

54 lines not on this page · raw message

meson.build +15 -0
index f1c5e7a..58bc25c 100644
@@ -300,6 +300,21 @@ if 'CONFIG_XEN_BACKEND' in config_host
   xen = declare_dependency(compile_args: config_host['XEN_CFLAGS'].split(),
                            link_args: config_host['XEN_LIBS'].split())
 endif
+cacard = declare_dependency()
+if 'CONFIG_SMARTCARD' in config_host
+  cacard = declare_dependency(compile_args: config_host['SMARTCARD_CFLAGS'].split(),
+                              link_args: config_host['SMARTCARD_LIBS'].split())
+endif
+usbredir = declare_dependency()
+if 'CONFIG_USB_REDIR' in config_host
+  usbredir = declare_dependency(compile_args: config_host['USB_REDIR_CFLAGS'].split(),
+                                link_args: config_host['USB_REDIR_LIBS'].split())
+endif
+libusb = declare_dependency()
+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
 
 create_config = find_program('scripts/create_config')
 minikconf = find_program('scripts/minikconf.py')
Signature · 1 line
1.8.3.1
#75 lore raw

PATCH v3 72/132 meson: convert hw/tpm

In reply to Paolo Bonzini

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

---
 hw/Makefile.objs     | 1 -
 hw/meson.build       | 1 +
 hw/tpm/Makefile.objs | 6 ------
 hw/tpm/meson.build   | 7 +++++++
 4 files changed, 8 insertions(+), 7 deletions(-)
 delete mode 100644 hw/tpm/Makefile.objs
 create mode 100644 hw/tpm/meson.build
hw/Makefile.objs +0 -1
index df804a0..6529617 100644
@@ -29,7 +29,6 @@ devices-dirs-$(CONFIG_SCSI) += scsi/
 devices-dirs-y += sd/
 devices-dirs-y += ssi/
 devices-dirs-y += timer/
-devices-dirs-$(CONFIG_TPM) += tpm/
 endif
 
 common-obj-y += $(devices-dirs-y)
hw/meson.build +1 -0
index 43797f9..4e918d0 100644
@@ -2,6 +2,7 @@ subdir('core')
 subdir('mem')
 subdir('semihosting')
 subdir('smbios')
+subdir('tpm')
 subdir('usb')
 subdir('vfio')
 subdir('virtio')
hw/tpm/Makefile.objs deleted +0 -6
deleted file mode 100644
index de0b85d..0000000
@@ -1,6 +0,0 @@
-common-obj-$(CONFIG_TPM) += tpm_util.o
-obj-$(call lor,$(CONFIG_TPM_TIS),$(CONFIG_TPM_CRB)) += tpm_ppi.o
-common-obj-$(CONFIG_TPM_TIS) += tpm_tis.o
-common-obj-$(CONFIG_TPM_CRB) += tpm_crb.o
-common-obj-$(CONFIG_TPM_PASSTHROUGH) += tpm_passthrough.o
-common-obj-$(CONFIG_TPM_EMULATOR) += tpm_emulator.o
hw/tpm/meson.build new file +7 -0
new file mode 100644
index 0000000..9ab7cd7
@@ -0,0 +1,7 @@
+softmmu_ss.add(when: 'CONFIG_TPM', if_true: files('tpm_util.c'))
+softmmu_ss.add(when: 'CONFIG_TPM_TIS', if_true: files('tpm_tis.c'))
+softmmu_ss.add(when: 'CONFIG_TPM_CRB', if_true: files('tpm_crb.c'))
+softmmu_ss.add(when: 'CONFIG_TPM_PASSTHROUGH', if_true: files('tpm_passthrough.c'))
+softmmu_ss.add(when: 'CONFIG_TPM_EMULATOR', if_true: files('tpm_emulator.c'))
+
+specific_ss.add(when: ['CONFIG_SOFTMMU', 'CONFIG_TPMDEV'], if_true: files('tpm_ppi.c'))
Signature · 1 line
1.8.3.1
#76 lore raw

PATCH v3 73/132 meson: convert hw/timer

In reply to Paolo Bonzini

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

---
 hw/Makefile.objs       |  1 -
 hw/meson.build         |  1 +
 hw/timer/Makefile.objs | 49 -------------------------------------------------
 hw/timer/meson.build   | 43 +++++++++++++++++++++++++++++++++++++++++++
 4 files changed, 44 insertions(+), 50 deletions(-)
 delete mode 100644 hw/timer/Makefile.objs
 create mode 100644 hw/timer/meson.build
hw/Makefile.objs +0 -1
index 6529617..1d47113 100644
@@ -28,7 +28,6 @@ devices-dirs-y += pcmcia/
 devices-dirs-$(CONFIG_SCSI) += scsi/
 devices-dirs-y += sd/
 devices-dirs-y += ssi/
-devices-dirs-y += timer/
 endif
 
 common-obj-y += $(devices-dirs-y)
hw/meson.build +1 -0
index 4e918d0..960fd14 100644
@@ -2,6 +2,7 @@ subdir('core')
 subdir('mem')
 subdir('semihosting')
 subdir('smbios')
+subdir('timer')
 subdir('tpm')
 subdir('usb')
 subdir('vfio')
hw/timer/Makefile.objs deleted +0 -49

49 lines not on this page · raw message

hw/timer/meson.build new file +43 -0

43 lines not on this page · raw message

Signature · 1 line
1.8.3.1
#77 lore raw

PATCH v3 74/132 meson: convert hw/ssi

In reply to Paolo Bonzini

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

---
 hw/Makefile.objs     |  1 -
 hw/meson.build       |  1 +
 hw/ssi/Makefile.objs | 10 ----------
 hw/ssi/meson.build   | 10 ++++++++++
 4 files changed, 11 insertions(+), 11 deletions(-)
 delete mode 100644 hw/ssi/Makefile.objs
 create mode 100644 hw/ssi/meson.build
hw/Makefile.objs +0 -1
index 1d47113..201d614 100644
@@ -27,7 +27,6 @@ devices-dirs-$(CONFIG_PCI) += pci-bridge/ pci-host/
 devices-dirs-y += pcmcia/
 devices-dirs-$(CONFIG_SCSI) += scsi/
 devices-dirs-y += sd/
-devices-dirs-y += ssi/
 endif
 
 common-obj-y += $(devices-dirs-y)
hw/meson.build +1 -0
index 960fd14..a867f82 100644
@@ -2,6 +2,7 @@ subdir('core')
 subdir('mem')
 subdir('semihosting')
 subdir('smbios')
+subdir('ssi')
 subdir('timer')
 subdir('tpm')
 subdir('usb')
hw/ssi/Makefile.objs deleted +0 -10
deleted file mode 100644
index f5bcc65..0000000
@@ -1,10 +0,0 @@
-common-obj-$(CONFIG_PL022) += pl022.o
-common-obj-$(CONFIG_SSI) += ssi.o
-common-obj-$(CONFIG_XILINX_SPI) += xilinx_spi.o
-common-obj-$(CONFIG_XILINX_SPIPS) += xilinx_spips.o
-common-obj-$(CONFIG_ASPEED_SOC) += aspeed_smc.o
-common-obj-$(CONFIG_STM32F2XX_SPI) += stm32f2xx_spi.o
-common-obj-$(CONFIG_MSF2) += mss-spi.o
-
-obj-$(CONFIG_OMAP) += omap_spi.o
-obj-$(CONFIG_IMX) += imx_spi.o
hw/ssi/meson.build new file +10 -0
new file mode 100644
index 0000000..612c109
@@ -0,0 +1,10 @@
+softmmu_ss.add(when: 'CONFIG_ASPEED_SOC', if_true: files('aspeed_smc.c'))
+softmmu_ss.add(when: 'CONFIG_MSF2', if_true: files('mss-spi.c'))
+softmmu_ss.add(when: 'CONFIG_PL022', if_true: files('pl022.c'))
+softmmu_ss.add(when: 'CONFIG_SSI', if_true: files('ssi.c'))
+softmmu_ss.add(when: 'CONFIG_STM32F2XX_SPI', if_true: files('stm32f2xx_spi.c'))
+softmmu_ss.add(when: 'CONFIG_XILINX_SPI', if_true: files('xilinx_spi.c'))
+softmmu_ss.add(when: 'CONFIG_XILINX_SPIPS', if_true: files('xilinx_spips.c'))
+
+specific_ss.add(when: 'CONFIG_IMX', if_true: files('imx_spi.c'))
+specific_ss.add(when: 'CONFIG_OMAP', if_true: files('omap_spi.c'))
Signature · 1 line
1.8.3.1
#78 lore raw

PATCH v3 75/132 meson: convert hw/sd

In reply to Paolo Bonzini

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

---
 hw/Makefile.objs    |  1 -
 hw/meson.build      |  1 +
 hw/sd/Makefile.objs | 10 ----------
 hw/sd/meson.build   | 10 ++++++++++
 4 files changed, 11 insertions(+), 11 deletions(-)
 delete mode 100644 hw/sd/Makefile.objs
 create mode 100644 hw/sd/meson.build
hw/Makefile.objs +0 -1
index 201d614..22ea14a 100644
@@ -26,7 +26,6 @@ devices-dirs-y += pci/
 devices-dirs-$(CONFIG_PCI) += pci-bridge/ pci-host/
 devices-dirs-y += pcmcia/
 devices-dirs-$(CONFIG_SCSI) += scsi/
-devices-dirs-y += sd/
 endif
 
 common-obj-y += $(devices-dirs-y)
hw/meson.build +1 -0
index a867f82..0d29fa7 100644
@@ -1,5 +1,6 @@
 subdir('core')
 subdir('mem')
+subdir('sd')
 subdir('semihosting')
 subdir('smbios')
 subdir('ssi')
hw/sd/Makefile.objs deleted +0 -10
deleted file mode 100644
index 0665727..0000000
@@ -1,10 +0,0 @@
-common-obj-$(CONFIG_PL181) += pl181.o
-common-obj-$(CONFIG_SSI_SD) += ssi-sd.o
-common-obj-$(CONFIG_SD) += sd.o core.o sdmmc-internal.o
-common-obj-$(CONFIG_SDHCI) += sdhci.o
-common-obj-$(CONFIG_SDHCI_PCI) += sdhci-pci.o
-
-obj-$(CONFIG_MILKYMIST) += milkymist-memcard.o
-obj-$(CONFIG_OMAP) += omap_mmc.o
-obj-$(CONFIG_PXA2XX) += pxa2xx_mmci.o
-obj-$(CONFIG_RASPI) += bcm2835_sdhost.o
hw/sd/meson.build new file +10 -0
new file mode 100644
index 0000000..65a5b04
@@ -0,0 +1,10 @@
+softmmu_ss.add(when: 'CONFIG_PL181', if_true: files('pl181.c'))
+softmmu_ss.add(when: 'CONFIG_SD', if_true: files('sd.c', 'core.c', 'sdmmc-internal.c'))
+softmmu_ss.add(when: 'CONFIG_SDHCI', if_true: files('sdhci.c'))
+softmmu_ss.add(when: 'CONFIG_SDHCI_PCI', if_true: files('sdhci-pci.c'))
+softmmu_ss.add(when: 'CONFIG_SSI_SD', if_true: files('ssi-sd.c'))
+
+specific_ss.add(when: 'CONFIG_MILKYMIST', if_true: files('milkymist-memcard.c'))
+specific_ss.add(when: 'CONFIG_OMAP', if_true: files('omap_mmc.c'))
+specific_ss.add(when: 'CONFIG_PXA2XX', if_true: files('pxa2xx_mmci.c'))
+specific_ss.add(when: 'CONFIG_RASPI', if_true: files('bcm2835_sdhost.c'))
Signature · 1 line
1.8.3.1
#79 lore raw

PATCH v3 76/132 meson: convert hw/scsi

In reply to Paolo Bonzini

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

---
 hw/Makefile.objs      |  1 -
 hw/meson.build        |  1 +
 hw/scsi/Makefile.objs | 15 ---------------
 hw/scsi/meson.build   | 26 ++++++++++++++++++++++++++
 4 files changed, 27 insertions(+), 16 deletions(-)
 delete mode 100644 hw/scsi/Makefile.objs
 create mode 100644 hw/scsi/meson.build
hw/Makefile.objs +0 -1
index 22ea14a..4670061 100644
@@ -25,7 +25,6 @@ devices-dirs-y += nvram/
 devices-dirs-y += pci/
 devices-dirs-$(CONFIG_PCI) += pci-bridge/ pci-host/
 devices-dirs-y += pcmcia/
-devices-dirs-$(CONFIG_SCSI) += scsi/
 endif
 
 common-obj-y += $(devices-dirs-y)
hw/meson.build +1 -0
index 0d29fa7..37ff9ec 100644
@@ -1,5 +1,6 @@
 subdir('core')
 subdir('mem')
+subdir('scsi')
 subdir('sd')
 subdir('semihosting')
 subdir('smbios')
hw/scsi/Makefile.objs deleted +0 -15
deleted file mode 100644
index 54b36ed..0000000
@@ -1,15 +0,0 @@
-common-obj-y += scsi-disk.o emulation.o
-common-obj-y += scsi-generic.o scsi-bus.o
-common-obj-$(CONFIG_LSI_SCSI_PCI) += lsi53c895a.o
-common-obj-$(CONFIG_MPTSAS_SCSI_PCI) += mptsas.o mptconfig.o mptendian.o
-common-obj-$(CONFIG_MEGASAS_SCSI_PCI) += megasas.o
-common-obj-$(CONFIG_VMW_PVSCSI_SCSI_PCI) += vmw_pvscsi.o
-common-obj-$(CONFIG_ESP) += esp.o
-common-obj-$(CONFIG_ESP_PCI) += esp-pci.o
-obj-$(CONFIG_SPAPR_VSCSI) += spapr_vscsi.o
-
-ifeq ($(CONFIG_VIRTIO_SCSI),y)
-obj-y += virtio-scsi.o virtio-scsi-dataplane.o
-obj-$(CONFIG_VHOST_SCSI) += vhost-scsi-common.o vhost-scsi.o
-obj-$(CONFIG_VHOST_USER_SCSI) += vhost-scsi-common.o vhost-user-scsi.o
-endif
hw/scsi/meson.build new file +26 -0
new file mode 100644
index 0000000..923a34f
@@ -0,0 +1,26 @@
+scsi_ss = ss.source_set()
+scsi_ss.add(files(
+  'emulation.c',
+  'scsi-bus.c',
+  'scsi-disk.c',
+  'scsi-generic.c',
+))
+scsi_ss.add(when: 'CONFIG_ESP', if_true: files('esp.c'))
+scsi_ss.add(when: 'CONFIG_ESP_PCI', if_true: files('esp-pci.c'))
+scsi_ss.add(when: 'CONFIG_LSI_SCSI_PCI', if_true: files('lsi53c895a.c'))
+scsi_ss.add(when: 'CONFIG_MEGASAS_SCSI_PCI', if_true: files('megasas.c'))
+scsi_ss.add(when: 'CONFIG_MPTSAS_SCSI_PCI', if_true: files('mptsas.c', 'mptconfig.c', 'mptendian.c'))
+scsi_ss.add(when: 'CONFIG_VMW_PVSCSI_SCSI_PCI', if_true: files('vmw_pvscsi.c'))
+softmmu_ss.add_all(when: 'CONFIG_SCSI', if_true: scsi_ss)
+
+specific_scsi_ss = ss.source_set()
+
+virtio_scsi_ss = ss.source_set()
+virtio_scsi_ss.add(files('virtio-scsi.c', 'virtio-scsi-dataplane.c'))
+virtio_scsi_ss.add(when: 'CONFIG_VHOST_SCSI', if_true: files('vhost-scsi-common.c', 'vhost-scsi.c'))
+virtio_scsi_ss.add(when: 'CONFIG_VHOST_USER_SCSI', if_true: files('vhost-scsi-common.c', 'vhost-user-scsi.c'))
+specific_scsi_ss.add_all(when: 'CONFIG_VIRTIO_SCSI', if_true: virtio_scsi_ss)
+
+specific_scsi_ss.add(when: 'CONFIG_SPAPR_VSCSI', if_true: files('spapr_vscsi.c'))
+
+specific_ss.add_all(when: 'CONFIG_SCSI', if_true: specific_scsi_ss)
Signature · 1 line
1.8.3.1
#80 lore raw

PATCH v3 77/132 meson: convert hw/pcmcia

In reply to Paolo Bonzini

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

---
 hw/Makefile.objs        | 1 -
 hw/meson.build          | 1 +
 hw/pcmcia/Makefile.objs | 2 --
 hw/pcmcia/meson.build   | 2 ++
 4 files changed, 3 insertions(+), 3 deletions(-)
 delete mode 100644 hw/pcmcia/Makefile.objs
 create mode 100644 hw/pcmcia/meson.build
hw/Makefile.objs +0 -1
index 4670061..bfa305f 100644
@@ -24,7 +24,6 @@ devices-dirs-y += rdma/
 devices-dirs-y += nvram/
 devices-dirs-y += pci/
 devices-dirs-$(CONFIG_PCI) += pci-bridge/ pci-host/
-devices-dirs-y += pcmcia/
 endif
 
 common-obj-y += $(devices-dirs-y)
hw/meson.build +1 -0
index 37ff9ec..2356eda 100644
@@ -1,5 +1,6 @@
 subdir('core')
 subdir('mem')
+subdir('pcmcia')
 subdir('scsi')
 subdir('sd')
 subdir('semihosting')
hw/pcmcia/Makefile.objs deleted +0 -2
deleted file mode 100644
index 4eac060..0000000
@@ -1,2 +0,0 @@
-common-obj-y += pcmcia.o
-obj-$(CONFIG_PXA2XX) += pxa2xx.o
hw/pcmcia/meson.build new file +2 -0
new file mode 100644
index 0000000..48ece81
@@ -0,0 +1,2 @@
+softmmu_ss.add(files('pcmcia.c'))
+specific_ss.add(when: 'CONFIG_PXA2XX', if_true: files('pxa2xx.c'))
Signature · 1 line
1.8.3.1
#81 lore raw

PATCH v3 78/132 meson: convert hw/pci-host

In reply to Paolo Bonzini

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

---
 hw/Makefile.objs          |  2 +-
 hw/meson.build            |  1 +
 hw/pci-host/Makefile.objs | 21 ---------------------
 hw/pci-host/meson.build   | 22 ++++++++++++++++++++++
 4 files changed, 24 insertions(+), 22 deletions(-)
 delete mode 100644 hw/pci-host/Makefile.objs
 create mode 100644 hw/pci-host/meson.build
hw/Makefile.objs +1 -1
index bfa305f..1f76ce1 100644
@@ -23,7 +23,7 @@ devices-dirs-y += net/
 devices-dirs-y += rdma/
 devices-dirs-y += nvram/
 devices-dirs-y += pci/
-devices-dirs-$(CONFIG_PCI) += pci-bridge/ pci-host/
+devices-dirs-$(CONFIG_PCI) += pci-bridge/
 endif
 
 common-obj-y += $(devices-dirs-y)
hw/meson.build +1 -0
index 2356eda..b93a496 100644
@@ -1,5 +1,6 @@
 subdir('core')
 subdir('mem')
+subdir('pci-host')
 subdir('pcmcia')
 subdir('scsi')
 subdir('sd')
hw/pci-host/Makefile.objs deleted +0 -21
deleted file mode 100644
index a9cd3e0..0000000
@@ -1,21 +0,0 @@
-common-obj-$(CONFIG_PAM) += pam.o
-
-# PPC devices
-common-obj-$(CONFIG_PREP_PCI) += prep.o
-common-obj-$(CONFIG_GRACKLE_PCI) += grackle.o
-# NewWorld PowerMac
-common-obj-$(CONFIG_UNIN_PCI) += uninorth.o
-# PowerPC E500 boards
-common-obj-$(CONFIG_PPCE500_PCI) += ppce500.o
-
-# ARM devices
-common-obj-$(CONFIG_VERSATILE_PCI) += versatile.o
-
-common-obj-$(CONFIG_PCI_SABRE) += sabre.o
-common-obj-$(CONFIG_FULONG) += bonito.o
-common-obj-$(CONFIG_PCI_PIIX) += piix.o
-common-obj-$(CONFIG_PCI_EXPRESS_Q35) += q35.o
-common-obj-$(CONFIG_PCI_EXPRESS_GENERIC_BRIDGE) += gpex.o
-common-obj-$(CONFIG_PCI_EXPRESS_XILINX) += xilinx-pcie.o
-
-common-obj-$(CONFIG_PCI_EXPRESS_DESIGNWARE) += designware.o
hw/pci-host/meson.build new file +22 -0
new file mode 100644
index 0000000..4938826
@@ -0,0 +1,22 @@
+pci_ss = ss.source_set()
+pci_ss.add(when: 'CONFIG_FULONG', if_true: files('bonito.c'))
+pci_ss.add(when: 'CONFIG_PAM', if_true: files('pam.c'))
+pci_ss.add(when: 'CONFIG_PCI_EXPRESS_DESIGNWARE', if_true: files('designware.c'))
+pci_ss.add(when: 'CONFIG_PCI_EXPRESS_GENERIC_BRIDGE', if_true: files('gpex.c'))
+pci_ss.add(when: 'CONFIG_PCI_EXPRESS_Q35', if_true: files('q35.c'))
+pci_ss.add(when: 'CONFIG_PCI_EXPRESS_XILINX', if_true: files('xilinx-pcie.c'))
+pci_ss.add(when: 'CONFIG_PCI_PIIX', if_true: files('piix.c'))
+pci_ss.add(when: 'CONFIG_PCI_SABRE', if_true: files('sabre.c'))
+
+# PPC devices
+pci_ss.add(when: 'CONFIG_PREP_PCI', if_true: files('prep.c'))
+pci_ss.add(when: 'CONFIG_GRACKLE_PCI', if_true: files('grackle.c'))
+# NewWorld PowerMac
+pci_ss.add(when: 'CONFIG_UNIN_PCI', if_true: files('uninorth.c'))
+# PowerPC E500 boards
+pci_ss.add(when: 'CONFIG_PPCE500_PCI', if_true: files('ppce500.c'))
+
+# ARM devices
+pci_ss.add(when: 'CONFIG_VERSATILE_PCI', if_true: files('versatile.c'))
+
+softmmu_ss.add_all(when: 'CONFIG_PCI', if_true: pci_ss)
Signature · 1 line
1.8.3.1
#82 lore raw

PATCH v3 79/132 meson: convert hw/pci-bridge

In reply to Paolo Bonzini

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

---
 hw/Makefile.objs            |  1 -
 hw/meson.build              |  1 +
 hw/pci-bridge/Makefile.objs | 10 ----------
 hw/pci-bridge/meson.build   | 14 ++++++++++++++
 4 files changed, 15 insertions(+), 11 deletions(-)
 delete mode 100644 hw/pci-bridge/Makefile.objs
 create mode 100644 hw/pci-bridge/meson.build
hw/Makefile.objs +0 -1
index 1f76ce1..8a56abf 100644
@@ -23,7 +23,6 @@ devices-dirs-y += net/
 devices-dirs-y += rdma/
 devices-dirs-y += nvram/
 devices-dirs-y += pci/
-devices-dirs-$(CONFIG_PCI) += pci-bridge/
 endif
 
 common-obj-y += $(devices-dirs-y)
hw/meson.build +1 -0
index b93a496..4d88cfa 100644
@@ -1,5 +1,6 @@
 subdir('core')
 subdir('mem')
+subdir('pci-bridge')
 subdir('pci-host')
 subdir('pcmcia')
 subdir('scsi')
hw/pci-bridge/Makefile.objs deleted +0 -10
deleted file mode 100644
index 47065f8..0000000
@@ -1,10 +0,0 @@
-common-obj-y += pci_bridge_dev.o
-common-obj-$(CONFIG_PCIE_PORT) += pcie_root_port.o gen_pcie_root_port.o pcie_pci_bridge.o
-common-obj-$(CONFIG_PXB) += pci_expander_bridge.o
-common-obj-$(CONFIG_XIO3130) += xio3130_upstream.o xio3130_downstream.o
-common-obj-$(CONFIG_IOH3420) += ioh3420.o
-common-obj-$(CONFIG_I82801B11) += i82801b11.o
-# NewWorld PowerMac
-common-obj-$(CONFIG_DEC_PCI) += dec.o
-# Sun4u
-common-obj-$(CONFIG_SIMBA) += simba.o
hw/pci-bridge/meson.build new file +14 -0
new file mode 100644
index 0000000..daab8ac
@@ -0,0 +1,14 @@
+pci_ss = ss.source_set()
+pci_ss.add(files('pci_bridge_dev.c'))
+pci_ss.add(when: 'CONFIG_I82801B11', if_true: files('i82801b11.c'))
+pci_ss.add(when: 'CONFIG_IOH3420', if_true: files('ioh3420.c'))
+pci_ss.add(when: 'CONFIG_PCIE_PORT', if_true: files('pcie_root_port.c', 'gen_pcie_root_port.c', 'pcie_pci_bridge.c'))
+pci_ss.add(when: 'CONFIG_PXB', if_true: files('pci_expander_bridge.c'))
+pci_ss.add(when: 'CONFIG_XIO3130', if_true: files('xio3130_upstream.c', 'xio3130_downstream.c'))
+
+# NewWorld PowerMac
+pci_ss.add(when: 'CONFIG_DEC_PCI', if_true: files('dec.c'))
+# Sun4u
+pci_ss.add(when: 'CONFIG_SIMBA', if_true: files('simba.c'))
+
+softmmu_ss.add_all(when: 'CONFIG_PCI', if_true: pci_ss)
Signature · 1 line
1.8.3.1
#83 lore raw

PATCH v3 80/132 meson: convert hw/pci

In reply to Paolo Bonzini

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

---
 hw/Makefile.objs     |  1 -
 hw/meson.build       |  1 +
 hw/pci/Makefile.objs | 14 --------------
 hw/pci/meson.build   | 19 +++++++++++++++++++
 4 files changed, 20 insertions(+), 15 deletions(-)
 delete mode 100644 hw/pci/Makefile.objs
 create mode 100644 hw/pci/meson.build
hw/Makefile.objs +0 -1
index 8a56abf..512d10d 100644
@@ -22,7 +22,6 @@ devices-dirs-y += misc/
 devices-dirs-y += net/
 devices-dirs-y += rdma/
 devices-dirs-y += nvram/
-devices-dirs-y += pci/
 endif
 
 common-obj-y += $(devices-dirs-y)
hw/meson.build +1 -0
index 4d88cfa..1fd9eb5 100644
@@ -1,5 +1,6 @@
 subdir('core')
 subdir('mem')
+subdir('pci')
 subdir('pci-bridge')
 subdir('pci-host')
 subdir('pcmcia')
hw/pci/Makefile.objs deleted +0 -14
deleted file mode 100644
index c78f2fb..0000000
@@ -1,14 +0,0 @@
-common-obj-$(CONFIG_PCI) += pci.o pci_bridge.o
-common-obj-$(CONFIG_PCI) += msix.o msi.o
-common-obj-$(CONFIG_PCI) += shpc.o
-common-obj-$(CONFIG_PCI) += slotid_cap.o
-common-obj-$(CONFIG_PCI) += pci_host.o
-
-# The functions in these modules can be used by devices too.  Since we
-# allow plugging PCIe devices into PCI buses, include them even if
-# CONFIG_PCI_EXPRESS=n.
-common-obj-$(CONFIG_PCI) += pcie.o pcie_aer.o
-common-obj-$(CONFIG_PCI_EXPRESS) += pcie_port.o pcie_host.o
-
-common-obj-$(call lnot,$(CONFIG_PCI)) += pci-stub.o
-common-obj-$(CONFIG_ALL) += pci-stub.o
hw/pci/meson.build new file +19 -0
new file mode 100644
index 0000000..5c4bbac
@@ -0,0 +1,19 @@
+pci_ss = ss.source_set()
+pci_ss.add(files(
+  'msi.c',
+  'msix.c',
+  'pci.c',
+  'pci_bridge.c',
+  'pci_host.c',
+  'shpc.c',
+  'slotid_cap.c'
+))
+# The functions in these modules can be used by devices too.  Since we
+# allow plugging PCIe devices into PCI buses, include them even if
+# CONFIG_PCI_EXPRESS=n.
+pci_ss.add(files('pcie.c', 'pcie_aer.c'))
+softmmu_ss.add(when: 'CONFIG_PCI_EXPRESS', if_true: files('pcie_port.c', 'pcie_host.c'))
+softmmu_ss.add_all(when: 'CONFIG_PCI', if_true: pci_ss)
+
+softmmu_ss.add(when: 'CONFIG_PCI', if_false: files('pci-stub.c'))
+softmmu_ss.add(when: 'CONFIG_ALL', if_true: files('pci-stub.c'))
Signature · 1 line
1.8.3.1
#84 lore raw

PATCH v3 81/132 meson: convert hw/nvram

In reply to Paolo Bonzini

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

---
 hw/Makefile.objs       |  1 -
 hw/meson.build         |  1 +
 hw/nvram/Makefile.objs |  8 --------
 hw/nvram/meson.build   | 11 +++++++++++
 4 files changed, 12 insertions(+), 9 deletions(-)
 delete mode 100644 hw/nvram/Makefile.objs
 create mode 100644 hw/nvram/meson.build
hw/Makefile.objs +0 -1
index 512d10d..6ce70d5 100644
@@ -21,7 +21,6 @@ devices-dirs-y += isa/
 devices-dirs-y += misc/
 devices-dirs-y += net/
 devices-dirs-y += rdma/
-devices-dirs-y += nvram/
 endif
 
 common-obj-y += $(devices-dirs-y)
hw/meson.build +1 -0
index 1fd9eb5..0c528e5 100644
@@ -1,5 +1,6 @@
 subdir('core')
 subdir('mem')
+subdir('nvram')
 subdir('pci')
 subdir('pci-bridge')
 subdir('pci-host')
hw/nvram/Makefile.objs deleted +0 -8
deleted file mode 100644
index 26f7b4c..0000000
@@ -1,8 +0,0 @@
-common-obj-$(CONFIG_DS1225Y) += ds1225y.o
-common-obj-y += eeprom93xx.o
-common-obj-$(CONFIG_AT24C) += eeprom_at24c.o
-common-obj-y += fw_cfg.o
-common-obj-y += chrp_nvram.o
-common-obj-$(CONFIG_MAC_NVRAM) += mac_nvram.o
-obj-$(CONFIG_PSERIES) += spapr_nvram.o
-obj-$(CONFIG_NRF51_SOC) += nrf51_nvm.o
hw/nvram/meson.build new file +11 -0
new file mode 100644
index 0000000..75fca7b
@@ -0,0 +1,11 @@
+softmmu_ss.add(files(
+  'chrp_nvram.c',
+  'eeprom93xx.c',
+  'fw_cfg.c',
+))
+softmmu_ss.add(when: 'CONFIG_AT24C', if_true: files('eeprom_at24c.c'))
+softmmu_ss.add(when: 'CONFIG_DS1225Y', if_true: files('ds1225y.c'))
+softmmu_ss.add(when: 'CONFIG_MAC_NVRAM', if_true: files('mac_nvram.c'))
+
+specific_ss.add(when: 'CONFIG_PSERIES', if_true: files('spapr_nvram.c'))
+specific_ss.add(when: 'CONFIG_NRF51_SOC', if_true: files('nrf51_nvm.c'))
Signature · 1 line
1.8.3.1
#85 lore raw

PATCH v3 82/132 meson: convert hw/rdma

In reply to Paolo Bonzini

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

---
 hw/Makefile.objs      |  1 -
 hw/meson.build        |  1 +
 hw/rdma/Makefile.objs |  3 ---
 hw/rdma/meson.build   | 10 ++++++++++
 4 files changed, 11 insertions(+), 4 deletions(-)
 delete mode 100644 hw/rdma/Makefile.objs
 create mode 100644 hw/rdma/meson.build
hw/Makefile.objs +0 -1
index 6ce70d5..4903808 100644
@@ -20,7 +20,6 @@ devices-dirs-$(CONFIG_IPMI) += ipmi/
 devices-dirs-y += isa/
 devices-dirs-y += misc/
 devices-dirs-y += net/
-devices-dirs-y += rdma/
 endif
 
 common-obj-y += $(devices-dirs-y)
hw/meson.build +1 -0
index 0c528e5..56e6057 100644
@@ -5,6 +5,7 @@ subdir('pci')
 subdir('pci-bridge')
 subdir('pci-host')
 subdir('pcmcia')
+subdir('rdma')
 subdir('scsi')
 subdir('sd')
 subdir('semihosting')
hw/rdma/Makefile.objs deleted +0 -3
deleted file mode 100644
index 819bb12..0000000
@@ -1,3 +0,0 @@
-obj-$(CONFIG_VMW_PVRDMA) += rdma_utils.o rdma_backend.o rdma_rm.o rdma.o
-obj-$(CONFIG_VMW_PVRDMA) += vmw/pvrdma_dev_ring.o vmw/pvrdma_cmd.o \
-                     vmw/pvrdma_qp_ops.o vmw/pvrdma_main.o
hw/rdma/meson.build new file +10 -0
new file mode 100644
index 0000000..7325f40
@@ -0,0 +1,10 @@
+specific_ss.add(when: 'CONFIG_VMW_PVRDMA', if_true: files(
+  'rdma.c',
+  'rdma_backend.c',
+  'rdma_rm.c',
+  'rdma_utils.c',
+  'vmw/pvrdma_cmd.c',
+  'vmw/pvrdma_dev_ring.c',
+  'vmw/pvrdma_main.c',
+  'vmw/pvrdma_qp_ops.c',
+))
Signature · 1 line
1.8.3.1
#86 lore raw

PATCH v3 83/132 meson: convert hw/net

In reply to Paolo Bonzini

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

---
 hw/Makefile.objs         |  1 -
 hw/meson.build           |  1 +
 hw/net/Makefile.objs     | 53 -----------------------------------------
 hw/net/can/Makefile.objs |  4 ----
 hw/net/can/meson.build   |  4 ++++
 hw/net/meson.build       | 61 ++++++++++++++++++++++++++++++++++++++++++++++++
 6 files changed, 66 insertions(+), 58 deletions(-)
 delete mode 100644 hw/net/Makefile.objs
 delete mode 100644 hw/net/can/Makefile.objs
 create mode 100644 hw/net/can/meson.build
 create mode 100644 hw/net/meson.build
hw/Makefile.objs +0 -1
index 4903808..d9479e3 100644
@@ -19,7 +19,6 @@ devices-dirs-$(CONFIG_IPACK) += ipack/
 devices-dirs-$(CONFIG_IPMI) += ipmi/
 devices-dirs-y += isa/
 devices-dirs-y += misc/
-devices-dirs-y += net/
 endif
 
 common-obj-y += $(devices-dirs-y)
hw/meson.build +1 -0
index 56e6057..3b20fea 100644
@@ -1,5 +1,6 @@
 subdir('core')
 subdir('mem')
+subdir('net')
 subdir('nvram')
 subdir('pci')
 subdir('pci-bridge')
hw/net/Makefile.objs deleted +0 -53

53 lines not on this page · raw message

hw/net/can/Makefile.objs deleted +0 -4
deleted file mode 100644
index 9f0c4ee..0000000
@@ -1,4 +0,0 @@
-common-obj-$(CONFIG_CAN_SJA1000) += can_sja1000.o
-common-obj-$(CONFIG_CAN_PCI) += can_kvaser_pci.o
-common-obj-$(CONFIG_CAN_PCI) += can_pcm3680_pci.o
-common-obj-$(CONFIG_CAN_PCI) += can_mioe3680_pci.o
hw/net/can/meson.build new file +4 -0
new file mode 100644
index 0000000..c9cfeb7
@@ -0,0 +1,4 @@
+softmmu_ss.add(when: 'CONFIG_CAN_SJA1000', if_true: files('can_sja1000.c'))
+softmmu_ss.add(when: 'CONFIG_CAN_PCI', if_true: files('can_kvaser_pci.c'))
+softmmu_ss.add(when: 'CONFIG_CAN_PCI', if_true: files('can_pcm3680_pci.c'))
+softmmu_ss.add(when: 'CONFIG_CAN_PCI', if_true: files('can_mioe3680_pci.c'))
hw/net/meson.build new file +61 -0

61 lines not on this page · raw message

Signature · 1 line
1.8.3.1
#87 lore raw

PATCH v3 84/132 meson: convert hw/misc

In reply to Paolo Bonzini

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

---
 hw/Makefile.objs            |  1 -
 hw/meson.build              |  1 +
 hw/misc/Makefile.objs       | 82 ---------------------------------------------
 hw/misc/macio/Makefile.objs |  5 ---
 hw/misc/macio/meson.build   |  8 +++++
 hw/misc/meson.build         | 79 +++++++++++++++++++++++++++++++++++++++++++
 6 files changed, 88 insertions(+), 88 deletions(-)
 delete mode 100644 hw/misc/Makefile.objs
 delete mode 100644 hw/misc/macio/Makefile.objs
 create mode 100644 hw/misc/macio/meson.build
 create mode 100644 hw/misc/meson.build
hw/Makefile.objs +0 -1
index d9479e3..e630c54 100644
@@ -18,7 +18,6 @@ devices-dirs-y += intc/
 devices-dirs-$(CONFIG_IPACK) += ipack/
 devices-dirs-$(CONFIG_IPMI) += ipmi/
 devices-dirs-y += isa/
-devices-dirs-y += misc/
 endif
 
 common-obj-y += $(devices-dirs-y)
hw/meson.build +1 -0
index 3b20fea..c83f37c 100644
@@ -1,5 +1,6 @@
 subdir('core')
 subdir('mem')
+subdir('misc')
 subdir('net')
 subdir('nvram')
 subdir('pci')
hw/misc/Makefile.objs deleted +0 -82

82 lines not on this page · raw message

hw/misc/macio/Makefile.objs deleted +0 -5
deleted file mode 100644
index 07fdb32..0000000
@@ -1,5 +0,0 @@
-common-obj-y += macio.o
-common-obj-$(CONFIG_CUDA) += cuda.o
-common-obj-$(CONFIG_MAC_PMU) += pmu.o
-common-obj-$(CONFIG_MAC_DBDMA) += mac_dbdma.o
-common-obj-$(CONFIG_MACIO_GPIO) += gpio.o
hw/misc/macio/meson.build new file +8 -0
new file mode 100644
index 0000000..17282da
@@ -0,0 +1,8 @@
+macio_ss = ss.source_set()
+macio_ss.add(files('macio.c'))
+macio_ss.add(when: 'CONFIG_CUDA', if_true: files('cuda.c'))
+macio_ss.add(when: 'CONFIG_MACIO_GPIO', if_true: files('gpio.c'))
+macio_ss.add(when: 'CONFIG_MAC_DBDMA', if_true: files('mac_dbdma.c'))
+macio_ss.add(when: 'CONFIG_MAC_PMU', if_true: files('pmu.c'))
+
+softmmu_ss.add_all(when: 'CONFIG_MACIO', if_true: macio_ss)
hw/misc/meson.build new file +79 -0

79 lines not on this page · raw message

Signature · 1 line
1.8.3.1
#88 lore raw

PATCH v3 85/132 meson: convert hw/isa

In reply to Paolo Bonzini

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

---
 hw/Makefile.objs     |  1 -
 hw/isa/Makefile.objs | 10 ----------
 hw/isa/meson.build   |  9 +++++++++
 hw/meson.build       |  1 +
 4 files changed, 10 insertions(+), 11 deletions(-)
 delete mode 100644 hw/isa/Makefile.objs
 create mode 100644 hw/isa/meson.build
hw/Makefile.objs +0 -1
index e630c54..1dd9f63 100644
@@ -17,7 +17,6 @@ devices-dirs-y += input/
 devices-dirs-y += intc/
 devices-dirs-$(CONFIG_IPACK) += ipack/
 devices-dirs-$(CONFIG_IPMI) += ipmi/
-devices-dirs-y += isa/
 endif
 
 common-obj-y += $(devices-dirs-y)
hw/isa/Makefile.objs deleted +0 -10
deleted file mode 100644
index 9e106df..0000000
@@ -1,10 +0,0 @@
-common-obj-$(CONFIG_ISA_BUS) += isa-bus.o
-common-obj-$(CONFIG_ISA_BUS) += isa-superio.o
-common-obj-$(CONFIG_APM) += apm.o
-common-obj-$(CONFIG_I82378) += i82378.o
-common-obj-$(CONFIG_PC87312) += pc87312.o
-common-obj-$(CONFIG_PIIX4) += piix4.o
-common-obj-$(CONFIG_VT82C686) += vt82c686.o
-common-obj-$(CONFIG_SMC37C669) += smc37c669-superio.o
-
-obj-$(CONFIG_LPC_ICH9) += lpc_ich9.o
hw/isa/meson.build new file +9 -0
new file mode 100644
index 0000000..729f799
@@ -0,0 +1,9 @@
+softmmu_ss.add(when: 'CONFIG_APM', if_true: files('apm.c'))
+softmmu_ss.add(when: 'CONFIG_I82378', if_true: files('i82378.c'))
+softmmu_ss.add(when: 'CONFIG_ISA_BUS', if_true: files('isa-bus.c', 'isa-superio.c'))
+softmmu_ss.add(when: 'CONFIG_PC87312', if_true: files('pc87312.c'))
+softmmu_ss.add(when: 'CONFIG_PIIX4', if_true: files('piix4.c'))
+softmmu_ss.add(when: 'CONFIG_SMC37C669', if_true: files('smc37c669-superio.c'))
+softmmu_ss.add(when: 'CONFIG_VT82C686', if_true: files('vt82c686.c'))
+
+specific_ss.add(when: 'CONFIG_LPC_ICH9', if_true: files('lpc_ich9.c'))
hw/meson.build +1 -0
index c83f37c..db35232 100644
@@ -1,4 +1,5 @@
 subdir('core')
+subdir('isa')
 subdir('mem')
 subdir('misc')
 subdir('net')
Signature · 1 line
1.8.3.1
#89 lore raw

PATCH v3 86/132 meson: convert hw/ipmi

In reply to Paolo Bonzini

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

---
 hw/Makefile.objs      | 1 -
 hw/ipmi/Makefile.objs | 5 -----
 hw/ipmi/meson.build   | 8 ++++++++
 hw/meson.build        | 1 +
 4 files changed, 9 insertions(+), 6 deletions(-)
 delete mode 100644 hw/ipmi/Makefile.objs
 create mode 100644 hw/ipmi/meson.build
hw/Makefile.objs +0 -1
index 1dd9f63..7d85aba 100644
@@ -16,7 +16,6 @@ devices-dirs-y += ide/
 devices-dirs-y += input/
 devices-dirs-y += intc/
 devices-dirs-$(CONFIG_IPACK) += ipack/
-devices-dirs-$(CONFIG_IPMI) += ipmi/
 endif
 
 common-obj-y += $(devices-dirs-y)
hw/ipmi/Makefile.objs deleted +0 -5
deleted file mode 100644
index 1b422bb..0000000
@@ -1,5 +0,0 @@
-common-obj-$(CONFIG_IPMI) += ipmi.o
-common-obj-$(CONFIG_IPMI_LOCAL) += ipmi_bmc_sim.o
-common-obj-$(CONFIG_IPMI_EXTERN) += ipmi_bmc_extern.o
-common-obj-$(CONFIG_ISA_IPMI_KCS) += isa_ipmi_kcs.o
-common-obj-$(CONFIG_ISA_IPMI_BT) += isa_ipmi_bt.o
hw/ipmi/meson.build new file +8 -0
new file mode 100644
index 0000000..47671ba
@@ -0,0 +1,8 @@
+ipmi_ss = ss.source_set()
+ipmi_ss.add(when: 'CONFIG_IPMI', if_true: files('ipmi.c'))
+ipmi_ss.add(when: 'CONFIG_IPMI_LOCAL', if_true: files('ipmi_bmc_sim.c'))
+ipmi_ss.add(when: 'CONFIG_IPMI_EXTERN', if_true: files('ipmi_bmc_extern.c'))
+ipmi_ss.add(when: 'CONFIG_ISA_IPMI_KCS', if_true: files('isa_ipmi_kcs.c'))
+ipmi_ss.add(when: 'CONFIG_ISA_IPMI_BT', if_true: files('isa_ipmi_bt.c'))
+
+softmmu_ss.add_all(when: 'CONFIG_IPMI', if_true: ipmi_ss)
hw/meson.build +1 -0
index db35232..276f9ed 100644
@@ -1,4 +1,5 @@
 subdir('core')
+subdir('ipmi')
 subdir('isa')
 subdir('mem')
 subdir('misc')
Signature · 1 line
1.8.3.1
#90 lore raw

PATCH v3 87/132 meson: convert hw/ipack

In reply to Paolo Bonzini

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

---
 hw/Makefile.objs       | 1 -
 hw/ipack/Makefile.objs | 2 --
 hw/ipack/meson.build   | 1 +
 hw/meson.build         | 1 +
 4 files changed, 2 insertions(+), 3 deletions(-)
 delete mode 100644 hw/ipack/Makefile.objs
 create mode 100644 hw/ipack/meson.build
hw/Makefile.objs +0 -1
index 7d85aba..8697b42 100644
@@ -15,7 +15,6 @@ devices-dirs-$(CONFIG_I2C) += i2c/
 devices-dirs-y += ide/
 devices-dirs-y += input/
 devices-dirs-y += intc/
-devices-dirs-$(CONFIG_IPACK) += ipack/
 endif
 
 common-obj-y += $(devices-dirs-y)
hw/ipack/Makefile.objs deleted +0 -2
deleted file mode 100644
index 8b9bdcb..0000000
@@ -1,2 +0,0 @@
-common-obj-$(CONFIG_IPACK) += ipack.o
-common-obj-$(CONFIG_IPACK) += tpci200.o
hw/ipack/meson.build new file +1 -0
new file mode 100644
index 0000000..3f8138b
@@ -0,0 +1 @@
+softmmu_ss.add(when: 'CONFIG_IPACK', if_true: files('ipack.c', 'tpci200.c'))
hw/meson.build +1 -0
index 276f9ed..3e3f090 100644
@@ -1,4 +1,5 @@
 subdir('core')
+subdir('ipack')
 subdir('ipmi')
 subdir('isa')
 subdir('mem')
Signature · 1 line
1.8.3.1
#91 lore raw

PATCH v3 88/132 meson: convert hw/intc

In reply to Paolo Bonzini

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

---
 hw/Makefile.objs      |  1 -
 hw/intc/Makefile.objs | 51 --------------------------------------------------
 hw/intc/meson.build   | 52 +++++++++++++++++++++++++++++++++++++++++++++++++++
 hw/meson.build        |  1 +
 4 files changed, 53 insertions(+), 52 deletions(-)
 delete mode 100644 hw/intc/Makefile.objs
 create mode 100644 hw/intc/meson.build
hw/Makefile.objs +0 -1
index 8697b42..c89ca8d 100644
@@ -14,7 +14,6 @@ devices-dirs-$(CONFIG_HYPERV) += hyperv/
 devices-dirs-$(CONFIG_I2C) += i2c/
 devices-dirs-y += ide/
 devices-dirs-y += input/
-devices-dirs-y += intc/
 endif
 
 common-obj-y += $(devices-dirs-y)
hw/intc/Makefile.objs deleted +0 -51

51 lines not on this page · raw message

hw/intc/meson.build new file +52 -0

52 lines not on this page · raw message

hw/meson.build +1 -0
index 3e3f090..a5032d3 100644
@@ -1,4 +1,5 @@
 subdir('core')
+subdir('intc')
 subdir('ipack')
 subdir('ipmi')
 subdir('isa')
Signature · 1 line
1.8.3.1
#92 lore raw

PATCH v3 89/132 meson: convert hw/input

In reply to Paolo Bonzini

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

---
 hw/Makefile.objs       |  1 -
 hw/input/Makefile.objs | 17 -----------------
 hw/input/meson.build   | 17 +++++++++++++++++
 hw/meson.build         |  1 +
 4 files changed, 18 insertions(+), 18 deletions(-)
 delete mode 100644 hw/input/Makefile.objs
 create mode 100644 hw/input/meson.build
hw/Makefile.objs +0 -1
index c89ca8d..c99f7e3 100644
@@ -13,7 +13,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 -17
deleted file mode 100644
index a1bc502..0000000
@@ -1,17 +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
-
-obj-$(CONFIG_MILKYMIST) += milkymist-softusb.o
-obj-$(CONFIG_PXA2XX) += pxa2xx_keypad.o
-obj-$(CONFIG_TSC210X) += tsc210x.o
hw/input/meson.build new file +17 -0
new file mode 100644
index 0000000..6cc59e6
@@ -0,0 +1,17 @@
+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'))
+
+specific_ss.add(when: 'CONFIG_MILKYMIST', if_true: files('milkymist-softusb.c'))
+specific_ss.add(when: 'CONFIG_PXA2XX', if_true: files('pxa2xx_keypad.c'))
+specific_ss.add(when: 'CONFIG_TSC210X', if_true: files('tsc210x.c'))
hw/meson.build +1 -0
index a5032d3..a85ec93 100644
@@ -1,4 +1,5 @@
 subdir('core')
+subdir('input')
 subdir('intc')
 subdir('ipack')
 subdir('ipmi')
Signature · 1 line
1.8.3.1
#93 lore raw

PATCH v3 90/132 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 c99f7e3..b75e027 100644
@@ -12,7 +12,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 a85ec93..848736d 100644
@@ -1,4 +1,5 @@
 subdir('core')
+subdir('ide')
 subdir('input')
 subdir('intc')
 subdir('ipack')
Signature · 1 line
1.8.3.1
#94 lore raw

PATCH v3 91/132 meson: convert hw/i2c

In reply to Paolo Bonzini

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

---
 hw/Makefile.objs     |  1 -
 hw/i2c/Makefile.objs | 13 -------------
 hw/i2c/meson.build   | 18 ++++++++++++++++++
 hw/meson.build       |  1 +
 4 files changed, 19 insertions(+), 14 deletions(-)
 delete mode 100644 hw/i2c/Makefile.objs
 create mode 100644 hw/i2c/meson.build
hw/Makefile.objs +0 -1
index b75e027..0213b1b 100644
@@ -11,7 +11,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 -13
deleted file mode 100644
index d7073a4..0000000
@@ -1,13 +0,0 @@
-common-obj-$(CONFIG_I2C) += core.o 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
-obj-$(CONFIG_OMAP) += omap_i2c.o
-obj-$(CONFIG_PPC4XX) += ppc4xx_i2c.o
hw/i2c/meson.build new file +18 -0
new file mode 100644
index 0000000..43901e6
@@ -0,0 +1,18 @@
+i2c_ss = ss.source_set()
+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_I2C', if_true: files('core.c', 'smbus_slave.c', 'smbus_master.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'))
+softmmu_ss.add_all(when: 'CONFIG_I2C', if_true: i2c_ss)
+
+specific_i2c_ss = ss.source_set()
+specific_i2c_ss.add(when: 'CONFIG_OMAP', if_true: files('omap_i2c.c'))
+specific_i2c_ss.add(when: 'CONFIG_PPC4XX', if_true: files('ppc4xx_i2c.c'))
+specific_ss.add_all(when: 'CONFIG_I2C', if_true: specific_i2c_ss)
hw/meson.build +1 -0
index 848736d..e59ed44 100644
@@ -1,4 +1,5 @@
 subdir('core')
+subdir('i2c')
 subdir('ide')
 subdir('input')
 subdir('intc')
Signature · 1 line
1.8.3.1
#95 lore raw

PATCH v3 92/132 meson: convert hw/hyperv

In reply to Paolo Bonzini

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

---
 hw/Makefile.objs        | 1 -
 hw/hyperv/Makefile.objs | 2 --
 hw/hyperv/meson.build   | 2 ++
 hw/meson.build          | 1 +
 4 files changed, 3 insertions(+), 3 deletions(-)
 delete mode 100644 hw/hyperv/Makefile.objs
 create mode 100644 hw/hyperv/meson.build
hw/Makefile.objs +0 -1
index 0213b1b..2ca159e 100644
@@ -10,7 +10,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 -2
deleted file mode 100644
index edaca2f..0000000
@@ -1,2 +0,0 @@
-obj-y += hyperv.o
-obj-$(CONFIG_HYPERV_TESTDEV) += hyperv_testdev.o
hw/hyperv/meson.build new file +2 -0
new file mode 100644
index 0000000..98663ec
@@ -0,0 +1,2 @@
+specific_ss.add(when: 'CONFIG_HYPERV', if_true: files('hyperv.c'))
+specific_ss.add(when: 'CONFIG_HYPERV_TESTDEV', if_true: files('hyperv_testdev.c'))
hw/meson.build +1 -0
index e59ed44..bfd4d59 100644
@@ -1,4 +1,5 @@
 subdir('core')
+subdir('hyperv')
 subdir('i2c')
 subdir('ide')
 subdir('input')
Signature · 1 line
1.8.3.1
#96 lore raw

PATCH v3 92/132 meson: convert hw/hyperv

In reply to Paolo Bonzini

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

---
 hw/Makefile.objs        | 1 -
 hw/hyperv/Makefile.objs | 2 --
 hw/hyperv/meson.build   | 2 ++
 hw/meson.build          | 1 +
 4 files changed, 3 insertions(+), 3 deletions(-)
 delete mode 100644 hw/hyperv/Makefile.objs
 create mode 100644 hw/hyperv/meson.build
hw/Makefile.objs +0 -1
index 0213b1b..2ca159e 100644
@@ -10,7 +10,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 -2
deleted file mode 100644
index edaca2f..0000000
@@ -1,2 +0,0 @@
-obj-y += hyperv.o
-obj-$(CONFIG_HYPERV_TESTDEV) += hyperv_testdev.o
hw/hyperv/meson.build new file +2 -0
new file mode 100644
index 0000000..98663ec
@@ -0,0 +1,2 @@
+specific_ss.add(when: 'CONFIG_HYPERV', if_true: files('hyperv.c'))
+specific_ss.add(when: 'CONFIG_HYPERV_TESTDEV', if_true: files('hyperv_testdev.c'))
hw/meson.build +1 -0
index e59ed44..bfd4d59 100644
@@ -1,4 +1,5 @@
 subdir('core')
+subdir('hyperv')
 subdir('i2c')
 subdir('ide')
 subdir('input')
Signature · 1 line
1.8.3.1
#98 lore raw
Quoted 3 lines · Markus Armbruster

I (mercifully?) haven't received PATCH 094-132, and the list archive doesn't have them, either.

Sent now, hopefully with correct threading.

FWIW, the interesting patches are:
- 1-6, integrating meson in the build system (but similar to previous RFCs)
- 9-10, converting QAPI and tracing (also similar to previous RFC)
- 20, converting qemu-ga
- 30, converting hxtool files
- 33, a hack for the current build system, and 34 for an example of using it
- 38, 40 and 112, the remaining big part of the build rules
- 47 and 48 as they use modules (but note that I have ideas on making modules nicer)
- 116-118, building docs
- 115 and 132 if you like negative diffstats :) (as mentioned in the cover letter,
the biggest negative diffstat will come from converting tests though).

Everything else is just moving lists of files from Makefiles to meson.build files.

Paolo

#99 lore raw

PATCH v3 93/132 meson: convert hw/gpio

In reply to Paolo Bonzini

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

---
 hw/Makefile.objs      |  1 -
 hw/gpio/Makefile.objs | 11 -----------
 hw/gpio/meson.build   | 11 +++++++++++
 hw/meson.build        |  1 +
 4 files changed, 12 insertions(+), 12 deletions(-)
 delete mode 100644 hw/gpio/Makefile.objs
 create mode 100644 hw/gpio/meson.build
hw/Makefile.objs +0 -1
index 2ca159e..084bfc6 100644
@@ -9,7 +9,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 -11
deleted file mode 100644
index e5da0cb..0000000
@@ -1,11 +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
-
-obj-$(CONFIG_OMAP) += omap_gpio.o
-obj-$(CONFIG_IMX) += imx_gpio.o
-obj-$(CONFIG_RASPI) += bcm2835_gpio.o
-obj-$(CONFIG_NRF51_SOC) += nrf51_gpio.o
hw/gpio/meson.build new file +11 -0
new file mode 100644
index 0000000..1d24a2d
@@ -0,0 +1,11 @@
+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'))
+
+specific_ss.add(when: 'CONFIG_IMX', if_true: files('imx_gpio.c'))
+specific_ss.add(when: 'CONFIG_NRF51_SOC', if_true: files('nrf51_gpio.c'))
+specific_ss.add(when: 'CONFIG_OMAP', if_true: files('omap_gpio.c'))
+specific_ss.add(when: 'CONFIG_RASPI', if_true: files('bcm2835_gpio.c'))
hw/meson.build +1 -0
index bfd4d59..a61aeaf 100644
@@ -1,4 +1,5 @@
 subdir('core')
+subdir('gpio')
 subdir('hyperv')
 subdir('i2c')
 subdir('ide')
Signature · 1 line
1.8.3.1
#100 lore raw

PATCH v3 93/132 meson: convert hw/gpio

In reply to Paolo Bonzini

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

---
 hw/Makefile.objs      |  1 -
 hw/gpio/Makefile.objs | 11 -----------
 hw/gpio/meson.build   | 11 +++++++++++
 hw/meson.build        |  1 +
 4 files changed, 12 insertions(+), 12 deletions(-)
 delete mode 100644 hw/gpio/Makefile.objs
 create mode 100644 hw/gpio/meson.build
hw/Makefile.objs +0 -1
index 2ca159e..084bfc6 100644
@@ -9,7 +9,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 -11
deleted file mode 100644
index e5da0cb..0000000
@@ -1,11 +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
-
-obj-$(CONFIG_OMAP) += omap_gpio.o
-obj-$(CONFIG_IMX) += imx_gpio.o
-obj-$(CONFIG_RASPI) += bcm2835_gpio.o
-obj-$(CONFIG_NRF51_SOC) += nrf51_gpio.o
hw/gpio/meson.build new file +11 -0
new file mode 100644
index 0000000..1d24a2d
@@ -0,0 +1,11 @@
+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'))
+
+specific_ss.add(when: 'CONFIG_IMX', if_true: files('imx_gpio.c'))
+specific_ss.add(when: 'CONFIG_NRF51_SOC', if_true: files('nrf51_gpio.c'))
+specific_ss.add(when: 'CONFIG_OMAP', if_true: files('omap_gpio.c'))
+specific_ss.add(when: 'CONFIG_RASPI', if_true: files('bcm2835_gpio.c'))
hw/meson.build +1 -0
index bfd4d59..a61aeaf 100644
@@ -1,4 +1,5 @@
 subdir('core')
+subdir('gpio')
 subdir('hyperv')
 subdir('i2c')
 subdir('ide')
Signature · 1 line
1.8.3.1
#101 lore raw

PATCH v3 94/132 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   | 16 ++++++++++++++++
 hw/meson.build       |  1 +
 4 files changed, 17 insertions(+), 17 deletions(-)
 delete mode 100644 hw/dma/Makefile.objs
 create mode 100644 hw/dma/meson.build
hw/Makefile.objs +0 -1
index 084bfc6..f5fd490 100644
@@ -8,7 +8,6 @@ devices-dirs-y += bt/
 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 b672e7a..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
-obj-$(CONFIG_XLNX_ZYNQMP_ARM) += xlnx_dpdma.o
-common-obj-$(CONFIG_XLNX_ZYNQMP_ARM) += xlnx-zdma.o
-
-obj-$(CONFIG_OMAP) += omap_dma.o soc_dma.o
-obj-$(CONFIG_PXA2XX) += pxa2xx_dma.o
-common-obj-$(CONFIG_RASPI) += bcm2835_dma.o
hw/dma/meson.build new file +16 -0
new file mode 100644
index 0000000..84677ad
@@ -0,0 +1,16 @@
+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'))
+specific_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'))
+
+specific_ss.add(when: 'CONFIG_OMAP', if_true: files('omap_dma.c', 'soc_dma.c'))
+specific_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 a61aeaf..3263f33 100644
@@ -1,4 +1,5 @@
 subdir('core')
+subdir('dma')
 subdir('gpio')
 subdir('hyperv')
 subdir('i2c')
Signature · 1 line
1.8.3.1
#102 lore raw

PATCH v3 95/132 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 | 59 ------------------------------------------------
 hw/display/meson.build   | 54 ++++++++++++++++++++++++++++++++++++++++++++
 hw/meson.build           |  1 +
 5 files changed, 56 insertions(+), 60 deletions(-)
 delete mode 100644 hw/display/Makefile.objs
 create mode 100644 hw/display/meson.build
Makefile.target +1 -0
index a41e4e5..82f384c 100644
@@ -168,6 +168,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 f5fd490..acc6bee 100644
@@ -7,7 +7,6 @@ devices-dirs-y += block/
 devices-dirs-y += bt/
 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 -59

59 lines not on this page · raw message

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

54 lines not on this page · raw message

hw/meson.build +1 -0
index 3263f33..3f40df2 100644
@@ -1,4 +1,5 @@
 subdir('core')
+subdir('display')
 subdir('dma')
 subdir('gpio')
 subdir('hyperv')
Signature · 1 line
1.8.3.1