Skip to contentSkip to conversation

Meson integration for 5.2

PATCH Superseded Paolo Bonzini 10 participants 198 messages Aug 10, 2020 – Aug 12, 2020 Page 1 of 3

Subsystems (10)

v1 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

cover Meson integration for 5.2

This version is substantially less "draft-like", and the diffstat is actually quite large with Thursday's draft.

The changes are as follows:
- updated oss-fuzz build script
- various cases fixed that broke depending on present/absent dependencies
- all build scripts handle --python correctly
- git submodules properly updated before running meson
- no warnings from Meson master (will be 0.56.0), one from upcoming 0.55.1
- installation matches current build system
- fixes for virtio-vga broken merge
- includes updated s390-ccw patch from Thomas
- less noisy "make check"
- tested with GitLab CI, BSD VM builds and various Docker builds
- input-keymap files properly regenerated

Of our supported build platforms, only Mac OS and non-x86 hosts are still untested. But I guess this might finally count as a v1.

This is available from https://gitlab.com/bonzini/qemu.git branch meson-poc-next.

Thanks to Thomas, Cornelia, Philippe, Daniel, Alexander and everyone else who tested the draft!

Paolo

Marc-André Lureau (90):
optionrom: simplify Makefile
build-sys hack: ensure target directory is there
configure: expand path variables for meson configure
configure: generate Meson cross file build-sys hack: link with whole .fa archives
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: handle edk2 bios and descriptors
meson: convert qom directory to Meson (tools part)
meson: convert authz directory to Meson
meson: convert crypto directory to Meson
meson: convert io directory to Meson
meson: convert target/s390x/gen-features.h
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 dump/
meson: convert replay directory to Meson
meson: convert migration directory to Meson
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/smbios
meson: convert hw/mem
meson: convert hw/watchdog
meson: convert hw/virtio
meson: convert hw/vfio
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/block
meson: convert hw/audio
meson: convert hw/adc
meson: convert hw/acpi
meson: convert hw/9pfs, cleanup
meson: convert hw/arch*
meson: accel
meson: linux-user
meson: bsd-user
meson: cpu-emu
meson: convert systemtap files
rules.mak: remove version.o
meson: convert po/

Paolo Bonzini (56):
oss-fuzz/build: remove LIB_FUZZING_ENGINE
trace: switch position of headers to what Meson requires
meson: rename .inc.c files to .inc
tests/vm: do not pollute configure with --efi-aarch64 tests/vm: check for Python YAML parser in the Makefile tests/docker: add test script for static linux-user builds
nsis: use "make DESTDIR=" instead of "make prefix="
configure: do not include $(...) variables in config-host.mak
configure: prepare CFLAGS/CXXFLAGS/LDFLAGS for Meson tests/vm: include setuptools
configure: integrate Meson in the build system
meson: move summary to meson.build
meson: add sparse support
meson: add testsuite Makefile generator
libqemuutil, qapi, trace: convert to meson contrib/libvhost-user: convert to Meson tools/virtiofsd: 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
meson: convert dummy Windows qga/qemu-ga target
meson: convert check-decodetree
meson: convert tests/fp and check-softfloat
meson: convert check-qapi-schema
meson: infrastructure for building emulators configure, Makefile; remove TOOLS and HELPERS-y variable
meson: convert chardev directory to Meson (emulator part)
meson: convert tests/qtest to meson
meson: convert audio directory to Meson
meson: convert root directory to Meson
meson: convert most of softmmu/
meson: convert common QMP bits for qemu and qemu-storage-daemon
meson: convert qemu-storage-daemon
meson: convert hw/semihosting
meson: convert hw/nubus
meson: convert hw/usb
meson: convert hw/tpm
meson: convert hw/timer
meson: convert hw/rtc
meson: target
meson: plugins
meson: link emulators without Makefile.target
remove Makefile.target
meson: sphinx-build
meson: build texi doc
meson: convert check-block
rules.mak: drop unneeded macros
meson: replace create-config with meson configure_file
meson: convert sample plugins
meson: move SDL and SDL-image detection to meson
meson: convert VNC and dependent libraries to meson
meson: update build-system documentation
acceptance: use stable URLs for the Debian and Ubuntu installer
cflags Signed-off-by: Paolo Bonzini <[email protected]>
meson: avoid unstable module warning with Meson 0.56.0 or newer

Thomas Huth (1):
pc-bios/s390-ccw: do not use rules.mak

 .gitignore                                         |    6 +-
 .gitlab-ci.yml                                     |    6 +-
 .gitmodules                                        |    3 +
 Makefile                                           |  985 +-------------
 Makefile.objs                                      |  219 +--
 Makefile.target                                    |  287 ----
 accel/Makefile.objs                                |    6 -
 accel/kvm/Makefile.objs                            |    2 -
 accel/kvm/meson.build                              |    5 +
 accel/kvm/trace.h                                  |    1 +
 accel/meson.build                                  |    7 +
 accel/stubs/Makefile.objs                          |    6 -
 accel/stubs/meson.build                            |    6 +
 accel/tcg/Makefile.objs                            |    9 -
 .../tcg/{atomic_common.inc.c => atomic_common.inc} |    0
 accel/tcg/cputlb.c                                 |    4 +-
 accel/tcg/meson.build                              |   15 +
 accel/tcg/trace.h                                  |    1 +
 accel/tcg/user-exec.c                              |    4 +-
 accel/xen/Makefile.objs                            |    1 -
 accel/xen/meson.build                              |    1 +
 audio/Makefile.objs                                |   35 -
 audio/meson.build                                  |   32 +
 audio/trace.h                                      |    1 +
 authz/Makefile.objs                                |    7 -
 authz/meson.build                                  |   19 +
 authz/trace.h                                      |    1 +
 backends/Makefile.objs                             |   23 -
 backends/meson.build                               |   19 +
 backends/tpm/Makefile.objs                         |    4 -
 backends/tpm/meson.build                           |    8 +
 backends/tpm/trace.h                               |    1 +
 backends/trace.h                                   |    1 +
 block.c                                            |    6 +-
 block/Makefile.objs                                |   75 -
 block/meson.build                                  |  111 ++
 block/monitor/Makefile.objs                        |    2 -
 block/monitor/meson.build                          |    2 +
 block/trace.h                                      |    1 +
 bsd-user/Makefile.objs                             |    2 -
 bsd-user/meson.build                               |   10 +
 chardev/Makefile.objs                              |   29 -
 chardev/meson.build                                |   43 +
 chardev/trace.h                                    |    1 +
 configure                                          |  976 ++++---------
 contrib/elf2dmp/Makefile.objs                      |    4 -
 contrib/elf2dmp/meson.build                        |    5 +
 contrib/gitdm/filetypes.txt                        |    2 +-
 contrib/ivshmem-client/Makefile.objs               |    1 -
 contrib/ivshmem-client/meson.build                 |    4 +
 contrib/ivshmem-server/Makefile.objs               |    1 -
 contrib/ivshmem-server/meson.build                 |    4 +
 contrib/libvhost-user/Makefile.objs                |    1 -
 contrib/libvhost-user/meson.build                  |    3 +
 contrib/rdmacm-mux/Makefile.objs                   |    3 -
 contrib/rdmacm-mux/meson.build                     |    8 +
 contrib/vhost-user-blk/Makefile.objs               |    1 -
 contrib/vhost-user-blk/meson.build                 |    5 +
 contrib/vhost-user-gpu/Makefile.objs               |   10 -
 contrib/vhost-user-gpu/meson.build                 |   13 +
 contrib/vhost-user-input/Makefile.objs             |    1 -
 contrib/vhost-user-input/meson.build               |    5 +
 contrib/vhost-user-scsi/Makefile.objs              |    1 -
 contrib/vhost-user-scsi/meson.build                |    7 +
 crypto/Makefile.objs                               |   43 -
 crypto/meson.build                                 |   63 +
 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/build-system.txt                        |  406 +++---
 docs/devel/testing.rst                             |   11 +-
 docs/devel/tracing.txt                             |    2 +-
 docs/index.html.in                                 |    4 +-
 docs/interop/live-block-operations.rst             |    4 +-
 docs/interop/qemu-ga-ref.texi                      |    2 +-
 docs/interop/qemu-qmp-ref.texi                     |    2 +-
 docs/meson.build                                   |   68 +
 dump/Makefile.objs                                 |    3 -
 dump/meson.build                                   |    4 +
 exec.c                                             |    6 +-
 ...t-specialize.inc.c => softfloat-specialize.inc} |    0
 fpu/softfloat.c                                    |    2 +-
 fsdev/Makefile.objs                                |   12 -
 fsdev/meson.build                                  |   18 +
 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                                   |   48 -
 hw/acpi/Makefile.objs                              |   26 -
 hw/acpi/meson.build                                |   25 +
 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                               |   56 -
 hw/arm/meson.build                                 |   59 +
 hw/arm/trace.h                                     |    1 +
 hw/audio/Makefile.objs                             |   18 -
 hw/audio/meson.build                               |   14 +
 hw/audio/trace.h                                   |    1 +
 hw/avr/Makefile.objs                               |    3 -
 hw/avr/meson.build                                 |    6 +
 hw/block/Makefile.objs                             |   18 -
 hw/block/dataplane/Makefile.objs                   |    2 -
 hw/block/dataplane/meson.build                     |    2 +
 hw/block/dataplane/trace.h                         |    1 +
 hw/block/meson.build                               |   21 +
 hw/block/trace.h                                   |    1 +
 hw/char/Makefile.objs                              |   39 -
 hw/char/meson.build                                |   38 +
 hw/char/trace.h                                    |    1 +
 hw/core/Makefile.objs                              |   34 -
 hw/core/cpu.c                                      |    2 +-
 hw/core/meson.build                                |   49 +
 hw/core/trace.h                                    |    1 +
 hw/cpu/Makefile.objs                               |    5 -
 hw/cpu/meson.build                                 |    6 +
 hw/cris/Makefile.objs                              |    2 -
 hw/cris/meson.build                                |    5 +
 hw/display/Makefile.objs                           |   65 -
 hw/display/meson.build                             |   87 ++
 hw/display/trace.h                                 |    1 +
 hw/dma/Makefile.objs                               |   16 -
 hw/dma/meson.build                                 |   15 +
 hw/dma/trace.h                                     |    1 +
 hw/gpio/Makefile.objs                              |   12 -
 hw/gpio/meson.build                                |   12 +
 hw/gpio/trace.h                                    |    1 +
 hw/hppa/Makefile.objs                              |    1 -
 hw/hppa/meson.build                                |    4 +
 hw/hppa/trace.h                                    |    1 +
 hw/hyperv/Makefile.objs                            |    3 -
 hw/hyperv/meson.build                              |    3 +
 hw/hyperv/trace.h                                  |    1 +
 hw/i2c/Makefile.objs                               |   14 -
 hw/i2c/meson.build                                 |   16 +
 hw/i2c/trace.h                                     |    1 +
 hw/i386/Makefile.objs                              |   20 -
 hw/i386/fw_cfg.c                                   |    2 +-
 hw/i386/kvm/Makefile.objs                          |    5 -
 hw/i386/kvm/meson.build                            |    8 +
 hw/i386/meson.build                                |   32 +
 hw/i386/pc.c                                       |    2 +-
 hw/i386/pc_piix.c                                  |    2 +-
 hw/i386/trace.h                                    |    1 +
 hw/i386/x86.c                                      |    2 +-
 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                             |   18 -
 hw/input/meson.build                               |   18 +
 hw/input/trace.h                                   |    1 +
 hw/intc/Makefile.objs                              |   54 -
 hw/intc/meson.build                                |   55 +
 hw/intc/trace.h                                    |    1 +
 hw/ipack/Makefile.objs                             |    2 -
 hw/ipack/meson.build                               |    1 +
 hw/ipmi/Makefile.objs                              |    8 -
 hw/ipmi/meson.build                                |   11 +
 hw/isa/Makefile.objs                               |   11 -
 hw/isa/meson.build                                 |   11 +
 hw/isa/trace.h                                     |    1 +
 hw/lm32/Makefile.objs                              |    3 -
 hw/lm32/meson.build                                |    6 +
 hw/m68k/Makefile.objs                              |    4 -
 hw/m68k/meson.build                                |    7 +
 hw/mem/Kconfig                                     |    1 +
 hw/mem/Makefile.objs                               |    3 -
 hw/mem/meson.build                                 |    6 +
 hw/mem/trace.h                                     |    1 +
 hw/meson.build                                     |   67 +
 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                              |   95 --
 hw/misc/macio/Makefile.objs                        |    5 -
 hw/misc/macio/meson.build                          |    8 +
 hw/misc/macio/trace.h                              |    1 +
 hw/misc/meson.build                                |   99 ++
 hw/misc/trace.h                                    |    1 +
 hw/moxie/Makefile.objs                             |    2 -
 hw/moxie/meson.build                               |    4 +
 hw/net/Makefile.objs                               |   59 -
 hw/net/can/Makefile.objs                           |    4 -
 hw/net/can/meson.build                             |    4 +
 hw/net/meson.build                                 |   67 +
 hw/net/trace.h                                     |    1 +
 hw/nios2/Makefile.objs                             |    3 -
 hw/nios2/meson.build                               |    6 +
 hw/nubus/Makefile.objs                             |    4 -
 hw/nubus/meson.build                               |    7 +
 hw/nvram/Makefile.objs                             |    8 -
 hw/nvram/meson.build                               |    9 +
 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                          |   24 -
 hw/pci-host/meson.build                            |   31 +
 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                               |   35 -
 hw/ppc/meson.build                                 |   80 ++
 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                             |   16 -
 hw/riscv/meson.build                               |   19 +
 hw/riscv/trace.h                                   |    1 +
 hw/rtc/Makefile.objs                               |   15 -
 hw/rtc/meson.build                                 |   16 +
 hw/rtc/trace.h                                     |    1 +
 hw/rx/Makefile.objs                                |    2 -
 hw/rx/meson.build                                  |    5 +
 hw/s390x/Makefile.objs                             |   37 -
 hw/s390x/meson.build                               |   46 +
 hw/s390x/trace.h                                   |    1 +
 hw/scsi/Makefile.objs                              |   15 -
 hw/scsi/meson.build                                |   26 +
 hw/scsi/trace.h                                    |    1 +
 hw/sd/Makefile.objs                                |   12 -
 hw/sd/meson.build                                  |   12 +
 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                                 |    9 +
 hw/ssi/trace.h                                     |    1 +
 hw/timer/Makefile.objs                             |   41 -
 hw/timer/meson.build                               |   37 +
 hw/timer/trace.h                                   |    1 +
 hw/tpm/Makefile.objs                               |    6 -
 hw/tpm/meson.build                                 |    8 +
 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                               |   71 -
 hw/usb/meson.build                                 |   69 +
 hw/usb/trace.h                                     |    1 +
 hw/vfio/Makefile.objs                              |    8 -
 hw/vfio/meson.build                                |   18 +
 hw/vfio/pci-quirks.c                               |    2 +-
 hw/vfio/trace.h                                    |    1 +
 hw/virtio/Makefile.objs                            |   48 -
 hw/virtio/meson.build                              |   51 +
 hw/virtio/trace.h                                  |    1 +
 hw/virtio/virtio-mem.c                             |    2 +-
 hw/watchdog/Makefile.objs                          |    7 -
 hw/watchdog/meson.build                            |    7 +
 hw/watchdog/trace.h                                |    1 +
 hw/xen/Makefile.objs                               |    7 -
 hw/xen/meson.build                                 |   20 +
 hw/xen/trace.h                                     |    1 +
 hw/xenpv/Makefile.objs                             |    2 -
 hw/xenpv/meson.build                               |    3 +
 hw/xtensa/Makefile.objs                            |    6 -
 hw/xtensa/meson.build                              |   11 +
 include/qemu/osdep.h                               |    2 +-
 include/tcg/tcg.h                                  |    2 +-
 include/user/syscall-trace.h                       |    2 +-
 io/Makefile.objs                                   |   12 -
 io/meson.build                                     |   25 +
 io/trace.h                                         |    1 +
 job-qmp.c                                          |    2 +-
 job.c                                              |    2 +-
 libdecnumber/Makefile.objs                         |    5 -
 libdecnumber/meson.build                           |    7 +
 linux-user/Makefile.objs                           |   25 -
 linux-user/alpha/Makefile.objs                     |    5 -
 linux-user/alpha/meson.build                       |    5 +
 linux-user/arm/Makefile.objs                       |    8 -
 linux-user/arm/meson.build                         |   10 +
 linux-user/arm/nwfpe/Makefile.objs                 |    2 -
 linux-user/arm/nwfpe/meson.build                   |   10 +
 linux-user/hppa/Makefile.objs                      |    5 -
 linux-user/hppa/meson.build                        |    5 +
 linux-user/i386/Makefile.objs                      |    5 -
 linux-user/i386/meson.build                        |    5 +
 linux-user/i386/syscall_nr.h                       |    1 +
 linux-user/m68k/Makefile.objs                      |    5 -
 linux-user/m68k/meson.build                        |    5 +
 linux-user/meson.build                             |   37 +
 linux-user/microblaze/Makefile.objs                |    5 -
 linux-user/microblaze/meson.build                  |    5 +
 linux-user/mips/Makefile.objs                      |    5 -
 linux-user/mips/meson.build                        |    5 +
 linux-user/mips/syscall_nr.h                       |    1 +
 linux-user/mips64/Makefile.objs                    |   12 -
 linux-user/mips64/meson.build                      |    6 +
 linux-user/mips64/syscall_nr.h                     |    7 +
 linux-user/ppc/Makefile.objs                       |    6 -
 linux-user/ppc/meson.build                         |    5 +
 linux-user/s390x/Makefile.objs                     |    5 -
 linux-user/s390x/meson.build                       |    5 +
 linux-user/sh4/Makefile.objs                       |    5 -
 linux-user/sh4/meson.build                         |    5 +
 linux-user/sparc/Makefile.objs                     |    5 -
 linux-user/sparc/meson.build                       |    5 +
 linux-user/sparc64/Makefile.objs                   |    5 -
 linux-user/sparc64/meson.build                     |    5 +
 linux-user/trace.h                                 |    1 +
 linux-user/x86_64/Makefile.objs                    |    5 -
 linux-user/x86_64/meson.build                      |    5 +
 linux-user/x86_64/syscall_nr.h                     |    1 +
 linux-user/xtensa/Makefile.objs                    |    5 -
 linux-user/xtensa/meson.build                      |    5 +
 memory_ldst.inc.c => memory_ldst.inc               |    0
 meson                                              |    1 +
 meson.build                                        | 1436 ++++++++++++++++++++
 meson_options.txt                                  |    6 +
 migration/Makefile.objs                            |   18 -
 migration/meson.build                              |   40 +
 migration/trace.h                                  |    1 +
 monitor/Makefile.objs                              |    6 -
 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                                    |   40 +
 net/trace.h                                        |    1 +
 os-posix.c                                         |    2 +-
 pc-bios/descriptors/meson.build                    |   14 +
 pc-bios/meson.build                                |   27 +
 pc-bios/optionrom/Makefile                         |   67 +-
 pc-bios/s390-ccw/Makefile                          |   18 +-
 plugins/Makefile.objs                              |   21 -
 plugins/meson.build                                |   13 +
 po/LINGUAS                                         |    7 +
 po/Makefile                                        |   52 -
 po/POTFILES                                        |    1 +
 po/meson.build                                     |    5 +
 po/messages.po                                     |   74 -
 qapi/Makefile.objs                                 |   38 -
 qapi/meson.build                                   |  124 ++
 qapi/trace.h                                       |    1 +
 qga/Makefile.objs                                  |   10 -
 qga/installer/qemu-ga.wxs                          |    2 +-
 qga/meson.build                                    |   87 ++
 qga/vss-win32/Makefile.objs                        |   23 -
 qga/vss-win32/meson.build                          |   36 +
 qobject/Makefile.objs                              |    3 -
 qobject/meson.build                                |    3 +
 qom/Makefile.objs                                  |    5 -
 qom/meson.build                                    |   18 +
 qom/trace.h                                        |    1 +
 replay/Makefile.objs                               |   10 -
 replay/meson.build                                 |   12 +
 rules.mak                                          |  314 +----
 scripts/archive-source.sh                          |    3 +-
 scripts/check_sparse.py                            |   25 +
 scripts/clean-includes                             |    2 +-
 scripts/create_config                              |  129 --
 scripts/decodetree.py                              |    2 +-
 scripts/device-crash-test                          |    2 +-
 scripts/feature_to_c.sh                            |   24 +-
 scripts/grepy.sh                                   |    3 +
 scripts/hxtool                                     |    2 +-
 scripts/minikconf.py                               |    0
 scripts/mtest2make.py                              |  102 ++
 scripts/ninjatool.py                               | 1010 ++++++++++++++
 scripts/oss-fuzz/build.sh                          |   32 +-
 scripts/qapi-gen.py                                |    0
 scripts/qemu-version.sh                            |   25 +
 scripts/tracetool.py                               |    0
 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 +
 softmmu/Makefile.objs                              |   14 -
 softmmu/balloon.c                                  |    2 +-
 softmmu/ioport.c                                   |    2 +-
 softmmu/memory.c                                   |    2 +-
 softmmu/meson.build                                |   10 +
 softmmu/qtest.c                                    |    2 +-
 softmmu/vl.c                                       |    2 +-
 storage-daemon/Makefile.objs                       |    1 -
 storage-daemon/meson.build                         |   14 +
 storage-daemon/qapi/Makefile.objs                  |    1 -
 storage-daemon/qapi/meson.build                    |    7 +
 .../qemu-storage-daemon.c                          |    0
 stubs/Makefile.objs                                |   56 -
 stubs/meson.build                                  |   50 +
 target/alpha/Makefile.objs                         |    4 -
 target/alpha/meson.build                           |   18 +
 target/arm/Makefile.objs                           |   89 --
 target/arm/meson.build                             |   62 +
 target/arm/trace.h                                 |    1 +
 .../{translate-neon.inc.c => translate-neon.inc}   |    6 +-
 target/arm/translate-sve.c                         |    2 +-
 .../arm/{translate-vfp.inc.c => translate-vfp.inc} |    4 +-
 target/arm/translate.c                             |   12 +-
 target/avr/Makefile.objs                           |   34 -
 target/avr/disas.c                                 |    2 +-
 target/avr/meson.build                             |   20 +
 target/avr/translate.c                             |    2 +-
 target/cris/Makefile.objs                          |    3 -
 target/cris/meson.build                            |   14 +
 target/cris/translate.c                            |    2 +-
 .../{translate_v10.inc.c => translate_v10.inc}     |    0
 target/hppa/Makefile.objs                          |   11 -
 target/hppa/meson.build                            |   19 +
 target/hppa/trace.h                                |    1 +
 target/hppa/translate.c                            |    2 +-
 target/i386/Makefile.objs                          |   23 -
 target/i386/hvf/Makefile.objs                      |    2 -
 target/i386/hvf/meson.build                        |   12 +
 target/i386/meson.build                            |   40 +
 target/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                                 |   23 +
 target/microblaze/Makefile.objs                    |    3 -
 target/microblaze/meson.build                      |   14 +
 target/mips/Makefile.objs                          |    6 -
 target/mips/meson.build                            |   24 +
 target/mips/trace.h                                |    1 +
 target/mips/translate.c                            |    2 +-
 .../{translate_init.inc.c => translate_init.inc}   |    0
 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/int_helper.c                            |    2 +-
 target/ppc/meson.build                             |   37 +
 target/ppc/{mfrom_table.inc.c => mfrom_table.inc}  |    0
 target/ppc/trace.h                                 |    1 +
 target/ppc/translate.c                             |   22 +-
 .../ppc/translate/{dfp-impl.inc.c => dfp-impl.inc} |    0
 .../ppc/translate/{dfp-ops.inc.c => dfp-ops.inc}   |    0
 .../ppc/translate/{fp-impl.inc.c => fp-impl.inc}   |    0
 target/ppc/translate/{fp-ops.inc.c => fp-ops.inc}  |    0
 .../ppc/translate/{spe-impl.inc.c => spe-impl.inc} |    0
 .../ppc/translate/{spe-ops.inc.c => spe-ops.inc}   |    0
 .../ppc/translate/{vmx-impl.inc.c => vmx-impl.inc} |    0
 .../ppc/translate/{vmx-ops.inc.c => vmx-ops.inc}   |    0
 .../ppc/translate/{vsx-impl.inc.c => vsx-impl.inc} |    0
 .../ppc/translate/{vsx-ops.inc.c => vsx-ops.inc}   |    0
 .../{translate_init.inc.c => translate_init.inc}   |    0
 target/riscv/Makefile.objs                         |   28 -
 ...trans_privileged.inc.c => trans_privileged.inc} |    0
 .../insn_trans/{trans_rva.inc.c => trans_rva.inc}  |    0
 .../insn_trans/{trans_rvd.inc.c => trans_rvd.inc}  |    0
 .../insn_trans/{trans_rvf.inc.c => trans_rvf.inc}  |    0
 .../insn_trans/{trans_rvh.inc.c => trans_rvh.inc}  |    0
 .../insn_trans/{trans_rvi.inc.c => trans_rvi.inc}  |    0
 .../insn_trans/{trans_rvm.inc.c => trans_rvm.inc}  |    0
 .../insn_trans/{trans_rvv.inc.c => trans_rvv.inc}  |    0
 target/riscv/meson.build                           |   34 +
 target/riscv/trace.h                               |    1 +
 target/riscv/translate.c                           |   20 +-
 target/rx/Makefile.objs                            |   11 -
 target/rx/disas.c                                  |    2 +-
 target/rx/meson.build                              |   16 +
 target/rx/translate.c                              |    2 +-
 target/s390x/Makefile.objs                         |   30 -
 target/s390x/cpu_features.h                        |    2 +-
 target/s390x/cpu_models.h                          |    2 +-
 target/s390x/meson.build                           |   49 +
 target/s390x/trace.h                               |    1 +
 target/s390x/translate.c                           |    2 +-
 .../s390x/{translate_vx.inc.c => translate_vx.inc} |    0
 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                         |   15 +
 target/unicore32/Makefile.objs                     |    8 -
 target/unicore32/meson.build                       |   14 +
 target/xtensa/Makefile.objs                        |   16 -
 target/xtensa/core-dc232b.c                        |    4 +-
 .../{gdb-config.inc.c => gdb-config.inc}           |    0
 .../{xtensa-modules.inc.c => xtensa-modules.inc}   |    0
 target/xtensa/core-dc233c.c                        |    4 +-
 .../{gdb-config.inc.c => gdb-config.inc}           |    0
 .../{xtensa-modules.inc.c => xtensa-modules.inc}   |    0
 target/xtensa/core-de212.c                         |    4 +-
 .../{gdb-config.inc.c => gdb-config.inc}           |    0
 .../{xtensa-modules.inc.c => xtensa-modules.inc}   |    0
 target/xtensa/core-fsf.c                           |    2 +-
 .../{xtensa-modules.inc.c => xtensa-modules.inc}   |    0
 target/xtensa/core-sample_controller.c             |    4 +-
 .../{gdb-config.inc.c => gdb-config.inc}           |    0
 .../{xtensa-modules.inc.c => xtensa-modules.inc}   |    0
 target/xtensa/core-test_kc705_be.c                 |    4 +-
 .../{gdb-config.inc.c => gdb-config.inc}           |    0
 .../{xtensa-modules.inc.c => xtensa-modules.inc}   |    0
 target/xtensa/core-test_mmuhifi_c3.c               |    4 +-
 .../{gdb-config.inc.c => gdb-config.inc}           |    0
 .../{xtensa-modules.inc.c => xtensa-modules.inc}   |    0
 target/xtensa/import_core.sh                       |    8 +-
 target/xtensa/meson.build                          |   30 +
 tcg/README                                         |    2 +-
 tcg/aarch64/{tcg-target.inc.c => tcg-target.inc}   |    4 +-
 tcg/arm/{tcg-target.inc.c => tcg-target.inc}       |    4 +-
 tcg/i386/{tcg-target.inc.c => tcg-target.inc}      |    4 +-
 tcg/mips/{tcg-target.inc.c => tcg-target.inc}      |    2 +-
 tcg/ppc/{tcg-target.inc.c => tcg-target.inc}       |    4 +-
 tcg/riscv/{tcg-target.inc.c => tcg-target.inc}     |    4 +-
 tcg/s390/{tcg-target.inc.c => tcg-target.inc}      |    4 +-
 tcg/sparc/{tcg-target.inc.c => tcg-target.inc}     |    2 +-
 tcg/{tcg-ldst.inc.c => tcg-ldst.inc}               |    0
 tcg/{tcg-pool.inc.c => tcg-pool.inc}               |    2 +-
 tcg/tcg.c                                          |    6 +-
 tcg/tci/README                                     |    4 +-
 tcg/tci/{tcg-target.inc.c => tcg-target.inc}       |    0
 tests/Makefile.include                             |  468 +------
 tests/acceptance/avocado_qemu/__init__.py          |    3 +-
 tests/acceptance/boot_linux_console.py             |    6 +-
 tests/data/acpi/rebuild-expected-aml.sh            |    2 +-
 tests/docker/test-static                           |   24 +
 tests/fp/Makefile                                  |  600 --------
 tests/fp/fp-test.c                                 |    2 +-
 tests/fp/meson.build                               |  636 +++++++++
 tests/fp/{wrap.inc.c => wrap.inc}                  |    0
 tests/meson.build                                  |   18 +
 tests/multiboot/run_test.sh                        |    2 +-
 tests/plugin/Makefile                              |   46 -
 tests/plugin/meson.build                           |    7 +
 tests/qapi-schema/meson.build                      |  216 +++
 tests/qemu-iotests/check                           |    6 +-
 tests/qemu-iotests/meson.build                     |   10 +
 tests/qtest/Makefile.include                       |  332 -----
 tests/qtest/ac97-test.c                            |    2 +-
 tests/qtest/acpi-utils.h                           |    2 +-
 tests/qtest/ahci-test.c                            |    2 +-
 tests/qtest/arm-cpu-features.c                     |    2 +-
 tests/qtest/bios-tables-test.c                     |    2 +-
 tests/qtest/boot-order-test.c                      |    2 +-
 tests/qtest/boot-sector.c                          |    2 +-
 tests/qtest/boot-sector.h                          |    2 +-
 tests/qtest/boot-serial-test.c                     |    2 +-
 tests/qtest/cdrom-test.c                           |    2 +-
 tests/qtest/dbus-vmstate-test.c                    |    2 +-
 tests/qtest/device-introspect-test.c               |    2 +-
 tests/qtest/device-plug-test.c                     |    2 +-
 tests/qtest/drive_del-test.c                       |    2 +-
 tests/qtest/ds1338-test.c                          |    2 +-
 tests/qtest/e1000-test.c                           |    2 +-
 tests/qtest/eepro100-test.c                        |    2 +-
 tests/qtest/endianness-test.c                      |    2 +-
 tests/qtest/es1370-test.c                          |    2 +-
 tests/qtest/fuzz/Makefile.include                  |   39 -
 tests/qtest/fuzz/fuzz.c                            |    2 +-
 tests/qtest/fuzz/fuzz.h                            |    2 +-
 tests/qtest/fuzz/i440fx_fuzz.c                     |    6 +-
 tests/qtest/fuzz/meson.build                       |   35 +
 tests/qtest/fuzz/qos_fuzz.c                        |    2 +-
 tests/qtest/fuzz/qtest_wrappers.c                  |    2 +-
 tests/qtest/fuzz/virtio_net_fuzz.c                 |    5 +-
 tests/qtest/fuzz/virtio_scsi_fuzz.c                |    8 +-
 tests/qtest/fw_cfg-test.c                          |    2 +-
 tests/qtest/hd-geo-test.c                          |    2 +-
 tests/qtest/hexloader-test.c                       |    2 +-
 tests/qtest/ide-test.c                             |    2 +-
 tests/qtest/ipoctal232-test.c                      |    2 +-
 tests/qtest/ivshmem-test.c                         |    2 +-
 tests/qtest/libqos/aarch64-xlnx-zcu102-machine.c   |    4 +-
 tests/qtest/libqos/ahci.c                          |    6 +-
 tests/qtest/libqos/ahci.h                          |    6 +-
 tests/qtest/libqos/arm-imx25-pdk-machine.c         |    6 +-
 tests/qtest/libqos/arm-n800-machine.c              |    6 +-
 tests/qtest/libqos/arm-raspi2-machine.c            |    4 +-
 tests/qtest/libqos/arm-sabrelite-machine.c         |    4 +-
 tests/qtest/libqos/arm-smdkc210-machine.c          |    4 +-
 tests/qtest/libqos/arm-virt-machine.c              |    6 +-
 tests/qtest/libqos/arm-xilinx-zynq-a9-machine.c    |    4 +-
 tests/qtest/libqos/e1000e.c                        |    6 +-
 tests/qtest/libqos/e1000e.h                        |    2 +-
 tests/qtest/libqos/fw_cfg.c                        |    2 +-
 tests/qtest/libqos/i2c-imx.c                       |    2 +-
 tests/qtest/libqos/i2c-omap.c                      |    2 +-
 tests/qtest/libqos/i2c.c                           |    2 +-
 tests/qtest/libqos/i2c.h                           |    2 +-
 tests/qtest/libqos/libqos-pc.c                     |    6 +-
 tests/qtest/libqos/libqos-pc.h                     |    2 +-
 tests/qtest/libqos/libqos-spapr.c                  |    6 +-
 tests/qtest/libqos/libqos-spapr.h                  |    2 +-
 tests/qtest/libqos/libqos.c                        |    4 +-
 tests/qtest/libqos/libqos.h                        |    4 +-
 tests/qtest/{ => libqos}/libqtest.h                |    0
 tests/qtest/libqos/malloc-pc.c                     |    4 +-
 tests/qtest/libqos/malloc-pc.h                     |    2 +-
 tests/qtest/libqos/malloc-spapr.c                  |    2 +-
 tests/qtest/libqos/malloc-spapr.h                  |    2 +-
 tests/qtest/libqos/malloc.c                        |    2 +-
 tests/qtest/libqos/meson.build                     |   57 +
 tests/qtest/libqos/pci-pc.c                        |    2 +-
 tests/qtest/libqos/pci-pc.h                        |    6 +-
 tests/qtest/libqos/pci-spapr.c                     |    6 +-
 tests/qtest/libqos/pci-spapr.h                     |    6 +-
 tests/qtest/libqos/pci.c                           |    4 +-
 tests/qtest/libqos/pci.h                           |    2 +-
 tests/qtest/libqos/ppc64_pseries-machine.c         |    4 +-
 tests/qtest/libqos/qgraph.c                        |    4 +-
 tests/qtest/libqos/qgraph.h                        |    8 +-
 tests/qtest/libqos/qgraph_internal.h               |    4 +-
 tests/qtest/libqos/qos_external.c                  |    8 +-
 tests/qtest/libqos/qos_external.h                  |    4 +-
 tests/qtest/libqos/rtas.c                          |    2 +-
 tests/qtest/libqos/rtas.h                          |    2 +-
 tests/qtest/libqos/sdhci.c                         |    2 +-
 tests/qtest/libqos/sdhci.h                         |    2 +-
 tests/qtest/libqos/tpci200.c                       |    4 +-
 tests/qtest/libqos/usb.c                           |    2 +-
 tests/qtest/libqos/usb.h                           |    2 +-
 tests/qtest/libqos/virtio-9p.c                     |    4 +-
 tests/qtest/libqos/virtio-9p.h                     |    6 +-
 tests/qtest/libqos/virtio-balloon.c                |    4 +-
 tests/qtest/libqos/virtio-balloon.h                |    6 +-
 tests/qtest/libqos/virtio-blk.c                    |    4 +-
 tests/qtest/libqos/virtio-blk.h                    |    6 +-
 tests/qtest/libqos/virtio-mmio.c                   |    8 +-
 tests/qtest/libqos/virtio-mmio.h                   |    4 +-
 tests/qtest/libqos/virtio-net.c                    |    4 +-
 tests/qtest/libqos/virtio-net.h                    |    6 +-
 tests/qtest/libqos/virtio-pci.c                    |   14 +-
 tests/qtest/libqos/virtio-pci.h                    |    6 +-
 tests/qtest/libqos/virtio-rng.c                    |    4 +-
 tests/qtest/libqos/virtio-rng.h                    |    6 +-
 tests/qtest/libqos/virtio-scsi.c                   |    4 +-
 tests/qtest/libqos/virtio-scsi.h                   |    6 +-
 tests/qtest/libqos/virtio-serial.c                 |    4 +-
 tests/qtest/libqos/virtio-serial.h                 |    6 +-
 tests/qtest/libqos/virtio.c                        |    2 +-
 tests/qtest/libqos/virtio.h                        |    2 +-
 tests/qtest/libqos/x86_64_pc-machine.c             |    2 +-
 tests/qtest/libqtest-single.h                      |    2 +-
 tests/qtest/libqtest.c                             |    2 +-
 tests/qtest/m48t59-test.c                          |    2 +-
 tests/qtest/machine-none-test.c                    |    2 +-
 tests/qtest/megasas-test.c                         |    2 +-
 tests/qtest/meson.build                            |  257 ++++
 tests/qtest/microbit-test.c                        |    2 +-
 tests/qtest/migration-helpers.h                    |    2 +-
 tests/qtest/migration-test.c                       |    4 +-
 tests/qtest/modules-test.c                         |    2 +-
 tests/qtest/ne2000-test.c                          |    2 +-
 tests/qtest/numa-test.c                            |    2 +-
 tests/qtest/nvme-test.c                            |    2 +-
 tests/qtest/pca9552-test.c                         |    2 +-
 tests/qtest/pci-test.c                             |    2 +-
 tests/qtest/pcnet-test.c                           |    2 +-
 tests/qtest/pflash-cfi02-test.c                    |    2 +-
 tests/qtest/pnv-xscom-test.c                       |    2 +-
 tests/qtest/prom-env-test.c                        |    2 +-
 tests/qtest/pvpanic-test.c                         |    2 +-
 tests/qtest/pxe-test.c                             |    2 +-
 tests/qtest/q35-test.c                             |    2 +-
 tests/qtest/qmp-cmd-test.c                         |    2 +-
 tests/qtest/qmp-test.c                             |    2 +-
 tests/qtest/qom-test.c                             |    2 +-
 tests/qtest/rtas-test.c                            |    4 +-
 tests/qtest/sdhci-test.c                           |    2 +-
 tests/qtest/spapr-phb-test.c                       |    2 +-
 tests/qtest/tco-test.c                             |    2 +-
 tests/qtest/test-filter-mirror.c                   |    2 +-
 tests/qtest/test-filter-redirector.c               |    2 +-
 tests/qtest/test-hmp.c                             |    2 +-
 tests/qtest/tpm-crb-swtpm-test.c                   |    2 +-
 tests/qtest/tpm-tis-device-swtpm-test.c            |    2 +-
 tests/qtest/tpm-tis-swtpm-test.c                   |    2 +-
 tests/qtest/tpm-util.c                             |    2 +-
 tests/qtest/tulip-test.c                           |    2 +-
 tests/qtest/virtio-rng-test.c                      |    2 +-
 tests/qtest/virtio-test.c                          |    2 +-
 tests/qtest/vmgenid-test.c                         |    2 +-
 tests/qtest/vmxnet3-test.c                         |    2 +-
 tests/qtest/wdt_ib700-test.c                       |    2 +-
 tests/tcg/configure.sh                             |    4 +-
 tests/test-qga.c                                   |   10 +-
 tests/test-qgraph.c                                |    5 +-
 tests/vm/Makefile.include                          |    6 +-
 tests/vm/freebsd                                   |    1 +
 tests/vm/netbsd                                    |    1 +
 tests/vm/openbsd                                   |    1 +
 tools/meson.build                                  |   10 +
 tools/virtiofsd/Makefile.objs                      |   12 -
 tools/virtiofsd/meson.build                        |   19 +
 tools/virtiofsd/passthrough_ll.c                   |    2 +-
 .../virtiofsd/{seccomp.c => passthrough_seccomp.c} |    2 +-
 .../virtiofsd/{seccomp.h => passthrough_seccomp.h} |    0
 trace/Makefile.objs                                |   59 -
 trace/control-target.c                             |    2 +-
 trace/control.c                                    |    2 +-
 trace/meson.build                                  |   93 ++
 ui/Makefile.objs                                   |   73 -
 ui/input-keymap.c                                  |   34 +-
 ui/meson.build                                     |  115 ++
 ui/shader.c                                        |    6 +-
 ui/shader/meson.build                              |   15 +
 ui/trace.h                                         |    1 +
 ui/vnc-enc-zrle.c                                  |   22 +-
 ui/{vnc-enc-zrle.inc.c => vnc-enc-zrle.inc}        |    0
 util/Makefile.objs                                 |   83 --
 util/meson.build                                   |   65 +
 util/trace.h                                       |    1 +
 version.texi.in                                    |    2 +
 749 files changed, 8622 insertions(+), 7202 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
 rename accel/tcg/{atomic_common.inc.c => atomic_common.inc} (100%)
 create mode 100644 accel/tcg/meson.build
 create mode 100644 accel/tcg/trace.h
 delete mode 100644 accel/xen/Makefile.objs
 create mode 100644 accel/xen/meson.build
 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 backends/tpm/Makefile.objs
 create mode 100644 backends/tpm/meson.build
 create mode 100644 backends/tpm/trace.h
 create mode 100644 backends/trace.h
 delete mode 100644 block/Makefile.objs
 create mode 100644 block/meson.build
 delete mode 100644 block/monitor/Makefile.objs
 create mode 100644 block/monitor/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
 delete mode 100644 contrib/vhost-user-blk/Makefile.objs
 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
 delete mode 100644 dump/Makefile.objs
 create mode 100644 dump/meson.build
 rename fpu/{softfloat-specialize.inc.c => softfloat-specialize.inc} (100%)
 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/avr/Makefile.objs
 create mode 100644 hw/avr/meson.build
 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/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
 create mode 100644 hw/core/trace.h
 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
 create mode 100644 hw/hyperv/trace.h
 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/nubus/Makefile.objs
 create mode 100644 hw/nubus/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/rtc/Makefile.objs
 create mode 100644 hw/rtc/meson.build
 create mode 100644 hw/rtc/trace.h
 delete mode 100644 hw/rx/Makefile.objs
 create mode 100644 hw/rx/meson.build
 delete mode 100644 hw/s390x/Makefile.objs
 create mode 100644 hw/s390x/meson.build
 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
 create mode 100644 hw/ssi/trace.h
 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/alpha/Makefile.objs
 create mode 100644 linux-user/alpha/meson.build
 delete mode 100644 linux-user/arm/Makefile.objs
 create mode 100644 linux-user/arm/meson.build
 delete mode 100644 linux-user/arm/nwfpe/Makefile.objs
 create mode 100644 linux-user/arm/nwfpe/meson.build
 delete mode 100644 linux-user/hppa/Makefile.objs
 create mode 100644 linux-user/hppa/meson.build
 delete mode 100644 linux-user/i386/Makefile.objs
 create mode 100644 linux-user/i386/meson.build
 create mode 100644 linux-user/i386/syscall_nr.h
 delete mode 100644 linux-user/m68k/Makefile.objs
 create mode 100644 linux-user/m68k/meson.build
 create mode 100644 linux-user/meson.build
 delete mode 100644 linux-user/microblaze/Makefile.objs
 create mode 100644 linux-user/microblaze/meson.build
 delete mode 100644 linux-user/mips/Makefile.objs
 create mode 100644 linux-user/mips/meson.build
 create mode 100644 linux-user/mips/syscall_nr.h
 delete mode 100644 linux-user/mips64/Makefile.objs
 create mode 100644 linux-user/mips64/meson.build
 create mode 100644 linux-user/mips64/syscall_nr.h
 delete mode 100644 linux-user/ppc/Makefile.objs
 create mode 100644 linux-user/ppc/meson.build
 delete mode 100644 linux-user/s390x/Makefile.objs
 create mode 100644 linux-user/s390x/meson.build
 delete mode 100644 linux-user/sh4/Makefile.objs
 create mode 100644 linux-user/sh4/meson.build
 delete mode 100644 linux-user/sparc/Makefile.objs
 create mode 100644 linux-user/sparc/meson.build
 delete mode 100644 linux-user/sparc64/Makefile.objs
 create mode 100644 linux-user/sparc64/meson.build
 create mode 100644 linux-user/trace.h
 delete mode 100644 linux-user/x86_64/Makefile.objs
 create mode 100644 linux-user/x86_64/meson.build
 create mode 100644 linux-user/x86_64/syscall_nr.h
 delete mode 100644 linux-user/xtensa/Makefile.objs
 create mode 100644 linux-user/xtensa/meson.build
 rename memory_ldst.inc.c => memory_ldst.inc (100%)
 create mode 160000 meson
 create mode 100644 meson.build
 create mode 100644 meson_options.txt
 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
 create mode 100644 pc-bios/descriptors/meson.build
 create mode 100644 pc-bios/meson.build
 delete mode 100644 plugins/Makefile.objs
 create mode 100644 plugins/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 100644 scripts/check_sparse.py
 delete mode 100755 scripts/create_config
 mode change 100755 => 100644 scripts/decodetree.py
 create mode 100755 scripts/grepy.sh
 mode change 100644 => 100755 scripts/hxtool
 mode change 100755 => 100644 scripts/minikconf.py
 create mode 100644 scripts/mtest2make.py
 create mode 100755 scripts/ninjatool.py
 mode change 100755 => 100644 scripts/qapi-gen.py
 create mode 100755 scripts/qemu-version.sh
 mode change 100755 => 100644 scripts/tracetool.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 softmmu/Makefile.objs
 create mode 100644 softmmu/meson.build
 delete mode 100644 storage-daemon/Makefile.objs
 create mode 100644 storage-daemon/meson.build
 delete mode 100644 storage-daemon/qapi/Makefile.objs
 create mode 100644 storage-daemon/qapi/meson.build
 rename qemu-storage-daemon.c => storage-daemon/qemu-storage-daemon.c (100%)
 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
 rename target/arm/{translate-neon.inc.c => translate-neon.inc} (99%)
 rename target/arm/{translate-vfp.inc.c => translate-vfp.inc} (99%)
 delete mode 100644 target/avr/Makefile.objs
 create mode 100644 target/avr/meson.build
 delete mode 100644 target/cris/Makefile.objs
 create mode 100644 target/cris/meson.build
 rename target/cris/{translate_v10.inc.c => translate_v10.inc} (100%)
 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
 rename target/mips/{translate_init.inc.c => translate_init.inc} (100%)
 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
 rename target/ppc/{mfrom_table.inc.c => mfrom_table.inc} (100%)
 create mode 100644 target/ppc/trace.h
 rename target/ppc/translate/{dfp-impl.inc.c => dfp-impl.inc} (100%)
 rename target/ppc/translate/{dfp-ops.inc.c => dfp-ops.inc} (100%)
 rename target/ppc/translate/{fp-impl.inc.c => fp-impl.inc} (100%)
 rename target/ppc/translate/{fp-ops.inc.c => fp-ops.inc} (100%)
 rename target/ppc/translate/{spe-impl.inc.c => spe-impl.inc} (100%)
 rename target/ppc/translate/{spe-ops.inc.c => spe-ops.inc} (100%)
 rename target/ppc/translate/{vmx-impl.inc.c => vmx-impl.inc} (100%)
 rename target/ppc/translate/{vmx-ops.inc.c => vmx-ops.inc} (100%)
 rename target/ppc/translate/{vsx-impl.inc.c => vsx-impl.inc} (100%)
 rename target/ppc/translate/{vsx-ops.inc.c => vsx-ops.inc} (100%)
 rename target/ppc/{translate_init.inc.c => translate_init.inc} (100%)
 delete mode 100644 target/riscv/Makefile.objs
 rename target/riscv/insn_trans/{trans_privileged.inc.c => trans_privileged.inc} (100%)
 rename target/riscv/insn_trans/{trans_rva.inc.c => trans_rva.inc} (100%)
 rename target/riscv/insn_trans/{trans_rvd.inc.c => trans_rvd.inc} (100%)
 rename target/riscv/insn_trans/{trans_rvf.inc.c => trans_rvf.inc} (100%)
 rename target/riscv/insn_trans/{trans_rvh.inc.c => trans_rvh.inc} (100%)
 rename target/riscv/insn_trans/{trans_rvi.inc.c => trans_rvi.inc} (100%)
 rename target/riscv/insn_trans/{trans_rvm.inc.c => trans_rvm.inc} (100%)
 rename target/riscv/insn_trans/{trans_rvv.inc.c => trans_rvv.inc} (100%)
 create mode 100644 target/riscv/meson.build
 create mode 100644 target/riscv/trace.h
 delete mode 100644 target/rx/Makefile.objs
 create mode 100644 target/rx/meson.build
 delete mode 100644 target/s390x/Makefile.objs
 create mode 100644 target/s390x/meson.build
 create mode 100644 target/s390x/trace.h
 rename target/s390x/{translate_vx.inc.c => translate_vx.inc} (100%)
 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
 rename target/xtensa/core-dc232b/{gdb-config.inc.c => gdb-config.inc} (100%)
 rename target/xtensa/core-dc232b/{xtensa-modules.inc.c => xtensa-modules.inc} (100%)
 rename target/xtensa/core-dc233c/{gdb-config.inc.c => gdb-config.inc} (100%)
 rename target/xtensa/core-dc233c/{xtensa-modules.inc.c => xtensa-modules.inc} (100%)
 rename target/xtensa/core-de212/{gdb-config.inc.c => gdb-config.inc} (100%)
 rename target/xtensa/core-de212/{xtensa-modules.inc.c => xtensa-modules.inc} (100%)
 rename target/xtensa/core-fsf/{xtensa-modules.inc.c => xtensa-modules.inc} (100%)
 rename target/xtensa/core-sample_controller/{gdb-config.inc.c => gdb-config.inc} (100%)
 rename target/xtensa/core-sample_controller/{xtensa-modules.inc.c => xtensa-modules.inc} (100%)
 rename target/xtensa/core-test_kc705_be/{gdb-config.inc.c => gdb-config.inc} (100%)
 rename target/xtensa/core-test_kc705_be/{xtensa-modules.inc.c => xtensa-modules.inc} (100%)
 rename target/xtensa/core-test_mmuhifi_c3/{gdb-config.inc.c => gdb-config.inc} (100%)
 rename target/xtensa/core-test_mmuhifi_c3/{xtensa-modules.inc.c => xtensa-modules.inc} (100%)
 create mode 100644 target/xtensa/meson.build
 rename tcg/aarch64/{tcg-target.inc.c => tcg-target.inc} (99%)
 rename tcg/arm/{tcg-target.inc.c => tcg-target.inc} (99%)
 rename tcg/i386/{tcg-target.inc.c => tcg-target.inc} (99%)
 rename tcg/mips/{tcg-target.inc.c => tcg-target.inc} (99%)
 rename tcg/ppc/{tcg-target.inc.c => tcg-target.inc} (99%)
 rename tcg/riscv/{tcg-target.inc.c => tcg-target.inc} (99%)
 rename tcg/s390/{tcg-target.inc.c => tcg-target.inc} (99%)
 rename tcg/sparc/{tcg-target.inc.c => tcg-target.inc} (99%)
 rename tcg/{tcg-ldst.inc.c => tcg-ldst.inc} (100%)
 rename tcg/{tcg-pool.inc.c => tcg-pool.inc} (99%)
 rename tcg/tci/{tcg-target.inc.c => tcg-target.inc} (100%)
 create mode 100755 tests/docker/test-static
 delete mode 100644 tests/fp/Makefile
 create mode 100644 tests/fp/meson.build
 rename tests/fp/{wrap.inc.c => wrap.inc} (100%)
 create mode 100644 tests/meson.build
 delete mode 100644 tests/plugin/Makefile
 create mode 100644 tests/plugin/meson.build
 create mode 100644 tests/qapi-schema/meson.build
 create mode 100644 tests/qemu-iotests/meson.build
 delete mode 100644 tests/qtest/Makefile.include
 delete mode 100644 tests/qtest/fuzz/Makefile.include
 create mode 100644 tests/qtest/fuzz/meson.build
 rename tests/qtest/{ => libqos}/libqtest.h (100%)
 create mode 100644 tests/qtest/libqos/meson.build
 create mode 100644 tests/qtest/meson.build
 create mode 100644 tools/meson.build
 delete mode 100644 tools/virtiofsd/Makefile.objs
 create mode 100644 tools/virtiofsd/meson.build
 rename tools/virtiofsd/{seccomp.c => passthrough_seccomp.c} (99%)
 rename tools/virtiofsd/{seccomp.h => passthrough_seccomp.h} (100%)
 delete mode 100644 trace/Makefile.objs
 create mode 100644 trace/meson.build
 delete mode 100644 ui/Makefile.objs
 create mode 100644 ui/meson.build
 create mode 100644 ui/shader/meson.build
 create mode 100644 ui/trace.h
 rename ui/{vnc-enc-zrle.inc.c => vnc-enc-zrle.inc} (100%)
 delete mode 100644 util/Makefile.objs
 create mode 100644 util/meson.build
 create mode 100644 util/trace.h
 create mode 100644 version.texi.in
Signature · 1 line
1.8.3.1
#1 lore raw

PATCH 1/147 oss-fuzz/build: remove LIB_FUZZING_ENGINE

Meson build scripts will only include qemu-fuzz-TARGET rules if configured with --enable-fuzzing, and that takes care of adding -fsanitize=fuzzer. Therefore we can just specify the configure option and stop modifying the CFLAGS and CONFIG_FUZZ options in the "make" invocation.

---
 scripts/oss-fuzz/build.sh | 16 +++++-----------
 1 file changed, 5 insertions(+), 11 deletions(-)
scripts/oss-fuzz/build.sh +5 -11
index a07b302..52430cb 100755
@@ -20,7 +20,7 @@
 # e.g.
 # $CXX $CXXFLAGS -std=c++11 -Iinclude \
 #     /path/to/name_of_fuzzer.cc -o $OUT/name_of_fuzzer \
-#     $LIB_FUZZING_ENGINE /path/to/library.a
+#     -fsanitize=fuzzer /path/to/library.a
 
 fatal () {
     echo "Error : ${*}, exiting."
@@ -54,10 +54,6 @@ mkdir -p $OSS_FUZZ_BUILD_DIR || fatal "mkdir $OSS_FUZZ_BUILD_DIR failed"
 cd $OSS_FUZZ_BUILD_DIR || fatal "cd $OSS_FUZZ_BUILD_DIR failed"
 
 
-if [ -z ${LIB_FUZZING_ENGINE+x} ]; then
-    LIB_FUZZING_ENGINE="-fsanitize=fuzzer"
-fi
-
 if [ -z ${OUT+x} ]; then
     DEST_DIR=$(realpath "./DEST_DIR")
 else
@@ -67,14 +63,12 @@ fi
 mkdir -p "$DEST_DIR/lib/"  # Copy the shared libraries here
 
 # Build once to get the list of dynamic lib paths, and copy them over
-../configure --disable-werror --cc="$CC" --cxx="$CXX" \
+../configure --disable-werror --cc="$CC" --cxx="$CXX" --enable-fuzzing \
     --extra-cflags="$EXTRA_CFLAGS" --target-list="i386-softmmu"
 
-if ! make CONFIG_FUZZ=y CFLAGS="$LIB_FUZZING_ENGINE" "-j$(nproc)" \
-    i386-softmmu/fuzz; then
+if ! make "-j$(nproc)" i386-softmmu/fuzz; then
     fatal "Build failed. Please specify a compiler with fuzzing support"\
-          "using the \$CC and \$CXX environemnt variables, or specify a"\
-          "\$LIB_FUZZING_ENGINE compatible with your compiler"\
+          "using the \$CC and \$CXX environemnt variables"\
           "\nFor example: CC=clang CXX=clang++ $0"
 fi
 
@@ -87,7 +81,7 @@ rm ./i386-softmmu/qemu-fuzz-i386
 ../configure --bindir="$DEST_DIR" --datadir="$DEST_DIR/data/" --disable-werror \
     --cc="$CC" --cxx="$CXX" --extra-cflags="$EXTRA_CFLAGS" \
     --extra-ldflags="-Wl,-rpath,'\$\$ORIGIN/lib'"
-make CONFIG_FUZZ=y CFLAGS="$LIB_FUZZING_ENGINE" "-j$(nproc)" i386-softmmu/fuzz
+make "-j$(nproc)" i386-softmmu/fuzz
 
 # Copy over the datadir
 cp  -r ../pc-bios/ "$DEST_DIR/pc-bios"
Signature · 1 line
1.8.3.1
#2 lore raw

PATCH 2/147 optionrom: simplify Makefile

In reply to Paolo Bonzini

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

Make it independent from the rules.mak, and clean up to use pattern rules.

---
 pc-bios/optionrom/Makefile | 67 ++++++++++++++++++++++++++++------------------
 1 file changed, 41 insertions(+), 26 deletions(-)
pc-bios/optionrom/Makefile +41 -26
index e33a24d..51cb6ca 100644
@@ -1,13 +1,16 @@
-all: build-all
+CURRENT_MAKEFILE := $(realpath $(word $(words $(MAKEFILE_LIST)),$(MAKEFILE_LIST)))
+SRC_DIR := $(dir $(CURRENT_MAKEFILE))
+TOPSRC_DIR := $(SRC_DIR)/../..
+VPATH = $(SRC_DIR)
+
+all: multiboot.bin linuxboot.bin linuxboot_dma.bin kvmvapic.bin pvh.bin
 # Dummy command so that make thinks it has done something
 	@true
 
 include ../../config-host.mak
-include $(SRC_PATH)/rules.mak
-
-$(call set-vpath, $(SRC_PATH)/pc-bios/optionrom)
 
-.PHONY : all clean build-all
+quiet-command = $(if $(V),$1,$(if $(2),@printf "  %-7s %s\n" $2 $3 && $1, @$1))
+cc-option = $(if $(shell $(CC) $1 -S -o /dev/null -xc /dev/null >/dev/null 2>&1 && echo OK), $1, $2)
 
 # Compiling with no optimization creates ROMs that are too large
 ifeq ($(lastword $(filter -O%, -O0 $(CFLAGS))),-O0)
@@ -15,48 +18,60 @@ override CFLAGS += -O2
 endif
 override CFLAGS += -march=i486
 
-# Drop -fstack-protector and the like
-QEMU_CFLAGS := $(filter -W%, $(QEMU_CFLAGS)) $(CFLAGS_NOPIE) -ffreestanding
-QEMU_CFLAGS += $(call cc-option, $(QEMU_CFLAGS), -fno-stack-protector)
-QEMU_CFLAGS += $(call cc-option, $(QEMU_CFLAGS), -m16)
-ifeq ($(filter -m16, $(QEMU_CFLAGS)),)
+# Flags for dependency generation
+override CPPFLAGS += -MMD -MP -MT $@ -MF $(@D)/$(*F).d
+
+override CFLAGS += $(filter -W%, $(QEMU_CFLAGS))
+override CFLAGS += $(CFLAGS_NOPIE) -ffreestanding -I$(TOPSRC_DIR)/include
+override CFLAGS += $(call cc-option, -fno-stack-protector)
+override CFLAGS += $(call cc-option, -m16)
+
+ifeq ($(filter -m16, $(CFLAGS)),)
 # Attempt to work around compilers that lack -m16 (GCC <= 4.8, clang <= ??)
 # On GCC we add -fno-toplevel-reorder to keep the order of asm blocks with
 # respect to the rest of the code.  clang does not have -fno-toplevel-reorder,
 # but it places all asm blocks at the beginning and we're relying on it for
 # the option ROM header.  So just force clang not to use the integrated
 # assembler, which doesn't support .code16gcc.
-QEMU_CFLAGS += $(call cc-option, $(QEMU_CFLAGS), -fno-toplevel-reorder)
-QEMU_CFLAGS += $(call cc-option, $(QEMU_CFLAGS), -no-integrated-as)
-QEMU_CFLAGS += -m32 -include $(SRC_PATH)/pc-bios/optionrom/code16gcc.h
+override CFLAGS += $(call cc-option, -fno-toplevel-reorder)
+override CFLAGS += $(call cc-option, -no-integrated-as)
+override CFLAGS += -m32 -include $(SRC_DIR)/code16gcc.h
 endif
 
-QEMU_INCLUDES += -I$(SRC_PATH)
-
 Wa = -Wa,
-ASFLAGS += -32
-QEMU_CFLAGS += $(call cc-c-option, $(QEMU_CFLAGS), $(Wa)-32)
+override ASFLAGS += -32
+override CFLAGS += $(call cc-option, $(Wa)-32)
 
-build-all: multiboot.bin linuxboot.bin linuxboot_dma.bin kvmvapic.bin pvh.bin
 
-# suppress auto-removal of intermediate files
-.SECONDARY:
+LD_I386_EMULATION ?= elf_i386
+override LDFLAGS = -m $(LD_I386_EMULATION) -T $(SRC_DIR)/flat.lds
+override LDFLAGS += $(LDFLAGS_NOPIE)
 
+all: multiboot.bin linuxboot.bin linuxboot_dma.bin kvmvapic.bin pvh.bin
+
+pvh.img: pvh.o pvh_main.o
 
 %.o: %.S
-	$(call quiet-command,$(CPP) $(QEMU_INCLUDES) $(QEMU_DGFLAGS) -c -o - $< | $(AS) $(ASFLAGS) -o $@,"AS","$(TARGET_DIR)$@")
+	$(call quiet-command,$(CPP) $(CPPFLAGS) -c -o - $< | $(AS) $(ASFLAGS) -o $@,"AS","$@")
 
-pvh.img: pvh.o pvh_main.o
-	$(call quiet-command,$(LD) $(LDFLAGS_NOPIE) -m $(LD_I386_EMULATION) -T $(SRC_PATH)/pc-bios/optionrom/flat.lds -s -o $@ $^,"BUILD","$(TARGET_DIR)$@")
+%.o: %.c
+	$(call quiet-command,$(CC) $(CPPFLAGS) $(CFLAGS) -c $< -o $@,"CC","$@")
 
 %.img: %.o
-	$(call quiet-command,$(LD) $(LDFLAGS_NOPIE) -m $(LD_I386_EMULATION) -T $(SRC_PATH)/pc-bios/optionrom/flat.lds -s -o $@ $<,"BUILD","$(TARGET_DIR)$@")
+	$(call quiet-command,$(LD) $(LDFLAGS) -s -o $@ $^,"BUILD","$@")
 
 %.raw: %.img
-	$(call quiet-command,$(OBJCOPY) -O binary -j .text $< $@,"BUILD","$(TARGET_DIR)$@")
+	$(call quiet-command,$(OBJCOPY) -O binary -j .text $< $@,"BUILD","$@")
 
 %.bin: %.raw
-	$(call quiet-command,$(PYTHON) $(SRC_PATH)/scripts/signrom.py $< $@,"SIGN","$(TARGET_DIR)$@")
+	$(call quiet-command,$(PYTHON) $(TOPSRC_DIR)/scripts/signrom.py $< $@,"SIGN","$@")
+
+include $(wildcard *.d)
 
 clean:
 	rm -f *.o *.d *.raw *.img *.bin *~
+
+# suppress auto-removal of intermediate files
+.SECONDARY:
+
+.PHONY: all clean
Signature · 1 line
1.8.3.1
#3 lore raw

PATCH 3/147 pc-bios/s390-ccw: do not use rules.mak

In reply to Paolo Bonzini

From: Thomas Huth <[email protected]>

---
 pc-bios/s390-ccw/Makefile | 18 +++++++++++++++++-
 1 file changed, 17 insertions(+), 1 deletion(-)
pc-bios/s390-ccw/Makefile +17 -1
index 50bc880..cc0f77b 100644
@@ -3,10 +3,26 @@ all: build-all
 	@true
 
 include ../../config-host.mak
-include $(SRC_PATH)/rules.mak
 
+quiet-command = $(if $(V),$1,$(if $(2),@printf "  %-7s %s\n" $2 $3 && $1, @$1))
+cc-option = $(if $(shell $(CC) $1 -S -o /dev/null -xc /dev/null > /dev/null \
+	      2>&1 && echo OK), $1, $2)
+
+VPATH_SUFFIXES = %.c %.h %.S %.m %.mak %.sh %.rc Kconfig% %.json.in
+set-vpath = $(if $1,$(foreach PATTERN,$(VPATH_SUFFIXES),$(eval vpath $(PATTERN) $1)))
 $(call set-vpath, $(SRC_PATH)/pc-bios/s390-ccw)
 
+# Flags for dependency generation
+QEMU_DGFLAGS = -MMD -MP -MT $@ -MF $(@D)/$(*F).d
+
+%.o: %.c
+	$(call quiet-command,$(CC) $(QEMU_CFLAGS) $(QEMU_DGFLAGS) $(CFLAGS) \
+	       -c -o $@ $<,"CC","$(TARGET_DIR)$@")
+
+%.o: %.S
+	$(call quiet-command,$(CCAS) $(QEMU_CFLAGS) $(QEMU_DGFLAGS) $(CFLAGS) \
+	       -c -o $@ $<,"CCAS","$(TARGET_DIR)$@")
+
 .PHONY : all clean build-all
 
 OBJECTS = start.o main.o bootmap.o jump2ipl.o sclp.o menu.o \
Signature · 1 line
1.8.3.1
Acked-by on v1 3/147
#4 lore raw

Re: [PATCH 003/147] pc-bios/s390-ccw: do not use rules.mak

Quoted 3 lines · On Mon, 10 Aug 2020 19:06:41 +0200 Paolo Bonzini <[email protected]> wrote:

From: Thomas Huth <[email protected]>

...this one probably needs signoffs from both of you?

Quoted 3 lines
---
 pc-bios/s390-ccw/Makefile | 18 +++++++++++++++++-
 1 file changed, 17 insertions(+), 1 deletion(-)

Anyway, with this I get a working bios.

#5 lore raw

PATCH 4/147 trace: switch position of headers to what Meson requires

In reply to Paolo Bonzini

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).

In order to keep the include directives unchanged,
the simplest solution is to generate headers with patterns like "trace/trace-audio.h" and place forwarding headers in the source tree such that for example "audio/trace.h" includes "trace/trace-audio.h".

This patch is too ugly to be applied to the Makefiles now. It's only a way to separate the changes to the tracing header files from the Meson rewrite of the tracing logic.

---
 .gitignore                               |  1 -
 Makefile                                 | 46 +++++++++++++++++++-------------
 Makefile.objs                            |  1 -
 accel/kvm/trace.h                        |  1 +
 accel/tcg/cputlb.c                       |  2 +-
 accel/tcg/trace.h                        |  1 +
 accel/tcg/user-exec.c                    |  2 +-
 audio/trace.h                            |  1 +
 authz/trace.h                            |  1 +
 backends/tpm/trace.h                     |  1 +
 backends/trace.h                         |  1 +
 block/trace.h                            |  1 +
 chardev/trace.h                          |  1 +
 crypto/trace.h                           |  1 +
 dma-helpers.c                            |  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/core/trace.h                          |  1 +
 hw/display/trace.h                       |  1 +
 hw/dma/trace.h                           |  1 +
 hw/gpio/trace.h                          |  1 +
 hw/hppa/trace.h                          |  1 +
 hw/hyperv/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/rtc/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/ssi/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/user/syscall-trace.h             |  2 +-
 io/trace.h                               |  1 +
 job-qmp.c                                |  2 +-
 job.c                                    |  2 +-
 linux-user/trace.h                       |  1 +
 migration/trace.h                        |  1 +
 monitor/trace.h                          |  1 +
 nbd/trace.h                              |  1 +
 net/trace.h                              |  1 +
 qapi/trace.h                             |  1 +
 qom/trace.h                              |  1 +
 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 +
 softmmu/balloon.c                        |  2 +-
 softmmu/ioport.c                         |  2 +-
 softmmu/memory.c                         |  2 +-
 softmmu/vl.c                             |  2 +-
 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/control-target.c                   |  2 +-
 trace/control.c                          |  2 +-
 ui/trace.h                               |  1 +
 util/trace.h                             |  1 +
 96 files changed, 121 insertions(+), 41 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 backends/tpm/trace.h
 create mode 100644 backends/trace.h
 create mode 100644 block/trace.h
 create mode 100644 chardev/trace.h
 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/core/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/hyperv/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/rtc/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/ssi/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/trace.h
 create mode 100644 qom/trace.h
 create mode 100644 scsi/trace.h
 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 ui/trace.h
 create mode 100644 util/trace.h
.gitignore +0 -1
index 2992d15..656e390 100644
@@ -146,7 +146,6 @@ docker-src.*
 *~
 *.ast_raw
 *.depend_raw
-trace.h
 trace.c
 trace-ust.h
 trace-ust.h
Makefile +28 -18

93 lines not on this page · raw message

Makefile.objs +0 -1
index d22b3b4..3823463 100644
@@ -209,7 +209,6 @@ trace-events-subdirs += util
 trace-events-files = $(SRC_PATH)/trace-events $(trace-events-subdirs:%=$(SRC_PATH)/%/trace-events)
 
 trace-obj-y = trace-root.o
-trace-obj-y += $(trace-events-subdirs:%=%/trace.o)
 trace-obj-$(CONFIG_TRACE_UST) += trace-ust-all.o
 trace-obj-$(CONFIG_TRACE_DTRACE) += trace-dtrace-root.o
 trace-obj-$(CONFIG_TRACE_DTRACE) += $(trace-events-subdirs:%=%/trace-dtrace.o)
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/cputlb.c +1 -1
index 5698292..5349ee6 100644
@@ -34,7 +34,7 @@
 #include "qemu/atomic.h"
 #include "qemu/atomic128.h"
 #include "translate-all.h"
-#include "trace-root.h"
+#include "trace/trace-root.h"
 #include "trace/mem.h"
 #ifdef CONFIG_PLUGIN
 #include "qemu/plugin-memory.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"
accel/tcg/user-exec.c +1 -1
index d8b027f..1d34c57 100644
@@ -26,7 +26,7 @@
 #include "translate-all.h"
 #include "exec/helper-proto.h"
 #include "qemu/atomic128.h"
-#include "trace-root.h"
+#include "trace/trace-root.h"
 #include "trace/mem.h"
 
 #undef EAX
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"
backends/tpm/trace.h new file +1 -0
new file mode 100644
index 0000000..40c4729
@@ -0,0 +1 @@
+#include "trace/trace-backends_tpm.h"
backends/trace.h new file +1 -0
new file mode 100644
index 0000000..77fe57f3
@@ -0,0 +1 @@
+#include "trace/trace-backends.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"
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 2a77b5a..41ef24a 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"
 #include "sysemu/cpus.h"
exec.c +1 -1
index 6f381f9..8047bf2 100644
@@ -50,7 +50,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 f3a318c..9dfb6e4 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 594441a..22bc3f9 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"
 #include "qemu/plugin.h"
 
 CPUInterruptHandler cpu_interrupt_handler;
hw/core/trace.h new file +1 -0
new file mode 100644
index 0000000..23dfd61
@@ -0,0 +1 @@
+#include "trace/trace-hw_core.h"
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/hyperv/trace.h new file +1 -0
new file mode 100644
index 0000000..7f2a888
@@ -0,0 +1 @@
+#include "trace/trace-hw_hyperv.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/rtc/trace.h new file +1 -0
new file mode 100644
index 0000000..cfd5d6e
@@ -0,0 +1 @@
+#include "trace/trace-hw_rtc.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/ssi/trace.h new file +1 -0
new file mode 100644
index 0000000..0c1de26
@@ -0,0 +1 @@
+#include "trace/trace-hw_ssi.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/user/syscall-trace.h +1 -1
index 79fd3e5..42e3b48 100644
@@ -10,7 +10,7 @@
 #ifndef _SYSCALL_TRACE_H_
 #define _SYSCALL_TRACE_H_
 
-#include "trace-root.h"
+#include "trace/trace-root.h"
 
 /*
  * These helpers just provide a common place for the various
io/trace.h new file +1 -0
new file mode 100644
index 0000000..92d63a5
@@ -0,0 +1 @@
+#include "trace/trace-io.h"
job-qmp.c +1 -1
index f9a5883..645601b 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 53be57a..8fecf38 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"
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/trace.h new file +1 -0
new file mode 100644
index 0000000..5c3fb67
@@ -0,0 +1 @@
+#include "trace/trace-qapi.h"
qom/trace.h new file +1 -0
new file mode 100644
index 0000000..f2895e6
@@ -0,0 +1 @@
+#include "trace/trace-qom.h"
scripts/tracetool/format/c.py +1 -4
index 23d82ea..c390c18 100644
@@ -19,10 +19,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 33cf6a3..4d84440 100644
@@ -28,7 +28,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 2db6317..72576e6 100644
@@ -41,7 +41,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"
softmmu/balloon.c +1 -1
index 354408c..b89646f 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"
softmmu/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"
 
softmmu/memory.c +1 -1
index af25987..70b9310 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"
softmmu/vl.c +1 -1
index 4eb9d1f..0cc86b0 100644
@@ -90,7 +90,7 @@
 
 #include "disas/disas.h"
 
-#include "trace-root.h"
+#include "trace/trace-root.h"
 #include "trace/control.h"
 #include "qemu/plugin.h"
 #include "qemu/queue.h"
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/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 6558b5c..c63a4de 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;
 
ui/trace.h new file +1 -0
new file mode 100644
index 0000000..a89d769
@@ -0,0 +1 @@
+#include "trace/trace-ui.h"
util/trace.h new file +1 -0
new file mode 100644
index 0000000..86ff7a3
@@ -0,0 +1 @@
+#include "trace/trace-util.h"
Signature · 1 line
1.8.3.1
#6 lore raw

PATCH 5/147 meson: rename .inc.c files to .inc

In reply to Paolo Bonzini
---
 .gitignore                                         |  4 +--
 Makefile                                           | 36 +++++++++----------
 .../tcg/{atomic_common.inc.c => atomic_common.inc} |  0
 accel/tcg/cputlb.c                                 |  2 +-
 accel/tcg/user-exec.c                              |  2 +-
 contrib/gitdm/filetypes.txt                        |  2 +-
 exec.c                                             |  4 +--
 ...t-specialize.inc.c => softfloat-specialize.inc} |  0
 fpu/softfloat.c                                    |  2 +-
 include/tcg/tcg.h                                  |  2 +-
 memory_ldst.inc.c => memory_ldst.inc               |  0
 scripts/clean-includes                             |  2 +-
 target/arm/Makefile.objs                           | 40 +++++++++++-----------
 .../{translate-neon.inc.c => translate-neon.inc}   |  6 ++--
 target/arm/translate-sve.c                         |  2 +-
 .../arm/{translate-vfp.inc.c => translate-vfp.inc} |  4 +--
 target/arm/translate.c                             | 12 +++----
 target/avr/Makefile.objs                           |  4 +--
 target/avr/disas.c                                 |  2 +-
 target/avr/translate.c                             |  2 +-
 target/cris/translate.c                            |  2 +-
 .../{translate_v10.inc.c => translate_v10.inc}     |  0
 target/hppa/Makefile.objs                          |  4 +--
 target/hppa/translate.c                            |  2 +-
 target/mips/translate.c                            |  2 +-
 .../{translate_init.inc.c => translate_init.inc}   |  0
 target/openrisc/Makefile.objs                      |  6 ++--
 target/openrisc/disas.c                            |  2 +-
 target/openrisc/translate.c                        |  2 +-
 target/ppc/int_helper.c                            |  2 +-
 target/ppc/{mfrom_table.inc.c => mfrom_table.inc}  |  0
 target/ppc/translate.c                             | 22 ++++++------
 .../ppc/translate/{dfp-impl.inc.c => dfp-impl.inc} |  0
 .../ppc/translate/{dfp-ops.inc.c => dfp-ops.inc}   |  0
 .../ppc/translate/{fp-impl.inc.c => fp-impl.inc}   |  0
 target/ppc/translate/{fp-ops.inc.c => fp-ops.inc}  |  0
 .../ppc/translate/{spe-impl.inc.c => spe-impl.inc} |  0
 .../ppc/translate/{spe-ops.inc.c => spe-ops.inc}   |  0
 .../ppc/translate/{vmx-impl.inc.c => vmx-impl.inc} |  0
 .../ppc/translate/{vmx-ops.inc.c => vmx-ops.inc}   |  0
 .../ppc/translate/{vsx-impl.inc.c => vsx-impl.inc} |  0
 .../ppc/translate/{vsx-ops.inc.c => vsx-ops.inc}   |  0
 .../{translate_init.inc.c => translate_init.inc}   |  0
 target/riscv/Makefile.objs                         |  8 ++---
 ...trans_privileged.inc.c => trans_privileged.inc} |  0
 .../insn_trans/{trans_rva.inc.c => trans_rva.inc}  |  0
 .../insn_trans/{trans_rvd.inc.c => trans_rvd.inc}  |  0
 .../insn_trans/{trans_rvf.inc.c => trans_rvf.inc}  |  0
 .../insn_trans/{trans_rvh.inc.c => trans_rvh.inc}  |  0
 .../insn_trans/{trans_rvi.inc.c => trans_rvi.inc}  |  0
 .../insn_trans/{trans_rvm.inc.c => trans_rvm.inc}  |  0
 .../insn_trans/{trans_rvv.inc.c => trans_rvv.inc}  |  0
 target/riscv/translate.c                           | 20 +++++------
 target/rx/Makefile.objs                            |  6 ++--
 target/rx/disas.c                                  |  2 +-
 target/rx/translate.c                              |  2 +-
 target/s390x/translate.c                           |  2 +-
 .../s390x/{translate_vx.inc.c => translate_vx.inc} |  0
 target/xtensa/core-dc232b.c                        |  4 +--
 .../{gdb-config.inc.c => gdb-config.inc}           |  0
 .../{xtensa-modules.inc.c => xtensa-modules.inc}   |  0
 target/xtensa/core-dc233c.c                        |  4 +--
 .../{gdb-config.inc.c => gdb-config.inc}           |  0
 .../{xtensa-modules.inc.c => xtensa-modules.inc}   |  0
 target/xtensa/core-de212.c                         |  4 +--
 .../{gdb-config.inc.c => gdb-config.inc}           |  0
 .../{xtensa-modules.inc.c => xtensa-modules.inc}   |  0
 target/xtensa/core-fsf.c                           |  2 +-
 .../{xtensa-modules.inc.c => xtensa-modules.inc}   |  0
 target/xtensa/core-sample_controller.c             |  4 +--
 .../{gdb-config.inc.c => gdb-config.inc}           |  0
 .../{xtensa-modules.inc.c => xtensa-modules.inc}   |  0
 target/xtensa/core-test_kc705_be.c                 |  4 +--
 .../{gdb-config.inc.c => gdb-config.inc}           |  0
 .../{xtensa-modules.inc.c => xtensa-modules.inc}   |  0
 target/xtensa/core-test_mmuhifi_c3.c               |  4 +--
 .../{gdb-config.inc.c => gdb-config.inc}           |  0
 .../{xtensa-modules.inc.c => xtensa-modules.inc}   |  0
 target/xtensa/import_core.sh                       |  8 ++---
 tcg/README                                         |  2 +-
 tcg/aarch64/{tcg-target.inc.c => tcg-target.inc}   |  4 +--
 tcg/arm/{tcg-target.inc.c => tcg-target.inc}       |  4 +--
 tcg/i386/{tcg-target.inc.c => tcg-target.inc}      |  4 +--
 tcg/mips/{tcg-target.inc.c => tcg-target.inc}      |  2 +-
 tcg/ppc/{tcg-target.inc.c => tcg-target.inc}       |  4 +--
 tcg/riscv/{tcg-target.inc.c => tcg-target.inc}     |  4 +--
 tcg/s390/{tcg-target.inc.c => tcg-target.inc}      |  4 +--
 tcg/sparc/{tcg-target.inc.c => tcg-target.inc}     |  2 +-
 tcg/{tcg-ldst.inc.c => tcg-ldst.inc}               |  0
 tcg/{tcg-pool.inc.c => tcg-pool.inc}               |  2 +-
 tcg/tcg.c                                          |  6 ++--
 tcg/tci/README                                     |  4 +--
 tcg/tci/{tcg-target.inc.c => tcg-target.inc}       |  0
 tests/fp/fp-test.c                                 |  2 +-
 tests/fp/{wrap.inc.c => wrap.inc}                  |  0
 ui/input-keymap.c                                  | 34 +++++++++---------
 ui/vnc-enc-zrle.c                                  | 22 ++++++------
 ui/{vnc-enc-zrle.inc.c => vnc-enc-zrle.inc}        |  0
 98 files changed, 173 insertions(+), 173 deletions(-)
 rename accel/tcg/{atomic_common.inc.c => atomic_common.inc} (100%)
 rename fpu/{softfloat-specialize.inc.c => softfloat-specialize.inc} (100%)
 rename memory_ldst.inc.c => memory_ldst.inc (100%)
 rename target/arm/{translate-neon.inc.c => translate-neon.inc} (99%)
 rename target/arm/{translate-vfp.inc.c => translate-vfp.inc} (99%)
 rename target/cris/{translate_v10.inc.c => translate_v10.inc} (100%)
 rename target/mips/{translate_init.inc.c => translate_init.inc} (100%)
 rename target/ppc/{mfrom_table.inc.c => mfrom_table.inc} (100%)
 rename target/ppc/translate/{dfp-impl.inc.c => dfp-impl.inc} (100%)
 rename target/ppc/translate/{dfp-ops.inc.c => dfp-ops.inc} (100%)
 rename target/ppc/translate/{fp-impl.inc.c => fp-impl.inc} (100%)
 rename target/ppc/translate/{fp-ops.inc.c => fp-ops.inc} (100%)
 rename target/ppc/translate/{spe-impl.inc.c => spe-impl.inc} (100%)
 rename target/ppc/translate/{spe-ops.inc.c => spe-ops.inc} (100%)
 rename target/ppc/translate/{vmx-impl.inc.c => vmx-impl.inc} (100%)
 rename target/ppc/translate/{vmx-ops.inc.c => vmx-ops.inc} (100%)
 rename target/ppc/translate/{vsx-impl.inc.c => vsx-impl.inc} (100%)
 rename target/ppc/translate/{vsx-ops.inc.c => vsx-ops.inc} (100%)
 rename target/ppc/{translate_init.inc.c => translate_init.inc} (100%)
 rename target/riscv/insn_trans/{trans_privileged.inc.c => trans_privileged.inc} (100%)
 rename target/riscv/insn_trans/{trans_rva.inc.c => trans_rva.inc} (100%)
 rename target/riscv/insn_trans/{trans_rvd.inc.c => trans_rvd.inc} (100%)
 rename target/riscv/insn_trans/{trans_rvf.inc.c => trans_rvf.inc} (100%)
 rename target/riscv/insn_trans/{trans_rvh.inc.c => trans_rvh.inc} (100%)
 rename target/riscv/insn_trans/{trans_rvi.inc.c => trans_rvi.inc} (100%)
 rename target/riscv/insn_trans/{trans_rvm.inc.c => trans_rvm.inc} (100%)
 rename target/riscv/insn_trans/{trans_rvv.inc.c => trans_rvv.inc} (100%)
 rename target/s390x/{translate_vx.inc.c => translate_vx.inc} (100%)
 rename target/xtensa/core-dc232b/{gdb-config.inc.c => gdb-config.inc} (100%)
 rename target/xtensa/core-dc232b/{xtensa-modules.inc.c => xtensa-modules.inc} (100%)
 rename target/xtensa/core-dc233c/{gdb-config.inc.c => gdb-config.inc} (100%)
 rename target/xtensa/core-dc233c/{xtensa-modules.inc.c => xtensa-modules.inc} (100%)
 rename target/xtensa/core-de212/{gdb-config.inc.c => gdb-config.inc} (100%)
 rename target/xtensa/core-de212/{xtensa-modules.inc.c => xtensa-modules.inc} (100%)
 rename target/xtensa/core-fsf/{xtensa-modules.inc.c => xtensa-modules.inc} (100%)
 rename target/xtensa/core-sample_controller/{gdb-config.inc.c => gdb-config.inc} (100%)
 rename target/xtensa/core-sample_controller/{xtensa-modules.inc.c => xtensa-modules.inc} (100%)
 rename target/xtensa/core-test_kc705_be/{gdb-config.inc.c => gdb-config.inc} (100%)
 rename target/xtensa/core-test_kc705_be/{xtensa-modules.inc.c => xtensa-modules.inc} (100%)
 rename target/xtensa/core-test_mmuhifi_c3/{gdb-config.inc.c => gdb-config.inc} (100%)
 rename target/xtensa/core-test_mmuhifi_c3/{xtensa-modules.inc.c => xtensa-modules.inc} (100%)
 rename tcg/aarch64/{tcg-target.inc.c => tcg-target.inc} (99%)
 rename tcg/arm/{tcg-target.inc.c => tcg-target.inc} (99%)
 rename tcg/i386/{tcg-target.inc.c => tcg-target.inc} (99%)
 rename tcg/mips/{tcg-target.inc.c => tcg-target.inc} (99%)
 rename tcg/ppc/{tcg-target.inc.c => tcg-target.inc} (99%)
 rename tcg/riscv/{tcg-target.inc.c => tcg-target.inc} (99%)
 rename tcg/s390/{tcg-target.inc.c => tcg-target.inc} (99%)
 rename tcg/sparc/{tcg-target.inc.c => tcg-target.inc} (99%)
 rename tcg/{tcg-ldst.inc.c => tcg-ldst.inc} (100%)
 rename tcg/{tcg-pool.inc.c => tcg-pool.inc} (99%)
 rename tcg/tci/{tcg-target.inc.c => tcg-target.inc} (100%)
 rename tests/fp/{wrap.inc.c => wrap.inc} (100%)
 rename ui/{vnc-enc-zrle.inc.c => vnc-enc-zrle.inc} (100%)
.gitignore +2 -2
index 656e390..2424131 100644
@@ -18,7 +18,7 @@
 /ui/shader/texture-blit-frag.h
 /ui/shader/texture-blit-vert.h
 /ui/shader/texture-blit-flip-vert.h
-/ui/input-keymap-*.c
+/ui/input-keymap-*.inc
 *-timestamp
 /*-softmmu
 /*-darwin-user
@@ -161,4 +161,4 @@ trace-dtrace-root.h
 trace-dtrace-root.dtrace
 trace-ust-all.h
 trace-ust-all.c
-/target/arm/decode-sve.inc.c
+/target/arm/decode-sve.inc
Makefile +18 -18
index 00cadeb..f237ff8 100644
@@ -289,28 +289,28 @@ 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 \
+		 ui/input-keymap-atset1-to-qcode.inc \
+		 ui/input-keymap-linux-to-qcode.inc \
+		 ui/input-keymap-qcode-to-atset1.inc \
+		 ui/input-keymap-qcode-to-atset2.inc \
+		 ui/input-keymap-qcode-to-atset3.inc \
+		 ui/input-keymap-qcode-to-linux.inc \
+		 ui/input-keymap-qcode-to-qnum.inc \
+		 ui/input-keymap-qcode-to-sun.inc \
+		 ui/input-keymap-qnum-to-qcode.inc \
+		 ui/input-keymap-usb-to-qcode.inc \
+		 ui/input-keymap-win32-to-qcode.inc \
+		 ui/input-keymap-x11-to-qcode.inc \
+		 ui/input-keymap-xorgevdev-to-qcode.inc \
+		 ui/input-keymap-xorgkbd-to-qcode.inc \
+		 ui/input-keymap-xorgxquartz-to-qcode.inc \
+		 ui/input-keymap-xorgxwin-to-qcode.inc \
+		 ui/input-keymap-osx-to-qcode.inc \
 		 $(NULL)
 
 generated-files-$(CONFIG_SOFTMMU) += $(KEYCODEMAP_FILES)
 
-ui/input-keymap-%.c: $(KEYCODEMAP_GEN) $(KEYCODEMAP_CSV) $(SRC_PATH)/ui/Makefile.objs
+ui/input-keymap-%.inc: $(KEYCODEMAP_GEN) $(KEYCODEMAP_CSV) $(SRC_PATH)/ui/Makefile.objs
 	$(call quiet-command,\
 	    stem=$* && src=$${stem%-to-*} dst=$${stem#*-to-} && \
 	    test -e $(KEYCODEMAP_GEN) && \
accel/tcg/atomic_common.inc renamed from accel/tcg/atomic_common.inc.c +0 -0
similarity index 100%
rename from accel/tcg/atomic_common.inc.c
rename to accel/tcg/atomic_common.inc
accel/tcg/cputlb.c +1 -1
index 5349ee6..ca4c982 100644
@@ -2354,7 +2354,7 @@ void cpu_stq_le_data(CPUArchState *env, target_ulong ptr, uint64_t val)
 #define ATOMIC_MMU_CLEANUP
 #define ATOMIC_MMU_IDX   get_mmuidx(oi)
 
-#include "atomic_common.inc.c"
+#include "atomic_common.inc"
 
 #define DATA_SIZE 1
 #include "atomic_template.h"
accel/tcg/user-exec.c +1 -1
index 1d34c57..e219ecc 100644
@@ -1189,7 +1189,7 @@ static void *atomic_mmu_lookup(CPUArchState *env, target_ulong addr,
 #define ATOMIC_NAME(X)   HELPER(glue(glue(atomic_ ## X, SUFFIX), END))
 #define EXTRA_ARGS
 
-#include "atomic_common.inc.c"
+#include "atomic_common.inc"
 
 #define DATA_SIZE 1
 #include "atomic_template.h"
contrib/gitdm/filetypes.txt +1 -1
index 2d5002f..e8e2628 100644
@@ -42,7 +42,7 @@ order build,interface,tests,code,documentation,devel-doc,blobs
 # (most common languages first
 #
 filetype code \.c$	# C
-filetype code \.inc.c$	# C
+filetype code \.inc$	# C
 filetype code \.C$	# C++
 filetype code \.cpp$	# C++
 filetype code \.c\+\+$	# C++
exec.c +2 -2
index 8047bf2..f5915ce 100644
@@ -3659,7 +3659,7 @@ void cpu_physical_memory_unmap(void *buffer, hwaddr len,
 #define TRANSLATE(...)           address_space_translate(as, __VA_ARGS__)
 #define RCU_READ_LOCK(...)       rcu_read_lock()
 #define RCU_READ_UNLOCK(...)     rcu_read_unlock()
-#include "memory_ldst.inc.c"
+#include "memory_ldst.inc"
 
 int64_t address_space_cache_init(MemoryRegionCache *cache,
                                  AddressSpace *as,
@@ -3795,7 +3795,7 @@ address_space_write_cached_slow(MemoryRegionCache *cache, hwaddr addr,
 #define TRANSLATE(...)           address_space_translate_cached(cache, __VA_ARGS__)
 #define RCU_READ_LOCK()          ((void)0)
 #define RCU_READ_UNLOCK()        ((void)0)
-#include "memory_ldst.inc.c"
+#include "memory_ldst.inc"
 
 /* virtual memory access for debug (includes writing to ROM) */
 int cpu_memory_rw_debug(CPUState *cpu, target_ulong addr,
fpu/softfloat-specialize.inc renamed from fpu/softfloat-specialize.inc.c +0 -0
similarity index 100%
rename from fpu/softfloat-specialize.inc.c
rename to fpu/softfloat-specialize.inc
fpu/softfloat.c +1 -1
index 79be4f5..7fb1f3b 100644
@@ -621,7 +621,7 @@ static inline float64 float64_pack_raw(FloatParts p)
 | are propagated from function inputs to output.  These details are target-
 | specific.
 *----------------------------------------------------------------------------*/
-#include "softfloat-specialize.inc.c"
+#include "softfloat-specialize.inc"
 
 /* Canonicalize EXP and FRAC, setting CLS.  */
 static FloatParts sf_canonicalize(FloatParts part, const FloatFmt *parm,
include/tcg/tcg.h +1 -1
index e63450a..89fa9cf 100644
@@ -636,7 +636,7 @@ struct TCGContext {
     /* Track which vCPU triggers events */
     CPUState *cpu;                      /* *_trans */
 
-    /* These structures are private to tcg-target.inc.c.  */
+    /* These structures are private to tcg-target.inc.  */
 #ifdef TCG_TARGET_NEED_LDST_LABELS
     QSIMPLEQ_HEAD(, TCGLabelQemuLdst) ldst_labels;
 #endif
memory_ldst.inc renamed from memory_ldst.inc.c +0 -0
similarity index 100%
rename from memory_ldst.inc.c
rename to memory_ldst.inc
scripts/clean-includes +1 -1
index 795b3be..ff2dbe8 100755
@@ -113,7 +113,7 @@ EOT
 
 for f in "$@"; do
   case "$f" in
-    *.inc.c)
+    *.inc)
       # These aren't standalone C source files
       echo "SKIPPING $f (not a standalone source file)"
       continue
target/arm/Makefile.objs +20 -20
index fa39fd7..4a177ad 100644
@@ -13,66 +13,66 @@ obj-$(call lnot,$(CONFIG_KVM)) += kvm-stub.o
 
 DECODETREE = $(SRC_PATH)/scripts/decodetree.py
 
-target/arm/decode-sve.inc.c: $(SRC_PATH)/target/arm/sve.decode $(DECODETREE)
+target/arm/decode-sve.inc: $(SRC_PATH)/target/arm/sve.decode $(DECODETREE)
 	$(call quiet-command,\
 	  $(PYTHON) $(DECODETREE) --decode disas_sve -o $@ $<,\
 	  "GEN", $(TARGET_DIR)$@)
 
-target/arm/decode-neon-shared.inc.c: $(SRC_PATH)/target/arm/neon-shared.decode $(DECODETREE)
+target/arm/decode-neon-shared.inc: $(SRC_PATH)/target/arm/neon-shared.decode $(DECODETREE)
 	$(call quiet-command,\
 	  $(PYTHON) $(DECODETREE) --static-decode disas_neon_shared -o $@ $<,\
 	  "GEN", $(TARGET_DIR)$@)
 
-target/arm/decode-neon-dp.inc.c: $(SRC_PATH)/target/arm/neon-dp.decode $(DECODETREE)
+target/arm/decode-neon-dp.inc: $(SRC_PATH)/target/arm/neon-dp.decode $(DECODETREE)
 	$(call quiet-command,\
 	  $(PYTHON) $(DECODETREE) --static-decode disas_neon_dp -o $@ $<,\
 	  "GEN", $(TARGET_DIR)$@)
 
-target/arm/decode-neon-ls.inc.c: $(SRC_PATH)/target/arm/neon-ls.decode $(DECODETREE)
+target/arm/decode-neon-ls.inc: $(SRC_PATH)/target/arm/neon-ls.decode $(DECODETREE)
 	$(call quiet-command,\
 	  $(PYTHON) $(DECODETREE) --static-decode disas_neon_ls -o $@ $<,\
 	  "GEN", $(TARGET_DIR)$@)
 
-target/arm/decode-vfp.inc.c: $(SRC_PATH)/target/arm/vfp.decode $(DECODETREE)
+target/arm/decode-vfp.inc: $(SRC_PATH)/target/arm/vfp.decode $(DECODETREE)
 	$(call quiet-command,\
 	  $(PYTHON) $(DECODETREE) --static-decode disas_vfp -o $@ $<,\
 	  "GEN", $(TARGET_DIR)$@)
 
-target/arm/decode-vfp-uncond.inc.c: $(SRC_PATH)/target/arm/vfp-uncond.decode $(DECODETREE)
+target/arm/decode-vfp-uncond.inc: $(SRC_PATH)/target/arm/vfp-uncond.decode $(DECODETREE)
 	$(call quiet-command,\
 	  $(PYTHON) $(DECODETREE) --static-decode disas_vfp_uncond -o $@ $<,\
 	  "GEN", $(TARGET_DIR)$@)
 
-target/arm/decode-a32.inc.c: $(SRC_PATH)/target/arm/a32.decode $(DECODETREE)
+target/arm/decode-a32.inc: $(SRC_PATH)/target/arm/a32.decode $(DECODETREE)
 	$(call quiet-command,\
 	  $(PYTHON) $(DECODETREE) --static-decode disas_a32 -o $@ $<,\
 	  "GEN", $(TARGET_DIR)$@)
 
-target/arm/decode-a32-uncond.inc.c: $(SRC_PATH)/target/arm/a32-uncond.decode $(DECODETREE)
+target/arm/decode-a32-uncond.inc: $(SRC_PATH)/target/arm/a32-uncond.decode $(DECODETREE)
 	$(call quiet-command,\
 	  $(PYTHON) $(DECODETREE) --static-decode disas_a32_uncond -o $@ $<,\
 	  "GEN", $(TARGET_DIR)$@)
 
-target/arm/decode-t32.inc.c: $(SRC_PATH)/target/arm/t32.decode $(DECODETREE)
+target/arm/decode-t32.inc: $(SRC_PATH)/target/arm/t32.decode $(DECODETREE)
 	$(call quiet-command,\
 	  $(PYTHON) $(DECODETREE) --static-decode disas_t32 -o $@ $<,\
 	  "GEN", $(TARGET_DIR)$@)
 
-target/arm/decode-t16.inc.c: $(SRC_PATH)/target/arm/t16.decode $(DECODETREE)
+target/arm/decode-t16.inc: $(SRC_PATH)/target/arm/t16.decode $(DECODETREE)
 	$(call quiet-command,\
 	  $(PYTHON) $(DECODETREE) -w 16 --static-decode disas_t16 -o $@ $<,\
 	  "GEN", $(TARGET_DIR)$@)
 
-target/arm/translate-sve.o: target/arm/decode-sve.inc.c
-target/arm/translate.o: target/arm/decode-neon-shared.inc.c
-target/arm/translate.o: target/arm/decode-neon-dp.inc.c
-target/arm/translate.o: target/arm/decode-neon-ls.inc.c
-target/arm/translate.o: target/arm/decode-vfp.inc.c
-target/arm/translate.o: target/arm/decode-vfp-uncond.inc.c
-target/arm/translate.o: target/arm/decode-a32.inc.c
-target/arm/translate.o: target/arm/decode-a32-uncond.inc.c
-target/arm/translate.o: target/arm/decode-t32.inc.c
-target/arm/translate.o: target/arm/decode-t16.inc.c
+target/arm/translate-sve.o: target/arm/decode-sve.inc
+target/arm/translate.o: target/arm/decode-neon-shared.inc
+target/arm/translate.o: target/arm/decode-neon-dp.inc
+target/arm/translate.o: target/arm/decode-neon-ls.inc
+target/arm/translate.o: target/arm/decode-vfp.inc
+target/arm/translate.o: target/arm/decode-vfp-uncond.inc
+target/arm/translate.o: target/arm/decode-a32.inc
+target/arm/translate.o: target/arm/decode-a32-uncond.inc
+target/arm/translate.o: target/arm/decode-t32.inc
+target/arm/translate.o: target/arm/decode-t16.inc
 
 obj-y += tlb_helper.o debug_helper.o
 obj-y += translate.o op_helper.o
target/arm/translate-neon.inc renamed from target/arm/translate-neon.inc.c +3 -3
similarity index 99%
rename from target/arm/translate-neon.inc.c
rename to target/arm/translate-neon.inc
index f6cb921..ac0ddcc 100644
@@ -50,9 +50,9 @@ static inline int rsub_8(DisasContext *s, int x)
 }
 
 /* Include the generated Neon decoder */
-#include "decode-neon-dp.inc.c"
-#include "decode-neon-ls.inc.c"
-#include "decode-neon-shared.inc.c"
+#include "decode-neon-dp.inc"
+#include "decode-neon-ls.inc"
+#include "decode-neon-shared.inc"
 
 /* Return the offset of a 2**SIZE piece of a NEON register, at index ELE,
  * where 0 is the least significant end of the register.
target/arm/translate-sve.c +1 -1
index 88a2fb2..60c0716 100644
@@ -100,7 +100,7 @@ static inline int msz_dtype(DisasContext *s, int msz)
  * Include the generated decoder.
  */
 
-#include "decode-sve.inc.c"
+#include "decode-sve.inc"
 
 /*
  * Implement all of the translator functions referenced by the decoder.
target/arm/translate-vfp.inc renamed from target/arm/translate-vfp.inc.c +2 -2
similarity index 99%
rename from target/arm/translate-vfp.inc.c
rename to target/arm/translate-vfp.inc
index afa8a5f..1f518b4 100644
@@ -27,8 +27,8 @@
  */
 
 /* Include the generated VFP decoder */
-#include "decode-vfp.inc.c"
-#include "decode-vfp-uncond.inc.c"
+#include "decode-vfp.inc"
+#include "decode-vfp-uncond.inc"
 
 /*
  * The imm8 encodes the sign bit, enough bits to represent an exponent in
target/arm/translate.c +6 -6
index c39a929..3128fa6 100644
@@ -1176,8 +1176,8 @@ static TCGv_ptr vfp_reg_ptr(bool dp, int reg)
 #define ARM_CP_RW_BIT   (1 << 20)
 
 /* Include the VFP and Neon decoders */
-#include "translate-vfp.inc.c"
-#include "translate-neon.inc.c"
+#include "translate-vfp.inc"
+#include "translate-neon.inc"
 
 static inline void iwmmxt_load_reg(TCGv_i64 var, int reg)
 {
@@ -5217,10 +5217,10 @@ static int t16_pop_list(DisasContext *s, int x)
  * Include the generated decoders.
  */
 
-#include "decode-a32.inc.c"
-#include "decode-a32-uncond.inc.c"
-#include "decode-t32.inc.c"
-#include "decode-t16.inc.c"
+#include "decode-a32.inc"
+#include "decode-a32-uncond.inc"
+#include "decode-t32.inc"
+#include "decode-t16.inc"
 
 /* Helpers to swap operands for reverse-subtract.  */
 static void gen_rsb(TCGv_i32 dst, TCGv_i32 a, TCGv_i32 b)
target/avr/Makefile.objs +2 -2
index 6e35ba2..81d9bcd 100644
@@ -21,12 +21,12 @@
 DECODETREE = $(SRC_PATH)/scripts/decodetree.py
 decode-y = $(SRC_PATH)/target/avr/insn.decode
 
-target/avr/decode_insn.inc.c: $(decode-y) $(DECODETREE)
+target/avr/decode_insn.inc: $(decode-y) $(DECODETREE)
 	$(call quiet-command, \
 	  $(PYTHON) $(DECODETREE) -o $@ --decode decode_insn --insnwidth 16 $<, \
 	  "GEN", $(TARGET_DIR)$@)
 
-target/avr/translate.o: target/avr/decode_insn.inc.c
+target/avr/translate.o: target/avr/decode_insn.inc
 
 obj-y += translate.o cpu.o helper.o
 obj-y += gdbstub.o
target/avr/disas.c +1 -1
index 8e1bac4..c45ab2c 100644
@@ -60,7 +60,7 @@ static int append_16(DisasContext *ctx, int x)
 
 /* Include the auto-generated decoder.  */
 static bool decode_insn(DisasContext *ctx, uint16_t insn);
-#include "decode_insn.inc.c"
+#include "decode_insn.inc"
 
 #define output(mnemonic, format, ...) \
     (pctx->info->fprintf_func(pctx->info->stream, "%-9s " format, \
target/avr/translate.c +1 -1
index 648dcd5..8deb126 100644
@@ -198,7 +198,7 @@ static bool avr_have_feature(DisasContext *ctx, int feature)
 }
 
 static bool decode_insn(DisasContext *ctx, uint16_t insn);
-#include "decode_insn.inc.c"
+#include "decode_insn.inc"
 
 /*
  * Arithmetic Instructions
target/cris/translate.c +1 -1
index aaa46b5..a0d4b1c 100644
@@ -3037,7 +3037,7 @@ static unsigned int crisv32_decoder(CPUCRISState *env, DisasContext *dc)
     return insn_len;
 }
 
-#include "translate_v10.inc.c"
+#include "translate_v10.inc"
 
 /*
  * Delay slots on QEMU/CRIS.
target/cris/translate_v10.inc renamed from target/cris/translate_v10.inc.c +0 -0
similarity index 100%
rename from target/cris/translate_v10.inc.c
rename to target/cris/translate_v10.inc
target/hppa/Makefile.objs +2 -2
index 174f50a..40dcb86 100644
@@ -4,8 +4,8 @@ obj-$(CONFIG_SOFTMMU) += machine.o
 
 DECODETREE = $(SRC_PATH)/scripts/decodetree.py
 
-target/hppa/decode.inc.c: $(SRC_PATH)/target/hppa/insns.decode $(DECODETREE)
+target/hppa/decode.inc: $(SRC_PATH)/target/hppa/insns.decode $(DECODETREE)
 	$(call quiet-command,\
 	  $(PYTHON) $(DECODETREE) -o $@ $<, "GEN", $(TARGET_DIR)$@)
 
-target/hppa/translate.o: target/hppa/decode.inc.c
+target/hppa/translate.o: target/hppa/decode.inc
target/hppa/translate.c +1 -1
index 4bd22d4..31e2926 100644
@@ -334,7 +334,7 @@ static int expand_shl11(DisasContext *ctx, int val)
 
 
 /* Include the auto-generated decoder.  */
-#include "decode.inc.c"
+#include "decode.inc"
 
 /* We are not using a goto_tb (for whatever reason), but have updated
    the iaq (for whatever reason), so don't do it again on exit.  */
target/mips/translate.c +1 -1
index 9fad58e..221a42e 100644
@@ -31322,7 +31322,7 @@ void mips_tcg_init(void)
 #endif
 }
 
-#include "translate_init.inc.c"
+#include "translate_init.inc"
 
 void cpu_mips_realize_env(CPUMIPSState *env)
 {
target/mips/translate_init.inc renamed from target/mips/translate_init.inc.c +0 -0
similarity index 100%
rename from target/mips/translate_init.inc.c
rename to target/mips/translate_init.inc
target/openrisc/Makefile.objs +3 -3
index b5432f4..0f2fcff 100644
@@ -6,10 +6,10 @@ obj-y += gdbstub.o
 
 DECODETREE = $(SRC_PATH)/scripts/decodetree.py
 
-target/openrisc/decode.inc.c: \
+target/openrisc/decode.inc: \
   $(SRC_PATH)/target/openrisc/insns.decode $(DECODETREE)
 	$(call quiet-command,\
 	  $(PYTHON) $(DECODETREE) -o $@ $<, "GEN", $(TARGET_DIR)$@)
 
-target/openrisc/translate.o: target/openrisc/decode.inc.c
-target/openrisc/disas.o: target/openrisc/decode.inc.c
+target/openrisc/translate.o: target/openrisc/decode.inc
+target/openrisc/disas.o: target/openrisc/decode.inc
target/openrisc/disas.c +1 -1
index ce11264..3f75316 100644
@@ -25,7 +25,7 @@
 typedef disassemble_info DisasContext;
 
 /* Include the auto-generated decoder.  */
-#include "decode.inc.c"
+#include "decode.inc"
 
 #define output(mnemonic, format, ...) \
     (info->fprintf_func(info->stream, "%-9s " format, \
target/openrisc/translate.c +1 -1
index 52323a1..a119be2 100644
@@ -65,7 +65,7 @@ static inline bool is_user(DisasContext *dc)
 }
 
 /* Include the auto-generated decoder.  */
-#include "decode.inc.c"
+#include "decode.inc"
 
 static TCGv cpu_sr;
 static TCGv cpu_regs[32];
target/ppc/int_helper.c +1 -1
index d8bd3c2..eff3c0d 100644
@@ -398,7 +398,7 @@ target_ulong helper_divso(CPUPPCState *env, target_ulong arg1,
 target_ulong helper_602_mfrom(target_ulong arg)
 {
     if (likely(arg < 602)) {
-#include "mfrom_table.inc.c"
+#include "mfrom_table.inc"
         return mfrom_ROM_table[arg];
     } else {
         return 0;
target/ppc/mfrom_table.inc renamed from target/ppc/mfrom_table.inc.c +0 -0
similarity index 100%
rename from target/ppc/mfrom_table.inc.c
rename to target/ppc/mfrom_table.inc
target/ppc/translate.c +11 -11
index 4ce3d66..95d9080 100644
@@ -6900,15 +6900,15 @@ static inline void set_avr64(int regno, TCGv_i64 src, bool high)
     tcg_gen_st_i64(src, cpu_env, avr64_offset(regno, high));
 }
 
-#include "translate/fp-impl.inc.c"
+#include "translate/fp-impl.inc"
 
-#include "translate/vmx-impl.inc.c"
+#include "translate/vmx-impl.inc"
 
-#include "translate/vsx-impl.inc.c"
+#include "translate/vsx-impl.inc"
 
-#include "translate/dfp-impl.inc.c"
+#include "translate/dfp-impl.inc"
 
-#include "translate/spe-impl.inc.c"
+#include "translate/spe-impl.inc"
 
 /* Handles lfdp, lxsd, lxssp */
 static void gen_dform39(DisasContext *ctx)
@@ -7587,19 +7587,19 @@ GEN_HANDLER2_E(treclaim, "treclaim", 0x1F, 0x0E, 0x1D, 0x03E0F800, \
 GEN_HANDLER2_E(trechkpt, "trechkpt", 0x1F, 0x0E, 0x1F, 0x03FFF800, \
                PPC_NONE, PPC2_TM),
 
-#include "translate/fp-ops.inc.c"
+#include "translate/fp-ops.inc"
 
-#include "translate/vmx-ops.inc.c"
+#include "translate/vmx-ops.inc"
 
-#include "translate/vsx-ops.inc.c"
+#include "translate/vsx-ops.inc"
 
-#include "translate/dfp-ops.inc.c"
+#include "translate/dfp-ops.inc"
 
-#include "translate/spe-ops.inc.c"
+#include "translate/spe-ops.inc"
 };
 
 #include "helper_regs.h"
-#include "translate_init.inc.c"
+#include "translate_init.inc"
 
 /*****************************************************************************/
 /* Misc PowerPC helpers */
target/ppc/translate/dfp-impl.inc renamed from target/ppc/translate/dfp-impl.inc.c +0 -0
similarity index 100%
rename from target/ppc/translate/dfp-impl.inc.c
rename to target/ppc/translate/dfp-impl.inc
target/ppc/translate/dfp-ops.inc renamed from target/ppc/translate/dfp-ops.inc.c +0 -0
similarity index 100%
rename from target/ppc/translate/dfp-ops.inc.c
rename to target/ppc/translate/dfp-ops.inc
target/ppc/translate/fp-impl.inc renamed from target/ppc/translate/fp-impl.inc.c +0 -0
similarity index 100%
rename from target/ppc/translate/fp-impl.inc.c
rename to target/ppc/translate/fp-impl.inc
target/ppc/translate/fp-ops.inc renamed from target/ppc/translate/fp-ops.inc.c +0 -0
similarity index 100%
rename from target/ppc/translate/fp-ops.inc.c
rename to target/ppc/translate/fp-ops.inc
target/ppc/translate/spe-impl.inc renamed from target/ppc/translate/spe-impl.inc.c +0 -0
similarity index 100%
rename from target/ppc/translate/spe-impl.inc.c
rename to target/ppc/translate/spe-impl.inc
target/ppc/translate/spe-ops.inc renamed from target/ppc/translate/spe-ops.inc.c +0 -0
similarity index 100%
rename from target/ppc/translate/spe-ops.inc.c
rename to target/ppc/translate/spe-ops.inc
target/ppc/translate/vmx-impl.inc renamed from target/ppc/translate/vmx-impl.inc.c +0 -0
similarity index 100%
rename from target/ppc/translate/vmx-impl.inc.c
rename to target/ppc/translate/vmx-impl.inc
target/ppc/translate/vmx-ops.inc renamed from target/ppc/translate/vmx-ops.inc.c +0 -0
similarity index 100%
rename from target/ppc/translate/vmx-ops.inc.c
rename to target/ppc/translate/vmx-ops.inc
target/ppc/translate/vsx-impl.inc renamed from target/ppc/translate/vsx-impl.inc.c +0 -0
similarity index 100%
rename from target/ppc/translate/vsx-impl.inc.c
rename to target/ppc/translate/vsx-impl.inc
target/ppc/translate/vsx-ops.inc renamed from target/ppc/translate/vsx-ops.inc.c +0 -0
similarity index 100%
rename from target/ppc/translate/vsx-ops.inc.c
rename to target/ppc/translate/vsx-ops.inc
target/ppc/translate_init.inc renamed from target/ppc/translate_init.inc.c +0 -0
similarity index 100%
rename from target/ppc/translate_init.inc.c
rename to target/ppc/translate_init.inc
target/riscv/Makefile.objs +4 -4
index ff38df6..1a66d8a 100644
@@ -14,15 +14,15 @@ decode16-y = $(SRC_PATH)/target/riscv/insn16.decode
 decode16-$(TARGET_RISCV32) += $(SRC_PATH)/target/riscv/insn16-32.decode
 decode16-$(TARGET_RISCV64) += $(SRC_PATH)/target/riscv/insn16-64.decode
 
-target/riscv/decode_insn32.inc.c: $(decode32-y) $(DECODETREE)
+target/riscv/decode_insn32.inc: $(decode32-y) $(DECODETREE)
 	$(call quiet-command, \
 	  $(PYTHON) $(DECODETREE) -o $@ --static-decode decode_insn32 \
           $(decode32-y), "GEN", $(TARGET_DIR)$@)
 
-target/riscv/decode_insn16.inc.c: $(decode16-y) $(DECODETREE)
+target/riscv/decode_insn16.inc: $(decode16-y) $(DECODETREE)
 	$(call quiet-command, \
 	  $(PYTHON) $(DECODETREE) -o $@ --static-decode decode_insn16 \
           --insnwidth 16 $(decode16-y), "GEN", $(TARGET_DIR)$@)
 
-target/riscv/translate.o: target/riscv/decode_insn32.inc.c \
-	target/riscv/decode_insn16.inc.c
+target/riscv/translate.o: target/riscv/decode_insn32.inc \
+	target/riscv/decode_insn16.inc
target/riscv/insn_trans/trans_privileged.inc renamed from target/riscv/insn_trans/trans_privileged.inc.c +0 -0
similarity index 100%
rename from target/riscv/insn_trans/trans_privileged.inc.c
rename to target/riscv/insn_trans/trans_privileged.inc
target/riscv/insn_trans/trans_rva.inc renamed from target/riscv/insn_trans/trans_rva.inc.c +0 -0
similarity index 100%
rename from target/riscv/insn_trans/trans_rva.inc.c
rename to target/riscv/insn_trans/trans_rva.inc
target/riscv/insn_trans/trans_rvd.inc renamed from target/riscv/insn_trans/trans_rvd.inc.c +0 -0
similarity index 100%
rename from target/riscv/insn_trans/trans_rvd.inc.c
rename to target/riscv/insn_trans/trans_rvd.inc
target/riscv/insn_trans/trans_rvf.inc renamed from target/riscv/insn_trans/trans_rvf.inc.c +0 -0
similarity index 100%
rename from target/riscv/insn_trans/trans_rvf.inc.c
rename to target/riscv/insn_trans/trans_rvf.inc
target/riscv/insn_trans/trans_rvh.inc renamed from target/riscv/insn_trans/trans_rvh.inc.c +0 -0
similarity index 100%
rename from target/riscv/insn_trans/trans_rvh.inc.c
rename to target/riscv/insn_trans/trans_rvh.inc
target/riscv/insn_trans/trans_rvi.inc renamed from target/riscv/insn_trans/trans_rvi.inc.c +0 -0
similarity index 100%
rename from target/riscv/insn_trans/trans_rvi.inc.c
rename to target/riscv/insn_trans/trans_rvi.inc
target/riscv/insn_trans/trans_rvm.inc renamed from target/riscv/insn_trans/trans_rvm.inc.c +0 -0
similarity index 100%
rename from target/riscv/insn_trans/trans_rvm.inc.c
rename to target/riscv/insn_trans/trans_rvm.inc
target/riscv/insn_trans/trans_rvv.inc renamed from target/riscv/insn_trans/trans_rvv.inc.c +0 -0
similarity index 100%
rename from target/riscv/insn_trans/trans_rvv.inc.c
rename to target/riscv/insn_trans/trans_rvv.inc
target/riscv/translate.c +10 -10
index 9632e79..aa7f56d 100644
@@ -583,7 +583,7 @@ static int ex_rvc_shifti(DisasContext *ctx, int imm)
 }
 
 /* Include the auto-generated decoder for 32 bit insn */
-#include "decode_insn32.inc.c"
+#include "decode_insn32.inc"
 
 static bool gen_arith_imm_fn(DisasContext *ctx, arg_i *a,
                              void (*func)(TCGv, TCGv, target_long))
@@ -718,17 +718,17 @@ static bool gen_shift(DisasContext *ctx, arg_r *a,
 }
 
 /* Include insn module translation function */
-#include "insn_trans/trans_rvi.inc.c"
-#include "insn_trans/trans_rvm.inc.c"
-#include "insn_trans/trans_rva.inc.c"
-#include "insn_trans/trans_rvf.inc.c"
-#include "insn_trans/trans_rvd.inc.c"
-#include "insn_trans/trans_rvh.inc.c"
-#include "insn_trans/trans_rvv.inc.c"
-#include "insn_trans/trans_privileged.inc.c"
+#include "insn_trans/trans_rvi.inc"
+#include "insn_trans/trans_rvm.inc"
+#include "insn_trans/trans_rva.inc"
+#include "insn_trans/trans_rvf.inc"
+#include "insn_trans/trans_rvd.inc"
+#include "insn_trans/trans_rvh.inc"
+#include "insn_trans/trans_rvv.inc"
+#include "insn_trans/trans_privileged.inc"
 
 /* Include the auto-generated decoder for 16 bit insn */
-#include "decode_insn16.inc.c"
+#include "decode_insn16.inc"
 
 static void decode_opc(CPURISCVState *env, DisasContext *ctx, uint16_t opcode)
 {
target/rx/Makefile.objs +3 -3
index a0018d5..eddc62a 100644
@@ -2,10 +2,10 @@ obj-y += translate.o op_helper.o helper.o cpu.o gdbstub.o disas.o
 
 DECODETREE = $(SRC_PATH)/scripts/decodetree.py
 
-target/rx/decode.inc.c: \
+target/rx/decode.inc: \
   $(SRC_PATH)/target/rx/insns.decode $(DECODETREE)
 	$(call quiet-command,\
 	  $(PYTHON) $(DECODETREE) --varinsnwidth 32 -o $@ $<, "GEN", $(TARGET_DIR)$@)
 
-target/rx/translate.o: target/rx/decode.inc.c
-target/rx/disas.o: target/rx/decode.inc.c
+target/rx/translate.o: target/rx/decode.inc
+target/rx/disas.o: target/rx/decode.inc
target/rx/disas.c +1 -1
index 6dee7a0..6450892 100644
@@ -100,7 +100,7 @@ static int bdsp_s(DisasContext *ctx, int d)
 }
 
 /* Include the auto-generated decoder.  */
-#include "decode.inc.c"
+#include "decode.inc"
 
 static void dump_bytes(DisasContext *ctx)
 {
target/rx/translate.c +1 -1
index 61e8665..272619c 100644
@@ -124,7 +124,7 @@ static int bdsp_s(DisasContext *ctx, int d)
 }
 
 /* Include the auto-generated decoder. */
-#include "decode.inc.c"
+#include "decode.inc"
 
 void rx_cpu_dump_state(CPUState *cs, FILE *f, int flags)
 {
target/s390x/translate.c +1 -1
index 4f6f1e3..4c6452f 100644
@@ -5120,7 +5120,7 @@ static DisasJumpType op_mpcifc(DisasContext *s, DisasOps *o)
 }
 #endif
 
-#include "translate_vx.inc.c"
+#include "translate_vx.inc"
 
 /* ====================================================================== */
 /* The "Cc OUTput" generators.  Given the generated output (and in some cases
target/s390x/translate_vx.inc renamed from target/s390x/translate_vx.inc.c +0 -0
similarity index 100%
rename from target/s390x/translate_vx.inc.c
rename to target/s390x/translate_vx.inc
target/xtensa/core-dc232b.c +2 -2
index 7851bcb..bc4c866 100644
@@ -35,13 +35,13 @@
 #include "overlay_tool.h"
 
 #define xtensa_modules xtensa_modules_dc232b
-#include "core-dc232b/xtensa-modules.inc.c"
+#include "core-dc232b/xtensa-modules.inc"
 
 static XtensaConfig dc232b __attribute__((unused)) = {
     .name = "dc232b",
     .gdb_regmap = {
         .reg = {
-#include "core-dc232b/gdb-config.inc.c"
+#include "core-dc232b/gdb-config.inc"
         }
     },
     .isa_internal = &xtensa_modules,
target/xtensa/core-dc232b/gdb-config.inc renamed from target/xtensa/core-dc232b/gdb-config.inc.c +0 -0
similarity index 100%
rename from target/xtensa/core-dc232b/gdb-config.inc.c
rename to target/xtensa/core-dc232b/gdb-config.inc
target/xtensa/core-dc232b/xtensa-modules.inc renamed from target/xtensa/core-dc232b/xtensa-modules.inc.c +0 -0
similarity index 100%
rename from target/xtensa/core-dc232b/xtensa-modules.inc.c
rename to target/xtensa/core-dc232b/xtensa-modules.inc
target/xtensa/core-dc233c.c +2 -2
index f8204f7..8341925 100644
@@ -34,13 +34,13 @@
 #include "overlay_tool.h"
 
 #define xtensa_modules xtensa_modules_dc233c
-#include "core-dc233c/xtensa-modules.inc.c"
+#include "core-dc233c/xtensa-modules.inc"
 
 static XtensaConfig dc233c __attribute__((unused)) = {
     .name = "dc233c",
     .gdb_regmap = {
         .reg = {
-#include "core-dc233c/gdb-config.inc.c"
+#include "core-dc233c/gdb-config.inc"
         }
     },
     .isa_internal = &xtensa_modules,
target/xtensa/core-dc233c/gdb-config.inc renamed from target/xtensa/core-dc233c/gdb-config.inc.c +0 -0
similarity index 100%
rename from target/xtensa/core-dc233c/gdb-config.inc.c
rename to target/xtensa/core-dc233c/gdb-config.inc
target/xtensa/core-dc233c/xtensa-modules.inc renamed from target/xtensa/core-dc233c/xtensa-modules.inc.c +0 -0
similarity index 100%
rename from target/xtensa/core-dc233c/xtensa-modules.inc.c
rename to target/xtensa/core-dc233c/xtensa-modules.inc
target/xtensa/core-de212.c +2 -2
index a061158..eda095d 100644
@@ -34,13 +34,13 @@
 #include "overlay_tool.h"
 
 #define xtensa_modules xtensa_modules_de212
-#include "core-de212/xtensa-modules.inc.c"
+#include "core-de212/xtensa-modules.inc"
 
 static XtensaConfig de212 __attribute__((unused)) = {
     .name = "de212",
     .gdb_regmap = {
         .reg = {
-#include "core-de212/gdb-config.inc.c"
+#include "core-de212/gdb-config.inc"
         }
     },
     .isa_internal = &xtensa_modules,
target/xtensa/core-de212/gdb-config.inc renamed from target/xtensa/core-de212/gdb-config.inc.c +0 -0
similarity index 100%
rename from target/xtensa/core-de212/gdb-config.inc.c
rename to target/xtensa/core-de212/gdb-config.inc
target/xtensa/core-de212/xtensa-modules.inc renamed from target/xtensa/core-de212/xtensa-modules.inc.c +0 -0
similarity index 100%
rename from target/xtensa/core-de212/xtensa-modules.inc.c
rename to target/xtensa/core-de212/xtensa-modules.inc
target/xtensa/core-fsf.c +1 -1
index 1221a29..3398f3b 100644
@@ -34,7 +34,7 @@
 #include "overlay_tool.h"
 
 #define xtensa_modules xtensa_modules_fsf
-#include "core-fsf/xtensa-modules.inc.c"
+#include "core-fsf/xtensa-modules.inc"
 
 static XtensaConfig fsf __attribute__((unused)) = {
     .name = "fsf",
target/xtensa/core-fsf/xtensa-modules.inc renamed from target/xtensa/core-fsf/xtensa-modules.inc.c +0 -0
similarity index 100%
rename from target/xtensa/core-fsf/xtensa-modules.inc.c
rename to target/xtensa/core-fsf/xtensa-modules.inc
target/xtensa/core-sample_controller.c +2 -2
index a1d220b..1523ef5 100644
@@ -34,13 +34,13 @@
 #include "overlay_tool.h"
 
 #define xtensa_modules xtensa_modules_sample_controller
-#include "core-sample_controller/xtensa-modules.inc.c"
+#include "core-sample_controller/xtensa-modules.inc"
 
 static XtensaConfig sample_controller __attribute__((unused)) = {
     .name = "sample_controller",
     .gdb_regmap = {
         .reg = {
-#include "core-sample_controller/gdb-config.inc.c"
+#include "core-sample_controller/gdb-config.inc"
         }
     },
     .isa_internal = &xtensa_modules,
target/xtensa/core-sample_controller/gdb-config.inc renamed from target/xtensa/core-sample_controller/gdb-config.inc.c +0 -0
similarity index 100%
rename from target/xtensa/core-sample_controller/gdb-config.inc.c
rename to target/xtensa/core-sample_controller/gdb-config.inc
target/xtensa/core-sample_controller/xtensa-modules.inc renamed from target/xtensa/core-sample_controller/xtensa-modules.inc.c +0 -0
similarity index 100%
rename from target/xtensa/core-sample_controller/xtensa-modules.inc.c
rename to target/xtensa/core-sample_controller/xtensa-modules.inc
target/xtensa/core-test_kc705_be.c +2 -2
index ab73c38..60e9a7d 100644
@@ -34,13 +34,13 @@
 #include "overlay_tool.h"
 
 #define xtensa_modules xtensa_modules_test_kc705_be
-#include "core-test_kc705_be/xtensa-modules.inc.c"
+#include "core-test_kc705_be/xtensa-modules.inc"
 
 static XtensaConfig test_kc705_be __attribute__((unused)) = {
     .name = "test_kc705_be",
     .gdb_regmap = {
         .reg = {
-#include "core-test_kc705_be/gdb-config.inc.c"
+#include "core-test_kc705_be/gdb-config.inc"
         }
     },
     .isa_internal = &xtensa_modules,
target/xtensa/core-test_kc705_be/gdb-config.inc renamed from target/xtensa/core-test_kc705_be/gdb-config.inc.c +0 -0
similarity index 100%
rename from target/xtensa/core-test_kc705_be/gdb-config.inc.c
rename to target/xtensa/core-test_kc705_be/gdb-config.inc
target/xtensa/core-test_kc705_be/xtensa-modules.inc renamed from target/xtensa/core-test_kc705_be/xtensa-modules.inc.c +0 -0
similarity index 100%
rename from target/xtensa/core-test_kc705_be/xtensa-modules.inc.c
rename to target/xtensa/core-test_kc705_be/xtensa-modules.inc
target/xtensa/core-test_mmuhifi_c3.c +2 -2
index 089ed7d..0a297f5 100644
@@ -35,13 +35,13 @@
 #include "overlay_tool.h"
 
 #define xtensa_modules xtensa_modules_test_mmuhifi_c3
-#include "core-test_mmuhifi_c3/xtensa-modules.inc.c"
+#include "core-test_mmuhifi_c3/xtensa-modules.inc"
 
 static XtensaConfig test_mmuhifi_c3 __attribute__((unused)) = {
     .name = "test_mmuhifi_c3",
     .gdb_regmap = {
         .reg = {
-#include "core-test_mmuhifi_c3/gdb-config.inc.c"
+#include "core-test_mmuhifi_c3/gdb-config.inc"
         }
     },
     .isa_internal = &xtensa_modules,
target/xtensa/core-test_mmuhifi_c3/gdb-config.inc renamed from target/xtensa/core-test_mmuhifi_c3/gdb-config.inc.c +0 -0
similarity index 100%
rename from target/xtensa/core-test_mmuhifi_c3/gdb-config.inc.c
rename to target/xtensa/core-test_mmuhifi_c3/gdb-config.inc
target/xtensa/core-test_mmuhifi_c3/xtensa-modules.inc renamed from target/xtensa/core-test_mmuhifi_c3/xtensa-modules.inc.c +0 -0
similarity index 100%
rename from target/xtensa/core-test_mmuhifi_c3/xtensa-modules.inc.c
rename to target/xtensa/core-test_mmuhifi_c3/xtensa-modules.inc
target/xtensa/import_core.sh +4 -4
index 8f844cf..a2e422b 100755
@@ -23,7 +23,7 @@ tar -xf "$OVERLAY" -C "$TARGET" --strip-components=2 \
     xtensa/config/core-isa.h \
     xtensa/config/core-matmap.h
 tar -xf "$OVERLAY" -O gdb/xtensa-config.c | \
-    sed -n '1,/*\//p;/XTREG/,/XTREG_END/p' > "$TARGET"/gdb-config.inc.c
+    sed -n '1,/*\//p;/XTREG/,/XTREG_END/p' > "$TARGET"/gdb-config.inc
 #
 # Fix up known issues in the xtensa-modules.c
 #
@@ -35,7 +35,7 @@ tar -xf "$OVERLAY" -O binutils/xtensa-modules.c | \
         -e '/^#include "ansidecl.h"/d' \
         -e '/^Slot_[a-zA-Z0-9_]\+_decode (const xtensa_insnbuf insn)/,/^}/s/^  return 0;$/  return XTENSA_UNDEFINED;/' \
         -e 's/#include <xtensa-isa.h>/#include "xtensa-isa.h"/' \
-    > "$TARGET"/xtensa-modules.inc.c
+    > "$TARGET"/xtensa-modules.inc
 
 cat <<EOF > "${TARGET}.c"
 #include "qemu/osdep.h"
@@ -49,13 +49,13 @@ cat <<EOF > "${TARGET}.c"
 #include "overlay_tool.h"
 
 #define xtensa_modules xtensa_modules_$NAME
-#include "core-$NAME/xtensa-modules.inc.c"
+#include "core-$NAME/xtensa-modules.inc"
 
 static XtensaConfig $NAME __attribute__((unused)) = {
     .name = "$NAME",
     .gdb_regmap = {
         .reg = {
-#include "core-$NAME/gdb-config.inc.c"
+#include "core-$NAME/gdb-config.inc"
         }
     },
     .isa_internal = &xtensa_modules,
tcg/README +1 -1
index a64f678..fdf6ee5 100644
@@ -652,7 +652,7 @@ function tcg_gen_xxx(args).
 
 4) Backend
 
-tcg-target.h contains the target specific definitions. tcg-target.inc.c
+tcg-target.h contains the target specific definitions. tcg-target.inc
 contains the target specific code; it is #included by tcg/tcg.c, rather
 than being a standalone C file.
 
tcg/aarch64/tcg-target.inc renamed from tcg/aarch64/tcg-target.inc.c +2 -2
similarity index 99%
rename from tcg/aarch64/tcg-target.inc.c
rename to tcg/aarch64/tcg-target.inc
index 760b0e7..000f7e6 100644
@@ -10,7 +10,7 @@
  * See the COPYING file in the top-level directory for details.
  */
 
-#include "../tcg-pool.inc.c"
+#include "../tcg-pool.inc"
 #include "qemu/bitops.h"
 
 /* We're going to re-use TCGType in setting of the SF bit, which controls
@@ -1542,7 +1542,7 @@ static void tcg_out_cltz(TCGContext *s, TCGType ext, TCGReg d,
 }
 
 #ifdef CONFIG_SOFTMMU
-#include "../tcg-ldst.inc.c"
+#include "../tcg-ldst.inc"
 
 /* helper signature: helper_ret_ld_mmu(CPUState *env, target_ulong addr,
  *                                     TCGMemOpIdx oi, uintptr_t ra)
tcg/arm/tcg-target.inc renamed from tcg/arm/tcg-target.inc.c +2 -2
similarity index 99%
rename from tcg/arm/tcg-target.inc.c
rename to tcg/arm/tcg-target.inc
index 6aa7757..42c2601 100644
@@ -23,7 +23,7 @@
  */
 
 #include "elf.h"
-#include "../tcg-pool.inc.c"
+#include "../tcg-pool.inc"
 
 int arm_arch = __ARM_ARCH;
 
@@ -1131,7 +1131,7 @@ static TCGCond tcg_out_cmp2(TCGContext *s, const TCGArg *args,
 }
 
 #ifdef CONFIG_SOFTMMU
-#include "../tcg-ldst.inc.c"
+#include "../tcg-ldst.inc"
 
 /* helper signature: helper_ret_ld_mmu(CPUState *env, target_ulong addr,
  *                                     int mmu_idx, uintptr_t ra)
tcg/i386/tcg-target.inc renamed from tcg/i386/tcg-target.inc.c +2 -2
similarity index 99%
rename from tcg/i386/tcg-target.inc.c
rename to tcg/i386/tcg-target.inc
index ae02282..c8d5ff7 100644
@@ -22,7 +22,7 @@
  * THE SOFTWARE.
  */
 
-#include "../tcg-pool.inc.c"
+#include "../tcg-pool.inc"
 
 #ifdef CONFIG_DEBUG_TCG
 static const char * const tcg_target_reg_names[TCG_TARGET_NB_REGS] = {
@@ -1647,7 +1647,7 @@ static void tcg_out_nopn(TCGContext *s, int n)
 }
 
 #if defined(CONFIG_SOFTMMU)
-#include "../tcg-ldst.inc.c"
+#include "../tcg-ldst.inc"
 
 /* helper signature: helper_ret_ld_mmu(CPUState *env, target_ulong addr,
  *                                     int mmu_idx, uintptr_t ra)
tcg/mips/tcg-target.inc renamed from tcg/mips/tcg-target.inc.c +1 -1
similarity index 99%
rename from tcg/mips/tcg-target.inc.c
rename to tcg/mips/tcg-target.inc
index 4d32ebc..5459818 100644
@@ -1107,7 +1107,7 @@ static void tcg_out_call(TCGContext *s, tcg_insn_unit *arg)
 }
 
 #if defined(CONFIG_SOFTMMU)
-#include "../tcg-ldst.inc.c"
+#include "../tcg-ldst.inc"
 
 static void * const qemu_ld_helpers[16] = {
     [MO_UB]   = helper_ret_ldub_mmu,
tcg/ppc/tcg-target.inc renamed from tcg/ppc/tcg-target.inc.c +2 -2
similarity index 99%
rename from tcg/ppc/tcg-target.inc.c
rename to tcg/ppc/tcg-target.inc
index c8d1e76..7f13849 100644
@@ -23,7 +23,7 @@
  */
 
 #include "elf.h"
-#include "../tcg-pool.inc.c"
+#include "../tcg-pool.inc"
 
 #if defined _CALL_DARWIN || defined __APPLE__
 #define TCG_TARGET_CALL_DARWIN
@@ -1845,7 +1845,7 @@ static const uint32_t qemu_exts_opc[4] = {
 };
 
 #if defined (CONFIG_SOFTMMU)
-#include "../tcg-ldst.inc.c"
+#include "../tcg-ldst.inc"
 
 /* helper signature: helper_ld_mmu(CPUState *env, target_ulong addr,
  *                                 int mmu_idx, uintptr_t ra)
tcg/riscv/tcg-target.inc renamed from tcg/riscv/tcg-target.inc.c +2 -2
similarity index 99%
rename from tcg/riscv/tcg-target.inc.c
rename to tcg/riscv/tcg-target.inc
index 3c11ab8..d666c79 100644
@@ -27,7 +27,7 @@
  * THE SOFTWARE.
  */
 
-#include "../tcg-pool.inc.c"
+#include "../tcg-pool.inc"
 
 #ifdef CONFIG_DEBUG_TCG
 static const char * const tcg_target_reg_names[TCG_TARGET_NB_REGS] = {
@@ -919,7 +919,7 @@ static void tcg_out_mb(TCGContext *s, TCGArg a0)
  */
 
 #if defined(CONFIG_SOFTMMU)
-#include "../tcg-ldst.inc.c"
+#include "../tcg-ldst.inc"
 
 /* helper signature: helper_ret_ld_mmu(CPUState *env, target_ulong addr,
  *                                     TCGMemOpIdx oi, uintptr_t ra)
tcg/s390/tcg-target.inc renamed from tcg/s390/tcg-target.inc.c +2 -2
similarity index 99%
rename from tcg/s390/tcg-target.inc.c
rename to tcg/s390/tcg-target.inc
index b07e9ff..c313a08 100644
@@ -29,7 +29,7 @@
 #error "unsupported code generation mode"
 #endif
 
-#include "../tcg-pool.inc.c"
+#include "../tcg-pool.inc"
 #include "elf.h"
 
 /* ??? The translation blocks produced by TCG are generally small enough to
@@ -1536,7 +1536,7 @@ static void tcg_out_qemu_st_direct(TCGContext *s, MemOp opc, TCGReg data,
 }
 
 #if defined(CONFIG_SOFTMMU)
-#include "../tcg-ldst.inc.c"
+#include "../tcg-ldst.inc"
 
 /* We're expecting to use a 20-bit negative offset on the tlb memory ops.  */
 QEMU_BUILD_BUG_ON(TLB_MASK_TABLE_OFS(0) > 0);
tcg/sparc/tcg-target.inc renamed from tcg/sparc/tcg-target.inc.c +1 -1
similarity index 99%
rename from tcg/sparc/tcg-target.inc.c
rename to tcg/sparc/tcg-target.inc
index 65fddb3..e6aecd9 100644
@@ -22,7 +22,7 @@
  * THE SOFTWARE.
  */
 
-#include "../tcg-pool.inc.c"
+#include "../tcg-pool.inc"
 
 #ifdef CONFIG_DEBUG_TCG
 static const char * const tcg_target_reg_names[TCG_TARGET_NB_REGS] = {
tcg/tcg-ldst.inc renamed from tcg/tcg-ldst.inc.c +0 -0
similarity index 100%
rename from tcg/tcg-ldst.inc.c
rename to tcg/tcg-ldst.inc
tcg/tcg-pool.inc renamed from tcg/tcg-pool.inc.c +1 -1
similarity index 99%
rename from tcg/tcg-pool.inc.c
rename to tcg/tcg-pool.inc
index 4eaa84b..7390173 100644
@@ -118,7 +118,7 @@ static inline void new_pool_l8(TCGContext *s, int rtype, tcg_insn_unit *label,
     new_pool_insert(s, n);
 }
 
-/* To be provided by cpu/tcg-target.inc.c.  */
+/* To be provided by cpu/tcg-target.inc.  */
 static void tcg_out_nop_fill(tcg_insn_unit *p, int count);
 
 static int tcg_out_pool_finalize(TCGContext *s)
tcg/tcg.c +3 -3
index 1362bc6..5af2ce4 100644
@@ -65,7 +65,7 @@
 #include "exec/log.h"
 #include "sysemu/sysemu.h"
 
-/* Forward declarations for functions declared in tcg-target.inc.c and
+/* Forward declarations for functions declared in tcg-target.inc and
    used here. */
 static void tcg_target_init(TCGContext *s);
 static const TCGTargetOpDef *tcg_target_op_def(TCGOpcode);
@@ -101,7 +101,7 @@ static void tcg_register_jit_int(void *buf, size_t size,
                                  size_t debug_frame_size)
     __attribute__((unused));
 
-/* Forward declarations for functions declared and used in tcg-target.inc.c. */
+/* Forward declarations for functions declared and used in tcg-target.inc. */
 static const char *target_parse_constraint(TCGArgConstraint *ct,
                                            const char *ct_str, TCGType type);
 static void tcg_out_ld(TCGContext *s, TCGType type, TCGReg ret, TCGReg arg1,
@@ -341,7 +341,7 @@ static void set_jmp_reset_offset(TCGContext *s, int which)
     assert(s->tb_jmp_reset_offset[which] == off);
 }
 
-#include "tcg-target.inc.c"
+#include "tcg-target.inc"
 
 /* compare a pointer @ptr and a tb_tc @s */
 static int ptr_cmp_tb_tc(const void *ptr, const struct tb_tc *s)
tcg/tci/README +2 -2
index 386c3c7..63ce297 100644
@@ -21,7 +21,7 @@ This is what TCI (Tiny Code Interpreter) does.
 2) Implementation
 
 Like each TCG host frontend, TCI implements the code generator in
-tcg-target.inc.c, tcg-target.h. Both files are in directory tcg/tci.
+tcg-target.inc, tcg-target.h. Both files are in directory tcg/tci.
 
 The additional file tcg/tci.c adds the interpreter.
 
@@ -123,7 +123,7 @@ u1 = linux-user-test works
   would also improve speed for hosts which support byte alignment).
 
 * A better disassembler for the pseudo code would be nice (a very primitive
-  disassembler is included in tcg-target.inc.c).
+  disassembler is included in tcg-target.inc).
 
 * It might be useful to have a runtime option which selects the native TCG
   or TCI, so QEMU would have to include two TCGs. Today, selecting TCI
tcg/tci/tcg-target.inc renamed from tcg/tci/tcg-target.inc.c +0 -0
similarity index 100%
rename from tcg/tci/tcg-target.inc.c
rename to tcg/tci/tcg-target.inc
tests/fp/fp-test.c +1 -1
index 43ef962..6fe2402 100644
@@ -116,7 +116,7 @@ static void usage_complete(int argc, char *argv[])
 }
 
 /* keep wrappers separate but do not bother defining headers for all of them */
-#include "wrap.inc.c"
+#include "wrap.inc"
 
 static void not_implemented(void)
 {
tests/fp/wrap.inc renamed from tests/fp/wrap.inc.c +0 -0
similarity index 100%
rename from tests/fp/wrap.inc.c
rename to tests/fp/wrap.inc
ui/input-keymap.c +17 -17
index c430185..cfe2c44 100644
@@ -4,23 +4,23 @@
 
 #include "standard-headers/linux/input.h"
 
-#include "ui/input-keymap-atset1-to-qcode.c"
-#include "ui/input-keymap-linux-to-qcode.c"
-#include "ui/input-keymap-qcode-to-atset1.c"
-#include "ui/input-keymap-qcode-to-atset2.c"
-#include "ui/input-keymap-qcode-to-atset3.c"
-#include "ui/input-keymap-qcode-to-linux.c"
-#include "ui/input-keymap-qcode-to-qnum.c"
-#include "ui/input-keymap-qcode-to-sun.c"
-#include "ui/input-keymap-qnum-to-qcode.c"
-#include "ui/input-keymap-usb-to-qcode.c"
-#include "ui/input-keymap-win32-to-qcode.c"
-#include "ui/input-keymap-x11-to-qcode.c"
-#include "ui/input-keymap-xorgevdev-to-qcode.c"
-#include "ui/input-keymap-xorgkbd-to-qcode.c"
-#include "ui/input-keymap-xorgxquartz-to-qcode.c"
-#include "ui/input-keymap-xorgxwin-to-qcode.c"
-#include "ui/input-keymap-osx-to-qcode.c"
+#include "ui/input-keymap-atset1-to-qcode.inc"
+#include "ui/input-keymap-linux-to-qcode.inc"
+#include "ui/input-keymap-qcode-to-atset1.inc"
+#include "ui/input-keymap-qcode-to-atset2.inc"
+#include "ui/input-keymap-qcode-to-atset3.inc"
+#include "ui/input-keymap-qcode-to-linux.inc"
+#include "ui/input-keymap-qcode-to-qnum.inc"
+#include "ui/input-keymap-qcode-to-sun.inc"
+#include "ui/input-keymap-qnum-to-qcode.inc"
+#include "ui/input-keymap-usb-to-qcode.inc"
+#include "ui/input-keymap-win32-to-qcode.inc"
+#include "ui/input-keymap-x11-to-qcode.inc"
+#include "ui/input-keymap-xorgevdev-to-qcode.inc"
+#include "ui/input-keymap-xorgkbd-to-qcode.inc"
+#include "ui/input-keymap-xorgxquartz-to-qcode.inc"
+#include "ui/input-keymap-xorgxwin-to-qcode.inc"
+#include "ui/input-keymap-osx-to-qcode.inc"
 
 int qemu_input_linux_to_qcode(unsigned int lnx)
 {
ui/vnc-enc-zrle.c +11 -11
index b4f71e3..98d5002 100644
@@ -199,56 +199,56 @@ static void zrle_write_u8(VncState *vs, uint8_t value)
 
 #define ZRLE_BPP 8
 #define ZYWRLE_ENDIAN ENDIAN_NO
-#include "vnc-enc-zrle.inc.c"
+#include "vnc-enc-zrle.inc"
 #undef ZRLE_BPP
 
 #define ZRLE_BPP 15
 #undef ZYWRLE_ENDIAN
 #define ZYWRLE_ENDIAN ENDIAN_LITTLE
-#include "vnc-enc-zrle.inc.c"
+#include "vnc-enc-zrle.inc"
 
 #undef ZYWRLE_ENDIAN
 #define ZYWRLE_ENDIAN ENDIAN_BIG
-#include "vnc-enc-zrle.inc.c"
+#include "vnc-enc-zrle.inc"
 
 #undef ZRLE_BPP
 #define ZRLE_BPP 16
 #undef ZYWRLE_ENDIAN
 #define ZYWRLE_ENDIAN ENDIAN_LITTLE
-#include "vnc-enc-zrle.inc.c"
+#include "vnc-enc-zrle.inc"
 
 #undef ZYWRLE_ENDIAN
 #define ZYWRLE_ENDIAN ENDIAN_BIG
-#include "vnc-enc-zrle.inc.c"
+#include "vnc-enc-zrle.inc"
 
 #undef ZRLE_BPP
 #define ZRLE_BPP 32
 #undef ZYWRLE_ENDIAN
 #define ZYWRLE_ENDIAN ENDIAN_LITTLE
-#include "vnc-enc-zrle.inc.c"
+#include "vnc-enc-zrle.inc"
 
 #undef ZYWRLE_ENDIAN
 #define ZYWRLE_ENDIAN ENDIAN_BIG
-#include "vnc-enc-zrle.inc.c"
+#include "vnc-enc-zrle.inc"
 
 #define ZRLE_COMPACT_PIXEL 24a
 #undef ZYWRLE_ENDIAN
 #define ZYWRLE_ENDIAN ENDIAN_LITTLE
-#include "vnc-enc-zrle.inc.c"
+#include "vnc-enc-zrle.inc"
 
 #undef ZYWRLE_ENDIAN
 #define ZYWRLE_ENDIAN ENDIAN_BIG
-#include "vnc-enc-zrle.inc.c"
+#include "vnc-enc-zrle.inc"
 
 #undef ZRLE_COMPACT_PIXEL
 #define ZRLE_COMPACT_PIXEL 24b
 #undef ZYWRLE_ENDIAN
 #define ZYWRLE_ENDIAN ENDIAN_LITTLE
-#include "vnc-enc-zrle.inc.c"
+#include "vnc-enc-zrle.inc"
 
 #undef ZYWRLE_ENDIAN
 #define ZYWRLE_ENDIAN ENDIAN_BIG
-#include "vnc-enc-zrle.inc.c"
+#include "vnc-enc-zrle.inc"
 #undef ZRLE_COMPACT_PIXEL
 #undef ZRLE_BPP
 
ui/vnc-enc-zrle.inc renamed from ui/vnc-enc-zrle.inc.c +0 -0
similarity index 100%
rename from ui/vnc-enc-zrle.inc.c
rename to ui/vnc-enc-zrle.inc
Signature · 1 line
1.8.3.1
#7 lore raw

PATCH 6/147 build-sys hack: ensure target directory is there

In reply to Paolo Bonzini

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 694865b..56ba540 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
#8 lore raw

PATCH 7/147 tests/vm: do not pollute configure with --efi-aarch64

In reply to Paolo Bonzini

Just make EFI_AARCH64 a variable in the makefile that defaults to the efi firmware included with QEMU. It can be redefined on the "make" command line.

---
 configure                 | 19 -------------------
 tests/vm/Makefile.include |  2 ++
 2 files changed, 2 insertions(+), 19 deletions(-)
configure +0 -19
index 2acc4d1..1c17a0f 100755
@@ -418,7 +418,6 @@ prefix="/usr/local"
 mandir="\${prefix}/share/man"
 datadir="\${prefix}/share"
 firmwarepath="\${prefix}/share/qemu-firmware"
-efi_aarch64=""
 qemu_docdir="\${prefix}/share/doc/qemu"
 bindir="\${prefix}/bin"
 libdir="\${prefix}/lib"
@@ -1109,8 +1108,6 @@ for opt do
   ;;
   --firmwarepath=*) firmwarepath="$optarg"
   ;;
-  --efi-aarch64=*) efi_aarch64="$optarg"
-  ;;
   --host=*|--build=*|\
   --disable-dependency-tracking|\
   --sbindir=*|--sharedstatedir=*|\
@@ -3650,20 +3647,6 @@ EOF
   fi
 fi
 
-############################################
-# efi-aarch64 probe
-# Check for efi files needed by aarch64 VMs.
-# By default we will use the efi included with QEMU.
-# Allow user to override the path for efi also.
-if ! test -f "$efi_aarch64"; then
-  if test -f $source_path/pc-bios/edk2-aarch64-code.fd.bz2; then
-    # valid after build
-    efi_aarch64=$PWD/pc-bios/edk2-aarch64-code.fd
-  else
-    efi_aarch64=""
-  fi
-fi
-
 ##########################################
 # libcap-ng library probe
 if test "$cap_ng" != "no" ; then
@@ -6861,7 +6844,6 @@ if test "$docs" != "no"; then
     echo "sphinx-build      $sphinx_build"
 fi
 echo "genisoimage       $genisoimage"
-echo "efi_aarch64       $efi_aarch64"
 echo "python_yaml       $python_yaml"
 echo "slirp support     $slirp $(echo_version $slirp $slirp_version)"
 if test "$slirp" != "no" ; then
@@ -7963,7 +7945,6 @@ echo "PYTHON=$python" >> $config_host_mak
 echo "SPHINX_BUILD=$sphinx_build" >> $config_host_mak
 echo "SPHINX_WERROR=$sphinx_werror" >> $config_host_mak
 echo "GENISOIMAGE=$genisoimage" >> $config_host_mak
-echo "EFI_AARCH64=$efi_aarch64" >> $config_host_mak
 echo "PYTHON_YAML=$python_yaml" >> $config_host_mak
 echo "CC=$cc" >> $config_host_mak
 if $iasl -h > /dev/null 2>&1; then
tests/vm/Makefile.include +2 -0
index f21948c..a599d19 100644
@@ -2,6 +2,8 @@
 
 .PHONY: vm-build-all vm-clean-all
 
+EFI_AARCH64 = $(wildcard $(BUILD_DIR)/pc-bios/edk2-aarch64-code.fd)
+
 IMAGES := freebsd netbsd openbsd centos fedora
 ifneq ($(GENISOIMAGE),)
 IMAGES += ubuntu.i386 centos
Signature · 1 line
1.8.3.1
Reviewed-by on v1 7/147
#9 lore raw

Re: [PATCH 007/147] tests/vm: do not pollute configure with --efi-aarch64

+Robert in case.

Quoted 5 lines · Paolo Bonzini

Just make EFI_AARCH64 a variable in the makefile that defaults to the efi firmware included with QEMU. It can be redefined on the "make" command line.

Quoted 77 lines
---
 configure                 | 19 -------------------
 tests/vm/Makefile.include |  2 ++
 2 files changed, 2 insertions(+), 19 deletions(-)
configure +0 -19
index 2acc4d1..1c17a0f 100755
@@ -418,7 +418,6 @@ prefix="/usr/local"
 mandir="\${prefix}/share/man"
 datadir="\${prefix}/share"
 firmwarepath="\${prefix}/share/qemu-firmware"
-efi_aarch64=""
 qemu_docdir="\${prefix}/share/doc/qemu"
 bindir="\${prefix}/bin"
 libdir="\${prefix}/lib"
@@ -1109,8 +1108,6 @@ for opt do
   ;;
   --firmwarepath=*) firmwarepath="$optarg"
   ;;
-  --efi-aarch64=*) efi_aarch64="$optarg"
-  ;;
   --host=*|--build=*|\
   --disable-dependency-tracking|\
   --sbindir=*|--sharedstatedir=*|\
@@ -3650,20 +3647,6 @@ EOF
   fi
 fi
 
-############################################
-# efi-aarch64 probe
-# Check for efi files needed by aarch64 VMs.
-# By default we will use the efi included with QEMU.
-# Allow user to override the path for efi also.
-if ! test -f "$efi_aarch64"; then
-  if test -f $source_path/pc-bios/edk2-aarch64-code.fd.bz2; then
-    # valid after build
-    efi_aarch64=$PWD/pc-bios/edk2-aarch64-code.fd
-  else
-    efi_aarch64=""
-  fi
-fi
-
 ##########################################
 # libcap-ng library probe
 if test "$cap_ng" != "no" ; then
@@ -6861,7 +6844,6 @@ if test "$docs" != "no"; then
     echo "sphinx-build      $sphinx_build"
 fi
 echo "genisoimage       $genisoimage"
-echo "efi_aarch64       $efi_aarch64"
 echo "python_yaml       $python_yaml"
 echo "slirp support     $slirp $(echo_version $slirp $slirp_version)"
 if test "$slirp" != "no" ; then
@@ -7963,7 +7945,6 @@ echo "PYTHON=$python" >> $config_host_mak
 echo "SPHINX_BUILD=$sphinx_build" >> $config_host_mak
 echo "SPHINX_WERROR=$sphinx_werror" >> $config_host_mak
 echo "GENISOIMAGE=$genisoimage" >> $config_host_mak
-echo "EFI_AARCH64=$efi_aarch64" >> $config_host_mak
 echo "PYTHON_YAML=$python_yaml" >> $config_host_mak
 echo "CC=$cc" >> $config_host_mak
 if $iasl -h > /dev/null 2>&1; then
tests/vm/Makefile.include +2 -0
index f21948c..a599d19 100644
@@ -2,6 +2,8 @@
 
 .PHONY: vm-build-all vm-clean-all
 
+EFI_AARCH64 = $(wildcard $(BUILD_DIR)/pc-bios/edk2-aarch64-code.fd)
+
 IMAGES := freebsd netbsd openbsd centos fedora
 ifneq ($(GENISOIMAGE),)
 IMAGES += ubuntu.i386 centos
Reviewed-by on v1 7/147
#10 lore raw

Re: [PATCH 007/147] tests/vm: do not pollute configure with --efi-aarch64

In reply to Paolo Bonzini
Quoted 87 lines · Paolo Bonzini

Just make EFI_AARCH64 a variable in the makefile that defaults to the efi firmware included with QEMU. It can be redefined on the "make" command line.

---
 configure                 | 19 -------------------
 tests/vm/Makefile.include |  2 ++
 2 files changed, 2 insertions(+), 19 deletions(-)
configure +0 -19
index 2acc4d1..1c17a0f 100755
@@ -418,7 +418,6 @@ prefix="/usr/local"
 mandir="\${prefix}/share/man"
 datadir="\${prefix}/share"
 firmwarepath="\${prefix}/share/qemu-firmware"
-efi_aarch64=""
 qemu_docdir="\${prefix}/share/doc/qemu"
 bindir="\${prefix}/bin"
 libdir="\${prefix}/lib"
@@ -1109,8 +1108,6 @@ for opt do
   ;;
   --firmwarepath=*) firmwarepath="$optarg"
   ;;
-  --efi-aarch64=*) efi_aarch64="$optarg"
-  ;;
   --host=*|--build=*|\
   --disable-dependency-tracking|\
   --sbindir=*|--sharedstatedir=*|\
@@ -3650,20 +3647,6 @@ EOF
   fi
 fi
 
-############################################
-# efi-aarch64 probe
-# Check for efi files needed by aarch64 VMs.
-# By default we will use the efi included with QEMU.
-# Allow user to override the path for efi also.
-if ! test -f "$efi_aarch64"; then
-  if test -f $source_path/pc-bios/edk2-aarch64-code.fd.bz2; then
-    # valid after build
-    efi_aarch64=$PWD/pc-bios/edk2-aarch64-code.fd
-  else
-    efi_aarch64=""
-  fi
-fi
-
 ##########################################
 # libcap-ng library probe
 if test "$cap_ng" != "no" ; then
@@ -6861,7 +6844,6 @@ if test "$docs" != "no"; then
     echo "sphinx-build      $sphinx_build"
 fi
 echo "genisoimage       $genisoimage"
-echo "efi_aarch64       $efi_aarch64"
 echo "python_yaml       $python_yaml"
 echo "slirp support     $slirp $(echo_version $slirp $slirp_version)"
 if test "$slirp" != "no" ; then
@@ -7963,7 +7945,6 @@ echo "PYTHON=$python" >> $config_host_mak
 echo "SPHINX_BUILD=$sphinx_build" >> $config_host_mak
 echo "SPHINX_WERROR=$sphinx_werror" >> $config_host_mak
 echo "GENISOIMAGE=$genisoimage" >> $config_host_mak
-echo "EFI_AARCH64=$efi_aarch64" >> $config_host_mak
 echo "PYTHON_YAML=$python_yaml" >> $config_host_mak
 echo "CC=$cc" >> $config_host_mak
 if $iasl -h > /dev/null 2>&1; then
tests/vm/Makefile.include +2 -1
index f21948c..a599d19 100644
@@ -2,6 +2,8 @@
 
 .PHONY: vm-build-all vm-clean-all
 
+EFI_AARCH64 = $(wildcard $(BUILD_DIR)/pc-bios/edk2-aarch64-code.fd)
+
 IMAGES := freebsd netbsd openbsd centos fedora
 ifneq ($(GENISOIMAGE),)
 IMAGES += ubuntu.i386 centos
--

1.8.3.1

#11 lore raw

PATCH 8/147 tests/vm: check for Python YAML parser in the Makefile

In reply to Paolo Bonzini

No need to do it in the configure file if it is only used for a help message.

---
 configure                 | 9 ---------
 tests/vm/Makefile.include | 4 +++-
 2 files changed, 3 insertions(+), 10 deletions(-)
configure +0 -9
index 1c17a0f..625c14c 100755
@@ -959,13 +959,6 @@ do
     fi
 done
 
-# Check for existence of python3 yaml, needed to
-# import yaml config files into vm-build.
-python_yaml="no"
-if $(python3 -c "import yaml" 2> /dev/null); then
-    python_yaml="yes"
-fi
-
 : ${smbd=${SMBD-/usr/sbin/smbd}}
 
 # Default objcc to clang if available, otherwise use CC
@@ -6844,7 +6837,6 @@ if test "$docs" != "no"; then
     echo "sphinx-build      $sphinx_build"
 fi
 echo "genisoimage       $genisoimage"
-echo "python_yaml       $python_yaml"
 echo "slirp support     $slirp $(echo_version $slirp $slirp_version)"
 if test "$slirp" != "no" ; then
     echo "smbd              $smbd"
@@ -7945,7 +7937,6 @@ echo "PYTHON=$python" >> $config_host_mak
 echo "SPHINX_BUILD=$sphinx_build" >> $config_host_mak
 echo "SPHINX_WERROR=$sphinx_werror" >> $config_host_mak
 echo "GENISOIMAGE=$genisoimage" >> $config_host_mak
-echo "PYTHON_YAML=$python_yaml" >> $config_host_mak
 echo "CC=$cc" >> $config_host_mak
 if $iasl -h > /dev/null 2>&1; then
   echo "IASL=$iasl" >> $config_host_mak
tests/vm/Makefile.include +3 -1
index a599d19..257e2ed 100644
@@ -17,6 +17,8 @@ IMAGE_FILES := $(patsubst %, $(IMAGES_DIR)/%.img, $(IMAGES))
 
 .PRECIOUS: $(IMAGE_FILES)
 
+HAVE_PYTHON_YAML = $(shell $(PYTHON) -c "import yaml" 2> /dev/null && echo yes)
+
 # 'vm-help' target was historically named 'vm-test'
 vm-help vm-test:
 	@echo "vm-help: Test QEMU in preconfigured virtual machines"
@@ -56,7 +58,7 @@ endif
 	@echo "    QEMU_LOCAL=1                 - Use QEMU binary local to this build."
 	@echo "    QEMU=/path/to/qemu		 - Change path to QEMU binary"
 	@echo "    QEMU_IMG=/path/to/qemu-img	 - Change path to qemu-img tool"
-ifeq ($(PYTHON_YAML),yes)
+ifeq ($(HAVE_PYTHON_YAML),yes)
 	@echo "    QEMU_CONFIG=/path/conf.yml   - Change path to VM configuration .yml file."
 else
 	@echo "    (install python3-yaml to enable support for yaml file to configure a VM.)"
Signature · 1 line
1.8.3.1
#12 lore raw

PATCH 9/147 tests/docker: add test script for static linux-user builds

In reply to Paolo Bonzini
---
 tests/docker/test-static | 24 ++++++++++++++++++++++++
 1 file changed, 24 insertions(+)
 create mode 100755 tests/docker/test-static
tests/docker/test-static new file +24 -0
new file mode 100755
index 0000000..372ef6f
@@ -0,0 +1,24 @@
+#!/bin/bash -e
+#
+# Compile QEMU user mode emulators as static binaries on Linux.
+#
+# Copyright (c) 2020 Red Hat Inc.
+#
+# Authors:
+#  Paolo Bonzini <[email protected]>
+#
+# This work is licensed under the terms of the GNU GPL, version 2
+# or (at your option) any later version. See the COPYING file in
+# the top-level directory.
+
+. common.rc
+
+cd "$BUILD_DIR"
+
+build_qemu \
+    --disable-system \
+    --disable-tools \
+    --disable-guest-agent \
+    --disable-docs \
+    --static
+install_qemu
Signature · 1 line
1.8.3.1
#13 lore raw

PATCH 10/147 nsis: use "make DESTDIR=" instead of "make prefix="

In reply to Paolo Bonzini

The next patch will prevent modifying the prefix on "make install". Adjust the creation of the installer.

---
 Makefile | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)
Makefile +6 -6
index f237ff8..9d94782 100644
@@ -1188,16 +1188,16 @@ installer: $(INSTALLER)
 
 INSTDIR=/tmp/qemu-nsis
 
-$(INSTALLER): install-doc $(SRC_PATH)/qemu.nsi
-	$(MAKE) install prefix=${INSTDIR}
+$(INSTALLER): $(SRC_PATH)/qemu.nsi
+	$(MAKE) install DESTDIR=${INSTDIR}
 ifdef SIGNCODE
-	(cd ${INSTDIR}; \
+	(cd ${INSTDIR}/${bindir}; \
          for i in *.exe; do \
            $(SIGNCODE) $${i}; \
          done \
         )
 endif # SIGNCODE
-	(cd ${INSTDIR}; \
+	(cd ${INSTDIR}/${bindir}; \
          for i in qemu-system-*.exe; do \
            arch=$${i%.exe}; \
            arch=$${arch#qemu-system-}; \
@@ -1206,11 +1206,11 @@ endif # SIGNCODE
            echo File \"\$${BINDIR}\\$$i\"; \
            echo SectionEnd; \
          done \
-        ) >${INSTDIR}/system-emulations.nsh
+        ) >${INSTDIR}/${bindir}/system-emulations.nsh
 	makensis $(nsisflags) \
                 $(if $(BUILD_DOCS),-DCONFIG_DOCUMENTATION="y") \
                 $(if $(CONFIG_GTK),-DCONFIG_GTK="y") \
-                -DBINDIR="${INSTDIR}" \
+                -DBINDIR="${INSTDIR}/${bindir}" \
                 $(if $(DLL_PATH),-DDLLDIR="$(DLL_PATH)") \
                 -DSRCDIR="$(SRC_PATH)" \
                 -DOUTFILE="$(INSTALLER)" \
Signature · 1 line
1.8.3.1
#14 lore raw

PATCH 11/147 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 | 32 ++++++++++++++++----------------
 1 file changed, 16 insertions(+), 16 deletions(-)
configure +16 -16
index 625c14c..606c327 100755
@@ -610,8 +610,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"
 fi
@@ -911,7 +911,7 @@ Linux)
   linux="yes"
   linux_user="yes"
   kvm="yes"
-  QEMU_INCLUDES="-isystem \$(SRC_PATH)/linux-headers -isystem $PWD/linux-headers $QEMU_INCLUDES"
+  QEMU_INCLUDES="-isystem ${source_path}/linux-headers -I$PWD/linux-headers $QEMU_INCLUDES"
   supported_os="yes"
   libudev="yes"
 ;;
@@ -4397,8 +4397,8 @@ EOF
           if [ "$pwd_is_source_path" != "y" ] ; then
               symlink "$source_path/dtc/Makefile" "dtc/Makefile"
           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
@@ -5385,13 +5385,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)
@@ -6414,8 +6414,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
@@ -7909,19 +7909,19 @@ if test "$secret_keyring" = "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
 
 echo "HELPERS=$helpers" >> $config_host_mak
Signature · 1 line
1.8.3.1
#15 lore raw

PATCH 12/147 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 606c327..373bb22 100755
@@ -415,16 +415,7 @@ LDFLAGS_SHARED="-shared"
 modules="no"
 module_upgrades="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=""
@@ -979,12 +970,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
@@ -1638,6 +1623,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
#16 lore raw

PATCH 13/147 configure: prepare CFLAGS/CXXFLAGS/LDFLAGS for Meson

In reply to Paolo Bonzini

Split between CFLAGS/QEMU_CFLAGS and CXXFLAGS/QEMU_CXXFLAGS so that we will use CFLAGS and CXXFLAGS for flags that we do not want to pass to add_project_arguments.

---
 configure | 46 ++++++++++++++++++++++++----------------------
 rules.mak |  4 ++--
 2 files changed, 26 insertions(+), 24 deletions(-)
configure +24 -22
index 373bb22..9ce1189 100755
@@ -107,15 +107,12 @@ update_cxxflags() {
     # options which some versions of GCC's C++ compiler complain about
     # because they only make sense for C programs.
     QEMU_CXXFLAGS="$QEMU_CXXFLAGS -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS"
-
+    CXXFLAGS=$(echo "$CFLAGS" | sed s/-std=gnu99/-std=gnu++11/)
     for arg in $QEMU_CFLAGS; do
         case $arg in
             -Wstrict-prototypes|-Wmissing-prototypes|-Wnested-externs|\
             -Wold-style-declaration|-Wold-style-definition|-Wredundant-decls)
                 ;;
-            -std=gnu99)
-                QEMU_CXXFLAGS=${QEMU_CXXFLAGS:+$QEMU_CXXFLAGS }"-std=gnu++98"
-                ;;
             *)
                 QEMU_CXXFLAGS=${QEMU_CXXFLAGS:+$QEMU_CXXFLAGS }$arg
                 ;;
@@ -125,13 +122,13 @@ update_cxxflags() {
 
 compile_object() {
   local_cflags="$1"
-  do_cc $QEMU_CFLAGS $local_cflags -c -o $TMPO $TMPC
+  do_cc $CFLAGS $QEMU_CFLAGS $local_cflags -c -o $TMPO $TMPC
 }
 
 compile_prog() {
   local_cflags="$1"
   local_ldflags="$2"
-  do_cc $QEMU_CFLAGS $local_cflags -o $TMPE $TMPC $QEMU_LDFLAGS $local_ldflags
+  do_cc $CFLAGS $QEMU_CFLAGS $local_cflags -o $TMPE $TMPC $LDFLAGS $QEMU_LDFLAGS $local_ldflags
 }
 
 # symbolically link $1 to $2.  Portable version of "ln -sf".
@@ -597,15 +594,14 @@ ARFLAGS="${ARFLAGS-rv}"
 # left shift of signed integers is well defined and has the expected
 # 2s-complement style results. (Both clang and gcc agree that it
 # provides these semantics.)
-QEMU_CFLAGS="-fno-strict-aliasing -fno-common -fwrapv -std=gnu99 $QEMU_CFLAGS"
-QEMU_CFLAGS="-Wall -Wundef -Wwrite-strings -Wmissing-prototypes $QEMU_CFLAGS"
+QEMU_CFLAGS="-fno-strict-aliasing -fno-common -fwrapv $QEMU_CFLAGS"
+QEMU_CFLAGS="-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 ${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"
-fi
+CFLAGS="-std=gnu99 -Wall"
+
 
 # running configure in the source tree?
 # we know that's the case if configure is there.
@@ -886,7 +882,6 @@ SunOS)
   QEMU_CFLAGS="-D_XOPEN_SOURCE=600 $QEMU_CFLAGS"
 # needed for TIOCWIN* defines in termios.h
   QEMU_CFLAGS="-D__EXTENSIONS__ $QEMU_CFLAGS"
-  QEMU_CFLAGS="-std=gnu99 $QEMU_CFLAGS"
   solarisnetlibs="-lsocket -lnsl -lresolv"
   LIBS="$solarisnetlibs $LIBS"
   libs_qga="$solarisnetlibs $libs_qga"
@@ -2109,7 +2104,7 @@ EOF
   for flag in $gcc_flags; do
     # We need to check both a compile and a link, since some compiler
     # setups fail only on a .c->.o compile and some only at link time
-    if do_cc $QEMU_CFLAGS -Werror $flag -c -o $TMPO $TMPC &&
+    if compile_object "-Werror $flag" &&
        compile_prog "-Werror $flag" ""; then
       QEMU_CFLAGS="$QEMU_CFLAGS $flag"
       QEMU_LDFLAGS="$QEMU_LDFLAGS $flag"
@@ -2184,7 +2179,7 @@ fi
 
 if test "$static" = "yes"; then
   if test "$pie" != "no" && compile_prog "-Werror -fPIE -DPIE" "-static-pie"; then
-    QEMU_CFLAGS="-fPIE -DPIE $QEMU_CFLAGS"
+    CFLAGS="-fPIE -DPIE $CFLAGS"
     QEMU_LDFLAGS="-static-pie $QEMU_LDFLAGS"
     pie="yes"
   elif test "$pie" = "yes"; then
@@ -2194,11 +2189,11 @@ if test "$static" = "yes"; then
     pie="no"
   fi
 elif test "$pie" = "no"; then
-  QEMU_CFLAGS="$CFLAGS_NOPIE $QEMU_CFLAGS"
-  QEMU_LDFLAGS="$LDFLAGS_NOPIE $QEMU_LDFLAGS"
+  CFLAGS="$CFLAGS_NOPIE $CFLAGS"
+  LDFLAGS="$LDFLAGS_NOPIE $LDFLAGS"
 elif compile_prog "-Werror -fPIE -DPIE" "-pie"; then
-  QEMU_CFLAGS="-fPIE -DPIE $QEMU_CFLAGS"
-  QEMU_LDFLAGS="-pie $QEMU_LDFLAGS"
+  CFLAGS="-fPIE -DPIE $CFLAGS"
+  LDFLAGS="-pie $LDFLAGS"
   pie="yes"
 elif test "$pie" = "yes"; then
   error_exit "PIE not available due to missing toolchain support"
@@ -3981,7 +3976,7 @@ EOF
 if ! compile_prog "$glib_cflags -Werror" "$glib_libs" ; then
     if cc_has_warning_flag "-Wno-unknown-attributes"; then
         glib_cflags="-Wno-unknown-attributes $glib_cflags"
-        CFLAGS="-Wno-unknown-attributes $CFLAGS"
+        QEMU_CFLAGS="-Wno-unknown-attributes $CFLAGS"
     fi
 fi
 
@@ -6506,10 +6501,16 @@ if test "$gcov" = "yes" ; then
   QEMU_CFLAGS="-fprofile-arcs -ftest-coverage -g $QEMU_CFLAGS"
   QEMU_LDFLAGS="-fprofile-arcs -ftest-coverage $QEMU_LDFLAGS"
 elif test "$fortify_source" = "yes" ; then
-  CFLAGS="-O2 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 $CFLAGS"
-elif test "$debug" = "no"; then
+  QEMU_CFLAGS="-U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 $QEMU_CFLAGS"
+  debug=no
+fi
+if test "$debug" = "no"; then
   CFLAGS="-O2 $CFLAGS"
 fi
+if test "$debug_info" = "yes"; then
+  CFLAGS="-g $CFLAGS"
+  LDFLAGS="-g $LDFLAGS"
+fi
 
 if test "$have_asan" = "yes"; then
   QEMU_CFLAGS="-fsanitize=address $QEMU_CFLAGS"
@@ -7874,7 +7875,7 @@ if test "$fuzzing" = "yes" ; then
   if test "$have_fuzzer" = "yes"; then
     FUZZ_LDFLAGS=" -fsanitize=fuzzer"
     FUZZ_CFLAGS=" -fsanitize=fuzzer"
-    CFLAGS="$CFLAGS -fsanitize=fuzzer-no-link"
+    QEMU_CFLAGS="$QEMU_CFLAGS -fsanitize=fuzzer-no-link"
   else
     error_exit "Your compiler doesn't support -fsanitize=fuzzer"
     exit 1
@@ -7961,6 +7962,7 @@ echo "NM=$nm" >> $config_host_mak
 echo "PKG_CONFIG=$pkg_config_exe" >> $config_host_mak
 echo "WINDRES=$windres" >> $config_host_mak
 echo "CFLAGS=$CFLAGS" >> $config_host_mak
+echo "CXXFLAGS=$CXXFLAGS" >> $config_host_mak
 echo "CFLAGS_NOPIE=$CFLAGS_NOPIE" >> $config_host_mak
 echo "QEMU_CFLAGS=$QEMU_CFLAGS" >> $config_host_mak
 echo "QEMU_CXXFLAGS=$QEMU_CXXFLAGS" >> $config_host_mak
rules.mak +2 -2
index 56ba540..e79a400 100644
@@ -88,12 +88,12 @@ LINK = $(call quiet-command, $(LINKPROG) $(CFLAGS) $(QEMU_LDFLAGS) -o $@ \
 
 %.o: %.cc
 	$(call quiet-command,$(CXX) $(QEMU_LOCAL_INCLUDES) $(QEMU_INCLUDES) \
-	       $(QEMU_CXXFLAGS) $(QEMU_DGFLAGS) $(CFLAGS) $($@-cflags) \
+	       $(QEMU_CXXFLAGS) $(QEMU_DGFLAGS) $(CXXFLAGS) $($@-cflags) \
 	       -c -o $@ $<,"CXX","$(TARGET_DIR)$@")
 
 %.o: %.cpp
 	$(call quiet-command,$(CXX) $(QEMU_LOCAL_INCLUDES) $(QEMU_INCLUDES) \
-	       $(QEMU_CXXFLAGS) $(QEMU_DGFLAGS) $(CFLAGS) $($@-cflags) \
+	       $(QEMU_CXXFLAGS) $(QEMU_DGFLAGS) $(CXXFLAGS) $($@-cflags) \
 	       -c -o $@ $<,"CXX","$(TARGET_DIR)$@")
 
 %.o: %.m
Signature · 1 line
1.8.3.1
#17 lore raw

PATCH 14/147 tests/vm: include setuptools

In reply to Paolo Bonzini

They are a dependency of Meson, so install them.

---
 tests/vm/freebsd | 1 +
 tests/vm/netbsd  | 1 +
 tests/vm/openbsd | 1 +
 3 files changed, 3 insertions(+)
tests/vm/freebsd +1 -0
index 29252fa..b34b14f 100755
@@ -33,6 +33,7 @@ class FreeBSDVM(basevm.BaseVM):
         "pkgconf",
         "bzip2",
         "python37",
+        "py37-setuptools",
 
         # gnu tools
         "bash",
tests/vm/netbsd +1 -0
index 2e87199..93d48b6 100755
@@ -31,6 +31,7 @@ class NetBSDVM(basevm.BaseVM):
         "pkgconf",
         "xz",
         "python37",
+        "py37-setuptools",
 
         # gnu tools
         "bash",
tests/vm/openbsd +1 -0
index dfe633e..7e27fda 100755
@@ -30,6 +30,7 @@ class OpenBSDVM(basevm.BaseVM):
         "git",
         "pkgconf",
         "bzip2", "xz",
+        "py3-setuptools",
 
         # gnu tools
         "bash",
Signature · 1 line
1.8.3.1
#18 lore raw

PATCH 15/147 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.

build.ninja already provides tags/ctags/cscope rules, so they are removed.

---
 Makefile             |   28 +-
 configure            |   38 +-
 meson.build          |   20 +
 scripts/ninjatool.py | 1010 ++++++++++++++++++++++++++++++++++++++++++++++++++
 4 files changed, 1078 insertions(+), 18 deletions(-)
 create mode 100644 meson.build
 create mode 100755 scripts/ninjatool.py
Makefile +13 -15
index 9d94782..f42cbdb 100644
@@ -49,6 +49,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 config-host.mak
+	$(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
@@ -68,6 +77,8 @@ CONFIG_ALL=y
 -include config-all-devices.mak
 -include config-all-disas.mak
 
+build.ninja: meson-private/coredata.dat
+meson-private/coredata.dat: config-host.mak
 config-host.mak: $(SRC_PATH)/configure $(SRC_PATH)/pc-bios $(SRC_PATH)/VERSION
 	@echo $@ is out-of-date, running configure
 	@./config.status
@@ -933,6 +944,8 @@ ICON_SIZES=16x16 24x24 32x32 48x48 64x64 128x128 256x256 512x512
 install-includedir:
 	$(INSTALL_DIR) "$(DESTDIR)$(includedir)"
 
+# Needed by "meson install"
+export DESTDIR
 install: all $(if $(BUILD_DOCS),install-doc) \
 	install-datadir install-localstatedir install-includedir \
 	$(if $(INSTALL_BLOBS),$(edk2-decompressed)) \
@@ -1006,21 +1019,6 @@ endif
 	done
 	$(INSTALL_DATA) $(BUILD_DIR)/trace-events-all "$(DESTDIR)$(qemu_datadir)/trace-events-all"
 
-.PHONY: ctags
-ctags:
-	rm -f tags
-	find "$(SRC_PATH)" -name '*.[hc]' -exec ctags --append {} +
-
-.PHONY: TAGS
-TAGS:
-	rm -f TAGS
-	find "$(SRC_PATH)" -name '*.[hc]' -exec etags --append {} +
-
-cscope:
-	rm -f "$(SRC_PATH)"/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 $@)
configure +35 -3
index 9ce1189..ad5bd1a 100755
@@ -506,6 +506,7 @@ fuzzing="no"
 rng_none="no"
 secret_keyring=""
 libdaxctl=""
+meson=meson
 
 supported_cpu="no"
 supported_os="no"
@@ -1002,6 +1003,8 @@ for opt do
   ;;
   --sphinx-build=*) sphinx_build="$optarg"
   ;;
+  --meson=*) meson="$optarg"
+  ;;
   --gcov=*) gcov_tool="$optarg"
   ;;
   --smbd=*) smbd="$optarg"
@@ -1767,6 +1770,7 @@ Advanced options (experts only):
   --install=INSTALL        use specified install [$install]
   --python=PYTHON          use specified python [$python]
   --sphinx-build=SPHINX    use specified sphinx-build [$sphinx_build]
+  --meson=MESON            use specified meson [$meson]
   --smbd=SMBD              use specified smbd [$smbd]
   --with-git=GIT           use specified git [$git]
   --static                 enable static build [$static]
@@ -1974,6 +1978,12 @@ python_version=$($python -c 'import sys; print("%d.%d.%d" % (sys.version_info[0]
 # Suppress writing compiled files
 python="$python -B"
 
+if ! has "$meson"
+then
+    error_exit "Meson not found. Use --meson=/path/to/meson"
+fi
+meson=$(command -v $meson)
+
 # Check that the C compiler works. Doing this here before testing
 # the host CPU ensures that we had a valid CC to autodetect the
 # $cpu var (and we should bail right here if that's not the case).
@@ -6504,13 +6514,13 @@ elif test "$fortify_source" = "yes" ; then
   QEMU_CFLAGS="-U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 $QEMU_CFLAGS"
   debug=no
 fi
-if test "$debug" = "no"; then
-  CFLAGS="-O2 $CFLAGS"
-fi
 if test "$debug_info" = "yes"; then
   CFLAGS="-g $CFLAGS"
   LDFLAGS="-g $LDFLAGS"
 fi
+if test "$debug" = "no"; then
+  CFLAGS="-O2 $CFLAGS"
+fi
 
 if test "$have_asan" = "yes"; then
   QEMU_CFLAGS="-fsanitize=address $QEMU_CFLAGS"
@@ -7943,6 +7953,7 @@ echo "PYTHON=$python" >> $config_host_mak
 echo "SPHINX_BUILD=$sphinx_build" >> $config_host_mak
 echo "SPHINX_WERROR=$sphinx_werror" >> $config_host_mak
 echo "GENISOIMAGE=$genisoimage" >> $config_host_mak
+echo "MESON=$meson" >> $config_host_mak
 echo "CC=$cc" >> $config_host_mak
 if $iasl -h > /dev/null 2>&1; then
   echo "IASL=$iasl" >> $config_host_mak
@@ -8571,6 +8582,27 @@ 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-logs/ meson-info/
+NINJA=$PWD/ninjatool $meson setup \
+        --prefix "$prefix" \
+        --libdir "$libdir" \
+        --libexecdir "$libexecdir" \
+        --bindir "$bindir" \
+        --includedir "$includedir" \
+        --datadir "$datadir" \
+        --mandir "$mandir" \
+        --sysconfdir "$sysconfdir" \
+        --localstatedir "$local_statedir" \
+        -Doptimization=$(if test "$debug" = yes; then echo 0; else echo 2; fi) \
+        -Ddebug=$(if test "$debug_info" = yes; then echo true; else echo false; fi) \
+        -Dwerror=$(if test "$werror" = yes; then echo true; else echo false; fi) \
+        -Dstrip=$(if test "$strip_opt" = yes; then echo true; else echo false; 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 +20 -0
new file mode 100644
index 0000000..4ed1566
@@ -0,0 +1,20 @@
+project('qemu', ['c', 'cpp'], meson_version: '>=0.55.0',
+        default_options: ['warning_level=1', 'c_std=gnu99', 'cpp_std=gnu++11', 'b_lundef=false'],
+        version: run_command('head', meson.source_root() / 'VERSION').stdout().strip())
+
+not_found = dependency('', required: false)
+keyval = import('unstable-keyval')
+config_host = keyval.load(meson.current_build_dir() / 'config-host.mak')
+
+add_project_arguments(config_host['QEMU_CFLAGS'].split(),
+                      language: ['c', 'objc'])
+add_project_arguments(config_host['QEMU_CXXFLAGS'].split(),
+                      language: 'cpp')
+add_project_link_arguments(config_host['QEMU_LDFLAGS'].split(),
+                           language: ['c', 'cpp', 'objc'])
+add_project_arguments(config_host['QEMU_INCLUDES'].split(),
+                      language: ['c', 'cpp', 'objc'])
+
+configure_file(input: files('scripts/ninjatool.py'),
+               output: 'ninjatool',
+               configuration: config_host)
scripts/ninjatool.py new file +1010 -0

1,010 lines not on this page · raw message

Signature · 1 line
1.8.3.1
#19 lore raw

PATCH 16/147 configure: generate Meson cross file

In reply to Paolo Bonzini

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

---
 configure | 45 +++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 45 insertions(+)
configure +45 -0
index ad5bd1a..f38c783 100755
@@ -8582,6 +8582,49 @@ 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
+        ;;
+    ppc64le)
+        echo "cpu_family = 'ppc64'" >> $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-logs/ meson-info/
 NINJA=$PWD/ninjatool $meson setup \
         --prefix "$prefix" \
@@ -8597,11 +8640,13 @@ NINJA=$PWD/ninjatool $meson setup \
         -Ddebug=$(if test "$debug_info" = yes; then echo true; else echo false; fi) \
         -Dwerror=$(if test "$werror" = yes; then echo true; else echo false; fi) \
         -Dstrip=$(if test "$strip_opt" = yes; then echo true; else echo false; fi) \
+        $cross_arg \
         "$PWD" "$source_path"
 
 if test "$?" -ne 0 ; then
     error_exit "meson setup failed"
 fi
+touch ninjatool.stamp
 
 # Save the configure command line for later reuse.
 cat <<EOD >config.status
Signature · 1 line
1.8.3.1
#20 lore raw

PATCH 17/147 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 e79a400..5ab42de 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
#21 lore raw

PATCH 18/147 build-sys: add meson submodule

In reply to Paolo Bonzini

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

---
 .gitmodules               |  3 +++
 configure                 | 53 ++++++++++++++++++++++++++++++++++++++++++-----
 meson                     |  1 +
 scripts/archive-source.sh |  3 ++-
 4 files changed, 54 insertions(+), 6 deletions(-)
 create mode 160000 meson
.gitmodules +3 -0
index 9c0501a..ce97939 100644
@@ -58,3 +58,6 @@
 [submodule "roms/qboot"]
 	path = roms/qboot
 	url = https://github.com/bonzini/qboot
+[submodule "meson"]
+	path = meson
+	url = https://github.com/mesonbuild/meson/
configure +48 -5

72 lines not on this page · raw message

meson new file +1 -0
new file mode 160000
index 0000000..d0c68dc
@@ -0,0 +1 @@
+Subproject commit d0c68dc11507a47b9b85de508e023d9590d60565
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
#22 lore raw

PATCH 19/147 meson: move summary to meson.build

In reply to Paolo Bonzini
---
 configure   | 235 ---------------------------------------------------------
 meson.build | 247 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 247 insertions(+), 235 deletions(-)
configure +0 -235
index 5806f92..9b6f0d9 100755
@@ -527,8 +527,6 @@ secret_keyring=""
 libdaxctl=""
 meson=""
 
-supported_cpu="no"
-supported_os="no"
 bogus_os="no"
 malloc_trim=""
 
@@ -767,35 +765,27 @@ ARCH=
 # Note that this case should only have supported host CPUs, not guests.
 case "$cpu" in
   ppc|ppc64|s390x|sparc64|x32|riscv32|riscv64)
-    supported_cpu="yes"
   ;;
   ppc64le)
     ARCH="ppc64"
-    supported_cpu="yes"
   ;;
   i386|i486|i586|i686|i86pc|BePC)
     cpu="i386"
-    supported_cpu="yes"
   ;;
   x86_64|amd64)
     cpu="x86_64"
-    supported_cpu="yes"
   ;;
   armv*b|armv*l|arm)
     cpu="arm"
-    supported_cpu="yes"
   ;;
   aarch64)
     cpu="aarch64"
-    supported_cpu="yes"
   ;;
   mips*)
     cpu="mips"
-    supported_cpu="yes"
   ;;
   sparc|sun4[cdmuv])
     cpu="sparc"
-    supported_cpu="yes"
   ;;
   *)
     # This will result in either an error or falling back to TCI later
@@ -823,7 +813,6 @@ MINGW32*)
     audio_drv_list=""
   fi
   supported_os="yes"
-  pie="no"
 ;;
 GNU/kFreeBSD)
   bsd="yes"
@@ -841,7 +830,6 @@ FreeBSD)
   libs_qga="-lutil $libs_qga"
   netmap=""  # enable netmap autodetect
   HOST_VARIANT_DIR="freebsd"
-  supported_os="yes"
 ;;
 DragonFly)
   bsd="yes"
@@ -858,7 +846,6 @@ NetBSD)
   audio_possible_drivers="oss sdl"
   oss_lib="-lossaudio"
   HOST_VARIANT_DIR="netbsd"
-  supported_os="yes"
 ;;
 OpenBSD)
   bsd="yes"
@@ -866,7 +853,6 @@ OpenBSD)
   audio_drv_list="try-sdl"
   audio_possible_drivers="sdl"
   HOST_VARIANT_DIR="openbsd"
-  supported_os="yes"
 ;;
 Darwin)
   bsd="yes"
@@ -887,7 +873,6 @@ Darwin)
   # won't work when we're compiling with gcc as a C compiler.
   QEMU_CFLAGS="-DOS_OBJECT_USE_OBJC=0 $QEMU_CFLAGS"
   HOST_VARIANT_DIR="darwin"
-  supported_os="yes"
 ;;
 SunOS)
   solaris="yes"
@@ -918,7 +903,6 @@ Linux)
   linux_user="yes"
   kvm="yes"
   QEMU_INCLUDES="-isystem ${source_path}/linux-headers -I$PWD/linux-headers $QEMU_INCLUDES"
-  supported_os="yes"
   libudev="yes"
 ;;
 esac
@@ -6860,225 +6844,6 @@ QEMU_CFLAGS="$pixman_cflags $fdt_cflags $QEMU_CFLAGS"
 QEMU_LDFLAGS="$fdt_ldflags $QEMU_LDFLAGS"
 libs_softmmu="$pixman_libs $libs_softmmu"
 
-echo "Install prefix    $prefix"
-echo "BIOS directory    $(eval echo $qemu_datadir)"
-echo "firmware path     $(eval echo $firmwarepath)"
-echo "binary directory  $(eval echo $bindir)"
-echo "library directory $(eval echo $libdir)"
-echo "module directory  $(eval echo $qemu_moddir)"
-echo "libexec directory $(eval echo $libexecdir)"
-echo "include directory $(eval echo $includedir)"
-echo "config directory  $(eval echo $sysconfdir)"
-if test "$mingw32" = "no" ; then
-echo "local state directory   $(eval echo $local_statedir)"
-echo "Manual directory  $(eval echo $mandir)"
-echo "ELF interp prefix $interp_prefix"
-else
-echo "local state directory   queried at runtime"
-echo "Windows SDK       $win_sdk"
-fi
-echo "Build directory   $(pwd)"
-echo "Source path       $source_path"
-echo "GIT binary        $git"
-echo "GIT submodules    $git_submodules"
-echo "C compiler        $cc"
-echo "Host C compiler   $host_cc"
-echo "C++ compiler      $cxx"
-echo "Objective-C compiler $objcc"
-echo "ARFLAGS           $ARFLAGS"
-echo "CFLAGS            $CFLAGS"
-echo "QEMU_CFLAGS       $QEMU_CFLAGS"
-echo "QEMU_LDFLAGS      $QEMU_LDFLAGS"
-echo "make              $make"
-echo "install           $install"
-echo "python            $python ($python_version)"
-if test "$docs" != "no"; then
-    echo "sphinx-build      $sphinx_build"
-fi
-echo "genisoimage       $genisoimage"
-echo "slirp support     $slirp $(echo_version $slirp $slirp_version)"
-if test "$slirp" != "no" ; then
-    echo "smbd              $smbd"
-fi
-echo "module support    $modules"
-echo "alt path mod load $module_upgrades"
-echo "host CPU          $cpu"
-echo "host big endian   $bigendian"
-echo "target list       $target_list"
-echo "gprof enabled     $gprof"
-echo "sparse enabled    $sparse"
-echo "strip binaries    $strip_opt"
-echo "profiler          $profiler"
-echo "static build      $static"
-echo "safe stack        $safe_stack"
-if test "$darwin" = "yes" ; then
-    echo "Cocoa support     $cocoa"
-fi
-echo "SDL support       $sdl $(echo_version $sdl $sdlversion)"
-echo "SDL image support $sdl_image"
-echo "GTK support       $gtk $(echo_version $gtk $gtk_version)"
-echo "GTK GL support    $gtk_gl"
-echo "VTE support       $vte $(echo_version $vte $vteversion)"
-echo "TLS priority      $tls_priority"
-echo "GNUTLS support    $gnutls"
-echo "libgcrypt         $gcrypt"
-if test "$gcrypt" = "yes"
-then
-   echo "  hmac            $gcrypt_hmac"
-   echo "  XTS             $gcrypt_xts"
-fi
-echo "nettle            $nettle $(echo_version $nettle $nettle_version)"
-if test "$nettle" = "yes"
-then
-   echo "  XTS             $nettle_xts"
-fi
-echo "libtasn1          $tasn1"
-echo "PAM               $auth_pam"
-echo "iconv support     $iconv"
-echo "curses support    $curses"
-echo "virgl support     $virglrenderer $(echo_version $virglrenderer $virgl_version)"
-echo "curl support      $curl"
-echo "mingw32 support   $mingw32"
-echo "Audio drivers     $audio_drv_list"
-echo "Block whitelist (rw) $block_drv_rw_whitelist"
-echo "Block whitelist (ro) $block_drv_ro_whitelist"
-echo "VirtFS support    $virtfs"
-echo "Multipath support $mpath"
-echo "VNC support       $vnc"
-if test "$vnc" = "yes" ; then
-    echo "VNC SASL support  $vnc_sasl"
-    echo "VNC JPEG support  $vnc_jpeg"
-    echo "VNC PNG support   $vnc_png"
-fi
-echo "xen support       $xen"
-if test "$xen" = "yes" ; then
-  echo "xen ctrl version  $xen_ctrl_version"
-fi
-echo "brlapi support    $brlapi"
-echo "Documentation     $docs"
-echo "PIE               $pie"
-echo "vde support       $vde"
-echo "netmap support    $netmap"
-echo "Linux AIO support $linux_aio"
-echo "Linux io_uring support $linux_io_uring"
-echo "ATTR/XATTR support $attr"
-echo "Install blobs     $blobs"
-echo "KVM support       $kvm"
-echo "HAX support       $hax"
-echo "HVF support       $hvf"
-echo "WHPX support      $whpx"
-echo "TCG support       $tcg"
-if test "$tcg" = "yes" ; then
-    echo "TCG debug enabled $debug_tcg"
-    echo "TCG interpreter   $tcg_interpreter"
-fi
-echo "malloc trim support $malloc_trim"
-echo "RDMA support      $rdma"
-echo "PVRDMA support    $pvrdma"
-echo "fdt support       $fdt"
-echo "membarrier        $membarrier"
-echo "preadv support    $preadv"
-echo "fdatasync         $fdatasync"
-echo "madvise           $madvise"
-echo "posix_madvise     $posix_madvise"
-echo "posix_memalign    $posix_memalign"
-echo "libcap-ng support $cap_ng"
-echo "vhost-net support $vhost_net"
-echo "vhost-crypto support $vhost_crypto"
-echo "vhost-scsi support $vhost_scsi"
-echo "vhost-vsock support $vhost_vsock"
-echo "vhost-user support $vhost_user"
-echo "vhost-user-fs support $vhost_user_fs"
-echo "vhost-vdpa support $vhost_vdpa"
-echo "Trace backends    $trace_backends"
-if have_backend "simple"; then
-echo "Trace output file $trace_file-<pid>"
-fi
-echo "spice support     $spice $(echo_version $spice $spice_protocol_version/$spice_server_version)"
-echo "rbd support       $rbd"
-echo "xfsctl support    $xfs"
-echo "smartcard support $smartcard"
-echo "libusb            $libusb"
-echo "usb net redir     $usb_redir"
-echo "OpenGL support    $opengl"
-echo "OpenGL dmabufs    $opengl_dmabuf"
-echo "libiscsi support  $libiscsi"
-echo "libnfs support    $libnfs"
-echo "build guest agent $guest_agent"
-echo "QGA VSS support   $guest_agent_with_vss"
-echo "QGA w32 disk info $guest_agent_ntddscsi"
-echo "QGA MSI support   $guest_agent_msi"
-echo "seccomp support   $seccomp"
-echo "coroutine backend $coroutine"
-echo "coroutine pool    $coroutine_pool"
-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"
-echo "QOM debugging     $qom_cast_debug"
-echo "Live block migration $live_block_migration"
-echo "lzo support       $lzo"
-echo "snappy support    $snappy"
-echo "bzip2 support     $bzip2"
-echo "lzfse support     $lzfse"
-echo "zstd support      $zstd"
-echo "NUMA host support $numa"
-echo "libxml2           $libxml2"
-echo "tcmalloc support  $tcmalloc"
-echo "jemalloc support  $jemalloc"
-echo "avx2 optimization $avx2_opt"
-echo "avx512f optimization $avx512f_opt"
-echo "replication support $replication"
-echo "bochs support     $bochs"
-echo "cloop support     $cloop"
-echo "dmg support       $dmg"
-echo "qcow v1 support   $qcow1"
-echo "vdi support       $vdi"
-echo "vvfat support     $vvfat"
-echo "qed support       $qed"
-echo "parallels support $parallels"
-echo "sheepdog support  $sheepdog"
-echo "capstone          $capstone"
-echo "libpmem support   $libpmem"
-echo "libdaxctl support $libdaxctl"
-echo "libudev           $libudev"
-echo "default devices   $default_devices"
-echo "plugin support    $plugins"
-echo "fuzzing support   $fuzzing"
-echo "gdb               $gdb_bin"
-echo "rng-none          $rng_none"
-echo "Linux keyring     $secret_keyring"
-
-if test "$supported_cpu" = "no"; then
-    echo
-    echo "WARNING: SUPPORT FOR THIS HOST CPU WILL GO AWAY IN FUTURE RELEASES!"
-    echo
-    echo "CPU host architecture $cpu support is not currently maintained."
-    echo "The QEMU project intends to remove support for this host CPU in"
-    echo "a future release if nobody volunteers to maintain it and to"
-    echo "provide a build host for our continuous integration setup."
-    echo "configure has succeeded and you can continue to build, but"
-    echo "if you care about QEMU on this platform you should contact"
-    echo "us upstream at [email protected]."
-fi
-
-if test "$supported_os" = "no"; then
-    echo
-    echo "WARNING: SUPPORT FOR THIS HOST OS WILL GO AWAY IN FUTURE RELEASES!"
-    echo
-    echo "Host OS $targetos support is not currently maintained."
-    echo "The QEMU project intends to remove support for this host OS in"
-    echo "a future release if nobody volunteers to maintain it and to"
-    echo "provide a build host for our continuous integration setup."
-    echo "configure has succeeded and you can continue to build, but"
-    echo "if you care about QEMU on this platform you should contact"
-    echo "us upstream at [email protected]."
-fi
-
 config_host_mak="config-host.mak"
 
 echo "# Automatically generated by configure - do not modify" >config-all-disas.mak
meson.build +247 -0

253 lines not on this page · raw message

Signature · 1 line
1.8.3.1
#23 lore raw

PATCH 20/147 meson: enable pie

In reply to Paolo Bonzini

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

---
 configure | 1 +
 1 file changed, 1 insertion(+)
configure +1 -0
index 9b6f0d9..91f518a 100755
@@ -8448,6 +8448,7 @@ NINJA=$PWD/ninjatool $meson setup \
         -Ddebug=$(if test "$debug_info" = yes; then echo true; else echo false; fi) \
         -Dwerror=$(if test "$werror" = yes; then echo true; else echo false; fi) \
         -Dstrip=$(if test "$strip_opt" = yes; then echo true; else echo false; 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
#24 lore raw

PATCH 21/147 meson: use coverage option

In reply to Paolo Bonzini

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

---
 Makefile               | 14 --------------
 Makefile.target        | 16 ----------------
 configure              |  9 ++-------
 docs/devel/testing.rst |  7 +++----
 meson.build            |  2 +-
 5 files changed, 6 insertions(+), 42 deletions(-)
Makefile +0 -14
index f42cbdb..1da5927 100644
@@ -765,14 +765,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
@@ -1275,9 +1267,6 @@ endif
 		echo '')
 	@echo  'Cleaning targets:'
 	$(call print-help,clean,Remove most generated files but keep the config)
-ifdef CONFIG_GCOV
-	$(call print-help,clean-coverage,Remove coverage files)
-endif
 	$(call print-help,distclean,Remove all generated files)
 	$(call print-help,dist,Build a distributable tarball)
 	@echo  ''
@@ -1288,9 +1277,6 @@ endif
 	@echo  ''
 	@echo  'Documentation targets:'
 	$(call print-help,html info pdf txt,Build documentation in specified format)
-ifdef CONFIG_GCOV
-	$(call print-help,coverage-report,Create code coverage report)
-endif
 	@echo  ''
 ifdef CONFIG_WIN32
 	@echo  'Windows targets:'
Makefile.target +0 -16
index ffa2657..d61a6a9 100644
@@ -269,19 +269,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 -7
index 91f518a..94cf0a3 100755
@@ -424,7 +424,6 @@ tcg_interpreter="no"
 bigendian="no"
 mingw32="no"
 gcov="no"
-gcov_tool="gcov"
 EXESUF=""
 DSOSUF=".so"
 LDFLAGS_SHARED="-shared"
@@ -1008,8 +1007,6 @@ for opt do
   ;;
   --meson=*) meson="$optarg"
   ;;
-  --gcov=*) gcov_tool="$optarg"
-  ;;
   --smbd=*) smbd="$optarg"
   ;;
   --extra-cflags=*)
@@ -1816,7 +1813,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)
@@ -6535,8 +6531,7 @@ fi
 write_c_skeleton
 
 if test "$gcov" = "yes" ; then
-  QEMU_CFLAGS="-fprofile-arcs -ftest-coverage -g $QEMU_CFLAGS"
-  QEMU_LDFLAGS="-fprofile-arcs -ftest-coverage $QEMU_LDFLAGS"
+  :
 elif test "$fortify_source" = "yes" ; then
   QEMU_CFLAGS="-U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 $QEMU_CFLAGS"
   debug=no
@@ -7809,7 +7804,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
@@ -8449,6 +8443,7 @@ NINJA=$PWD/ninjatool $meson setup \
         -Dwerror=$(if test "$werror" = yes; then echo true; else echo false; fi) \
         -Dstrip=$(if test "$strip_opt" = yes; then echo true; else echo false; 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 c1ff243..a426469 100644
@@ -164,13 +164,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``
meson.build +1 -1
index cc08534..b368929 100644
@@ -199,7 +199,7 @@ summary_info += {'debug stack usage': config_host.has_key('CONFIG_DEBUG_STACK_US
 summary_info += {'mutex debugging':   config_host.has_key('CONFIG_DEBUG_MUTEX')}
 summary_info += {'crypto afalg':      config_host.has_key('CONFIG_AF_ALG')}
 summary_info += {'GlusterFS support': config_host.has_key('CONFIG_GLUSTERFS')}
-summary_info += {'gcov':              config_host.has_key('CONFIG_GCOV')}
+summary_info += {'gcov':              get_option('b_coverage')}
 summary_info += {'TPM support':       config_host.has_key('CONFIG_TPM')}
 summary_info += {'libssh support':    config_host.has_key('CONFIG_LIBSSH')}
 summary_info += {'QOM debugging':     config_host.has_key('CONFIG_QOM_CAST_DEBUG')}
Signature · 1 line
1.8.3.1
#25 lore raw

PATCH 22/147 meson: add sparse support

In reply to Paolo Bonzini

Do not use cgcc; instead, extract compilation commands from compile_commands.json and invoke sparse directly.

---
 Makefile                |  1 +
 configure               |  8 ++------
 meson.build             |  7 +++++++
 scripts/check_sparse.py | 25 +++++++++++++++++++++++++
 4 files changed, 35 insertions(+), 6 deletions(-)
 create mode 100644 scripts/check_sparse.py
Makefile +1 -0
index 1da5927..12c68a2 100644
@@ -1245,6 +1245,7 @@ endif
 	$(call print-help,install,Install QEMU, documentation and tools)
 	$(call print-help,ctags/TAGS,Generate tags file for editors)
 	$(call print-help,cscope,Generate cscope index)
+	$(call print-help,sparse,Run sparse on the QEMU source)
 	@echo  ''
 	@$(if $(TARGET_DIRS), \
 		echo 'Architecture specific targets:'; \
configure +2 -6
index 94cf0a3..53527f6 100755
@@ -2991,7 +2991,7 @@ fi
 ##########################################
 # Sparse probe
 if test "$sparse" != "no" ; then
-  if has cgcc; then
+  if has sparse; then
     sparse=yes
   else
     if test "$sparse" = "yes" ; then
@@ -7782,11 +7782,7 @@ echo "QEMU_CFLAGS=$QEMU_CFLAGS" >> $config_host_mak
 echo "QEMU_CXXFLAGS=$QEMU_CXXFLAGS" >> $config_host_mak
 echo "QEMU_INCLUDES=$QEMU_INCLUDES" >> $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
-  echo "CXX          := REAL_CC=\"\$(CXX)\" cgcc"      >> $config_host_mak
-  echo "HOST_CC      := REAL_CC=\"\$(HOST_CC)\" cgcc"  >> $config_host_mak
-  echo "QEMU_CFLAGS  += -Wbitwise -Wno-transparent-union -Wno-old-initializer -Wno-non-pointer-null" >> $config_host_mak
+  echo "SPARSE_CFLAGS = -Wbitwise -Wno-transparent-union -Wno-old-initializer -Wno-non-pointer-null" >> $config_host_mak
 fi
 echo "QEMU_LDFLAGS=$QEMU_LDFLAGS" >> $config_host_mak
 echo "LDFLAGS_NOPIE=$LDFLAGS_NOPIE" >> $config_host_mak
meson.build +7 -0
index b368929..e227b43 100644
@@ -17,6 +17,13 @@ add_project_arguments(config_host['QEMU_INCLUDES'].split(),
 
 python = import('python').find_installation(config_host['PYTHON'].split()[0])
 
+if 'SPARSE_CFLAGS' in config_host
+  run_target('sparse',
+             command: [find_program('scripts/check_sparse.py'),
+                       config_host['SPARSE_CFLAGS'].split(),
+                       'compile_commands.json'])
+endif
+
 if host_machine.system() == 'darwin'
   add_languages('objc', required: false)
 endif
scripts/check_sparse.py new file +25 -0
new file mode 100644
index 0000000..0de7aa5
@@ -0,0 +1,25 @@
+#! /usr/bin/env python3
+
+# Invoke sparse based on the contents of compile_commands.json
+
+import json
+import subprocess
+import sys
+import shlex
+
+def extract_cflags(shcmd):
+    cflags = shlex.split(shcmd)
+    return [x for x in cflags
+            if x.startswith('-D') or x.startswith('-I') or x.startswith('-W')
+               or x.startswith('-std=')]
+
+cflags = sys.argv[1:-1]
+with open(sys.argv[-1], 'r') as fd:
+    compile_commands = json.load(fd)
+
+for cmd in compile_commands:
+    cmd = ['sparse'] + cflags + extract_cflags(cmd['command']) + [cmd['file']]
+    print(' '.join((shlex.quote(x) for x in cmd)))
+    r = subprocess.run(cmd)
+    if r.returncode != 0:
+        sys.exit(r.returncode)
Signature · 1 line
1.8.3.1
#26 lore raw

PATCH 23/147 meson: add testsuite Makefile generator

In reply to Paolo Bonzini

Rules to execute tests are generated by a simple Python program that integrates into the existing "make check" mechanism. This provides familiarity for developers, and also allows piecewise conversion of the testsuite Makefiles to meson.

The generated rules are based on QEMU's existing test harness Makefile and TAP parser.

---
 Makefile               |   4 ++
 scripts/mtest2make.py  | 102 +++++++++++++++++++++++++++++++++++++++++++++++++
 tests/Makefile.include |   1 -
 3 files changed, 106 insertions(+), 1 deletion(-)
 create mode 100644 scripts/mtest2make.py
Makefile +4 -0
index 12c68a2..7d9d4e5 100644
@@ -58,6 +58,10 @@ ninjatool: ninjatool.stamp
 ninjatool.stamp: $(SRC_PATH)/scripts/ninjatool.py config-host.mak
 	$(MESON) setup --reconfigure . $(SRC_PATH) && touch $@
 
+Makefile.mtest: build.ninja scripts/mtest2make.py
+	$(MESON) introspect --tests | $(PYTHON) scripts/mtest2make.py > $@
+-include Makefile.mtest
+
 .git-submodule-status: git-submodule-update config-host.mak
 
 # Check that we're not trying to do an out-of-tree build from
scripts/mtest2make.py new file +102 -0

102 lines not on this page · raw message

tests/Makefile.include +0 -1
index c7e4646..ad54100 100644
@@ -674,7 +674,6 @@ check-report-unit.tap: $(check-unit-y)
 # Reports and overall runs
 
 check-report.tap: $(patsubst %,check-report-qtest-%.tap, $(QTEST_TARGETS)) check-report-unit.tap
-	$(call quiet-command, cat $^ | scripts/tap-merge.pl >$@,"GEN","$@")
 
 # FPU Emulation tests (aka softfloat)
 #
Signature · 1 line
1.8.3.1
#27 lore raw

PATCH 24/147 libqemuutil, qapi, trace: 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.

---
 Makefile                            | 228 ++++++------------------------------
 Makefile.objs                       |  95 ---------------
 Makefile.target                     |   8 +-
 configure                           |   8 ++
 crypto/Makefile.objs                |   6 -
 crypto/meson.build                  |  11 ++
 docs/devel/tracing.txt              |   2 +-
 meson.build                         | 194 ++++++++++++++++++++++++++++++
 qapi/Makefile.objs                  |  23 ----
 qapi/meson.build                    | 120 +++++++++++++++++++
 qobject/Makefile.objs               |   3 -
 qobject/meson.build                 |   3 +
 rules.mak                           |   2 +-
 scripts/qapi-gen.py                 |   0
 scripts/tracetool.py                |   0
 scripts/tracetool/backend/dtrace.py |   2 +-
 scripts/tracetool/backend/ust.py    |   6 +-
 storage-daemon/Makefile.objs        |   4 +-
 storage-daemon/meson.build          |   1 +
 storage-daemon/qapi/Makefile.objs   |   1 -
 storage-daemon/qapi/meson.build     |  10 ++
 stubs/Makefile.objs                 |  56 ---------
 stubs/meson.build                   |  50 ++++++++
 trace/Makefile.objs                 |  51 --------
 trace/meson.build                   |  76 ++++++++++++
 util/Makefile.objs                  |  83 -------------
 util/meson.build                    |  68 +++++++++++
 27 files changed, 586 insertions(+), 525 deletions(-)
 create mode 100644 crypto/meson.build
 create mode 100644 qapi/meson.build
 delete mode 100644 qobject/Makefile.objs
 create mode 100644 qobject/meson.build
 mode change 100755 => 100644 scripts/qapi-gen.py
 mode change 100755 => 100644 scripts/tracetool.py
 create mode 100644 storage-daemon/meson.build
 delete mode 100644 storage-daemon/qapi/Makefile.objs
 create mode 100644 storage-daemon/qapi/meson.build
 delete mode 100644 stubs/Makefile.objs
 create mode 100644 stubs/meson.build
 create mode 100644 trace/meson.build
 delete mode 100644 util/Makefile.objs
 create mode 100644 util/meson.build
Makefile +34 -194
index 7d9d4e5..0811fd5 100644
@@ -121,184 +121,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-init-commands.h qapi/qapi-init-commands.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
-
-# The following list considers only the storage daemon main module. All other
-# modules are currently shared with the main schema, so we don't actually
-# generate additional files.
-
-GENERATED_STORAGE_DAEMON_QAPI_FILES = storage-daemon/qapi/qapi-commands.h
-GENERATED_STORAGE_DAEMON_QAPI_FILES += storage-daemon/qapi/qapi-commands.c
-GENERATED_STORAGE_DAEMON_QAPI_FILES += storage-daemon/qapi/qapi-emit-events.h
-GENERATED_STORAGE_DAEMON_QAPI_FILES += storage-daemon/qapi/qapi-emit-events.c
-GENERATED_STORAGE_DAEMON_QAPI_FILES += storage-daemon/qapi/qapi-events.h
-GENERATED_STORAGE_DAEMON_QAPI_FILES += storage-daemon/qapi/qapi-events.c
-GENERATED_STORAGE_DAEMON_QAPI_FILES += storage-daemon/qapi/qapi-init-commands.h
-GENERATED_STORAGE_DAEMON_QAPI_FILES += storage-daemon/qapi/qapi-init-commands.c
-GENERATED_STORAGE_DAEMON_QAPI_FILES += storage-daemon/qapi/qapi-introspect.h
-GENERATED_STORAGE_DAEMON_QAPI_FILES += storage-daemon/qapi/qapi-introspect.c
-GENERATED_STORAGE_DAEMON_QAPI_FILES += storage-daemon/qapi/qapi-types.h
-GENERATED_STORAGE_DAEMON_QAPI_FILES += storage-daemon/qapi/qapi-types.c
-GENERATED_STORAGE_DAEMON_QAPI_FILES += storage-daemon/qapi/qapi-visit.h
-GENERATED_STORAGE_DAEMON_QAPI_FILES += storage-daemon/qapi/qapi-visit.c
-GENERATED_STORAGE_DAEMON_QAPI_FILES += storage-daemon/qapi/qapi-doc.texi
-
-generated-files-y += $(GENERATED_QAPI_FILES)
-generated-files-y += $(GENERATED_STORAGE_DAEMON_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/trace-root.h
-TRACE_SOURCES = trace/trace-root.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 += $(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')
-trace-group-suffix = $(shell echo $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")
 
-define __trace_rules
-TRACE_HEADERS += trace/trace-$2.h
-TRACE_SOURCES += trace/trace-$2.c
-trace-obj-y += trace/trace-$2.o
-trace/trace-$2.h: trace/trace-$2.h-timestamp
-	@cmp $$< $$@ >/dev/null 2>&1 || cp $$< $$@
-trace/trace-$2.h-timestamp: $(SRC_PATH)/$1/trace-events $(tracetool-y) $(BUILD_DIR)/config-host.mak
-	$(call quiet-command,$(TRACETOOL) \
-		--group=$2 \
-		--format=h \
-		--backends=$(TRACE_BACKENDS) \
-		$$< > $$@,"GEN","$$(@:%-timestamp=%)")
-
-trace/trace-$2.c: trace/trace-$2.c-timestamp
-	@cmp $$< $$@ >/dev/null 2>&1 || cp $$< $$@
-trace/trace-$2.c-timestamp: $(SRC_PATH)/$1/trace-events $(tracetool-y) $(BUILD_DIR)/config-host.mak
-	$(call quiet-command,$(TRACETOOL) \
-		--group=$2 \
-		--format=c \
-		--backends=$(TRACE_BACKENDS) \
-		$$< > $$@,"GEN","$$(@:%-timestamp=%)")
-endef
-
-%/trace-ust.h: %/trace-ust.h-timestamp
+trace/generated-helpers-wrappers.h: trace/generated-helpers-wrappers.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/trace-root.h: trace/trace-root.h-timestamp
-	@cmp $< $@ >/dev/null 2>&1 || cp $< $@
-trace/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/trace-root.c: trace/trace-root.c-timestamp
+trace/generated-helpers.h: trace/generated-helpers.h-timestamp
 	@cmp $< $@ >/dev/null 2>&1 || cp $< $@
-trace/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
@@ -469,10 +345,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 \
@@ -493,14 +367,7 @@ dummy := $(call unnest-vars,, \
                 qom-obj-y \
                 io-obj-y \
                 common-obj-y \
-                common-obj-m \
-                trace-obj-y)
-
-dummy := $(foreach DIR,$(trace-events-subdirs),$(eval $(call __trace_rules,$(DIR),$(call trace-group-suffix,$(DIR)))))
-
-generated-files-y += $(TRACE_HEADERS)
-generated-files-y += $(TRACE_SOURCES)
-
+                common-obj-m)
 
 include $(SRC_PATH)/tests/Makefile.include
 
@@ -614,8 +481,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)
 
 ######################################################################
 
@@ -678,27 +544,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=%)")
-	@>$@
-
-qapi-modules-storage-daemon = \
-	$(SRC_PATH)/storage-daemon/qapi/qapi-schema.json \
-    $(QAPI_MODULES_STORAGE_DAEMON:%=$(SRC_PATH)/qapi/%.json)
-
-$(GENERATED_STORAGE_DAEMON_QAPI_FILES): storage-daemon/qapi/qapi-gen-timestamp ;
-storage-daemon/qapi/qapi-gen-timestamp: $(qapi-modules-storage-daemon) $(qapi-py)
-	$(call quiet-command,$(PYTHON) $(SRC_PATH)/scripts/qapi-gen.py \
-		-o "storage-daemon/qapi" $<, \
-		"GEN","$(@:%-timestamp=%)")
-	@>$@
-
 QGALIB_GEN=$(addprefix qga/qapi-generated/, qga-qapi-types.h qga-qapi-visit.h qga-qapi-commands.h qga-qapi-init-commands.h)
 $(qga-obj-y): $(QGALIB_GEN)
 
@@ -736,9 +581,9 @@ 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"
@@ -751,12 +596,12 @@ virtiofsd$(EXESUF): $(virtiofsd-obj-y) libvhost-user.a $(COMMON_LDADDS)
 	$(call LINK, $^)
 endif
 
-vhost-user-gpu$(EXESUF): $(vhost-user-gpu-obj-y) $(libvhost-user-obj-y) libqemuutil.a
+vhost-user-gpu$(EXESUF): $(vhost-user-gpu-obj-y) 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 libqemuutil.a
+vhost-user-input$(EXESUF): $(vhost-user-input-obj-y) libvhost-user.a $(COMMON_LDADDS)
 	$(call LINK, $^)
 
 # build by default, do not install
@@ -784,9 +629,6 @@ clean: recurse-clean
 	rm -f fsdev/*.pod scsi/*.pod
 	rm -f qemu-img-cmds.h
 	rm -f ui/shader/*-vert.h ui/shader/*-frag.h
-	@# May not be present in generated-files-y
-	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 -f storage-daemon/qapi/qapi-gen-timestamp
@@ -1013,7 +855,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
 
 # opengl shader programs
 ui/shader/%-vert.h: $(SRC_PATH)/ui/shader/%.vert $(SRC_PATH)/scripts/shaderinclude.pl
@@ -1224,10 +1068,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 +0 -95

109 lines not on this page · raw message

Makefile.target +4 -4
index d61a6a9..0b32364 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 \
configure +8 -0
index 53527f6..685bd28 100755
@@ -7170,6 +7170,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
@@ -7180,6 +7182,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 "$qemu_private_xts" = "yes" ; then
   echo "CONFIG_QEMU_PRIVATE_XTS=y" >> $config_host_mak
@@ -7556,6 +7560,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
@@ -7781,6 +7787,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 "SPARSE_CFLAGS = -Wbitwise -Wno-transparent-union -Wno-old-initializer -Wno-non-pointer-null" >> $config_host_mak
 fi
crypto/Makefile.objs +0 -6
index f1965b1..a988591 100644
@@ -35,9 +35,3 @@ crypto-obj-$(CONFIG_QEMU_PRIVATE_XTS) += 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,$(CONFIG_RNG_NONE))) += random-none.o
-util-obj-$(if $(CONFIG_GCRYPT),n,$(if $(CONFIG_GNUTLS),n,$(if $(CONFIG_RNG_NONE),n,y))) += random-platform.o
-util-obj-y += aes.o init.o
crypto/meson.build new file +11 -0
new file mode 100644
index 0000000..1b24431
@@ -0,0 +1,11 @@
+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)
+elif 'CONFIG_RNG_NONE' in config_host
+  util_ss.add(files('random-none.c'))
+else
+  util_ss.add(files('random-platform.c'))
+endif
docs/devel/tracing.txt +1 -1
index cb5f685..6144d99 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 ===
meson.build +194 -0

206 lines not on this page · raw message

qapi/Makefile.objs +0 -23
index 4673ab7..c0a31be 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 control crypto
-QAPI_COMMON_MODULES += dump error introspect job machine migration misc
-QAPI_COMMON_MODULES += net pragma 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)
@@ -34,5 +13,3 @@ obj-y += qapi-init-commands.o
 
 QAPI_MODULES_STORAGE_DAEMON = block-core char common control crypto
 QAPI_MODULES_STORAGE_DAEMON += introspect job qom sockets pragma transaction
-
-storage-daemon-obj-y += $(QAPI_MODULES_STORAGE_DAEMON:%=qapi-commands-%.o)
qapi/meson.build new file +120 -0

120 lines not on this page · raw message

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'))
rules.mak +1 -1
index 5ab42de..7aefd37 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 +0 -0
old mode 100755
new mode 100644
scripts/tracetool.py +0 -0
old mode 100755
new mode 100644
scripts/tracetool/backend/dtrace.py +1 -1
index fc0c8fc..e17edc9 100644
@@ -38,7 +38,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
 
     # Workaround for ust backend, which also includes <sys/sdt.h> and may
     # require SDT_USE_VARIADIC to be defined. If dtrace includes <sys/sdt.h>
scripts/tracetool/backend/ust.py +1 -5
index 6c0a5f8..c857516 100644
@@ -19,11 +19,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,
         '',
storage-daemon/Makefile.objs +3 -1
index cfe6bee..41c0d02 100644
@@ -1 +1,3 @@
-storage-daemon-obj-y += qapi/
+storage-daemon-obj-y = qapi/libqsd-qapi.fa
+
+qemu-storage-daemon.o: storage-daemon/qapi/qapi-commands.h storage-daemon/qapi/qapi-init-commands.h
storage-daemon/meson.build new file +1 -0
new file mode 100644
index 0000000..35f8949
@@ -0,0 +1 @@
+subdir('qapi')
storage-daemon/qapi/Makefile.objs deleted +0 -1
deleted file mode 100644
index 8a4b220..0000000
@@ -1 +0,0 @@
-storage-daemon-obj-y += qapi-commands.o qapi-init-commands.o qapi-introspect.o
storage-daemon/qapi/meson.build new file +10 -0
new file mode 100644
index 0000000..a4e24f3
@@ -0,0 +1,10 @@
+qsd_qapi_files = custom_target('QAPI files for qemu-storage-daemon',
+                               output: qapi_nonmodule_outputs,
+                               input: [ files('qapi-schema.json') ],
+                               command: [ qapi_gen, '-o', 'storage-daemon/qapi', '@INPUT@' ],
+                               depend_files: [ qapi_inputs, qapi_gen_depends ])
+
+static_library('qsd-qapi',
+               qsd_qapi_files.to_list(),
+               name_suffix: 'fa',
+               build_by_default: false)
stubs/Makefile.objs deleted +0 -56

56 lines not on this page · raw message

stubs/meson.build new file +50 -0

50 lines not on this page · raw message

trace/Makefile.objs +0 -51

59 lines not on this page · raw message

trace/meson.build new file +76 -0

76 lines not on this page · raw message

util/Makefile.objs deleted +0 -83

83 lines not on this page · raw message

util/meson.build new file +68 -0

68 lines not on this page · raw message

Signature · 1 line
1.8.3.1
#28 lore raw

PATCH 25/147 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 0811fd5..f2a6397 100644
@@ -121,61 +121,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 f0a8d1c..cab36a2 100644
@@ -55,6 +55,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
#29 lore raw

PATCH 26/147 meson: add version.o

In reply to Paolo Bonzini

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

---
 meson.build | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)
meson.build +7 -1
index e1ea8ce..11b0887 100644
@@ -45,8 +45,14 @@ targetos = host_machine.system()
 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())
@@ -231,7 +237,7 @@ 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,
-                              sources: genh)
+                              sources: genh + version_res)
 
 summary_info = {}
 summary_info += {'Install prefix':    config_host['prefix']}
Signature · 1 line
1.8.3.1
#30 lore raw

PATCH 27/147 contrib/libvhost-user: convert to Meson

In reply to Paolo Bonzini

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

---
 Makefile                            | 16 +++++-----------
 Makefile.objs                       |  1 -
 contrib/libvhost-user/Makefile.objs |  1 -
 contrib/libvhost-user/meson.build   |  3 +++
 meson.build                         |  8 ++++++++
 5 files changed, 16 insertions(+), 13 deletions(-)
 delete mode 100644 contrib/libvhost-user/Makefile.objs
 create mode 100644 contrib/libvhost-user/meson.build
Makefile +5 -11
index f2a6397..e189d24 100644
@@ -302,7 +302,6 @@ dummy := $(call unnest-vars,, \
                 ivshmem-server-obj-y \
                 virtiofsd-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 \
@@ -428,11 +427,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
 
@@ -530,9 +524,9 @@ 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"
@@ -541,16 +535,16 @@ rdmacm-mux$(EXESUF): $(rdmacm-mux-obj-y) $(COMMON_LDADDS)
 
 # relies on Linux-specific syscalls
 ifeq ($(CONFIG_LINUX)$(CONFIG_SECCOMP)$(CONFIG_LIBCAP_NG),yyy)
-virtiofsd$(EXESUF): $(virtiofsd-obj-y) libvhost-user.a $(COMMON_LDADDS)
+virtiofsd$(EXESUF): $(virtiofsd-obj-y) contrib/libvhost-user/libvhost-user.a $(COMMON_LDADDS)
 	$(call LINK, $^)
 endif
 
-vhost-user-gpu$(EXESUF): $(vhost-user-gpu-obj-y) libvhost-user.a $(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 e5c9077..9489864 100644
@@ -106,7 +106,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 +3 -0
new file mode 100644
index 0000000..e68dd1a
@@ -0,0 +1,3 @@
+libvhost_user = static_library('vhost-user',
+                               files('libvhost-user.c', 'libvhost-user-glib.c'),
+                               build_by_default: false)
meson.build +8 -0
index 11b0887..2a19433 100644
@@ -239,6 +239,14 @@ libqemuutil = static_library('qemuutil',
 qemuutil = declare_dependency(link_with: libqemuutil,
                               sources: genh + version_res)
 
+# Other build targets
+
+if have_tools
+  if 'CONFIG_VHOST_USER' in config_host
+    subdir('contrib/libvhost-user')
+  endif
+endif
+
 summary_info = {}
 summary_info += {'Install prefix':    config_host['prefix']}
 summary_info += {'BIOS directory':    config_host['qemu_datadir']}
Signature · 1 line
1.8.3.1
#31 lore raw

PATCH 28/147 tools/virtiofsd: convert to Meson

In reply to Paolo Bonzini
---
 Makefile                                             | 12 ------------
 Makefile.objs                                        |  1 -
 configure                                            |  1 +
 meson.build                                          | 11 +++++++++++
 tools/meson.build                                    | 10 ++++++++++
 tools/virtiofsd/Makefile.objs                        | 12 ------------
 tools/virtiofsd/meson.build                          | 19 +++++++++++++++++++
 tools/virtiofsd/passthrough_ll.c                     |  2 +-
 tools/virtiofsd/{seccomp.c => passthrough_seccomp.c} |  2 +-
 tools/virtiofsd/{seccomp.h => passthrough_seccomp.h} |  0
 10 files changed, 43 insertions(+), 27 deletions(-)
 create mode 100644 tools/meson.build
 delete mode 100644 tools/virtiofsd/Makefile.objs
 create mode 100644 tools/virtiofsd/meson.build
 rename tools/virtiofsd/{seccomp.c => passthrough_seccomp.c} (99%)
 rename tools/virtiofsd/{seccomp.h => passthrough_seccomp.h} (100%)
Makefile +0 -12
index e189d24..6a3dfc4 100644
@@ -189,11 +189,6 @@ HELPERS-y += vhost-user-gpu$(EXESUF)
 vhost-user-json-y += contrib/vhost-user-gpu/50-qemu-gpu.json
 endif
 
-ifeq ($(CONFIG_SOFTMMU)$(CONFIG_LINUX)$(CONFIG_SECCOMP)$(CONFIG_LIBCAP_NG),yyyy)
-HELPERS-y += virtiofsd$(EXESUF)
-vhost-user-json-y += tools/virtiofsd/50-qemu-virtiofsd.json
-endif
-
 # Sphinx does not allow building manuals into the same directory as
 # the source files, so if we're doing an in-tree QEMU build we must
 # build the manuals into a subdirectory (and then install them from
@@ -300,7 +295,6 @@ dummy := $(call unnest-vars,, \
                 elf2dmp-obj-y \
                 ivshmem-client-obj-y \
                 ivshmem-server-obj-y \
-                virtiofsd-obj-y \
                 rdmacm-mux-obj-y \
                 vhost-user-scsi-obj-y \
                 vhost-user-blk-obj-y \
@@ -533,12 +527,6 @@ rdmacm-mux$(EXESUF): LIBS += "-libumad"
 rdmacm-mux$(EXESUF): $(rdmacm-mux-obj-y) $(COMMON_LDADDS)
 	$(call LINK, $^)
 
-# relies on Linux-specific syscalls
-ifeq ($(CONFIG_LINUX)$(CONFIG_SECCOMP)$(CONFIG_LIBCAP_NG),yyy)
-virtiofsd$(EXESUF): $(virtiofsd-obj-y) contrib/libvhost-user/libvhost-user.a $(COMMON_LDADDS)
-	$(call LINK, $^)
-endif
-
 vhost-user-gpu$(EXESUF): $(vhost-user-gpu-obj-y) contrib/libvhost-user/libvhost-user.a $(COMMON_LDADDS)
 	$(call LINK, $^)
 
Makefile.objs +0 -1
index 9489864..fee0f71 100644
@@ -113,6 +113,5 @@ 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/
-virtiofsd-obj-y = tools/virtiofsd/
 
 ######################################################################
configure +1 -0
index 685bd28..86a8c8b 100755
@@ -6970,6 +6970,7 @@ if test "$gprof" = "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 -0
index 2a19433..c6b5292 100644
@@ -79,6 +79,15 @@ if 'CONFIG_GNUTLS' in config_host
   gnutls = declare_dependency(compile_args: config_host['GNUTLS_CFLAGS'].split(),
                               link_args: config_host['GNUTLS_LIBS'].split())
 endif
+seccomp = not_found
+if 'CONFIG_SECCOMP' in config_host
+  seccomp = declare_dependency(compile_args: config_host['SECCOMP_CFLAGS'].split(),
+                               link_args: config_host['SECCOMP_LIBS'].split())
+endif
+libcap_ng = not_found
+if 'CONFIG_LIBCAP_NG' in config_host
+  libcap_ng = declare_dependency(link_args: config_host['LIBCAP_NG_LIBS'].split())
+endif
 
 target_dirs = config_host['TARGET_DIRS'].split()
 have_user = false
@@ -247,6 +256,8 @@ if have_tools
   endif
 endif
 
+subdir('tools')
+
 summary_info = {}
 summary_info += {'Install prefix':    config_host['prefix']}
 summary_info += {'BIOS directory':    config_host['qemu_datadir']}
tools/meson.build new file +10 -0
new file mode 100644
index 0000000..513bd2f
@@ -0,0 +1,10 @@
+have_virtiofsd = (have_system and
+    have_tools and
+    'CONFIG_LINUX' in config_host and 
+    'CONFIG_SECCOMP' in config_host and
+    'CONFIG_LIBCAP_NG' in config_host and
+    'CONFIG_VHOST_USER' in config_host)
+
+if have_virtiofsd
+  subdir('virtiofsd')
+endif
tools/virtiofsd/Makefile.objs deleted +0 -12
deleted file mode 100644
index 076f667..0000000
@@ -1,12 +0,0 @@
-virtiofsd-obj-y = buffer.o \
-                  fuse_opt.o \
-                  fuse_log.o \
-                  fuse_lowlevel.o \
-                  fuse_signals.o \
-                  fuse_virtio.o \
-                  helper.o \
-                  passthrough_ll.o \
-                  seccomp.o
-
-seccomp.o-cflags := $(SECCOMP_CFLAGS)
-seccomp.o-libs := $(SECCOMP_LIBS)
tools/virtiofsd/meson.build new file +19 -0
new file mode 100644
index 0000000..d1e23c5
@@ -0,0 +1,19 @@
+executable('virtiofsd', files(
+  'buffer.c',
+  'fuse_opt.c',
+  'fuse_log.c',
+  'fuse_lowlevel.c',
+  'fuse_signals.c',
+  'fuse_virtio.c',
+  'helper.c',
+  'passthrough_ll.c',
+  'passthrough_seccomp.c'),
+  link_with: libvhost_user,
+  dependencies: [seccomp, qemuutil, libcap_ng],
+  install: true,
+  install_dir: get_option('libexecdir'))
+
+configure_file(input: '50-qemu-virtiofsd.json.in',
+               output: '50-qemu-virtiofsd.json',
+               configuration: config_host,
+               install_dir: config_host['qemu_datadir'] / 'vhost-user')
tools/virtiofsd/passthrough_ll.c +1 -1
index 94e0de2..63d1d00 100644
@@ -65,7 +65,7 @@
 #include <unistd.h>
 
 #include "passthrough_helpers.h"
-#include "seccomp.h"
+#include "passthrough_seccomp.h"
 
 /* Keep track of inode posix locks for each owner. */
 struct lo_inode_plock {
tools/virtiofsd/passthrough_seccomp.c renamed from tools/virtiofsd/seccomp.c +1 -1
similarity index 99%
rename from tools/virtiofsd/seccomp.c
rename to tools/virtiofsd/passthrough_seccomp.c
index 3b1522a..19fee60 100644
@@ -7,7 +7,7 @@
  */
 
 #include "qemu/osdep.h"
-#include "seccomp.h"
+#include "passthrough_seccomp.h"
 #include "fuse_i.h"
 #include "fuse_log.h"
 #include <errno.h>
tools/virtiofsd/passthrough_seccomp.h renamed from tools/virtiofsd/seccomp.h +0 -0
similarity index 100%
rename from tools/virtiofsd/seccomp.h
rename to tools/virtiofsd/passthrough_seccomp.h
Signature · 1 line
1.8.3.1
#32 lore raw

PATCH 29/147 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/Makefile.objs | 1 -
 contrib/vhost-user-blk/meson.build   | 5 +++++
 meson.build                          | 1 +
 5 files changed, 6 insertions(+), 5 deletions(-)
 delete mode 100644 contrib/vhost-user-blk/Makefile.objs
 create mode 100644 contrib/vhost-user-blk/meson.build
Makefile +0 -3
index 6a3dfc4..7317554 100644
@@ -297,7 +297,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 \
@@ -520,8 +519,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 fee0f71..f69736c 100644
@@ -109,7 +109,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/Makefile.objs deleted +0 -1
deleted file mode 100644
index 72e2cdc..0000000
@@ -1 +0,0 @@
-vhost-user-blk-obj-y = vhost-user-blk.o
contrib/vhost-user-blk/meson.build new file +5 -0
new file mode 100644
index 0000000..05cbf81
@@ -0,0 +1,5 @@
+executable('vhost-user-blk', files('vhost-user-blk.c'),
+           link_with: libvhost_user,
+           dependencies: qemuutil,
+           build_by_default: targetos == 'linux',
+           install: false)
meson.build +1 -0
index c6b5292..fc1346a 100644
@@ -253,6 +253,7 @@ 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
#33 lore raw

PATCH 30/147 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   | 7 +++++++
 meson.build                           | 6 ++++++
 5 files changed, 13 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 7317554..11716bb 100644
@@ -296,7 +296,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 \
@@ -517,8 +516,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 f69736c..ab798b0 100644
@@ -106,9 +106,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 +7 -0
new file mode 100644
index 0000000..257cbff
@@ -0,0 +1,7 @@
+if 'CONFIG_LIBISCSI' in config_host
+  executable('vhost-user-scsi', files('vhost-user-scsi.c'),
+             link_with: libvhost_user,
+             dependencies: [qemuutil, libiscsi],
+             build_by_default: targetos == 'linux',
+             install: false)
+endif
meson.build +6 -0
index fc1346a..eb0ae2c 100644
@@ -88,6 +88,11 @@ libcap_ng = not_found
 if 'CONFIG_LIBCAP_NG' in config_host
   libcap_ng = declare_dependency(link_args: config_host['LIBCAP_NG_LIBS'].split())
 endif
+libiscsi = not_found
+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
@@ -254,6 +259,7 @@ 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
#34 lore raw

PATCH 31/147 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   | 8 ++++++++
 meson.build                      | 2 ++
 5 files changed, 10 insertions(+), 9 deletions(-)
 delete mode 100644 contrib/rdmacm-mux/Makefile.objs
 create mode 100644 contrib/rdmacm-mux/meson.build
Makefile +0 -5
index 11716bb..404cab7 100644
@@ -295,7 +295,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 \
@@ -517,10 +516,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 ab798b0..0f80b63 100644
@@ -106,7 +106,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 +8 -0
new file mode 100644
index 0000000..1a01bb9
@@ -0,0 +1,8 @@
+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],
+             build_by_default: targetos == 'linux',
+             install: false)
+endif
meson.build +2 -0
index eb0ae2c..1d55980 100644
@@ -256,6 +256,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
#35 lore raw

PATCH 32/147 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   |  5 +++++
 meson.build                            |  1 +
 5 files changed, 6 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 404cab7..dd7b99e 100644
@@ -295,7 +295,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 \
@@ -519,16 +518,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 0f80b63..0922c3ed 100644
@@ -106,7 +106,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 +5 -0
new file mode 100644
index 0000000..1eeb132
@@ -0,0 +1,5 @@
+executable('vhost-user-input', files('main.c'),
+           link_with: libvhost_user,
+           dependencies: qemuutil,
+           build_by_default: targetos == 'linux',
+           install: false)
meson.build +1 -0
index 1d55980..80966cc 100644
@@ -261,6 +261,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
#36 lore raw

PATCH 33/147 contrib/vhost-user-gpu: convert to meson

In reply to Paolo Bonzini

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

---
 Makefile                             | 18 +-----------------
 Makefile.objs                        |  1 -
 contrib/vhost-user-gpu/Makefile.objs | 10 ----------
 contrib/vhost-user-gpu/meson.build   | 13 +++++++++++++
 meson.build                          | 15 +++++++++++++++
 rules.mak                            |  7 -------
 6 files changed, 29 insertions(+), 35 deletions(-)
 delete mode 100644 contrib/vhost-user-gpu/Makefile.objs
 create mode 100644 contrib/vhost-user-gpu/meson.build
Makefile +1 -17
index dd7b99e..750598c 100644
@@ -179,16 +179,10 @@ $(call set-vpath, $(SRC_PATH))
 
 LIBS+=-lz $(LIBS_TOOLS)
 
-vhost-user-json-y =
 HELPERS-y = $(HELPERS)
 
 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
-
 # Sphinx does not allow building manuals into the same directory as
 # the source files, so if we're doing an in-tree QEMU build we must
 # build the manuals into a subdirectory (and then install them from
@@ -295,7 +289,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 \
@@ -309,7 +302,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
 
 qemu-version.h: FORCE
 	$(call quiet-command, \
@@ -515,9 +508,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))), \
@@ -711,12 +701,6 @@ 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 \
-		$(INSTALL_DATA) $$x "$(DESTDIR)$(qemu_datadir)/vhost-user/"; \
-	done
-endif
 ifdef CONFIG_TRACE_SYSTEMTAP
 	$(INSTALL_PROG) "scripts/qemu-trace-stap" $(DESTDIR)$(bindir)
 endif
Makefile.objs +0 -1
index 0922c3ed..2f2d4b2 100644
@@ -106,6 +106,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 0929609..0000000
@@ -1,10 +0,0 @@
-vhost-user-gpu-obj-y = vhost-user-gpu.o virgl.o vugbm.o
-
-vhost-user-gpu.o-cflags := $(PIXMAN_CFLAGS) $(GBM_CFLAGS)
-vhost-user-gpu.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 +13 -0
new file mode 100644
index 0000000..6c1459f
@@ -0,0 +1,13 @@
+if 'CONFIG_TOOLS' in config_host and 'CONFIG_VIRGL' in config_host \
+    and 'CONFIG_GBM' in config_host and 'CONFIG_LINUX' in config_host
+  executable('vhost-user-gpu', files('vhost-user-gpu.c', 'virgl.c', 'vugbm.c'),
+             link_with: libvhost_user,
+             dependencies: [qemuutil, pixman, gbm, virgl],
+             install: true,
+             install_dir: get_option('libexecdir'))
+
+  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
meson.build +15 -0
index 80966cc..3483056 100644
@@ -79,6 +79,8 @@ 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())
 seccomp = not_found
 if 'CONFIG_SECCOMP' in config_host
   seccomp = declare_dependency(compile_args: config_host['SECCOMP_CFLAGS'].split(),
@@ -93,6 +95,16 @@ 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 = not_found
+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 = not_found
+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
@@ -261,6 +273,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
rules.mak +0 -7
index 7aefd37..1aa6394 100644
@@ -402,13 +402,6 @@ TEXI2MAN = $(call quiet-command, \
 %.8:
 	$(call TEXI2MAN)
 
-GEN_SUBST = $(call quiet-command, \
-	sed -e "s!@libexecdir@!$(libexecdir)!g" < $< > $@, \
-	"GEN","$@")
-
-%.json: %.json.in
-	$(call GEN_SUBST)
-
 # Support for building multiple output files by atomically executing
 # a single rule which depends on several input files (so the rule
 # will be executed exactly once, not once per output file, and
Signature · 1 line
1.8.3.1
#37 lore raw

PATCH 34/147 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   | 4 ++++
 contrib/ivshmem-server/Makefile.objs | 1 -
 contrib/ivshmem-server/meson.build   | 4 ++++
 meson.build                          | 5 +++++
 8 files changed, 13 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 750598c..58ec90d 100644
@@ -287,8 +287,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 \
@@ -501,13 +499,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 2f2d4b2..336a684 100644
@@ -104,7 +104,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 86a8c8b..6f7a5aa 100755
@@ -6652,9 +6652,6 @@ if test "$want_tools" = "yes" ; then
   if [ "$linux" = "yes" -o "$bsd" = "yes" -o "$solaris" = "yes" ] ; then
     tools="qemu-nbd\$(EXESUF) qemu-storage-daemon\$(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 +4 -0
new file mode 100644
index 0000000..1b171ef
@@ -0,0 +1,4 @@
+executable('ivshmem-client', files('ivshmem-client.c', 'main.c'),
+           dependencies: glib,
+           build_by_default: targetos == 'linux',
+           install: false)
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 +4 -0
new file mode 100644
index 0000000..3a53942
@@ -0,0 +1,4 @@
+executable('ivshmem-server', files('ivshmem-server.c', 'main.c'),
+           dependencies: [qemuutil, rt],
+           build_by_default: targetos == 'linux',
+           install: false)
meson.build +5 -0
index 3483056..dc970df 100644
@@ -90,6 +90,7 @@ libcap_ng = not_found
 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 = not_found
 if 'CONFIG_LIBISCSI' in config_host
   libiscsi = declare_dependency(compile_args: config_host['LIBISCSI_CFLAGS'].split(),
@@ -279,6 +280,10 @@ 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
 
 subdir('tools')
Signature · 1 line
1.8.3.1
#38 lore raw

PATCH 35/147 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   | 5 +++++
 meson.build                   | 6 ++++++
 6 files changed, 11 insertions(+), 17 deletions(-)
 delete mode 100644 contrib/elf2dmp/Makefile.objs
 create mode 100644 contrib/elf2dmp/meson.build
Makefile +0 -4
index 58ec90d..574435e 100644
@@ -286,7 +286,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 \
@@ -496,9 +495,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 336a684..1486254 100644
@@ -100,9 +100,3 @@ version-obj-$(CONFIG_WIN32) += $(BUILD_DIR)/version.o
 # 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 6f7a5aa..98c413f 100755
@@ -6652,9 +6652,6 @@ if test "$want_tools" = "yes" ; then
   if [ "$linux" = "yes" -o "$bsd" = "yes" -o "$solaris" = "yes" ] ; then
     tools="qemu-nbd\$(EXESUF) qemu-storage-daemon\$(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 +5 -0
new file mode 100644
index 0000000..b3de173
@@ -0,0 +1,5 @@
+if 'CONFIG_CURL' in config_host
+  executable('elf2dmp', files('main.c', 'addrspace.c', 'download.c', 'pdb.c', 'qemu_elf.c'),
+             dependencies: [glib, curl],
+             install: true)
+endif
meson.build +6 -0
index dc970df..ed557f1 100644
@@ -106,6 +106,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 = not_found
+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
@@ -270,6 +275,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
#39 lore raw

PATCH 36/147 meson: convert qemu-ga

In reply to Paolo Bonzini
---
 Makefile                  | 53 ++++++-----------------------------------------
 Makefile.objs             |  1 -
 configure                 |  9 ++++----
 meson.build               |  8 +++++++
 qga/Makefile.objs         |  9 --------
 qga/installer/qemu-ga.wxs |  2 +-
 qga/meson.build           | 46 ++++++++++++++++++++++++++++++++++++++++
 tests/Makefile.include    |  4 ++--
 tests/test-qga.c          |  8 +++----
 9 files changed, 71 insertions(+), 69 deletions(-)
 create mode 100644 qga/meson.build
Makefile +6 -47
index 574435e..b50e290 100644
@@ -285,7 +285,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 \
@@ -433,52 +432,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/__init__.py \
-$(SRC_PATH)/scripts/qapi/commands.py \
-$(SRC_PATH)/scripts/qapi/common.py \
-$(SRC_PATH)/scripts/qapi/doc.py \
-$(SRC_PATH)/scripts/qapi/error.py \
-$(SRC_PATH)/scripts/qapi/events.py \
-$(SRC_PATH)/scripts/qapi/expr.py \
-$(SRC_PATH)/scripts/qapi/gen.py \
-$(SRC_PATH)/scripts/qapi/introspect.py \
-$(SRC_PATH)/scripts/qapi/parser.py \
-$(SRC_PATH)/scripts/qapi/schema.py \
-$(SRC_PATH)/scripts/qapi/source.py \
-$(SRC_PATH)/scripts/qapi/types.py \
-$(SRC_PATH)/scripts/qapi/visit.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-init-commands.h qga/qapi-generated/qga-qapi-init-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-qapi-init-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
 
@@ -491,8 +453,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
@@ -516,9 +478,6 @@ clean: recurse-clean
 	rm -f qemu-img-cmds.h
 	rm -f ui/shader/*-vert.h ui/shader/*-frag.h
 	rm -f $(foreach f,$(generated-files-y),$(f) $(f)-timestamp)
-	rm -f qapi-gen-timestamp
-	rm -f storage-daemon/qapi/qapi-gen-timestamp
-	rm -rf qga/qapi-generated
 	rm -f config-all-devices.mak
 	rm -f $(SUBDIR_DEVICES_MAK)
 
@@ -637,7 +596,7 @@ endif
 ifdef CONFIG_TRACE_SYSTEMTAP
 	$(INSTALL_DATA) $(MANUAL_BUILDDIR)/tools/qemu-trace-stap.1 "$(DESTDIR)$(mandir)/man1"
 endif
-ifneq (,$(findstring qemu-ga,$(TOOLS)))
+ifeq ($(CONFIG_GUEST_AGENT),y)
 	$(INSTALL_DATA) $(MANUAL_BUILDDIR)/interop/qemu-ga.8 "$(DESTDIR)$(mandir)/man8"
 	$(INSTALL_DIR) "$(DESTDIR)$(qemu_docdir)/interop"
 	$(INSTALL_DATA) docs/interop/qemu-ga-ref.html "$(DESTDIR)$(qemu_docdir)/interop"
@@ -658,7 +617,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
@@ -850,7 +809,7 @@ $(MANUAL_BUILDDIR)/index.html: $(SRC_PATH)/docs/index.html.in qemu-version.h
 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 $< $@
 
 html: docs/interop/qemu-qmp-ref.html docs/interop/qemu-ga-ref.html sphinxdocs
Makefile.objs +0 -1
index 1486254..259f993 100644
@@ -98,5 +98,4 @@ version-obj-$(CONFIG_WIN32) += $(BUILD_DIR)/version.o
 # 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 98c413f..ae6929e 100755
@@ -3954,7 +3954,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
@@ -5174,7 +5173,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
@@ -5199,7 +5197,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()
@@ -6694,7 +6691,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
@@ -6940,6 +6936,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
@@ -7797,7 +7796,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 ed557f1..e05a440 100644
@@ -111,6 +111,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 = not_found
+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
@@ -273,6 +277,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 -9
index 9c558ae..9ecf249 100644
@@ -1,10 +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-obj-y += qapi-generated/qga-qapi-init-commands.o
-
 qga-vss-dll-obj-$(CONFIG_QGA_VSS) += vss-win32/
qga/installer/qemu-ga.wxs +1 -1
index f678175..9cb4c3d 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 +46 -0

46 lines not on this page · raw message

tests/Makefile.include +2 -2
index ad54100..f277d23 100644
@@ -129,7 +129,7 @@ ifndef CONFIG_TSAN
 # https://github.com/google/sanitizers/issues/1116
 check-unit-$(CONFIG_SOFTMMU) += tests/test-char$(EXESUF)
 check-unit-$(CONFIG_SOFTMMU) += tests/test-qdev-global-props$(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
 endif
@@ -603,7 +603,7 @@ tests/migration/initrd-stress.img: tests/migration/stress$(EXESUF)
 
 include $(SRC_PATH)/tests/qtest/Makefile.include
 
-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)
 tests/vhost-user-bridge$(EXESUF): tests/vhost-user-bridge.o $(test-util-obj-y) libvhost-user.a
 tests/qemu-iotests/socket_scm_helper$(EXESUF): tests/qemu-iotests/socket_scm_helper.o
tests/test-qga.c +4 -4
index d2b2435..d1b4c3e 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 ?: "");
@@ -699,8 +699,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
#40 lore raw

PATCH 37/147 meson: convert vss-win32

In reply to Paolo Bonzini

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

---
 Makefile                    |  1 -
 Makefile.objs               |  8 --------
 qga/Makefile.objs           |  1 -
 qga/meson.build             |  6 ++++++
 qga/vss-win32/Makefile.objs | 23 -----------------------
 qga/vss-win32/meson.build   | 33 +++++++++++++++++++++++++++++++++
 6 files changed, 39 insertions(+), 33 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 b50e290..36e1069 100644
@@ -285,7 +285,6 @@ endif
 dummy := $(call unnest-vars,, \
                 authz-obj-y \
                 chardev-obj-y \
-                qga-vss-dll-obj-y \
                 block-obj-y \
                 block-obj-m \
                 storage-daemon-obj-y \
Makefile.objs +0 -8
index 259f993..baf1565 100644
@@ -91,11 +91,3 @@ common-obj-y += disas/
 ######################################################################
 # Resource file for Windows executables
 version-obj-$(CONFIG_WIN32) += $(BUILD_DIR)/version.o
-
-######################################################################
-# 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/
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 3513a90..948302e 100644
@@ -44,3 +44,9 @@ qga = executable('qemu-ga', qga_ss.sources(),
                  link_args: config_host['LIBS_QGA'].split(),
                  dependencies: [qemuutil, libudev],
                  install: true)
+
+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 c82676a..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
-
-QGA_VSS_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) $(QGA_VSS_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 +33 -0
new file mode 100644
index 0000000..42c8d31
@@ -0,0 +1,33 @@
+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, socket,
+                               cc.find_library('ole32'),
+                               cc.find_library('oleaut32'),
+                               cc.find_library('shlwapi'),
+                               cc.find_library('uuid'),
+                               cc.find_library('intl')])
+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
#41 lore raw

PATCH 38/147 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 |  3 ++-
 3 files changed, 27 insertions(+), 19 deletions(-)
Makefile +0 -18
index 36e1069..3aeadfb 100644
@@ -434,23 +434,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)
@@ -465,7 +448,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 948302e..2d33c09 100644
@@ -48,5 +48,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 +2 -1
index 42c8d31..1f39e05 100644
@@ -2,7 +2,8 @@ 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
#42 lore raw

PATCH 39/147 meson: convert dummy Windows qga/qemu-ga target

In reply to Paolo Bonzini
---
 Makefile                  | 5 -----
 qga/meson.build           | 4 ++++
 qga/vss-win32/meson.build | 2 ++
 3 files changed, 6 insertions(+), 5 deletions(-)
Makefile +0 -5
index 3aeadfb..b844b06 100644
@@ -434,11 +434,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)
 
-ifneq ($(EXESUF),)
-.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
 	$(call quiet-command,$(PYTHON) $< $@ \
 	$(addprefix $(SRC_PATH)/,$(patsubst %.mo,%.c,$(block-obj-m))), \
qga/meson.build +4 -0
index 2d33c09..7e7174b 100644
@@ -44,6 +44,7 @@ qga = executable('qemu-ga', qga_ss.sources(),
                  link_args: config_host['LIBS_QGA'].split(),
                  dependencies: [qemuutil, libudev],
                  install: true)
+all_qga = [qga]
 
 if host_machine.system() == 'windows'
   if 'CONFIG_QGA_VSS' in config_host
@@ -72,6 +73,9 @@ if host_machine.system() == 'windows'
                               config_host['QEMU_GA_MSI_WITH_VSS'].split(),
                               config_host['QEMU_GA_MSI_MINGW_DLL_PATH'].split(),
                             ])
+    all_qga += [qga-msi]
     alias_target('msi', qga_msi)
   endif
 endif
+
+alias_target('qemu-ga', all_qga)
qga/vss-win32/meson.build +2 -0
index 1f39e05..780c461 100644
@@ -14,6 +14,8 @@ if add_languages('cpp', required: false)
                                cc.find_library('shlwapi'),
                                cc.find_library('uuid'),
                                cc.find_library('intl')])
+
+  all_qga += qga_vss
 endif
 
 # rules to build qga-vss.tlb
Signature · 1 line
1.8.3.1
#43 lore raw

PATCH 40/147 meson: add qemu-bridge-helper

In reply to Paolo Bonzini

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

---
 Makefile    | 4 ----
 meson.build | 9 ++++++++-
 2 files changed, 8 insertions(+), 5 deletions(-)
Makefile +0 -4
index b844b06..b4f486b 100644
@@ -181,8 +181,6 @@ LIBS+=-lz $(LIBS_TOOLS)
 
 HELPERS-y = $(HELPERS)
 
-HELPERS-$(call land,$(CONFIG_SOFTMMU),$(CONFIG_LINUX)) += qemu-bridge-helper$(EXESUF)
-
 # Sphinx does not allow building manuals into the same directory as
 # the source files, so if we're doing an in-tree QEMU build we must
 # build the manuals into a subdirectory (and then install them from
@@ -415,8 +413,6 @@ qemu-nbd$(EXESUF): qemu-nbd.o $(authz-obj-y) $(block-obj-y) $(crypto-obj-y) $(io
 qemu-io$(EXESUF): qemu-io.o $(authz-obj-y) $(block-obj-y) $(crypto-obj-y) $(io-obj-y) $(qom-obj-y) $(COMMON_LDADDS)
 qemu-storage-daemon$(EXESUF): qemu-storage-daemon.o $(authz-obj-y) $(block-obj-y) $(crypto-obj-y) $(chardev-obj-y) $(io-obj-y) $(qom-obj-y) $(storage-daemon-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)
meson.build +8 -1
index e05a440..7d07aa7 100644
@@ -276,7 +276,6 @@ qemuutil = declare_dependency(link_with: libqemuutil,
                               sources: genh + version_res)
 
 # Other build targets
-
 if 'CONFIG_GUEST_AGENT' in config_host
   subdir('qga')
 endif
@@ -294,6 +293,14 @@ if have_tools
     subdir('contrib/vhost-user-input')
     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
#44 lore raw

PATCH 41/147 meson: add qemu-keymap

In reply to Paolo Bonzini

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

---
 Makefile    |  5 -----
 configure   |  4 +---
 meson.build | 10 ++++++++++
 3 files changed, 11 insertions(+), 8 deletions(-)
Makefile +0 -5
index b4f486b..0a99cb9 100644
@@ -413,8 +413,6 @@ qemu-nbd$(EXESUF): qemu-nbd.o $(authz-obj-y) $(block-obj-y) $(crypto-obj-y) $(io
 qemu-io$(EXESUF): qemu-io.o $(authz-obj-y) $(block-obj-y) $(crypto-obj-y) $(io-obj-y) $(qom-obj-y) $(COMMON_LDADDS)
 qemu-storage-daemon$(EXESUF): qemu-storage-daemon.o $(authz-obj-y) $(block-obj-y) $(crypto-obj-y) $(chardev-obj-y) $(io-obj-y) $(qom-obj-y) $(storage-daemon-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)
@@ -427,9 +425,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)
-
 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))), \
configure +1 -3
index ae6929e..b786483 100755
@@ -6680,9 +6680,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
@@ -6999,6 +6996,7 @@ if test "$vnc_png" = "yes" ; then
   echo "CONFIG_VNC_PNG=y" >> $config_host_mak
 fi
 if test "$xkbcommon" = "yes" ; then
+  echo "CONFIG_XKBCOMMON=y" >> $config_host_mak
   echo "XKBCOMMON_CFLAGS=$xkbcommon_cflags" >> $config_host_mak
   echo "XKBCOMMON_LIBS=$xkbcommon_libs" >> $config_host_mak
 fi
meson.build +10 -0
index 7d07aa7..e91ebc3 100644
@@ -90,6 +90,11 @@ libcap_ng = not_found
 if 'CONFIG_LIBCAP_NG' in config_host
   libcap_ng = declare_dependency(link_args: config_host['LIBCAP_NG_LIBS'].split())
 endif
+xkbcommon = not_found
+if 'CONFIG_XKBCOMMON' in config_host
+  xkbcommon = declare_dependency(compile_args: config_host['XKBCOMMON_CFLAGS'].split(),
+                                 link_args: config_host['XKBCOMMON_LIBS'].split())
+endif
 rt = cc.find_library('rt', required: false)
 libiscsi = not_found
 if 'CONFIG_LIBISCSI' in config_host
@@ -284,6 +289,11 @@ if have_tools
   subdir('contrib/rdmacm-mux')
   subdir('contrib/elf2dmp')
 
+  if 'CONFIG_XKBCOMMON' in config_host
+    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
#45 lore raw

PATCH 42/147 meson: add qemu-edid

In reply to Paolo Bonzini

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

---
 Makefile    | 2 --
 configure   | 2 +-
 meson.build | 4 ++++
 3 files changed, 5 insertions(+), 3 deletions(-)
Makefile +0 -2
index 0a99cb9..6e22245 100644
@@ -413,8 +413,6 @@ qemu-nbd$(EXESUF): qemu-nbd.o $(authz-obj-y) $(block-obj-y) $(crypto-obj-y) $(io
 qemu-io$(EXESUF): qemu-io.o $(authz-obj-y) $(block-obj-y) $(crypto-obj-y) $(io-obj-y) $(qom-obj-y) $(COMMON_LDADDS)
 qemu-storage-daemon$(EXESUF): qemu-storage-daemon.o $(authz-obj-y) $(block-obj-y) $(crypto-obj-y) $(chardev-obj-y) $(io-obj-y) $(qom-obj-y) $(storage-daemon-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)
 
 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)
configure +1 -1
index b786483..bdd5c48 100755
@@ -6645,7 +6645,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) qemu-storage-daemon\$(EXESUF) $tools"
   fi
meson.build +4 -0
index e91ebc3..b5de9f4 100644
@@ -294,6 +294,10 @@ if have_tools
                dependencies: [qemuutil, xkbcommon], install: true)
   endif
 
+  executable('qemu-edid', files('qemu-edid.c', 'hw/display/edid-generate.c'),
+             dependencies: qemuutil,
+             install: true)
+
   if 'CONFIG_VHOST_USER' in config_host
     subdir('contrib/libvhost-user')
     subdir('contrib/vhost-user-blk')
Signature · 1 line
1.8.3.1
#46 lore raw

PATCH 43/147 meson: add virtfs-proxy-helper

In reply to Paolo Bonzini

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

---
 Makefile          | 2 --
 configure         | 7 +++++--
 fsdev/meson.build | 8 ++++++++
 meson.build       | 6 ++++++
 4 files changed, 19 insertions(+), 4 deletions(-)
 create mode 100644 fsdev/meson.build
Makefile +0 -2
index 6e22245..f4e5ecf 100644
@@ -413,8 +413,6 @@ qemu-nbd$(EXESUF): qemu-nbd.o $(authz-obj-y) $(block-obj-y) $(crypto-obj-y) $(io
 qemu-io$(EXESUF): qemu-io.o $(authz-obj-y) $(block-obj-y) $(crypto-obj-y) $(io-obj-y) $(qom-obj-y) $(COMMON_LDADDS)
 qemu-storage-daemon$(EXESUF): qemu-storage-daemon.o $(authz-obj-y) $(block-obj-y) $(crypto-obj-y) $(chardev-obj-y) $(io-obj-y) $(qom-obj-y) $(storage-daemon-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)
-
 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 +5 -2
index bdd5c48..76a4658 100755
@@ -4325,6 +4325,7 @@ fi
 ##########################################
 # attr probe
 
+libattr_libs=
 if test "$attr" != "no" ; then
   cat > $TMPC <<EOF
 #include <stdio.h>
@@ -4341,7 +4342,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
@@ -6644,6 +6646,7 @@ if [ "$eventfd" = "yes" ]; then
 fi
 
 tools=""
+helpers=""
 if test "$want_tools" = "yes" ; then
   tools="qemu-img\$(EXESUF) qemu-io\$(EXESUF) $tools"
   if [ "$linux" = "yes" -o "$bsd" = "yes" -o "$solaris" = "yes" ] ; then
@@ -6654,7 +6657,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
-      helpers="$helpers fsdev/virtfs-proxy-helper\$(EXESUF)"
     else
       if test "$virtfs" = yes; then
         error_exit "VirtFS requires libcap-ng devel and libattr devel"
@@ -7236,6 +7238,7 @@ if test "$linux_io_uring" = "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 +8 -0
new file mode 100644
index 0000000..30e2319
@@ -0,0 +1,8 @@
+have_virtfs_proxy_helper = have_tools and libattr.found() and libcap_ng.found() and 'CONFIG_VIRTFS' in config_host
+if have_virtfs_proxy_helper
+  executable('virtfs-proxy-helper',
+             files('virtfs-proxy-helper.c', '9p-marshal.c', '9p-iov-marshal.c'),
+             dependencies: [qemuutil, libattr, libcap_ng],
+             install: true,
+             install_dir: get_option('libexecdir'))
+endif
meson.build +6 -0
index b5de9f4..d71d87d 100644
@@ -81,6 +81,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 = not_found
+if 'CONFIG_ATTR' in config_host
+  libattr = declare_dependency(link_args: config_host['LIBATTR_LIBS'].split())
+endif
 seccomp = not_found
 if 'CONFIG_SECCOMP' in config_host
   seccomp = declare_dependency(compile_args: config_host['SECCOMP_CFLAGS'].split(),
@@ -280,6 +284,8 @@ libqemuutil = static_library('qemuutil',
 qemuutil = declare_dependency(link_with: libqemuutil,
                               sources: genh + version_res)
 
+subdir('fsdev')
+
 # Other build targets
 if 'CONFIG_GUEST_AGENT' in config_host
   subdir('qga')
Signature · 1 line
1.8.3.1
#47 lore raw

PATCH 44/147 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 f4e5ecf..d5e43a0 100644
@@ -125,44 +125,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.inc \
-		 ui/input-keymap-linux-to-qcode.inc \
-		 ui/input-keymap-qcode-to-atset1.inc \
-		 ui/input-keymap-qcode-to-atset2.inc \
-		 ui/input-keymap-qcode-to-atset3.inc \
-		 ui/input-keymap-qcode-to-linux.inc \
-		 ui/input-keymap-qcode-to-qnum.inc \
-		 ui/input-keymap-qcode-to-sun.inc \
-		 ui/input-keymap-qnum-to-qcode.inc \
-		 ui/input-keymap-usb-to-qcode.inc \
-		 ui/input-keymap-win32-to-qcode.inc \
-		 ui/input-keymap-x11-to-qcode.inc \
-		 ui/input-keymap-xorgevdev-to-qcode.inc \
-		 ui/input-keymap-xorgkbd-to-qcode.inc \
-		 ui/input-keymap-xorgxquartz-to-qcode.inc \
-		 ui/input-keymap-xorgxwin-to-qcode.inc \
-		 ui/input-keymap-osx-to-qcode.inc \
-		 $(NULL)
-
-generated-files-$(CONFIG_SOFTMMU) += $(KEYCODEMAP_FILES)
-
-ui/input-keymap-%.inc: $(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 d71d87d..4ea7fbb 100644
@@ -271,6 +271,7 @@ subdir('trace')
 subdir('util')
 subdir('crypto')
 subdir('storage-daemon')
+subdir('ui')
 
 # Build targets from sourcesets
 
ui/meson.build new file +34 -0
new file mode 100644
index 0000000..daacd2f
@@ -0,0 +1,34 @@
+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'],
+]
+
+if have_system
+  foreach e : keymaps
+    output = 'input-keymap-@0@-to-@[email protected]'.format(e[0], e[1])
+    genh += 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: [python.full_path(), files('keycodemapdb/tools/keymap-gen'),
+                            '--lang', 'glib2',
+                            '--varname', 'qemu_input_map_@0@_to_@1@'.format(e[0], e[1]),
+                            'code-map', '@INPUT0@', e[0], e[1]])
+  endforeach
+endif
Signature · 1 line
1.8.3.1
#48 lore raw

PATCH 45/147 meson: generate qemu-version.h

In reply to Paolo Bonzini

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

---
 Makefile                | 27 +--------------------------
 meson.build             | 14 ++++++++++++--
 scripts/qemu-version.sh | 25 +++++++++++++++++++++++++
 3 files changed, 38 insertions(+), 28 deletions(-)
 create mode 100755 scripts/qemu-version.sh
Makefile +1 -26
index d5e43a0..f995b23 100644
@@ -105,21 +105,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
 
@@ -259,17 +245,6 @@ include $(SRC_PATH)/tests/Makefile.include
 
 all: $(DOCS) $(if $(BUILD_DOCS),sphinxdocs) $(TOOLS) $(HELPERS-y) recurse-all modules
 
-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 +12 -2
index 4ea7fbb..549d81c 100644
@@ -137,6 +137,7 @@ have_block = have_system or have_tools
 
 # Generators
 
+genh = []
 qapi_gen = find_program('scripts/qapi-gen.py')
 qapi_gen_depends = [ meson.source_root() / 'scripts/qapi/__init__.py',
                      meson.source_root() / 'scripts/qapi/commands.py',
@@ -162,6 +163,17 @@ tracetool = [
    '--backend=' + config_host['TRACE_BACKENDS']
 ]
 
+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.h',
+                             output: 'qemu-version.h',
+                             command: qemu_version_cmd,
+                             capture: true,
+                             build_by_default: true,
+                             build_always_stale: true)
+genh += qemu_version
+
 # Collect sourcesets.
 
 util_ss = ss.source_set()
@@ -262,8 +274,6 @@ trace_events_subdirs += [
   'util',
 ]
 
-genh = []
-
 subdir('qapi')
 subdir('qobject')
 subdir('stubs')
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
#49 lore raw

PATCH 46/147 meson: generate shader headers

In reply to Paolo Bonzini

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

---
 Makefile              | 19 -------------------
 meson.build           |  1 +
 ui/meson.build        |  2 ++
 ui/shader/meson.build | 15 +++++++++++++++
 4 files changed, 18 insertions(+), 19 deletions(-)
 create mode 100644 ui/shader/meson.build
Makefile +0 -19
index f995b23..f7af925 100644
@@ -376,7 +376,6 @@ clean: recurse-clean
 	rm -f $(filter-out %.tlb,$(TOOLS)) $(HELPERS-y) 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
 	rm -f $(foreach f,$(generated-files-y),$(f) $(f)-timestamp)
 	rm -f config-all-devices.mak
 	rm -f $(SUBDIR_DEVICES_MAK)
@@ -598,24 +597,6 @@ endif
 	$(MAKE) $(SUBDIR_MAKEFLAGS) TARGET_DIR=$$d/ -C $$d $@ || exit 1 ; \
         done
 
-# 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 549d81c..e007c98 100644
@@ -138,6 +138,7 @@ have_block = have_system or have_tools
 # Generators
 
 genh = []
+shaderinclude = find_program('scripts/shaderinclude.pl')
 qapi_gen = find_program('scripts/qapi-gen.py')
 qapi_gen_depends = [ meson.source_root() / 'scripts/qapi/__init__.py',
                      meson.source_root() / 'scripts/qapi/commands.py',
ui/meson.build +2 -0
index daacd2f..8cf070c 100644
@@ -32,3 +32,5 @@ if have_system
                             'code-map', '@INPUT0@', e[0], e[1]])
   endforeach
 endif
+
+subdir('shader')
ui/shader/meson.build new file +15 -0
new file mode 100644
index 0000000..f69e44e
@@ -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])
+  genh += 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
#50 lore raw

PATCH 47/147 meson: generate hxtool files

In reply to Paolo Bonzini

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

---
 Makefile        |  8 +-------
 Makefile.target |  6 ------
 meson.build     | 22 ++++++++++++++++++++++
 scripts/hxtool  |  2 +-
 4 files changed, 24 insertions(+), 14 deletions(-)
 mode change 100644 => 100755 scripts/hxtool
Makefile +1 -7
index f7af925..b9260a1 100644
@@ -105,7 +105,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
 
@@ -247,8 +247,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 fuzz clean install, $(addsuffix /$(t), $(TARGET_DIRS)))
 
@@ -355,9 +353,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","$@")
-
 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))), \
@@ -375,7 +370,6 @@ clean: recurse-clean
 	rm -f $(edk2-decompressed)
 	rm -f $(filter-out %.tlb,$(TOOLS)) $(HELPERS-y) TAGS cscope.* *.pod *~ */*~
 	rm -f fsdev/*.pod scsi/*.pod
-	rm -f qemu-img-cmds.h
 	rm -f $(foreach f,$(generated-files-y),$(f) $(f)-timestamp)
 	rm -f config-all-devices.mak
 	rm -f $(SUBDIR_DEVICES_MAK)
Makefile.target +0 -6
index 0b32364..257afc2 100644
@@ -225,12 +225,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 +22 -0
index e007c98..0c4988a 100644
@@ -138,6 +138,7 @@ have_block = have_system or have_tools
 # Generators
 
 genh = []
+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/__init__.py',
@@ -175,6 +176,27 @@ qemu_version = custom_target('qemu-version.h',
                              build_always_stale: true)
 genh += qemu_version
 
+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
+genh += hxdep
+
 # Collect sourcesets.
 
 util_ss = ss.source_set()
scripts/hxtool +1 -1
old mode 100644
new mode 100755
index 7b1452f..80516b9
@@ -19,6 +19,6 @@ hxtoh()
 case "$1" in
 "-h") hxtoh ;;
 *) exit 1 ;;
-esac
+esac < "$2"
 
 exit 0
Signature · 1 line
1.8.3.1
#51 lore raw

PATCH 48/147 meson: handle edk2 bios and descriptors

In reply to Paolo Bonzini

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

---
 Makefile                        | 29 -----------------------------
 meson.build                     |  1 +
 pc-bios/descriptors/meson.build | 14 ++++++++++++++
 pc-bios/meson.build             | 27 +++++++++++++++++++++++++++
 4 files changed, 42 insertions(+), 29 deletions(-)
 create mode 100644 pc-bios/descriptors/meson.build
 create mode 100644 pc-bios/meson.build
Makefile +0 -29
index b9260a1..62e0ef0 100644
@@ -111,10 +111,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: ;
@@ -258,9 +254,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
-ifdef DECOMPRESS_EDK2_BLOBS
-$(SOFTMMU_ALL_RULES): $(edk2-decompressed)
-endif
 
 SOFTMMU_FUZZ_RULES=$(filter %-softmmu/fuzz, $(TARGET_DIRS_RULES))
 $(SOFTMMU_FUZZ_RULES): $(authz-obj-y)
@@ -367,7 +360,6 @@ clean: recurse-clean
 		! -path ./roms/edk2/ArmPkg/Library/GccLto/liblto-arm.a \
 		! -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 fsdev/*.pod scsi/*.pod
 	rm -f $(foreach f,$(generated-files-y),$(f) $(f)-timestamp)
@@ -441,13 +433,8 @@ edk2-licenses.txt \
 hppa-firmware.img \
 opensbi-riscv32-sifive_u-fw_jump.bin opensbi-riscv32-virt-fw_jump.bin \
 opensbi-riscv64-sifive_u-fw_jump.bin opensbi-riscv64-virt-fw_jump.bin
-
-
-DESCS=50-edk2-i386-secure.json 50-edk2-x86_64-secure.json \
-60-edk2-aarch64.json 60-edk2-arm.json 60-edk2-i386.json 60-edk2-x86_64.json
 else
 BLOBS=
-DESCS=
 endif
 
 # Note that we manually filter-out the non-Sphinx documentation which
@@ -524,7 +511,6 @@ install-includedir:
 export DESTDIR
 install: all $(if $(BUILD_DOCS),install-doc) \
 	install-datadir install-localstatedir install-includedir \
-	$(if $(INSTALL_BLOBS),$(edk2-decompressed)) \
 	recurse-install
 ifneq ($(TOOLS),)
 	$(call install-prog,$(TOOLS),$(DESTDIR)$(bindir))
@@ -548,21 +534,6 @@ ifneq ($(BLOBS),)
 		$(INSTALL_DATA) $(SRC_PATH)/pc-bios/$$x "$(DESTDIR)$(qemu_datadir)"; \
 	done
 endif
-ifdef INSTALL_BLOBS
-	set -e; for x in $(edk2-decompressed); do \
-		$(INSTALL_DATA) $$x "$(DESTDIR)$(qemu_datadir)"; \
-	done
-endif
-ifneq ($(DESCS),)
-	$(INSTALL_DIR) "$(DESTDIR)$(qemu_datadir)/firmware"
-	set -e; tmpf=$$(mktemp); trap 'rm -f -- "$$tmpf"' EXIT; \
-	for x in $(DESCS); do \
-		sed -e 's,@DATADIR@,$(qemu_datadir),' \
-			"$(SRC_PATH)/pc-bios/descriptors/$$x" > "$$tmpf"; \
-		$(INSTALL_DATA) "$$tmpf" \
-			"$(DESTDIR)$(qemu_datadir)/firmware/$$x"; \
-	done
-endif
 	for s in $(ICON_SIZES); do \
 		mkdir -p "$(DESTDIR)$(qemu_icondir)/hicolor/$${s}/apps"; \
 		$(INSTALL_DATA) $(SRC_PATH)/ui/icons/qemu_$${s}.png \
meson.build +1 -0
index 0c4988a..a3c2ea7 100644
@@ -362,6 +362,7 @@ if have_tools
 endif
 
 subdir('tools')
+subdir('pc-bios')
 
 summary_info = {}
 summary_info += {'Install prefix':    config_host['prefix']}
pc-bios/descriptors/meson.build new file +14 -0
new file mode 100644
index 0000000..7c715ba
@@ -0,0 +1,14 @@
+foreach f: [
+  '50-edk2-i386-secure.json',
+  '50-edk2-x86_64-secure.json',
+  '60-edk2-aarch64.json',
+  '60-edk2-arm.json',
+  '60-edk2-i386.json',
+  '60-edk2-x86_64.json'
+]
+  configure_file(input: files(f),
+                 output: f,
+                 configuration: {'DATADIR': config_host['qemu_datadir']},
+                 install: install_blobs,
+                 install_dir: config_host['qemu_datadir'] / 'firmware')
+endforeach
pc-bios/meson.build new file +27 -0
new file mode 100644
index 0000000..6e3bfe3
@@ -0,0 +1,27 @@
+bzip2 = find_program('bzip2')
+
+install_blobs = 'INSTALL_BLOBS' in config_host
+if 'DECOMPRESS_EDK2_BLOBS' in config_host
+  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,
+                  install: install_blobs,
+                  install_dir: config_host['qemu_datadir'],
+                  command: [ bzip2, '-dc', '@INPUT0@' ])
+  endforeach
+endif
+
+subdir('descriptors')
Signature · 1 line
1.8.3.1
#52 lore raw

PATCH 49/147 meson: convert check-decodetree

In reply to Paolo Bonzini
---
 meson.build            | 2 ++
 tests/Makefile.include | 8 +-------
 tests/meson.build      | 4 ++++
 3 files changed, 7 insertions(+), 7 deletions(-)
 create mode 100644 tests/meson.build
meson.build +2 -0
index a3c2ea7..6f1e199 100644
@@ -6,6 +6,7 @@ not_found = dependency('', required: false)
 keyval = import('unstable-keyval')
 ss = import('sourceset')
 
+sh = find_program('sh')
 cc = meson.get_compiler('c')
 config_host = keyval.load(meson.current_build_dir() / 'config-host.mak')
 
@@ -363,6 +364,7 @@ endif
 
 subdir('tools')
 subdir('pc-bios')
+subdir('tests')
 
 summary_info = {}
 summary_info += {'Install prefix':    config_host['prefix']}
tests/Makefile.include +1 -7
index f277d23..8e953a2 100644
@@ -894,13 +894,6 @@ check-tests/qapi-schema/frontend: $(addprefix $(SRC_PATH)/, $(check-qapi-schema-
 check-tests/qapi-schema/doc-good.texi: tests/qapi-schema/doc-good.test.texi
 	@diff -u $(SRC_PATH)/tests/qapi-schema/doc-good.texi $<
 
-.PHONY: check-decodetree
-check-decodetree:
-	$(call quiet-command, \
-	  cd $(SRC_PATH)/tests/decode && \
-          ./check.sh "$(PYTHON)" "$(SRC_PATH)/scripts/decodetree.py", \
-          TEST, decodetree.py)
-
 # Python venv for running tests
 
 .PHONY: check-venv check-acceptance
@@ -962,6 +955,7 @@ check-block: $(patsubst %,check-%, $(check-block-y))
 endif
 check-build: build-unit build-softfloat build-qtest
 
+check: check-block check-qapi-schema check-unit check-softfloat check-qtest
 check-clean:
 	rm -rf $(check-unit-y) tests/*.o tests/*/*.o $(QEMU_IOTESTS_HELPERS-y)
 	rm -rf $(sort $(foreach target,$(SYSEMU_TARGET_LIST), $(check-qtest-$(target)-y:%=tests/qtest/%$(EXESUF))) $(check-qtest-generic-y:%=tests/qtest/%$(EXESUF)))
tests/meson.build new file +4 -0
new file mode 100644
index 0000000..5c52021
@@ -0,0 +1,4 @@
+test('decodetree', sh,
+     args: [ files('decode/check.sh'), config_host['PYTHON'], files('../scripts/decodetree.py') ],
+     workdir: meson.current_source_dir() / 'decode',
+     suite: 'decodetree')
Signature · 1 line
1.8.3.1
#53 lore raw

PATCH 50/147 meson: convert tests/fp and check-softfloat

In reply to Paolo Bonzini
---
 configure              |   2 +-
 tests/Makefile.include | 160 +------------
 tests/fp/Makefile      | 600 ----------------------------------------------
 tests/fp/meson.build   | 636 +++++++++++++++++++++++++++++++++++++++++++++++++
 tests/meson.build      |   4 +
 5 files changed, 644 insertions(+), 758 deletions(-)
 delete mode 100644 tests/fp/Makefile
 create mode 100644 tests/fp/meson.build
configure +1 -1
index 76a4658..4e9dc80 100755
@@ -8324,7 +8324,7 @@ DIRS="$DIRS pc-bios/optionrom pc-bios/s390-ccw"
 DIRS="$DIRS roms/seabios"
 LINKS="Makefile"
 LINKS="$LINKS tests/tcg/lm32/Makefile po/Makefile"
-LINKS="$LINKS tests/tcg/Makefile.target tests/fp/Makefile"
+LINKS="$LINKS tests/tcg/Makefile.target"
 LINKS="$LINKS tests/plugin/Makefile"
 LINKS="$LINKS pc-bios/optionrom/Makefile pc-bios/keymaps"
 LINKS="$LINKS pc-bios/s390-ccw/Makefile"
tests/Makefile.include +3 -157

185 lines not on this page · raw message

tests/fp/Makefile deleted +0 -600

600 lines not on this page · raw message

tests/fp/meson.build new file +636 -0

636 lines not on this page · raw message

tests/meson.build +4 -0
index 5c52021..ec26f92 100644
@@ -2,3 +2,7 @@ test('decodetree', sh,
      args: [ files('decode/check.sh'), config_host['PYTHON'], files('../scripts/decodetree.py') ],
      workdir: meson.current_source_dir() / 'decode',
      suite: 'decodetree')
+
+if 'CONFIG_TCG' in config_host
+  subdir('fp')
+endif
Signature · 1 line
1.8.3.1
#54 lore raw

PATCH 51/147 meson: convert check-qapi-schema

In reply to Paolo Bonzini
---
 tests/Makefile.include        | 218 +-----------------------------------------
 tests/meson.build             |   2 +
 tests/qapi-schema/meson.build | 216 +++++++++++++++++++++++++++++++++++++++++
 3 files changed, 220 insertions(+), 216 deletions(-)
 create mode 100644 tests/qapi-schema/meson.build
tests/Makefile.include +2 -216
index b3f8fdd..676d099 100644
@@ -161,201 +161,6 @@ check-unit-y += tests/test-qapi-util$(EXESUF)
 
 check-block-$(call land,$(CONFIG_POSIX),$(CONFIG_SOFTMMU)) += tests/check-block.sh
 
-qapi-schema += alternate-any.json
-qapi-schema += alternate-array.json
-qapi-schema += alternate-base.json
-qapi-schema += alternate-branch-if-invalid.json
-qapi-schema += alternate-clash.json
-qapi-schema += alternate-conflict-dict.json
-qapi-schema += alternate-conflict-enum-bool.json
-qapi-schema += alternate-conflict-enum-int.json
-qapi-schema += alternate-conflict-string.json
-qapi-schema += alternate-conflict-bool-string.json
-qapi-schema += alternate-conflict-num-string.json
-qapi-schema += alternate-empty.json
-qapi-schema += alternate-invalid-dict.json
-qapi-schema += alternate-nested.json
-qapi-schema += alternate-unknown.json
-qapi-schema += args-alternate.json
-qapi-schema += args-any.json
-qapi-schema += args-array-empty.json
-qapi-schema += args-array-unknown.json
-qapi-schema += args-bad-boxed.json
-qapi-schema += args-boxed-anon.json
-qapi-schema += args-boxed-string.json
-qapi-schema += args-int.json
-qapi-schema += args-invalid.json
-qapi-schema += args-member-array-bad.json
-qapi-schema += args-member-case.json
-qapi-schema += args-member-unknown.json
-qapi-schema += args-name-clash.json
-qapi-schema += args-union.json
-qapi-schema += args-unknown.json
-qapi-schema += bad-base.json
-qapi-schema += bad-data.json
-qapi-schema += bad-ident.json
-qapi-schema += bad-if.json
-qapi-schema += bad-if-empty.json
-qapi-schema += bad-if-empty-list.json
-qapi-schema += bad-if-list.json
-qapi-schema += bad-type-bool.json
-qapi-schema += bad-type-dict.json
-qapi-schema += bad-type-int.json
-qapi-schema += base-cycle-direct.json
-qapi-schema += base-cycle-indirect.json
-qapi-schema += command-int.json
-qapi-schema += comments.json
-qapi-schema += doc-bad-alternate-member.json
-qapi-schema += doc-bad-boxed-command-arg.json
-qapi-schema += doc-bad-command-arg.json
-qapi-schema += doc-bad-enum-member.json
-qapi-schema += doc-bad-event-arg.json
-qapi-schema += doc-bad-feature.json
-qapi-schema += doc-bad-section.json
-qapi-schema += doc-bad-symbol.json
-qapi-schema += doc-bad-union-member.json
-qapi-schema += doc-before-include.json
-qapi-schema += doc-before-pragma.json
-qapi-schema += doc-duplicated-arg.json
-qapi-schema += doc-duplicated-return.json
-qapi-schema += doc-duplicated-since.json
-qapi-schema += doc-empty-arg.json
-qapi-schema += doc-empty-section.json
-qapi-schema += doc-empty-symbol.json
-qapi-schema += doc-good.json
-qapi-schema += doc-interleaved-section.json
-qapi-schema += doc-invalid-end.json
-qapi-schema += doc-invalid-end2.json
-qapi-schema += doc-invalid-return.json
-qapi-schema += doc-invalid-section.json
-qapi-schema += doc-invalid-start.json
-qapi-schema += doc-missing-colon.json
-qapi-schema += doc-missing-expr.json
-qapi-schema += doc-missing-space.json
-qapi-schema += doc-missing.json
-qapi-schema += doc-no-symbol.json
-qapi-schema += doc-undoc-feature.json
-qapi-schema += double-type.json
-qapi-schema += duplicate-key.json
-qapi-schema += empty.json
-qapi-schema += enum-bad-member.json
-qapi-schema += enum-bad-name.json
-qapi-schema += enum-bad-prefix.json
-qapi-schema += enum-clash-member.json
-qapi-schema += enum-dict-member-unknown.json
-qapi-schema += enum-if-invalid.json
-qapi-schema += enum-int-member.json
-qapi-schema += enum-member-case.json
-qapi-schema += enum-missing-data.json
-qapi-schema += enum-wrong-data.json
-qapi-schema += event-boxed-empty.json
-qapi-schema += event-case.json
-qapi-schema += event-member-invalid-dict.json
-qapi-schema += event-nest-struct.json
-qapi-schema += features-bad-type.json
-qapi-schema += features-deprecated-type.json
-qapi-schema += features-duplicate-name.json
-qapi-schema += features-if-invalid.json
-qapi-schema += features-missing-name.json
-qapi-schema += features-name-bad-type.json
-qapi-schema += features-no-list.json
-qapi-schema += features-unknown-key.json
-qapi-schema += flat-union-array-branch.json
-qapi-schema += flat-union-bad-base.json
-qapi-schema += flat-union-bad-discriminator.json
-qapi-schema += flat-union-base-any.json
-qapi-schema += flat-union-base-union.json
-qapi-schema += flat-union-clash-member.json
-qapi-schema += flat-union-discriminator-bad-name.json
-qapi-schema += flat-union-empty.json
-qapi-schema += flat-union-inline.json
-qapi-schema += flat-union-inline-invalid-dict.json
-qapi-schema += flat-union-int-branch.json
-qapi-schema += flat-union-invalid-branch-key.json
-qapi-schema += flat-union-invalid-discriminator.json
-qapi-schema += flat-union-invalid-if-discriminator.json
-qapi-schema += flat-union-no-base.json
-qapi-schema += flat-union-optional-discriminator.json
-qapi-schema += flat-union-string-discriminator.json
-qapi-schema += funny-char.json
-qapi-schema += funny-word.json
-qapi-schema += ident-with-escape.json
-qapi-schema += include-before-err.json
-qapi-schema += include-cycle.json
-qapi-schema += include-extra-junk.json
-qapi-schema += include-nested-err.json
-qapi-schema += include-no-file.json
-qapi-schema += include-non-file.json
-qapi-schema += include-repetition.json
-qapi-schema += include-self-cycle.json
-qapi-schema += include-simple.json
-qapi-schema += indented-expr.json
-qapi-schema += leading-comma-list.json
-qapi-schema += leading-comma-object.json
-qapi-schema += missing-colon.json
-qapi-schema += missing-comma-list.json
-qapi-schema += missing-comma-object.json
-qapi-schema += missing-type.json
-qapi-schema += nested-struct-data.json
-qapi-schema += nested-struct-data-invalid-dict.json
-qapi-schema += non-objects.json
-qapi-schema += oob-test.json
-qapi-schema += allow-preconfig-test.json
-qapi-schema += pragma-doc-required-crap.json
-qapi-schema += pragma-extra-junk.json
-qapi-schema += pragma-name-case-whitelist-crap.json
-qapi-schema += pragma-non-dict.json
-qapi-schema += pragma-unknown.json
-qapi-schema += pragma-returns-whitelist-crap.json
-qapi-schema += qapi-schema-test.json
-qapi-schema += quoted-structural-chars.json
-qapi-schema += redefined-builtin.json
-qapi-schema += redefined-command.json
-qapi-schema += redefined-event.json
-qapi-schema += redefined-type.json
-qapi-schema += reserved-command-q.json
-qapi-schema += reserved-enum-q.json
-qapi-schema += reserved-member-has.json
-qapi-schema += reserved-member-q.json
-qapi-schema += reserved-member-u.json
-qapi-schema += reserved-member-underscore.json
-qapi-schema += reserved-type-kind.json
-qapi-schema += reserved-type-list.json
-qapi-schema += returns-alternate.json
-qapi-schema += returns-array-bad.json
-qapi-schema += returns-dict.json
-qapi-schema += returns-unknown.json
-qapi-schema += returns-whitelist.json
-qapi-schema += string-code-point-31.json
-qapi-schema += string-code-point-127.json
-qapi-schema += struct-base-clash-deep.json
-qapi-schema += struct-base-clash.json
-qapi-schema += struct-data-invalid.json
-qapi-schema += struct-member-if-invalid.json
-qapi-schema += struct-member-invalid-dict.json
-qapi-schema += struct-member-invalid.json
-qapi-schema += trailing-comma-list.json
-qapi-schema += trailing-comma-object.json
-qapi-schema += type-bypass-bad-gen.json
-qapi-schema += unclosed-list.json
-qapi-schema += unclosed-object.json
-qapi-schema += unclosed-string.json
-qapi-schema += union-base-empty.json
-qapi-schema += union-base-no-discriminator.json
-qapi-schema += union-branch-case.json
-qapi-schema += union-branch-if-invalid.json
-qapi-schema += union-branch-invalid-dict.json
-qapi-schema += union-clash-branches.json
-qapi-schema += union-empty.json
-qapi-schema += union-invalid-base.json
-qapi-schema += union-optional-branch.json
-qapi-schema += union-unknown.json
-qapi-schema += unknown-escape.json
-qapi-schema += unknown-expr-key.json
-
-
-check-qapi-schema-y := $(addprefix tests/qapi-schema/, $(qapi-schema))
-
 generated-files-y += tests/test-qapi-types.h
 generated-files-y += tests/include/test-qapi-types-sub-module.h
 generated-files-y += tests/test-qapi-types-sub-sub-module.h
@@ -501,13 +306,6 @@ tests/test-qapi-gen-timestamp: \
 	@rm -f tests/test-qapi-doc.texi
 	@>$@
 
-tests/qapi-schema/doc-good.test.texi: $(SRC_PATH)/tests/qapi-schema/doc-good.json $(qapi-py)
-	$(call quiet-command,$(PYTHON) $(SRC_PATH)/scripts/qapi-gen.py \
-		-o tests/qapi-schema -p "doc-good-" $<, \
-		"GEN","$@")
-	@mv tests/qapi-schema/doc-good-qapi-doc.texi $@
-	@rm -f tests/qapi-schema/doc-good-qapi-*.[ch] tests/qapi-schema/doc-good-qmp-*.[ch]
-
 tests/qtest/dbus-vmstate1.h tests/qtest/dbus-vmstate1.c: tests/qtest/dbus-vmstate1-gen-timestamp ;
 tests/qtest/dbus-vmstate1-gen-timestamp: $(SRC_PATH)/tests/qtest/dbus-vmstate1.xml
 	$(call quiet-command,$(GDBUS_CODEGEN) $< \
@@ -720,7 +518,6 @@ check-tcg: $(RUN_TCG_TARGET_RULES)
 .PHONY: clean-tcg
 clean-tcg: $(CLEAN_TCG_TARGET_RULES)
 
-# Other tests
 
 QEMU_IOTESTS_HELPERS-$(call land,$(CONFIG_SOFTMMU),$(CONFIG_LINUX)) = tests/qemu-iotests/socket_scm_helper$(EXESUF)
 
@@ -730,16 +527,6 @@ check-tests/check-block.sh: tests/check-block.sh qemu-img$(EXESUF) \
 		$(patsubst %,%/all,$(filter %-softmmu,$(TARGET_DIRS)))
 	@$<
 
-.PHONY: check-tests/qapi-schema/frontend
-check-tests/qapi-schema/frontend: $(addprefix $(SRC_PATH)/, $(check-qapi-schema-y))
-	$(call quiet-command, PYTHONPATH=$(SRC_PATH)/scripts \
-	  PYTHONIOENCODING=utf-8 $(PYTHON) $(SRC_PATH)/tests/qapi-schema/test-qapi.py $^, \
-	  TEST, check-qapi-schema)
-
-.PHONY: check-tests/qapi-schema/doc-good.texi
-check-tests/qapi-schema/doc-good.texi: tests/qapi-schema/doc-good.test.texi
-	@diff -u $(SRC_PATH)/tests/qapi-schema/doc-good.texi $<
-
 # Python venv for running tests
 
 .PHONY: check-venv check-acceptance
@@ -793,15 +580,14 @@ check-acceptance: check-venv $(TESTS_RESULTS_DIR) get-vm-images
 
 # Consolidated targets
 
-.PHONY: check-block check-qapi-schema check-qtest check-unit check check-clean get-vm-images
-check-qapi-schema: check-tests/qapi-schema/frontend check-tests/qapi-schema/doc-good.texi
+.PHONY: check-block check-qtest check-unit check check-clean get-vm-images
 check-qtest: $(patsubst %,check-qtest-%, $(QTEST_TARGETS))
 ifeq ($(CONFIG_TOOLS),y)
 check-block: $(patsubst %,check-%, $(check-block-y))
 endif
 check-build: build-unit build-qtest
 
-check: check-block check-qapi-schema check-unit check-qtest
+check: check-block check-unit check-qtest
 check-clean:
 	rm -rf $(check-unit-y) tests/*.o tests/*/*.o $(QEMU_IOTESTS_HELPERS-y)
 	rm -rf $(sort $(foreach target,$(SYSEMU_TARGET_LIST), $(check-qtest-$(target)-y:%=tests/qtest/%$(EXESUF))) $(check-qtest-generic-y:%=tests/qtest/%$(EXESUF)))
tests/meson.build +2 -0
index ec26f92..8be9c22 100644
@@ -6,3 +6,5 @@ test('decodetree', sh,
 if 'CONFIG_TCG' in config_host
   subdir('fp')
 endif
+
+subdir('qapi-schema')
tests/qapi-schema/meson.build new file +216 -0

216 lines not on this page · raw message

Signature · 1 line
1.8.3.1
#55 lore raw

PATCH 52/147 meson: convert qom directory to Meson (tools part)

In reply to Paolo Bonzini

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

---
 Makefile          |  2 +-
 Makefile.objs     |  2 +-
 Makefile.target   |  3 ++-
 meson.build       |  1 +
 qom/Makefile.objs |  3 ---
 qom/meson.build   | 15 +++++++++++++++
 6 files changed, 20 insertions(+), 6 deletions(-)
 create mode 100644 qom/meson.build
Makefile +1 -1
index 62e0ef0..1be6019 100644
@@ -232,7 +232,6 @@ dummy := $(call unnest-vars,, \
                 storage-daemon-obj-y \
                 storage-daemon-obj-m \
                 crypto-obj-y \
-                qom-obj-y \
                 io-obj-y \
                 common-obj-y \
                 common-obj-m)
@@ -253,6 +252,7 @@ $(SOFTMMU_ALL_RULES): $(storage-daemon-obj-y)
 $(SOFTMMU_ALL_RULES): $(chardev-obj-y)
 $(SOFTMMU_ALL_RULES): $(crypto-obj-y)
 $(SOFTMMU_ALL_RULES): $(io-obj-y)
+$(SOFTMMU_ALL_RULES): $(qom-obj-y)
 $(SOFTMMU_ALL_RULES): config-all-devices.mak
 
 SOFTMMU_FUZZ_RULES=$(filter %-softmmu/fuzz, $(TARGET_DIRS_RULES))
Makefile.objs +1 -1
index baf1565..84bfa2a 100644
@@ -1,6 +1,6 @@
 #######################################################################
 # Common libraries for tools and emulators
-qom-obj-y = qom/
+qom-obj-y = qom/libqom.fa
 
 #######################################################################
 # code used by both qemu system emulation and qemu-img
Makefile.target +2 -1
index 257afc2..1e04551 100644
@@ -191,13 +191,14 @@ all-obj-y := $(obj-y)
 common-obj-m :=
 
 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 6f1e199..6517d7e 100644
@@ -319,6 +319,7 @@ libqemuutil = static_library('qemuutil',
 qemuutil = declare_dependency(link_with: libqemuutil,
                               sources: genh + version_res)
 
+subdir('qom')
 subdir('fsdev')
 
 # Other build targets
qom/Makefile.objs +0 -3
index 1b45d10..b962904 100644
@@ -1,5 +1,2 @@
-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
 storage-daemon-obj-y += 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)
Signature · 1 line
1.8.3.1
#56 lore raw

PATCH 53/147 meson: convert authz directory to Meson

In reply to Paolo Bonzini

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

---
 Makefile            |  1 -
 Makefile.objs       |  3 ++-
 Makefile.target     |  2 +-
 authz/Makefile.objs |  7 -------
 authz/meson.build   | 19 +++++++++++++++++++
 meson.build         |  5 +++++
 6 files changed, 27 insertions(+), 10 deletions(-)
 delete mode 100644 authz/Makefile.objs
 create mode 100644 authz/meson.build
Makefile +0 -1
index 1be6019..872f450 100644
@@ -225,7 +225,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 +2 -1
index 84bfa2a..0bc361d 100644
@@ -9,7 +9,8 @@ ifeq ($(call lor,$(CONFIG_SOFTMMU),$(CONFIG_TOOLS)),y)
 
 chardev-obj-y = chardev/
 
-authz-obj-y = authz/
+authz-obj-y = authz/libauthz.fa
+authz/libauthz.fa-libs = $(if $(CONFIG_AUTH_PAM),-lpam)
 
 block-obj-y = block/ nbd/ scsi/
 block-obj-y += block.o blockjob.o job.o
Makefile.target +1 -1
index 1e04551..79b6e02 100644
@@ -192,9 +192,9 @@ common-obj-m :=
 
 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 +19 -0
new file mode 100644
index 0000000..c1f6362
@@ -0,0 +1,19 @@
+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: [authz_ss.dependencies()],
+                          name_suffix: 'fa',
+                          build_by_default: false)
+
+authz = declare_dependency(link_whole: libauthz,
+                           dependencies: qom)
meson.build +5 -0
index 6517d7e..f8fd56a 100644
@@ -82,6 +82,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 = not_found
+if 'CONFIG_AUTH_PAM' in config_host
+  pam = cc.find_library('pam')
+endif
 libattr = not_found
 if 'CONFIG_ATTR' in config_host
   libattr = declare_dependency(link_args: config_host['LIBATTR_LIBS'].split())
@@ -320,6 +324,7 @@ qemuutil = declare_dependency(link_with: libqemuutil,
                               sources: genh + version_res)
 
 subdir('qom')
+subdir('authz')
 subdir('fsdev')
 
 # Other build targets
Signature · 1 line
1.8.3.1
#57 lore raw

PATCH 54/147 meson: convert crypto directory to Meson

In reply to Paolo Bonzini

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

---
 Makefile             |  1 -
 Makefile.objs        |  2 +-
 Makefile.target      |  2 +-
 crypto/Makefile.objs | 37 -------------------------------------
 crypto/meson.build   | 52 ++++++++++++++++++++++++++++++++++++++++++++++++++++
 meson.build          |  4 ++--
 qom/meson.build      |  2 +-
 7 files changed, 57 insertions(+), 43 deletions(-)
 delete mode 100644 crypto/Makefile.objs
Makefile +0 -1
index 872f450..d26ad4c 100644
@@ -230,7 +230,6 @@ dummy := $(call unnest-vars,, \
                 block-obj-m \
                 storage-daemon-obj-y \
                 storage-daemon-obj-m \
-                crypto-obj-y \
                 io-obj-y \
                 common-obj-y \
                 common-obj-m)
Makefile.objs +1 -1
index 0bc361d..018338d 100644
@@ -19,7 +19,7 @@ block-obj-$(CONFIG_REPLICATION) += replication.o
 
 block-obj-m = block/
 
-crypto-obj-y = crypto/
+crypto-obj-y = crypto/libcrypto.fa
 
 io-obj-y = io/
 
Makefile.target +1 -1
index 79b6e02..b213955 100644
@@ -193,12 +193,12 @@ common-obj-m :=
 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 -37
deleted file mode 100644
index a988591..0000000
@@ -1,37 +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-$(CONFIG_GNUTLS) += tls-cipher-suites.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_common.o
-crypto-obj-y += secret.o
-crypto-obj-$(CONFIG_SECRET_KEYRING) += secret_keyring.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-$(CONFIG_QEMU_PRIVATE_XTS) += xts.o
-crypto-obj-y += block.o
-crypto-obj-y += block-qcow.o
-crypto-obj-y += block-luks.o
crypto/meson.build +52 -0

55 lines not on this page · raw message

meson.build +2 -2
index f8fd56a..8d46944 100644
@@ -307,6 +307,8 @@ subdir('qobject')
 subdir('stubs')
 subdir('trace')
 subdir('util')
+subdir('qom')
+subdir('authz')
 subdir('crypto')
 subdir('storage-daemon')
 subdir('ui')
@@ -323,8 +325,6 @@ libqemuutil = static_library('qemuutil',
 qemuutil = declare_dependency(link_with: libqemuutil,
                               sources: genh + 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
#58 lore raw

PATCH 55/147 meson: convert io directory to Meson

In reply to Paolo Bonzini

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

---
 Makefile         |  1 -
 Makefile.objs    |  2 +-
 Makefile.target  |  2 +-
 io/Makefile.objs | 12 ------------
 io/meson.build   | 25 +++++++++++++++++++++++++
 meson.build      |  1 +
 6 files changed, 28 insertions(+), 15 deletions(-)
 delete mode 100644 io/Makefile.objs
 create mode 100644 io/meson.build
Makefile +0 -1
index d26ad4c..8fe446b 100644
@@ -230,7 +230,6 @@ dummy := $(call unnest-vars,, \
                 block-obj-m \
                 storage-daemon-obj-y \
                 storage-daemon-obj-m \
-                io-obj-y \
                 common-obj-y \
                 common-obj-m)
 
Makefile.objs +1 -1
index 018338d..0920cdb 100644
@@ -21,7 +21,7 @@ block-obj-m = block/
 
 crypto-obj-y = crypto/libcrypto.fa
 
-io-obj-y = io/
+io-obj-y = io/libio.fa
 
 endif # CONFIG_SOFTMMU or CONFIG_TOOLS
 
Makefile.target +1 -1
index b213955..f6b7a86 100644
@@ -194,12 +194,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..062e011
@@ -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: [io_ss.dependencies()],
+                       link_with: libqemuutil,
+                       name_suffix: 'fa',
+                       build_by_default: false)
+
+io = declare_dependency(link_whole: libio, dependencies: [crypto, qom])
meson.build +1 -0
index 8d46944..5c4bf16 100644
@@ -325,6 +325,7 @@ libqemuutil = static_library('qemuutil',
 qemuutil = declare_dependency(link_with: libqemuutil,
                               sources: genh + version_res)
 
+subdir('io')
 subdir('fsdev')
 
 # Other build targets
Signature · 1 line
1.8.3.1
#59 lore raw

PATCH 56/147 meson: convert target/s390x/gen-features.h

In reply to Paolo Bonzini

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

Needed by linux-user/s390x/cpu_loop.c.

---
 Makefile                    |  2 ++
 meson.build                 |  1 +
 target/meson.build          |  1 +
 target/s390x/Makefile.objs  | 20 --------------------
 target/s390x/cpu_features.h |  2 +-
 target/s390x/cpu_models.h   |  2 +-
 target/s390x/meson.build    |  9 +++++++++
 7 files changed, 15 insertions(+), 22 deletions(-)
 create mode 100644 target/meson.build
 create mode 100644 target/s390x/meson.build
Makefile +2 -0
index 8fe446b..bd5b4db 100644
@@ -108,6 +108,8 @@ CONFIG_BLOCK := $(call lor,$(CONFIG_SOFTMMU),$(CONFIG_TOOLS))
 generated-files-y = config-host.h
 
 generated-files-y += module_block.h
+generated-files-y += target/s390x/gen-features.h
+target/s390x/gen-features.h: Makefile.ninja
 
 generated-files-y += .git-submodule-status
 
meson.build +1 -0
index 5c4bf16..c072d68 100644
@@ -327,6 +327,7 @@ qemuutil = declare_dependency(link_with: libqemuutil,
 
 subdir('io')
 subdir('fsdev')
+subdir('target')
 
 # Other build targets
 if 'CONFIG_GUEST_AGENT' in config_host
target/meson.build new file +1 -0
new file mode 100644
index 0000000..e29dd3e
@@ -0,0 +1 @@
+subdir('s390x')
target/s390x/Makefile.objs +0 -20
index 3e27455..9b9accc 100644
@@ -8,23 +8,3 @@ obj-$(CONFIG_SOFTMMU) += sigp.o
 obj-$(CONFIG_KVM) += kvm.o
 obj-$(call lnot,$(CONFIG_KVM)) += kvm-stub.o
 obj-$(call lnot,$(CONFIG_TCG)) += tcg-stub.o
-
-# build and run feature list generator
-feat-src = $(SRC_PATH)/target/$(TARGET_BASE_ARCH)/
-feat-dst = $(BUILD_DIR)/$(TARGET_DIR)
-ifneq ($(MAKECMDGOALS),clean)
-generated-files-y += $(feat-dst)gen-features.h
-endif
-
-$(feat-dst)gen-features.h: $(feat-dst)gen-features.h-timestamp
-	@cmp $< $@ >/dev/null 2>&1 || cp $< $@
-$(feat-dst)gen-features.h-timestamp: $(feat-dst)gen-features
-	$(call quiet-command,$< >$@,"GEN","$(TARGET_DIR)gen-features.h")
-
-$(feat-dst)gen-features: $(feat-src)gen-features.c
-	$(call quiet-command,$(HOST_CC) $(QEMU_INCLUDES) -o $@ $<,"CC","$(TARGET_DIR)gen-features")
-
-clean-target:
-	rm -f gen-features.h-timestamp
-	rm -f gen-features.h
-	rm -f gen-features
target/s390x/cpu_features.h +1 -1
index da695a8..2a29475 100644
@@ -16,7 +16,7 @@
 
 #include "qemu/bitmap.h"
 #include "cpu_features_def.h"
-#include "gen-features.h"
+#include "target/s390x/gen-features.h"
 
 /* CPU features are announced via different ways */
 typedef enum {
target/s390x/cpu_models.h +1 -1
index 88bd01a6..74d1f87 100644
@@ -14,7 +14,7 @@
 #define TARGET_S390X_CPU_MODELS_H
 
 #include "cpu_features.h"
-#include "gen-features.h"
+#include "target/s390x/gen-features.h"
 #include "hw/core/cpu.h"
 
 /* static CPU definition */
target/s390x/meson.build new file +9 -0
new file mode 100644
index 0000000..ddf8d20
@@ -0,0 +1,9 @@
+gen_features = executable('gen-features', 'gen-features.c', native: true,
+                          build_by_default: false)
+
+gen_features_h = custom_target('gen-features.h',
+                               output: 'gen-features.h',
+                               capture: true,
+                               command: gen_features)
+
+specific_ss.add(gen_features_h)
Signature · 1 line
1.8.3.1
#60 lore raw

PATCH 57/147 meson: infrastructure for building emulators

In reply to Paolo Bonzini
---
 Makefile               |  74 +++-------------------
 Makefile.target        |  19 +++---
 configure              |   6 --
 hw/i386/fw_cfg.c       |   2 +-
 hw/i386/pc.c           |   2 +-
 hw/i386/pc_piix.c      |   2 +-
 hw/i386/x86.c          |   2 +-
 hw/vfio/pci-quirks.c   |   2 +-
 hw/virtio/virtio-mem.c |   2 +-
 include/qemu/osdep.h   |   2 +-
 meson.build            | 166 ++++++++++++++++++++++++++++++++++++++++++++++++-
 rules.mak              |   8 ---
 scripts/create_config  |   2 +
 scripts/grepy.sh       |   3 +
 scripts/minikconf.py   |   0
 softmmu/qtest.c        |   2 +-
 util/meson.build       |   5 +-
 17 files changed, 193 insertions(+), 106 deletions(-)
 create mode 100755 scripts/grepy.sh
 mode change 100755 => 100644 scripts/minikconf.py
Makefile +7 -67
index bd5b4db..f0fed55 100644
@@ -105,8 +105,6 @@ 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
-
 generated-files-y += module_block.h
 generated-files-y += target/s390x/gen-features.h
 target/s390x/gen-features.h: Makefile.ninja
@@ -162,65 +160,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 $< $(SRC_PATH)/Kconfig \
-    CONFIG_TCG=$(CONFIG_TCG) \
-    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_VHOST_KERNEL=$(CONFIG_VHOST_KERNEL) \
-    CONFIG_VIRTFS=$(CONFIG_VIRTFS) \
-    CONFIG_LINUX=$(CONFIG_LINUX) \
-    CONFIG_PVRDMA=$(CONFIG_PVRDMA)
-
-MINIKCONF = $(PYTHON) $(SRC_PATH)/scripts/minikconf.py
-
-$(SUBDIR_DEVICES_MAK): %/config-devices.mak: default-configs/%.mak $(SRC_PATH)/Kconfig $(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
@@ -263,10 +202,15 @@ $(SOFTMMU_FUZZ_RULES): $(io-obj-y)
 $(SOFTMMU_FUZZ_RULES): config-all-devices.mak
 $(SOFTMMU_FUZZ_RULES): $(edk2-decompressed)
 
+# meson: this is sub-optimal but going away after conversion
+TARGET_DEPS = $(patsubst %,%-config-target.h, $(TARGET_DIRS))
+TARGET_DEPS += $(patsubst %,%-config-devices.h, $(filter %-softmmu,$(TARGET_DIRS)))
+TARGET_DEPS += $(patsubst %,libqemu-%.fa, $(TARGET_DIRS))
+
 .PHONY: $(TARGET_DIRS_RULES)
 # The $(TARGET_DIRS_RULES) are of the form SUBDIR/GOAL, so that
 # $(dir $@) yields the sub-directory, and $(notdir $@) yields the sub-goal
-$(TARGET_DIRS_RULES):
+$(TARGET_DIRS_RULES): $(TARGET_DEPS)
 	$(call quiet-command,$(MAKE) $(SUBDIR_MAKEFLAGS) -C $(dir $@) V="$(V)" TARGET_DIR="$(dir $@)" $(notdir $@),)
 
 # LIBFDT_lib="": avoid breaking existing trees with objects requiring -fPIC
@@ -353,7 +297,6 @@ module_block.h: $(SRC_PATH)/scripts/modules/module_block.py config-host.mak
 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
 	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 \
@@ -362,8 +305,6 @@ clean: recurse-clean
 	rm -f $(filter-out %.tlb,$(TOOLS)) $(HELPERS-y) TAGS cscope.* *.pod *~ */*~
 	rm -f fsdev/*.pod scsi/*.pod
 	rm -f $(foreach f,$(generated-files-y),$(f) $(f)-timestamp)
-	rm -f config-all-devices.mak
-	rm -f $(SUBDIR_DEVICES_MAK)
 
 VERSION ?= $(shell cat VERSION)
 
@@ -380,8 +321,7 @@ endef
 distclean: clean
 	rm -f config-host.mak config-host.h* $(DOCS)
 	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-plugins-ld.symbols qemu-plugins-ld64.symbols
Makefile.target +9 -10
index f6b7a86..43d2f97 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/
 
 #########################################################
@@ -169,7 +170,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
 
@@ -210,7 +210,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
@@ -262,5 +262,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 4e9dc80..f1a9824 100755
@@ -8098,18 +8098,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/fw_cfg.c +1 -1
index c55abfb..33441ad 100644
@@ -22,7 +22,7 @@
 #include "hw/nvram/fw_cfg.h"
 #include "e820_memory_layout.h"
 #include "kvm_i386.h"
-#include "config-devices.h"
+#include CONFIG_DEVICES
 
 struct hpet_fw_config hpet_cfg = {.count = UINT8_MAX};
 
hw/i386/pc.c +1 -1
index 47c5ca3..cc616e4 100644
@@ -92,10 +92,10 @@
 #include "hw/mem/memory-device.h"
 #include "sysemu/replay.h"
 #include "qapi/qmp/qerror.h"
-#include "config-devices.h"
 #include "e820_memory_layout.h"
 #include "fw_cfg.h"
 #include "trace.h"
+#include CONFIG_DEVICES
 
 GlobalProperty pc_compat_5_0[] = {
 };
hw/i386/pc_piix.c +1 -1
index b789e83..456e336 100644
@@ -23,7 +23,7 @@
  */
 
 #include "qemu/osdep.h"
-#include "config-devices.h"
+#include CONFIG_DEVICES
 
 #include "qemu/units.h"
 #include "hw/loader.h"
hw/i386/x86.c +1 -1
index 67bee1b..cf384b9 100644
@@ -49,7 +49,7 @@
 #include "multiboot.h"
 #include "elf.h"
 #include "standard-headers/asm-x86/bootparam.h"
-#include "config-devices.h"
+#include CONFIG_DEVICES
 #include "kvm_i386.h"
 
 #define BIOS_FILENAME "bios.bin"
hw/vfio/pci-quirks.c +1 -1
index 3a14b7c..5715091 100644
@@ -11,7 +11,7 @@
  */
 
 #include "qemu/osdep.h"
-#include "config-devices.h"
+#include CONFIG_DEVICES
 #include "exec/memop.h"
 #include "qemu/units.h"
 #include "qemu/error-report.h"
hw/virtio/virtio-mem.c +1 -1
index 7740fc6..8fbec77 100644
@@ -29,7 +29,7 @@
 #include "migration/misc.h"
 #include "hw/boards.h"
 #include "hw/qdev-properties.h"
-#include "config-devices.h"
+#include CONFIG_DEVICES
 #include "trace.h"
 
 /*
include/qemu/osdep.h +1 -1
index 20872e7..412962d 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 +163 -3

213 lines not on this page · raw message

rules.mak +0 -8
index 1aa6394..d8d35f7 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 +0 -0
old mode 100755
new mode 100644
softmmu/qtest.c +1 -1
index 5672b75..4e439ca 100644
@@ -27,7 +27,7 @@
 #include "qemu/error-report.h"
 #include "qemu/module.h"
 #include "qemu/cutils.h"
-#include "config-devices.h"
+#include CONFIG_DEVICES
 #ifdef CONFIG_PSERIES
 #include "hw/ppc/spapr_rtas.h"
 #endif
util/meson.build +1 -4
index 62113ba..9ee7425 100644
@@ -62,7 +62,4 @@ util_ss.add(when: 'CONFIG_LINUX', if_true: files('vfio-helpers.c'))
 util_ss.add(when: 'CONFIG_POSIX', if_true: files('drm.c'))
 util_ss.add(files('guest-random.c'))
 util_ss.add(when: 'CONFIG_GIO', if_true: [files('dbus.c'), gio])
-
-if have_user then
-  util_ss.add(files('selfmap.c'))
-endif
+util_ss.add(when: 'CONFIG_USER_ONLY', if_true: [files('selfmap.c')])
Signature · 1 line
1.8.3.1
#61 lore raw

PATCH 58/147 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 | 9 +++++++++
 1 file changed, 9 insertions(+)
meson.build +9 -0
index 3388d68..74be140 100644
@@ -48,6 +48,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')
 
@@ -55,6 +59,11 @@ 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'
+  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
#62 lore raw

PATCH 59/147 meson: add modules infrastructure

In reply to Paolo Bonzini

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

---
 Makefile            | 10 +---------
 Makefile.target     |  6 ++++++
 meson.build         | 52 ++++++++++++++++++++++++++++++++++++++++++++++++++++
 rules.mak           | 10 +++++-----
 scripts/undefsym.sh | 20 ++++++++++++++++++++
 5 files changed, 84 insertions(+), 14 deletions(-)
 create mode 100755 scripts/undefsym.sh
Makefile +1 -9
index f0fed55..6d58b43 100644
@@ -250,7 +250,7 @@ slirp/all: .git-submodule-status
 		CFLAGS="$(QEMU_CFLAGS) $(CFLAGS)" LDFLAGS="$(QEMU_LDFLAGS)")
 
 $(filter %/all, $(TARGET_DIRS_RULES)): libqemuutil.a $(common-obj-y) \
-	$(qom-obj-y)
+	$(qom-obj-y) block.syms qemu.syms
 
 $(filter %/fuzz, $(TARGET_DIRS_RULES)): libqemuutil.a $(common-obj-y) \
 	$(qom-obj-y) $(crypto-user-obj-$(CONFIG_USER_ONLY))
@@ -454,14 +454,6 @@ install: all $(if $(BUILD_DOCS),install-doc) \
 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 43d2f97..d1d8906 100644
@@ -162,6 +162,12 @@ obj-y += qapi/
 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 +52 -0

82 lines not on this page · raw message

rules.mak +5 -5
index d8d35f7..9da9dcd 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..b9ec332
@@ -0,0 +1,20 @@
+#! /usr/bin/env 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
#63 lore raw

PATCH 60/147 meson: convert chardev directory to Meson (tools part)

In reply to Paolo Bonzini

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

---
 Makefile              |  1 -
 Makefile.objs         |  4 ++--
 Makefile.target       |  2 +-
 chardev/Makefile.objs | 19 -------------------
 chardev/meson.build   | 32 ++++++++++++++++++++++++++++++++
 meson.build           |  1 +
 6 files changed, 36 insertions(+), 23 deletions(-)
 create mode 100644 chardev/meson.build
Makefile +0 -1
index 6d58b43..bd54901 100644
@@ -166,7 +166,6 @@ include $(SRC_PATH)/Makefile.objs
 endif
 
 dummy := $(call unnest-vars,, \
-                chardev-obj-y \
                 block-obj-y \
                 block-obj-m \
                 storage-daemon-obj-y \
Makefile.objs +2 -2
index 0920cdb..297bd5b 100644
@@ -7,8 +7,6 @@ qom-obj-y = qom/libqom.fa
 
 ifeq ($(call lor,$(CONFIG_SOFTMMU),$(CONFIG_TOOLS)),y)
 
-chardev-obj-y = chardev/
-
 authz-obj-y = authz/libauthz.fa
 authz/libauthz.fa-libs = $(if $(CONFIG_AUTH_PAM),-lpam)
 
@@ -19,6 +17,8 @@ block-obj-$(CONFIG_REPLICATION) += replication.o
 
 block-obj-m = block/
 
+chardev-obj-y = chardev/libchardev.fa
+
 crypto-obj-y = crypto/libcrypto.fa
 
 io-obj-y = io/libio.fa
Makefile.target +1 -1
index d1d8906..6b9de09 100644
@@ -199,13 +199,13 @@ common-obj-m :=
 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 3783dad..6662d0d 100644
@@ -1,23 +1,4 @@
-chardev-obj-y += char.o
 chardev-obj-$(CONFIG_SOFTMMU) += chardev-sysemu.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-$(CONFIG_SOFTMMU) += msmouse.o wctablet.o testdev.o
 
 ifeq ($(CONFIG_BRLAPI),y)
chardev/meson.build new file +32 -0
new file mode 100644
index 0000000..a2e671d
@@ -0,0 +1,32 @@
+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(),
+                            name_suffix: 'fa',
+                            build_by_default: false)
+
+chardev = declare_dependency(link_whole: libchardev)
meson.build +1 -0
index ccf5a63..aa813a2 100644
@@ -442,6 +442,7 @@ qemuutil = declare_dependency(link_with: libqemuutil,
                               sources: genh + version_res)
 
 subdir('io')
+subdir('chardev')
 subdir('fsdev')
 subdir('target')
 
Signature · 1 line
1.8.3.1
#64 lore raw

PATCH 61/147 meson: convert block

In reply to Paolo Bonzini

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

---
 Makefile                    |   8 ----
 Makefile.objs               |  32 ++++++++++---
 Makefile.target             |   3 +-
 block.c                     |   2 +-
 block/Makefile.objs         |  75 ------------------------------
 block/meson.build           | 111 ++++++++++++++++++++++++++++++++++++++++++++
 block/monitor/Makefile.objs |   2 -
 block/monitor/meson.build   |   2 +
 configure                   |  14 ++++--
 meson.build                 |  68 +++++++++++++++++++++++++++
 nbd/Makefile.objs           |   1 -
 nbd/meson.build             |   5 ++
 rules.mak                   |   3 +-
 scsi/Makefile.objs          |   4 --
 scsi/meson.build            |   4 ++
 15 files changed, 227 insertions(+), 107 deletions(-)
 delete mode 100644 block/Makefile.objs
 create mode 100644 block/meson.build
 delete mode 100644 block/monitor/Makefile.objs
 create mode 100644 block/monitor/meson.build
 delete mode 100644 nbd/Makefile.objs
 create mode 100644 nbd/meson.build
 delete mode 100644 scsi/Makefile.objs
 create mode 100644 scsi/meson.build
Makefile +0 -8
index bd54901..f251703 100644
@@ -105,7 +105,6 @@ include $(SRC_PATH)/rules.mak
 # lor is defined in rules.mak
 CONFIG_BLOCK := $(call lor,$(CONFIG_SOFTMMU),$(CONFIG_TOOLS))
 
-generated-files-y += module_block.h
 generated-files-y += target/s390x/gen-features.h
 target/s390x/gen-features.h: Makefile.ninja
 
@@ -166,8 +165,6 @@ include $(SRC_PATH)/Makefile.objs
 endif
 
 dummy := $(call unnest-vars,, \
-                block-obj-y \
-                block-obj-m \
                 storage-daemon-obj-y \
                 storage-daemon-obj-m \
                 common-obj-y \
@@ -288,11 +285,6 @@ ifdef CONFIG_MPATH
 scsi/qemu-pr-helper$(EXESUF): LIBS += -ludev -lmultipath -lmpathpersist
 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 +25 -7
index 297bd5b..eeaa0cf 100644
@@ -10,12 +10,20 @@ ifeq ($(call lor,$(CONFIG_SOFTMMU),$(CONFIG_TOOLS)),y)
 authz-obj-y = authz/libauthz.fa
 authz/libauthz.fa-libs = $(if $(CONFIG_AUTH_PAM),-lpam)
 
-block-obj-y = block/ nbd/ scsi/
-block-obj-y += block.o blockjob.o job.o
-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 = $(ZSTD_LIBS)
+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)
 
 chardev-obj-y = chardev/libchardev.fa
 
@@ -40,7 +48,7 @@ storage-daemon-obj-$(CONFIG_POSIX) += os-posix.o
 # 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 = blockdev.o blockdev-nbd.o
 common-obj-y += bootdevice.o iothread.o
 common-obj-y += dump/
 common-obj-y += job-qmp.o
@@ -55,6 +63,16 @@ common-obj-$(CONFIG_LINUX) += fsdev/
 common-obj-y += accel/
 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 6b9de09..c0575da 100644
@@ -199,13 +199,12 @@ common-obj-m :=
 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 d9ac0e0..67c5028 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 deleted +0 -75

75 lines not on this page · raw message

block/meson.build new file +111 -0

111 lines not on this page · raw message

block/monitor/Makefile.objs deleted +0 -2
deleted file mode 100644
index 39acf85..0000000
@@ -1,2 +0,0 @@
-common-obj-y += block-hmp-cmds.o
-block-obj-y += bitmap-qmp-cmds.o
block/monitor/meson.build new file +2 -0
new file mode 100644
index 0000000..374aac1
@@ -0,0 +1,2 @@
+softmmu_ss.add(files('block-hmp-cmds.c'))
+block_ss.add(files('bitmap-qmp-cmds.c'))
configure +9 -5
index f1a9824..200c5f7 100755
@@ -2628,8 +2628,6 @@ if test "$zstd" != "no" ; then
     if $pkg_config --atleast-version=$libzstd_minver libzstd ; then
         zstd_cflags="$($pkg_config --cflags libzstd)"
         zstd_libs="$($pkg_config --libs libzstd)"
-        LIBS="$zstd_libs $LIBS"
-        QEMU_CFLAGS="$QEMU_CFLAGS $zstd_cflags"
         zstd="yes"
     else
         if test "$zstd" = "yes" ; then
@@ -4047,7 +4045,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."
@@ -7324,7 +7323,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
@@ -7394,6 +7397,8 @@ fi
 
 if test "$zstd" = "yes" ; then
   echo "CONFIG_ZSTD=y" >> $config_host_mak
+  echo "ZSTD_CFLAGS=$zstd_cflags" >> $config_host_mak
+  echo "ZSTD_LIBS=$zstd_libs" >> $config_host_mak
 fi
 
 if test "$libiscsi" = "yes" ; then
@@ -7426,7 +7431,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 +68 -0

98 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 9da9dcd..8285fe5 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)))))
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
#65 lore raw

PATCH 62/147 meson: qemu-{img,io,nbd}

In reply to Paolo Bonzini

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

---
 Makefile    |  5 -----
 configure   |  3 +--
 meson.build | 14 ++++++++++++--
 3 files changed, 13 insertions(+), 9 deletions(-)
Makefile +0 -5
index f251703..c269823 100644
@@ -273,11 +273,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)
 qemu-storage-daemon$(EXESUF): qemu-storage-daemon.o $(authz-obj-y) $(block-obj-y) $(crypto-obj-y) $(chardev-obj-y) $(io-obj-y) $(qom-obj-y) $(storage-daemon-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)
configure +1 -2
index 200c5f7..a8ad31c 100755
@@ -6647,9 +6647,8 @@ fi
 tools=""
 helpers=""
 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) qemu-storage-daemon\$(EXESUF) $tools"
+    tools="qemu-storage-daemon\$(EXESUF) $tools"
   fi
 fi
 if test "$softmmu" = yes ; then
meson.build +12 -2
index 62ceb46..ad38f29 100644
@@ -338,7 +338,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,
@@ -547,7 +547,8 @@ libblock = static_library('block', block_ss.sources(),
                           build_by_default: false)
 
 block = declare_dependency(link_whole: [libblock],
-                           link_args: '@block.syms')
+                           link_args: '@block.syms',
+                           dependencies: [crypto, io])
 
 foreach m : mods
   shared_module(m['dir'] + '-' + m['name'],
@@ -625,6 +626,15 @@ if 'CONFIG_GUEST_AGENT' in config_host
 endif
 
 if have_tools
+  qemu_img = executable('qemu-img', [files('qemu-img.c'), hxdep],
+             dependencies: [authz, block, crypto, io, qom, qemuutil], install: true)
+  qemu_io = executable('qemu-io', files('qemu-io.c'),
+             dependencies: [block, qemuutil], install: true)
+  if host_machine.system() == 'linux' or host_machine.system() == 'sunos' or host_machine.system().endswith('bsd')
+    qemu_nbd = executable('qemu-nbd', files('qemu-nbd.c'),
+               dependencies: [block, qemuutil], install: true)
+  endif
+
   subdir('contrib/rdmacm-mux')
   subdir('contrib/elf2dmp')
 
Signature · 1 line
1.8.3.1
#66 lore raw

PATCH 63/147 meson: qemu-pr-helper

In reply to Paolo Bonzini

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

---
 Makefile    |  7 +------
 configure   |  3 ---
 meson.build | 10 ++++++++++
 3 files changed, 11 insertions(+), 9 deletions(-)
Makefile +1 -6
index c269823..9ca02de 100644
@@ -122,7 +122,7 @@ $(call set-vpath, $(SRC_PATH))
 
 LIBS+=-lz $(LIBS_TOOLS)
 
-HELPERS-y = $(HELPERS)
+HELPERS-y =
 
 # Sphinx does not allow building manuals into the same directory as
 # the source files, so if we're doing an in-tree QEMU build we must
@@ -275,11 +275,6 @@ COMMON_LDADDS = libqemuutil.a
 
 qemu-storage-daemon$(EXESUF): qemu-storage-daemon.o $(authz-obj-y) $(block-obj-y) $(crypto-obj-y) $(chardev-obj-y) $(io-obj-y) $(qom-obj-y) $(storage-daemon-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
-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
configure +0 -3
index a8ad31c..da082f4 100755
@@ -6645,7 +6645,6 @@ if [ "$eventfd" = "yes" ]; then
 fi
 
 tools=""
-helpers=""
 if test "$want_tools" = "yes" ; then
   if [ "$linux" = "yes" -o "$bsd" = "yes" -o "$solaris" = "yes" ] ; then
     tools="qemu-storage-daemon\$(EXESUF) $tools"
@@ -6669,7 +6668,6 @@ if test "$softmmu" = yes ; then
       fi
       mpath=no
     fi
-    helpers="$helpers scsi/qemu-pr-helper\$(EXESUF)"
   else
     if test "$virtfs" = yes; then
       error_exit "VirtFS is supported only on Linux"
@@ -7747,7 +7745,6 @@ else
   QEMU_INCLUDES="-iquote ${source_path}/tcg/${ARCH} $QEMU_INCLUDES"
 fi
 
-echo "HELPERS=$helpers" >> $config_host_mak
 echo "TOOLS=$tools" >> $config_host_mak
 echo "ROMS=$roms" >> $config_host_mak
 echo "MAKE=$make" >> $config_host_mak
meson.build +10 -0
index ad38f29..ae2716b 100644
@@ -136,6 +136,10 @@ if 'CONFIG_XKBCOMMON' in config_host
                                  link_args: config_host['XKBCOMMON_LIBS'].split())
 endif
 rt = cc.find_library('rt', required: false)
+libmpathpersist = not_found
+if config_host.has_key('CONFIG_MPATH')
+  libmpathpersist = cc.find_library('mpathpersist')
+endif
 libiscsi = not_found
 if 'CONFIG_LIBISCSI' in config_host
   libiscsi = declare_dependency(compile_args: config_host['LIBISCSI_CFLAGS'].split(),
@@ -621,6 +625,7 @@ foreach target : target_dirs
 endforeach
 
 # Other build targets
+
 if 'CONFIG_GUEST_AGENT' in config_host
   subdir('qga')
 endif
@@ -662,6 +667,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
#67 lore raw

PATCH 64/147 configure, Makefile; remove TOOLS and HELPERS-y variable

In reply to Paolo Bonzini

Everything involving tools is now done by meson.

---
 Makefile  | 22 ++--------------------
 configure |  7 -------
 2 files changed, 2 insertions(+), 27 deletions(-)
Makefile +2 -20
index 9ca02de..ac1e31f 100644
@@ -122,8 +122,6 @@ $(call set-vpath, $(SRC_PATH))
 
 LIBS+=-lz $(LIBS_TOOLS)
 
-HELPERS-y =
-
 # Sphinx does not allow building manuals into the same directory as
 # the source files, so if we're doing an in-tree QEMU build we must
 # build the manuals into a subdirectory (and then install them from
@@ -172,7 +170,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
 
 config-host.h: config-host.h-timestamp
 config-host.h-timestamp: config-host.mak
@@ -283,7 +281,7 @@ clean: recurse-clean
 		! -path ./roms/edk2/ArmPkg/Library/GccLto/liblto-arm.a \
 		! -path ./roms/edk2/BaseTools/Source/Python/UPT/Dll/sqlite3.dll \
 		-exec rm {} +
-	rm -f $(filter-out %.tlb,$(TOOLS)) $(HELPERS-y) TAGS cscope.* *.pod *~ */*~
+	rm -f TAGS cscope.* *.pod *~ */*~
 	rm -f fsdev/*.pod scsi/*.pod
 	rm -f $(foreach f,$(generated-files-y),$(f) $(f)-timestamp)
 
@@ -432,12 +430,6 @@ export DESTDIR
 install: all $(if $(BUILD_DOCS),install-doc) \
 	install-datadir install-localstatedir install-includedir \
 	recurse-install
-ifneq ($(TOOLS),)
-	$(call install-prog,$(TOOLS),$(DESTDIR)$(bindir))
-endif
-ifneq ($(HELPERS-y),)
-	$(call install-prog,$(HELPERS-y),$(DESTDIR)$(libexecdir))
-endif
 ifdef CONFIG_TRACE_SYSTEMTAP
 	$(INSTALL_PROG) "scripts/qemu-trace-stap" $(DESTDIR)$(bindir)
 endif
@@ -697,16 +689,6 @@ endif
 				$(call print-help-run,$(t)/fuzz,Build fuzzer for $(t)); \
 		))) \
 		echo '')
-	@$(if $(HELPERS-y), \
-		echo 'Helper targets:'; \
-		$(foreach t, $(HELPERS-y), \
-		$(call print-help-run,$(t),Build $(shell basename $(t)));) \
-		echo '')
-	@$(if $(TOOLS), \
-		echo 'Tools targets:'; \
-		$(foreach t, $(TOOLS), \
-		$(call print-help-run,$(t),Build $(shell basename $(t)) tool);) \
-		echo '')
 	@echo  'Cleaning targets:'
 	$(call print-help,clean,Remove most generated files but keep the config)
 	$(call print-help,distclean,Remove all generated files)
configure +0 -7
index da082f4..088072c 100755
@@ -6644,12 +6644,6 @@ if [ "$eventfd" = "yes" ]; then
   ivshmem=yes
 fi
 
-tools=""
-if test "$want_tools" = "yes" ; then
-  if [ "$linux" = "yes" -o "$bsd" = "yes" -o "$solaris" = "yes" ] ; then
-    tools="qemu-storage-daemon\$(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
@@ -7745,7 +7739,6 @@ else
   QEMU_INCLUDES="-iquote ${source_path}/tcg/${ARCH} $QEMU_INCLUDES"
 fi
 
-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
#68 lore raw

PATCH 65/147 meson: convert chardev directory to Meson (emulator part)

In reply to Paolo Bonzini
---
 Makefile.objs         |  2 --
 Makefile.target       |  2 ++
 chardev/Makefile.objs | 10 ----------
 chardev/meson.build   | 11 +++++++++++
 configure             |  2 ++
 meson.build           | 14 ++++++++++++++
 6 files changed, 29 insertions(+), 12 deletions(-)
 delete mode 100644 chardev/Makefile.objs
Makefile.objs +0 -2
index eeaa0cf..e43526f 100644
@@ -87,8 +87,6 @@ common-obj-y += dma-helpers.o
 common-obj-$(CONFIG_TPM) += tpm.o
 
 common-obj-y += backends/
-common-obj-y += chardev/
-common-obj-m += chardev/
 
 common-obj-$(CONFIG_SECCOMP) += qemu-seccomp.o
 qemu-seccomp.o-cflags := $(SECCOMP_CFLAGS)
Makefile.target +2 -0
index c0575da..c8c4b70 100644
@@ -104,6 +104,7 @@ all: $(PROGS) stap
 	@true
 
 obj-y += $(LIBQEMU)
+
 obj-y += trace/
 
 #########################################################
@@ -167,6 +168,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 -10
deleted file mode 100644
index 6662d0d..0000000
@@ -1,10 +0,0 @@
-chardev-obj-$(CONFIG_SOFTMMU) += chardev-sysemu.o
-common-obj-$(CONFIG_SOFTMMU) += msmouse.o wctablet.o testdev.o
-
-ifeq ($(CONFIG_BRLAPI),y)
-common-obj-m += baum.o
-baum.o-cflags := $(SDL_CFLAGS)
-baum.o-libs := $(BRLAPI_LIBS)
-endif
-
-common-obj-$(CONFIG_SPICE) += spice.o
chardev/meson.build +11 -0
index a2e671d..2122505 100644
@@ -30,3 +30,14 @@ libchardev = static_library('chardev', chardev_ss.sources(),
                             build_by_default: false)
 
 chardev = declare_dependency(link_whole: libchardev)
+
+softmmu_ss.add(files('chardev-sysemu.c', 'msmouse.c', 'wctablet.c', 'testdev.c'))
+softmmu_ss.add(when: ['CONFIG_SPICE', spice], if_true: files('spice.c'))
+
+chardev_modules = []
+
+if config_host.has_key('CONFIG_BRLAPI') and config_host.has_key('CONFIG_SDL')
+  chardev_modules += [['baum', files('baum.c'), [sdl, brlapi]]]
+endif
+
+modules += { 'chardev': chardev_modules }
configure +2 -0
index 088072c..875f088 100755
@@ -7321,6 +7321,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 ae2716b..534ed4c 100644
@@ -135,6 +135,11 @@ if 'CONFIG_XKBCOMMON' in config_host
   xkbcommon = declare_dependency(compile_args: config_host['XKBCOMMON_CFLAGS'].split(),
                                  link_args: config_host['XKBCOMMON_LIBS'].split())
 endif
+spice = not_found
+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 = not_found
 if config_host.has_key('CONFIG_MPATH')
@@ -169,6 +174,15 @@ libudev = not_found
 if 'CONFIG_LIBUDEV' in config_host
   libudev = declare_dependency(link_args: config_host['LIBUDEV_LIBS'].split())
 endif
+brlapi = not_found
+if 'CONFIG_BRLAPI' in config_host
+  brlapi = declare_dependency(link_args: config_host['BRLAPI_LIBS'].split())
+endif
+sdl = not_found
+if 'CONFIG_SDL' in config_host
+  sdl = declare_dependency(compile_args: config_host['SDL_CFLAGS'].split(),
+                           link_args: config_host['SDL_LIBS'].split())
+endif
 rbd = not_found
 if 'CONFIG_RBD' in config_host
   rbd = declare_dependency(link_args: config_host['RBD_LIBS'].split())
Signature · 1 line
1.8.3.1