Meson integration for 5.2
Subsystems (10)
cover Meson integration for 5.2
This the more or less final version of the Meson conversion. Due to the sheer size of the series you have been CCed only on the cover letter.
The series reaches the point where Makefile.target and unnest-vars can be removed, and all builds become non-recursive. I have also converted parts of the testsuite, notably qtest since it is needed for fuzzing. What's left for _after_ the merge is: 1) unit tests;
2) moving the rest of installation to meson (for which I have patches);
3) moving feature detection from configure to meson.
Things I still haven't tested:
- fuzzing
- non-x86/Linux builds
- static builds
- Docker and VM builds
Things I have checked:
- x86 builds
- modules
- "make install"
- internal slirp/dtc/capstone.
It should be more or less bisectable. I have not tried building _all_ steps, but I have tried both before and after each major one.
Build system rebuild rules seem to work reliably.
After a week or quite intense rebasing, my impression is more or less the same as last December: Meson looks more daunting, but it is actually much nicer to work with.
The diffstat so far is not very favorable, but remember that:
1) the series leaves quite a few nearly-obsolete bits in configure, Makefile and rules.mak (over 200 lines only in the makefiles).
2) configure test conversion will be where meson really shines. I included a couple examples just to show
meson: convert VNC and dependent libraries to meson
4 files changed, 44 insertions(+), 134 deletions(-)
meson: move SDL and SDL-image detection to meson
5 files changed, 30 insertions(+), 144 deletions(-)
meson: replace create-config with meson configure_file
6 files changed, 80 insertions(+), 168 deletions(-)
3) the idea behind using Makefile generators is to have stable code written in a high-level language instead of Makefile magic that tends to grow by accretion. So even though ninjatool is large at 1000 lines of Python, it can already be considered mature or even "done". It had only ~15 lines changed since the last post, and whenever debugging meson.build issues looking at build.ninja has always (literally!) been enough.
Available on git://github.com/bonzini/qemu branch meson-poc-next.
Paolo
Marc-André Lureau (92):
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: uncompress edk2 bios
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 block/
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: target
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 (51):
tests: move socket_scm_helper back to tests/ pc-bios/s390-ccw: simplify Makefile
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
configure: do not include $(...) variables in config-host.mak
configure: prepare CFLAGS/CXXFLAGS/LDFLAGS for Meson
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 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: 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
.gitignore | 4 +-
.gitlab-ci.yml | 4 +-
.gitmodules | 3 +
Makefile | 955 +------------
Makefile.objs | 218 +--
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 | 958 ++++---------
contrib/elf2dmp/Makefile.objs | 4 -
contrib/elf2dmp/meson.build | 4 +
contrib/gitdm/filetypes.txt | 2 +-
contrib/ivshmem-client/Makefile.objs | 1 -
contrib/ivshmem-client/meson.build | 3 +
contrib/ivshmem-server/Makefile.objs | 1 -
contrib/ivshmem-server/meson.build | 3 +
contrib/libvhost-user/Makefile.objs | 1 -
contrib/libvhost-user/meson.build | 2 +
contrib/rdmacm-mux/Makefile.objs | 3 -
contrib/rdmacm-mux/meson.build | 6 +
contrib/vhost-user-blk/Makefile.objs | 1 -
contrib/vhost-user-blk/meson.build | 3 +
contrib/vhost-user-gpu/Makefile.objs | 10 -
contrib/vhost-user-gpu/meson.build | 11 +
contrib/vhost-user-input/Makefile.objs | 1 -
contrib/vhost-user-input/meson.build | 3 +
contrib/vhost-user-scsi/Makefile.objs | 1 -
contrib/vhost-user-scsi/meson.build | 5 +
crypto/Makefile.objs | 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 | 378 +++---
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 | 15 +
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 | 43 +
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 | 94 ++
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 | 30 +
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 | 1413 ++++++++++++++++++++
meson_options.txt | 6 +
migration/Makefile.objs | 18 -
migration/meson.build | 29 +
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/meson.build | 23 +
pc-bios/optionrom/Makefile | 67 +-
pc-bios/s390-ccw/Makefile | 105 +-
pc-bios/s390-ccw/netboot.mak | 62 -
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 | 86 ++
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/modules/module_block.py | 0
scripts/mtest2make.py | 102 ++
scripts/ninjatool.py | 1010 ++++++++++++++
scripts/qemu-version.sh | 25 +
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 | 14 +
softmmu/qtest.c | 2 +-
softmmu/vl.c | 2 +-
storage-daemon/Makefile.objs | 1 -
storage-daemon/meson.build | 13 +
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 | 48 +
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 | 451 +------
tests/acceptance/avocado_qemu/__init__.py | 3 +-
tests/data/acpi/rebuild-expected-aml.sh | 2 +-
tests/fp/Makefile | 600 ---------
tests/fp/fp-test.c | 2 +-
tests/fp/meson.build | 628 +++++++++
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 | 215 +++
tests/qemu-iotests/check | 6 +-
tests/qemu-iotests/meson.build | 8 +
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 | 34 +
tests/qtest/fuzz/qos_fuzz.c | 2 +-
tests/qtest/fuzz/virtio_net_fuzz.c | 5 +-
tests/qtest/fuzz/virtio_scsi_fuzz.c | 2 +-
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 | 254 ++++
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 +-
tools/meson.build | 7 +
tools/virtiofsd/Makefile.objs | 12 -
tools/virtiofsd/meson.build | 17 +
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 | 99 ++
ui/Makefile.objs | 73 -
ui/meson.build | 114 ++
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 +
739 files changed, 8491 insertions(+), 7194 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/meson.build
delete mode 100644 pc-bios/s390-ccw/netboot.mak
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
create mode 100755 scripts/grepy.sh
mode change 100644 => 100755 scripts/hxtool
mode change 100644 => 100755 scripts/modules/module_block.py
create mode 100644 scripts/mtest2make.py
create mode 100755 scripts/ninjatool.py
create mode 100755 scripts/qemu-version.sh
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%)
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.inSignature · 1 line
1.8.3.1
PATCH 1/143 tests: move socket_scm_helper back to tests/
This file is unrelated to qemu-iotests and was moved incorrectly to tests/qtest/Makefile.include.
--- tests/Makefile.include | 2 ++ 1 file changed, 2 insertions(+)
tests/Makefile.include +2 -0
@@ -879,6 +879,8 @@ clean-tcg: $(CLEAN_TCG_TARGET_RULES) QEMU_IOTESTS_HELPERS-$(call land,$(CONFIG_SOFTMMU),$(CONFIG_LINUX)) = tests/qemu-iotests/socket_scm_helper$(EXESUF) +tests/qemu-iotests/socket_scm_helper$(EXESUF): tests/qemu-iotests/socket_scm_helper.o + .PHONY: check-tests/check-block.sh check-tests/check-block.sh: tests/check-block.sh qemu-img$(EXESUF) \ qemu-io$(EXESUF) qemu-nbd$(EXESUF) $(QEMU_IOTESTS_HELPERS-y) \
Signature · 1 line
1.8.3.1
Re: [PATCH 001/143] tests: move socket_scm_helper back to tests/
Quoted 13 lines · Paolo Bonzini
This file is unrelated to qemu-iotests and was moved incorrectly to tests/qtest/Makefile.include.
Signed-off-by Paolo Bonzini <[email protected]>--- tests/Makefile.include | 2 ++ 1 file changed, 2 insertions(+)tests/Makefile.include +0
-0
tests/Makefile.include clean-tcg: $(CLEAN_TCG_TARGET_RULES) · line 882
Quoted 4 lines
tests/Makefile.include +1
-0@@ -879,6 +879,8 @@ clean-tcg: $(CLEAN_TCG_TARGET_RULES) QEMU_IOTESTS_HELPERS-$(call land,$(CONFIG_SOFTMMU),$(CONFIG_LINUX)) = tests/qemu-iotests/socket_scm_helper$(EXESUF) +tests/qemu-iotests/socket_scm_helper$(EXESUF): tests/qemu-iotests/socket_scm_helper.o
Already done in 6e1da96b94 ("tests/qemu-iotests: Fix socket_scm_helper build path"). Should we move it back to tests/?
Quoted 5 lines
tests/Makefile.include +1
-0+ .PHONY: check-tests/check-block.sh check-tests/check-block.sh: tests/check-block.sh qemu-img$(EXESUF) \ qemu-io$(EXESUF) qemu-nbd$(EXESUF) $(QEMU_IOTESTS_HELPERS-y) \
PATCH 2/143 optionrom: simplify Makefile
In reply to Paolo BonziniFrom: 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
@@ -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
PATCH 3/143 pc-bios/s390-ccw: simplify Makefile
In reply to Paolo BonziniMake it independent from the rules.mak, and clean up to use pattern rules.
--- pc-bios/s390-ccw/Makefile | 105 ++++++++++++++++++++++++++++++++++--------- pc-bios/s390-ccw/netboot.mak | 62 ------------------------- 2 files changed, 84 insertions(+), 83 deletions(-) delete mode 100644 pc-bios/s390-ccw/netboot.mak
pc-bios/s390-ccw/Makefile +84 -21
@@ -1,41 +1,102 @@ -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: # 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/s390-ccw) +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) -.PHONY : all clean build-all +override CFLAGS += $(filter -W%, $(QEMU_CFLAGS)) +override CFLAGS += -ffreestanding -fno-delete-null-pointer-checks -msoft-float +override CFLAGS += -march=z900 -fPIE -fno-strict-aliasing +override CFLAGS += -fno-asynchronous-unwind-tables +override CFLAGS += $(call cc-option, -fno-stack-protector) +LDFLAGS += -Wl,-pie -nostdlib OBJECTS = start.o main.o bootmap.o jump2ipl.o sclp.o menu.o \ virtio.o virtio-scsi.o virtio-blkdev.o libc.o cio.o dasd-ipl.o -QEMU_CFLAGS := $(filter -W%, $(QEMU_CFLAGS)) -QEMU_CFLAGS += -ffreestanding -fno-delete-null-pointer-checks -msoft-float -QEMU_CFLAGS += -march=z900 -fPIE -fno-strict-aliasing -QEMU_CFLAGS += -fno-asynchronous-unwind-tables -QEMU_CFLAGS += $(call cc-option, $(QEMU_CFLAGS), -fno-stack-protector) -LDFLAGS += -Wl,-pie -nostdlib +STRIP ?= strip -build-all: s390-ccw.img s390-netboot.img +$(OBJECTS): Makefile -s390-ccw.elf: $(OBJECTS) - $(call quiet-command,$(CC) $(LDFLAGS) -o $@ $(OBJECTS),"BUILD","$(TARGET_DIR)$@") +SLOF_DIR := $(SRC_PATH)/roms/SLOF -STRIP ?= strip +NETOBJS := start.o sclp.o cio.o virtio.o virtio-net.o jump2ipl.o netmain.o \ -s390-ccw.img: s390-ccw.elf +LIBC_INC := -nostdinc -I$(SLOF_DIR)/lib/libc/include +LIBNET_INC := -I$(SLOF_DIR)/lib/libnet + +$(NETOBJS): QEMU_CFLAGS += $(LIBC_INC) $(LIBNET_INC) + +# libc files: + +LIBC_CFLAGS := $(QEMU_CFLAGS) $(CFLAGS) $(LIBC_INC) $(LIBNET_INC) \ + -MMD -MP -MT $@ -MF $(@:%.o=%.d) + + +CTYPE_OBJS = isdigit.o isxdigit.o toupper.o +$(CTYPE_OBJS) : %.o : $(SLOF_DIR)/lib/libc/ctype/%.c + $(call quiet-command,$(CC) $(LIBC_CFLAGS) -c -o $@ $<,"CC","$(TARGET_DIR)$@") + +STRING_OBJS = strcat.o strchr.o strrchr.o strcpy.o strlen.o strncpy.o \ + strcmp.o strncmp.o strcasecmp.o strncasecmp.o strstr.o \ + memset.o memcpy.o memmove.o memcmp.o +$(STRING_OBJS) : %.o : $(SLOF_DIR)/lib/libc/string/%.c + $(call quiet-command,$(CC) $(LIBC_CFLAGS) -c -o $@ $<,"CC","$(TARGET_DIR)$@") + +STDLIB_OBJS = atoi.o atol.o strtoul.o strtol.o rand.o malloc.o free.o +$(STDLIB_OBJS) : %.o : $(SLOF_DIR)/lib/libc/stdlib/%.c + $(call quiet-command,$(CC) $(LIBC_CFLAGS) -c -o $@ $<,"CC","$(TARGET_DIR)$@") + +STDIO_OBJS = sprintf.o snprintf.o vfprintf.o vsnprintf.o vsprintf.o fprintf.o \ + printf.o putc.o puts.o putchar.o stdchnls.o fileno.o +$(STDIO_OBJS) : %.o : $(SLOF_DIR)/lib/libc/stdio/%.c + $(call quiet-command,$(CC) $(LIBC_CFLAGS) -c -o $@ $<,"CC","$(TARGET_DIR)$@") + +sbrk.o: $(SLOF_DIR)/slof/sbrk.c + $(call quiet-command,$(CC) $(LIBC_CFLAGS) -c -o $@ $<,"CC","$(TARGET_DIR)$@") + +LIBCOBJS := $(STRING_OBJS) $(CTYPE_OBJS) $(STDLIB_OBJS) $(STDIO_OBJS) sbrk.o + +libc.a: $(LIBCOBJS) + $(call quiet-command,$(AR) -rc $@ $^,"AR","$(TARGET_DIR)$@") + +# libnet files: + +LIBNETOBJS := args.o dhcp.o dns.o icmpv6.o ipv6.o tcp.o udp.o bootp.o \ + dhcpv6.o ethernet.o ipv4.o ndp.o tftp.o pxelinux.o +LIBNETCFLAGS := $(CFLAGS) -DDHCPARCH=0x1F $(LIBC_INC) $(LIBNET_INC) \ + -DDHCPARCH=0x1F -MMD -MP -MT $@ -MF $(@:%.o=%.d) + +$(LIBNETOBJS) : %.o : $(SLOF_DIR)/lib/libnet/%.c + $(call quiet-command,$(CC) $(LIBNETCFLAGS) -c -o $@ $<,"CC","$(TARGET_DIR)$@") + +libnet.a: $(LIBNETOBJS) + $(call quiet-command,$(AR) -rc $@ $^,"AR","$(TARGET_DIR)$@") + +%.elf: + $(call quiet-command,$(CC) $(LDFLAGS) -o $@ $^,"BUILD","$(TARGET_DIR)$@") + +%.img: %.elf $(call quiet-command,$(STRIP) --strip-unneeded $< -o $@,"STRIP","$(TARGET_DIR)$@") -$(OBJECTS): Makefile +s390-ccw.elf: $(OBJECTS) +s390-ccw.img: s390-ccw.elf +all: s390-ccw.img + +ifneq ($(wildcard $(SLOF_DIR)/lib/libnet),) +s390-netboot.elf: $(NETOBJS) libnet.a libc.a +s390-netboot.elf: LDFLAGS += -Ttext=0x7800000 -ifneq ($(wildcard $(SRC_PATH)/roms/SLOF/lib/libnet),) -include $(SRC_PATH)/pc-bios/s390-ccw/netboot.mak -else -s390-netboot.img: - @echo "s390-netboot.img not built since roms/SLOF/ is not available." +s390-netboot.img: s390-netboot.elf +all: s390-netboot.img endif ALL_OBJS = $(sort $(OBJECTS) $(NETOBJS) $(LIBCOBJS) $(LIBNETOBJS))
@@ -43,3 +104,5 @@ ALL_OBJS = $(sort $(OBJECTS) $(NETOBJS) $(LIBCOBJS) $(LIBNETOBJS)) clean: rm -f *.o *.d *.img *.elf *~ *.a + +.PHONY : all clean
pc-bios/s390-ccw/netboot.mak deleted +0 -62
62 lines not on this page · raw message
Signature · 1 line
1.8.3.1
Re: [PATCH 003/143] pc-bios/s390-ccw: simplify Makefile
Quoted 8 lines · Paolo Bonzini
Make it independent from the rules.mak, and clean up to use pattern rules.
Signed-off-by Paolo Bonzini <[email protected]>--- pc-bios/s390-ccw/Makefile | 105 ++++++++++++++++++++++++++++++++++--------- pc-bios/s390-ccw/netboot.mak | 62 ------------------------- 2 files changed, 84 insertions(+), 83 deletions(-) delete mode 100644 pc-bios/s390-ccw/netboot.mak
As Cornelia already mentioned in another mail, this does not work yet. I'd also prefer if we could keep the netbook.mak stuff in that separate file.
Maybe you could go with this minimal patch first - this seems to work for me:
commit 7f265ef8253613d882bdeb8a89502d55923c0077
Author: Thomas Huth <[email protected]> Date: Fri Aug 7 14:51:52 2020 +0200
minimam pc-bios/s390-ccw/Makefile patch
pc-bios/s390-ccw/Makefile +1 -1
@@ -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
Quoted 1 line
/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 \
Thomas
Re: [PATCH 003/143] pc-bios/s390-ccw: simplify Makefile
Quoted 3 lines · Thomas Huth
As Cornelia already mentioned in another mail, this does not work yet. I'd also prefer if we could keep the netbook.mak stuff in that separate file.
It won't be possible to keep it separate when it's converted to Meson (unless you add a new directory for netboot), but for now I'll surely go for the bare minimum patch. Thanks very much!
Paolo
PATCH 4/143 trace: switch position of headers to what Meson requires
In reply to Paolo BonziniMeson 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
@@ -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
@@ -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
@@ -0,0 +1 @@ +#include "trace/trace-accel_kvm.h"
accel/tcg/cputlb.c +1 -1
@@ -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
@@ -0,0 +1 @@ +#include "trace/trace-accel_tcg.h"
accel/tcg/user-exec.c +1 -1
@@ -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
@@ -0,0 +1 @@ +#include "trace/trace-audio.h"
authz/trace.h new file +1 -0
@@ -0,0 +1 @@ +#include "trace/trace-authz.h"
backends/tpm/trace.h new file +1 -0
@@ -0,0 +1 @@ +#include "trace/trace-backends_tpm.h"
backends/trace.h new file +1 -0
@@ -0,0 +1 @@ +#include "trace/trace-backends.h"
block/trace.h new file +1 -0
@@ -0,0 +1 @@ +#include "trace/trace-block.h"
chardev/trace.h new file +1 -0
@@ -0,0 +1 @@ +#include "trace/trace-chardev.h"
crypto/trace.h new file +1 -0
@@ -0,0 +1 @@ +#include "trace/trace-crypto.h"
dma-helpers.c +1 -1
@@ -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
@@ -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
@@ -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
@@ -0,0 +1 @@ +#include "trace/trace-hw_9pfs.h"
hw/acpi/trace.h new file +1 -0
@@ -0,0 +1 @@ +#include "trace/trace-hw_acpi.h"
hw/alpha/trace.h new file +1 -0
@@ -0,0 +1 @@ +#include "trace/trace-hw_alpha.h"
hw/arm/trace.h new file +1 -0
@@ -0,0 +1 @@ +#include "trace/trace-hw_arm.h"
hw/audio/trace.h new file +1 -0
@@ -0,0 +1 @@ +#include "trace/trace-hw_audio.h"
hw/block/dataplane/trace.h new file +1 -0
@@ -0,0 +1 @@ +#include "trace/trace-hw_block_dataplane.h"
hw/block/trace.h new file +1 -0
@@ -0,0 +1 @@ +#include "trace/trace-hw_block.h"
hw/char/trace.h new file +1 -0
@@ -0,0 +1 @@ +#include "trace/trace-hw_char.h"
hw/core/cpu.c +1 -1
@@ -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
@@ -0,0 +1 @@ +#include "trace/trace-hw_core.h"
hw/display/trace.h new file +1 -0
@@ -0,0 +1 @@ +#include "trace/trace-hw_display.h"
hw/dma/trace.h new file +1 -0
@@ -0,0 +1 @@ +#include "trace/trace-hw_dma.h"
hw/gpio/trace.h new file +1 -0
@@ -0,0 +1 @@ +#include "trace/trace-hw_gpio.h"
hw/hppa/trace.h new file +1 -0
@@ -0,0 +1 @@ +#include "trace/trace-hw_hppa.h"
hw/hyperv/trace.h new file +1 -0
@@ -0,0 +1 @@ +#include "trace/trace-hw_hyperv.h"
hw/i2c/trace.h new file +1 -0
@@ -0,0 +1 @@ +#include "trace/trace-hw_i2c.h"
hw/i386/trace.h new file +1 -0
@@ -0,0 +1 @@ +#include "trace/trace-hw_i386.h"
hw/i386/xen/trace.h new file +1 -0
@@ -0,0 +1 @@ +#include "trace/trace-hw_i386_xen.h"
hw/ide/trace.h new file +1 -0
@@ -0,0 +1 @@ +#include "trace/trace-hw_ide.h"
hw/input/trace.h new file +1 -0
@@ -0,0 +1 @@ +#include "trace/trace-hw_input.h"
hw/intc/trace.h new file +1 -0
@@ -0,0 +1 @@ +#include "trace/trace-hw_intc.h"
hw/isa/trace.h new file +1 -0
@@ -0,0 +1 @@ +#include "trace/trace-hw_isa.h"
hw/mem/trace.h new file +1 -0
@@ -0,0 +1 @@ +#include "trace/trace-hw_mem.h"
hw/mips/trace.h new file +1 -0
@@ -0,0 +1 @@ +#include "trace/trace-hw_mips.h"
hw/misc/macio/trace.h new file +1 -0
@@ -0,0 +1 @@ +#include "trace/trace-hw_misc_macio.h"
hw/misc/trace.h new file +1 -0
@@ -0,0 +1 @@ +#include "trace/trace-hw_misc.h"
hw/net/trace.h new file +1 -0
@@ -0,0 +1 @@ +#include "trace/trace-hw_net.h"
hw/nvram/trace.h new file +1 -0
@@ -0,0 +1 @@ +#include "trace/trace-hw_nvram.h"
hw/pci-host/trace.h new file +1 -0
@@ -0,0 +1 @@ +#include "trace/trace-hw_pci_host.h"
hw/pci/trace.h new file +1 -0
@@ -0,0 +1 @@ +#include "trace/trace-hw_pci.h"
hw/ppc/trace.h new file +1 -0
@@ -0,0 +1 @@ +#include "trace/trace-hw_ppc.h"
hw/rdma/trace.h new file +1 -0
@@ -0,0 +1 @@ +#include "trace/trace-hw_rdma.h"
hw/rdma/vmw/trace.h new file +1 -0
@@ -0,0 +1 @@ +#include "trace/trace-hw_rdma_vmw.h"
hw/riscv/trace.h new file +1 -0
@@ -0,0 +1 @@ +#include "trace/trace-hw_riscv.h"
hw/rtc/trace.h new file +1 -0
@@ -0,0 +1 @@ +#include "trace/trace-hw_rtc.h"
hw/s390x/trace.h new file +1 -0
@@ -0,0 +1 @@ +#include "trace/trace-hw_s390x.h"
hw/scsi/trace.h new file +1 -0
@@ -0,0 +1 @@ +#include "trace/trace-hw_scsi.h"
hw/sd/trace.h new file +1 -0
@@ -0,0 +1 @@ +#include "trace/trace-hw_sd.h"
hw/sparc/trace.h new file +1 -0
@@ -0,0 +1 @@ +#include "trace/trace-hw_sparc.h"
hw/sparc64/trace.h new file +1 -0
@@ -0,0 +1 @@ +#include "trace/trace-hw_sparc64.h"
hw/ssi/trace.h new file +1 -0
@@ -0,0 +1 @@ +#include "trace/trace-hw_ssi.h"
hw/timer/trace.h new file +1 -0
@@ -0,0 +1 @@ +#include "trace/trace-hw_timer.h"
hw/tpm/trace.h new file +1 -0
@@ -0,0 +1 @@ +#include "trace/trace-hw_tpm.h"
hw/usb/trace.h new file +1 -0
@@ -0,0 +1 @@ +#include "trace/trace-hw_usb.h"
hw/vfio/trace.h new file +1 -0
@@ -0,0 +1 @@ +#include "trace/trace-hw_vfio.h"
hw/virtio/trace.h new file +1 -0
@@ -0,0 +1 @@ +#include "trace/trace-hw_virtio.h"
hw/watchdog/trace.h new file +1 -0
@@ -0,0 +1 @@ +#include "trace/trace-hw_watchdog.h"
hw/xen/trace.h new file +1 -0
@@ -0,0 +1 @@ +#include "trace/trace-hw_xen.h"
include/user/syscall-trace.h +1 -1
@@ -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
@@ -0,0 +1 @@ +#include "trace/trace-io.h"
job-qmp.c +1 -1
@@ -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
@@ -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
@@ -0,0 +1 @@ +#include "trace/trace-linux_user.h"
migration/trace.h new file +1 -0
@@ -0,0 +1 @@ +#include "trace/trace-migration.h"
monitor/trace.h new file +1 -0
@@ -0,0 +1 @@ +#include "trace/trace-monitor.h"
nbd/trace.h new file +1 -0
@@ -0,0 +1 @@ +#include "trace/trace-nbd.h"
net/trace.h new file +1 -0
@@ -0,0 +1 @@ +#include "trace/trace-net.h"
qapi/trace.h new file +1 -0
@@ -0,0 +1 @@ +#include "trace/trace-qapi.h"
qom/trace.h new file +1 -0
@@ -0,0 +1 @@ +#include "trace/trace-qom.h"
scripts/tracetool/format/c.py +1 -4
@@ -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
@@ -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
@@ -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
@@ -0,0 +1 @@ +#include "trace/trace-scsi.h"
softmmu/balloon.c +1 -1
@@ -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
@@ -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
@@ -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
@@ -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
@@ -0,0 +1 @@ +#include "trace/trace-target_arm.h"
target/hppa/trace.h new file +1 -0
@@ -0,0 +1 @@ +#include "trace/trace-target_hppa.h"
target/i386/trace.h new file +1 -0
@@ -0,0 +1 @@ +#include "trace/trace-target_i386.h"
target/mips/trace.h new file +1 -0
@@ -0,0 +1 @@ +#include "trace/trace-target_mips.h"
target/ppc/trace.h new file +1 -0
@@ -0,0 +1 @@ +#include "trace/trace-target_ppc.h"
target/riscv/trace.h new file +1 -0
@@ -0,0 +1 @@ +#include "trace/trace-target_riscv.h"
target/s390x/trace.h new file +1 -0
@@ -0,0 +1 @@ +#include "trace/trace-target_s390x.h"
target/sparc/trace.h new file +1 -0
@@ -0,0 +1 @@ +#include "trace/trace-target_sparc.h"
trace/control-target.c +1 -1
@@ -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
@@ -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
@@ -0,0 +1 @@ +#include "trace/trace-ui.h"
util/trace.h new file +1 -0
@@ -0,0 +1 @@ +#include "trace/trace-util.h"
Signature · 1 line
1.8.3.1
PATCH 5/143 meson: rename .inc.c files to .inc
In reply to Paolo Bonzini---
.gitignore | 2 +-
.../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/vnc-enc-zrle.c | 22 ++++++------
ui/{vnc-enc-zrle.inc.c => vnc-enc-zrle.inc} | 0
96 files changed, 137 insertions(+), 137 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 +1 -1
@@ -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
accel/tcg/atomic_common.inc renamed from accel/tcg/atomic_common.inc.c +0 -0
accel/tcg/cputlb.c +1 -1
@@ -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
@@ -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
@@ -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
@@ -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
fpu/softfloat.c +1 -1
@@ -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
@@ -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
scripts/clean-includes +1 -1
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
target/hppa/Makefile.objs +2 -2
@@ -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
@@ -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
@@ -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
target/openrisc/Makefile.objs +3 -3
@@ -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
@@ -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
@@ -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
@@ -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
target/ppc/translate.c +11 -11
@@ -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
target/ppc/translate/dfp-ops.inc renamed from target/ppc/translate/dfp-ops.inc.c +0 -0
target/ppc/translate/fp-impl.inc renamed from target/ppc/translate/fp-impl.inc.c +0 -0
target/ppc/translate/fp-ops.inc renamed from target/ppc/translate/fp-ops.inc.c +0 -0
target/ppc/translate/spe-impl.inc renamed from target/ppc/translate/spe-impl.inc.c +0 -0
target/ppc/translate/spe-ops.inc renamed from target/ppc/translate/spe-ops.inc.c +0 -0
target/ppc/translate/vmx-impl.inc renamed from target/ppc/translate/vmx-impl.inc.c +0 -0
target/ppc/translate/vmx-ops.inc renamed from target/ppc/translate/vmx-ops.inc.c +0 -0
target/ppc/translate/vsx-impl.inc renamed from target/ppc/translate/vsx-impl.inc.c +0 -0
target/ppc/translate/vsx-ops.inc renamed from target/ppc/translate/vsx-ops.inc.c +0 -0
target/ppc/translate_init.inc renamed from target/ppc/translate_init.inc.c +0 -0
target/riscv/Makefile.objs +4 -4
@@ -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
target/riscv/insn_trans/trans_rva.inc renamed from target/riscv/insn_trans/trans_rva.inc.c +0 -0
target/riscv/insn_trans/trans_rvd.inc renamed from target/riscv/insn_trans/trans_rvd.inc.c +0 -0
target/riscv/insn_trans/trans_rvf.inc renamed from target/riscv/insn_trans/trans_rvf.inc.c +0 -0
target/riscv/insn_trans/trans_rvh.inc renamed from target/riscv/insn_trans/trans_rvh.inc.c +0 -0
target/riscv/insn_trans/trans_rvi.inc renamed from target/riscv/insn_trans/trans_rvi.inc.c +0 -0
target/riscv/insn_trans/trans_rvm.inc renamed from target/riscv/insn_trans/trans_rvm.inc.c +0 -0
target/riscv/insn_trans/trans_rvv.inc renamed from target/riscv/insn_trans/trans_rvv.inc.c +0 -0
target/riscv/translate.c +10 -10
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
target/xtensa/core-dc232b.c +2 -2
@@ -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
target/xtensa/core-dc232b/xtensa-modules.inc renamed from target/xtensa/core-dc232b/xtensa-modules.inc.c +0 -0
target/xtensa/core-dc233c.c +2 -2
@@ -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
target/xtensa/core-dc233c/xtensa-modules.inc renamed from target/xtensa/core-dc233c/xtensa-modules.inc.c +0 -0
target/xtensa/core-de212.c +2 -2
@@ -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
target/xtensa/core-de212/xtensa-modules.inc renamed from target/xtensa/core-de212/xtensa-modules.inc.c +0 -0
target/xtensa/core-fsf.c +1 -1
@@ -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
target/xtensa/core-sample_controller.c +2 -2
@@ -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
target/xtensa/core-sample_controller/xtensa-modules.inc renamed from target/xtensa/core-sample_controller/xtensa-modules.inc.c +0 -0
target/xtensa/core-test_kc705_be.c +2 -2
@@ -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
target/xtensa/core-test_kc705_be/xtensa-modules.inc renamed from target/xtensa/core-test_kc705_be/xtensa-modules.inc.c +0 -0
target/xtensa/core-test_mmuhifi_c3.c +2 -2
@@ -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
target/xtensa/core-test_mmuhifi_c3/xtensa-modules.inc renamed from target/xtensa/core-test_mmuhifi_c3/xtensa-modules.inc.c +0 -0
target/xtensa/import_core.sh +4 -4
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
tcg/tcg-pool.inc renamed from tcg/tcg-pool.inc.c +1 -1
@@ -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
@@ -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
@@ -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
tests/fp/fp-test.c +1 -1
@@ -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
ui/vnc-enc-zrle.c +11 -11
@@ -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
Signature · 1 line
1.8.3.1
Re: [PATCH 005/143] meson: rename .inc.c files to .inc
Quoted 3 lines · Paolo Bonzini
Signed-off-by Paolo Bonzini <[email protected]>---
What's the rationale for this ? ".inc.c" is the project's standard naming convention for files which aren't headers but which are lumps of C code #included into a top level .c file. The .inc.c deliberately ends '.c' because that way editors will use the right syntax highlighting for the file.
It would be much better if Meson could cope with our standard naming convention rather than forcing us to change it.
thanks
-- PMM
Re: [PATCH 005/143] meson: rename .inc.c files to .inc
Quoted 8 lines · Peter Maydell
Quoted 2 lines · Paolo Bonzini
Signed-off-by Paolo Bonzini <[email protected]>---
What's the rationale for this ? "
.inc.c" is the project's standard naming convention for files which aren't headers but which are lumps of C code #included into a top level .c file. The.inc.cdeliberately ends '.c' because that way editors will use the right syntax highlighting for the file.
Good point. It can be changed to .inc.h too, if that's preferrable for you.
Quoted 2 lines
It would be much better if Meson could cope with our standard naming convention rather than forcing us to change it.
First of all I need to describe why this is needed; it is because of the way Meson handles dependencies on generated headers.
With Makefiles that have automatically generated dependencies, you typically make generated includes depend on the Makefile so that they are built before everything else and they are available when first building the .c files.
Meson is similar, however the way it works is that you list those generated includes in the sources. The dependencies are still automatically generated, but the build rules will ensure that the includes are generated before attempting to build the toplevel C sources.
The problem is that Meson decides if something is a source vs. a generated include by looking at the extension: '.c', '.cc', '.m', '.C' are sources, while everything else is considered an include---including '.inc.c'.
Going back to patch 124, I can now answer your question:
Quoted 2 lines
Quoted 2 lines
It's not clear to me why all the decodetree lines ended up in a single "gen = []" block -- they're independent of each other.
The files are added to the source list with "arm_ss.add(gen)". All that line does is ensuring they are built before other target-specific files for ARM targets.
The question then is if Meson could be changed to cope with our naming convention, and unfortunately the answer is no. The root cause is that Makefiles list .o files (and uses implicit patterns to connect .o files to the corresponding sources), while Meson lists .c files.
There is a silver lining, in that you do get something out of this: if you have a typo in the name of a .c file, it is detected it at "configure" time rather than having to wait until "make" tries to find the source code for that ".o" file.
Paolo
Re: [PATCH 005/143] meson: rename .inc.c files to .inc
Quoted 5 lines · Paolo Bonzini
Quoted 3 lines · Peter Maydell
Quoted 2 lines · Paolo Bonzini
Signed-off-by Paolo Bonzini <[email protected]>---
Quoted 7 lines
Quoted 5 lines
What's the rationale for this ? "
.inc.c" is the project's standard naming convention for files which aren't headers but which are lumps of C code #included into a top level .c file. The.inc.cdeliberately ends '.c' because that way editors will use the right syntax highlighting for the file.Good point. It can be changed to
.inc.htoo, if that's preferrable for you.
Not really, though I guess it's slightly better than plain .inc. They're not header files...
Quoted 11 lines
Quoted 2 lines
It would be much better if Meson could cope with our standard naming convention rather than forcing us to change it.
First of all I need to describe why this is needed; it is because of the way Meson handles dependencies on generated headers.
With Makefiles that have automatically generated dependencies, you typically make generated includes depend on the
Makefileso that they are built before everything else and they are available when first building the .c files.
Quoted 4 lines
Meson is similar, however the way it works is that you list those generated includes in the sources. The dependencies are still automatically generated, but the build rules will ensure that the includes are generated before attempting to build the toplevel C sources.
But we don't really want to build all these files before building all C sources. We just want to say "this .c file depends on these .inc.c files" and then let the build tool figure it out, surely?
Quoted 4 lines
The problem is that Meson decides if something is a source vs. a generated include by looking at the extension: '.c', '.cc', '.m', '.C' are sources, while everything else is considered an include---including '
.inc.c'.
Is this hardcoded in Meson? That seems pretty suboptimal.
Quoted 8 lines
Going back to patch 124, I can now answer your question:
Quoted 2 lines
Quoted 2 lines
It's not clear to me why all the decodetree lines ended up in a single "gen = []" block -- they're independent of each other.
The files are added to the source list with "
arm_ss.add(gen)". All that line does is ensuring they are built before other target-specific files for ARM targets.
Do you mean that it just adds an extra implicit ordering constraint, such that if we need to rebuild both files not in 'gen' and files that are in 'gen' the 'gen' ones go first, or that Meson really builds all the 'gen' files first? What happens when you edit a .decode file? How much stuff gets rebuilt?
Quoted 4 lines
The question then is if Meson could be changed to cope with our naming convention, and unfortunately the answer is no. The root cause is that Makefiles list .o files (and uses implicit patterns to connect .o files to the corresponding sources), while Meson lists .c files.
Can Meson handle "this .c file needs to be built from something else?". Presumably so, that's a common pattern for flex/yacc type tools.
thanks
-- PMM
Re: [PATCH 005/143] meson: rename .inc.c files to .inc
Quoted 12 lines · Peter Maydell
Quoted 11 lines · Paolo Bonzini
Quoted 8 lines · Peter Maydell
Quoted 2 lines · Paolo Bonzini
Signed-off-by Paolo Bonzini <[email protected]>---
What's the rationale for this ? "
.inc.c" is the project's standard naming convention for files which aren't headers but which are lumps of C code #included into a top level .c file. The.inc.cdeliberately ends '.c' because that way editors will use the right syntax highlighting for the file.
Quoted 4 lines
Quoted 1 line
Good point. It can be changed to
.inc.htoo, if that's preferrable for you.Not really, though I guess it's slightly better than plain .inc. They're not header files...
Ok for the lack of a better option I'll switch.
Quoted 3 lines
But we don't really want to build all these files before building all C sources. We just want to say "this .c file depends on these
.inc.cfiles" and then let the build tool figure it out, surely?
With Makefiles we have two options:
1) build before everything, e.g.
linux-user/x86_64/Makefile.objs
generated-files-y += linux-user/x86_64/syscall_nr.h
The way it works is that, by building the generated files first, we can then rely on automated dependency tracking. It is most useful for files that are included widely, such as header files.
2) fine-grained dependency, e.g.
target/arm/translate.o: target/arm/decode-neon-shared.inc.c
This needs no explanation. It is most useful for files that are included only once or twice, such as .inc.c files.
With Meson you have only one choice and it is a third option, namely "build at the beginning of the corresponding target"; the way you express it is to list the includes in the sources of that target.
The rationale is the same as (1); in terms of what is rebuilt when it is the same as (2). It may remove a bit of parallelism: if you edit helper.c and insns.decode, however, helper.c won't be built until after decode-insns.inc is created.
Quoted 6 lines
Quoted 4 lines
The problem is that Meson decides if something is a source vs. a generated include by looking at the extension: '.c', '.cc', '.m', '.C' are sources, while everything else is considered an include---including '
.inc.c'.Is this hardcoded in Meson? That seems pretty suboptimal.
Yes, it is. It is certainly a different mindset not being able to control every aspect of the build. On the other hand surprises are rare.
Quoted 8 lines
Quoted 2 lines
The files are added to the source list with "
arm_ss.add(gen)". [...] they are built before other target-specific files for ARM targets.Do you mean that it just adds an extra implicit ordering constraint, such that if we need to rebuild both files not in 'gen' and files that are in 'gen' the 'gen' ones go first, or that Meson really builds all the 'gen' files first? What happens when you edit a .decode file? How much stuff gets rebuilt?
Only what's needed.
Quoted 7 lines
Quoted 4 lines
The question then is if Meson could be changed to cope with our naming convention, and unfortunately the answer is no. The root cause is that Makefiles list .o files (and uses implicit patterns to connect .o files to the corresponding sources), while Meson lists .c files.
Can Meson handle "this .c file needs to be built from something else?". Presumably so, that's a common pattern for flex/yacc type tools.
Yes, of course (we have cases of that, for example with QAPI sources). Generated sources that are top-level (not includes) also don't hamper parallelism of the build in any way.
Paolo
Re: [PATCH 005/143] meson: rename .inc.c files to .inc
In reply to Paolo BonziniQuoted 4 lines · Paolo Bonzini
Quoted 3 lines · Peter Maydell
Quoted 2 lines · Paolo Bonzini
Signed-off-by Paolo Bonzini <[email protected]>---
Quoted 8 lines
Quoted 5 lines
What's the rationale for this ? "
.inc.c" is the project's standard naming convention for files which aren't headers but which are lumps of C code #included into a top level .c file. The.inc.cdeliberately ends '.c' because that way editors will use the right syntax highlighting for the file.Good point. It can be changed to
.inc.htoo, if that's preferrable for you.
We have two types of inc files - the inline C sections but also .inc.h files. I'm not sure they should be lumped together. I think most of the header based ones are essentially templates which get expanded multiple times with #undef/#define blocks before each inclusion.
Quoted 36 lines
Quoted 3 lines
It would be much better if Meson could cope with our standard naming convention rather than forcing us to change it.
First of all I need to describe why this is needed; it is because of the way Meson handles dependencies on generated headers.
With Makefiles that have automatically generated dependencies, you typically make generated includes depend on the
Makefileso that they are built before everything else and they are available when first building the .c files.Meson is similar, however the way it works is that you list those generated includes in the sources. The dependencies are still automatically generated, but the build rules will ensure that the includes are generated before attempting to build the toplevel C sources.
The problem is that Meson decides if something is a source vs. a generated include by looking at the extension: '.c', '.cc', '.m', '.C' are sources, while everything else is considered an include---including '
.inc.c'.Going back to patch 124, I can now answer your question:
Quoted 2 lines
Quoted 2 lines
It's not clear to me why all the decodetree lines ended up in a single "gen = []" block -- they're independent of each other.
The files are added to the source list with "
arm_ss.add(gen)". All that line does is ensuring they are built before other target-specific files for ARM targets.The question then is if Meson could be changed to cope with our naming convention, and unfortunately the answer is no. The root cause is that Makefiles list .o files (and uses implicit patterns to connect .o files to the corresponding sources), while Meson lists .c files.
Quoted 4 lines
There is a silver lining, in that you do get something out of this: if you have a typo in the name of a .c file, it is detected it at "configure" time rather than having to wait until "make" tries to find the source code for that ".o" file.
Hmm - I guess one workaround is to tweak editorconfig so whatever we end up renaming things still get identified as the right type of file for syntax hi-lighting purposes.
Signature · 1 line
Alex Bennée
Re: [PATCH 005/143] meson: rename .inc.c files to .inc
Quoted 3 lines · Alex Bennée
Hmm - I guess one workaround is to tweak editorconfig so whatever we end up renaming things still get identified as the right type of file for syntax hi-lighting purposes.
We can use .c.inc and .h.inc in that case. .c.inc would be for singly-included inline C files, .h.inc is for multiply-included inline C files.
FWIW I would also prefer .inc.c, but it's not my choice to make unfortunately.
Paolo
PATCH 6/143 build-sys hack: ensure target directory is there
In reply to Paolo BonziniFrom: 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
@@ -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
PATCH 7/143 tests/vm: do not pollute configure with --efi-aarch64
In reply to Paolo BonziniJust 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
@@ -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
@@ -10,6 +10,8 @@ IMAGES += ubuntu.aarch64 centos.aarch64 endif endif +EFI_AARCH64 = $(wildcard $(SRC_PATH)/pc-bios/edk2-aarch64-code.fd) + IMAGES_DIR := $(HOME)/.cache/qemu-vm/images IMAGE_FILES := $(patsubst %, $(IMAGES_DIR)/%.img, $(IMAGES))
Signature · 1 line
1.8.3.1
Re: [PATCH 007/143] tests/vm: do not pollute configure with --efi-aarch64
Quoted 73 lines · Paolo Bonzini
Just make
EFI_AARCH64a variable in the makefile that defaults to the efi firmware included with QEMU. It can be redefined on the "make" command line.Signed-off-by Paolo Bonzini <[email protected]>--- configure | 19 ------------------- tests/vm/Makefile.include | 2 ++ 2 files changed, 2 insertions(+), 19 deletions(-)configure +0
-19@@ -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; thentests/vm/Makefile.include +0
-0
tests/vm/Makefile.include IMAGES += ubuntu.aarch64 centos.aarch64 · line 13
Quoted 4 lines
tests/vm/Makefile.include +1
-0@@ -10,6 +10,8 @@ IMAGES += ubuntu.aarch64 centos.aarch64 endif endif +EFI_AARCH64 = $(wildcard $(SRC_PATH)/pc-bios/edk2-aarch64-code.fd)
I'm not sure this is correct. Shouldn't we use the '?=' operator to allow override? I think we want to test $(BUILD_DIR)/pc-bios/edk2-aarch64-code.fd instead.
Quoted 5 lines
tests/vm/Makefile.include +1
-0+ IMAGES_DIR := $(HOME)/.cache/qemu-vm/images IMAGE_FILES := $(patsubst %, $(IMAGES_DIR)/%.img, $(IMAGES))
Re: [PATCH 007/143] tests/vm: do not pollute configure with --efi-aarch64
Quoted 5 lines · Philippe Mathieu-Daudé
Quoted 1 line
+EFI_AARCH64 = $(wildcard $(SRC_PATH)/pc-bios/edk2-aarch64-code.fd)
I'm not sure this is correct. Shouldn't we use the '?=' operator to allow override? I think we want to test $(BUILD_DIR)/pc-bios/edk2-aarch64-code.fd instead.
Command-line always override the Makefile value. But yes I'll fix the path.
Paolo
PATCH 8/143 tests/vm: check for Python YAML parser in the Makefile
In reply to Paolo BonziniNo 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
@@ -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
@@ -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
Re: [PATCH 008/143] tests/vm: check for Python YAML parser in the Makefile
Quoted 8 lines · Paolo Bonzini
No need to do it in the configure file if it is only used for a help message.
Signed-off-by Paolo Bonzini <[email protected]>--- configure | 9 --------- tests/vm/Makefile.include | 4 +++- 2 files changed, 3 insertions(+), 10 deletions(-)
PATCH 9/143 configure: do not include $(...) variables in config-host.mak
In reply to Paolo BonziniThis 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
@@ -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
Re: [PATCH 009/143] configure: do not include $(...) variables in config-host.mak
Quoted 7 lines · Paolo Bonzini
This ensures that Meson will be able to reuse the results of the tests that are performed in the configure script.
Signed-off-by Paolo Bonzini <[email protected]>--- configure | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-)
PATCH 10/143 configure: expand path variables for meson configure
In reply to Paolo BonziniFrom: Marc-André Lureau <[email protected]>
--- configure | 35 ++++++++++++++++++++--------------- 1 file changed, 20 insertions(+), 15 deletions(-)
configure +20 -15
@@ -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
PATCH 11/143 configure: prepare CFLAGS/CXXFLAGS/LDFLAGS for Meson
In reply to Paolo BonziniSplit 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 | 42 ++++++++++++++++++++++-------------------- rules.mak | 4 ++-- 2 files changed, 24 insertions(+), 22 deletions(-)
configure +22 -20
@@ -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++03/) 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 ;;
@@ -131,7 +128,7 @@ compile_object() { 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="-fno-strict-aliasing -fno-common -fwrapv $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 ${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 + # 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"
@@ -2184,21 +2179,21 @@ fi if test "$static" = "yes"; then if test "$pie" != "no" && compile_prog "-Werror -fPIE -DPIE" "-static-pie"; then - QEMU_CFLAGS="-fPIE -DPIE $QEMU_CFLAGS" - QEMU_LDFLAGS="-static-pie $QEMU_LDFLAGS" + CFLAGS="-fPIE -DPIE $QEMU_CFLAGS" + LDFLAGS="-static-pie $QEMU_LDFLAGS" pie="yes" elif test "$pie" = "yes"; then error_exit "-static-pie not available due to missing toolchain support" else - QEMU_LDFLAGS="-static $QEMU_LDFLAGS" + LDFLAGS="-static $QEMU_LDFLAGS" pie="no" fi elif test "$pie" = "no"; then - QEMU_CFLAGS="$CFLAGS_NOPIE $QEMU_CFLAGS" - QEMU_LDFLAGS="$LDFLAGS_NOPIE $QEMU_LDFLAGS" + CFLAGS="$CFLAGS_NOPIE $QEMU_CFLAGS" + LDFLAGS="$LDFLAGS_NOPIE $QEMU_LDFLAGS" elif compile_prog "-Werror -fPIE -DPIE" "-pie"; then - QEMU_CFLAGS="-fPIE -DPIE $QEMU_CFLAGS" - QEMU_LDFLAGS="-pie $QEMU_LDFLAGS" + CFLAGS="-fPIE -DPIE $QEMU_CFLAGS" + LDFLAGS="-pie $QEMU_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"
@@ -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
@@ -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
PATCH 12/143 configure: integrate Meson in the build system
In reply to Paolo BonziniThe 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
@@ -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
@@ -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]
@@ -1961,6 +1965,12 @@ then error_exit "Python not found. Use --python=/path/to/python" fi +if ! has "$meson" +then + error_exit "Meson not found. Use --meson=/path/to/meson" +fi +meson=$(command -v $meson) + # Note that if the Python conditional here evaluates True we will exit # with status 1 which is a shell 'false' value. if ! $python -c 'import sys; sys.exit(sys.version_info < (3,5))'; then
@@ -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 $python $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
@@ -0,0 +1,20 @@ +project('qemu', ['c', 'cpp'], meson_version: '>=0.55.0', + default_options: ['warning_level=1', 'c_std=gnu99', 'cpp_std=gnu++03', '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
PATCH 13/143 configure: generate Meson cross file
In reply to Paolo BonziniFrom: Marc-André Lureau <[email protected]>
--- configure | 45 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+)
configure +45 -0
@@ -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 $python $meson setup \ --prefix "$prefix" \
@@ -8597,11 +8640,13 @@ NINJA=$PWD/ninjatool $python $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
PATCH 14/143 build-sys hack: link with whole .fa archives
In reply to Paolo BonziniFrom: 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
@@ -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
PATCH 15/143 build-sys: add meson submodule
In reply to Paolo BonziniFrom: Marc-André Lureau <[email protected]>
--- .gitmodules | 3 +++ configure | 44 +++++++++++++++++++++++++++++++++++++++++--- meson | 1 + scripts/archive-source.sh | 3 ++- 4 files changed, 47 insertions(+), 4 deletions(-) create mode 160000 meson
.gitmodules +3 -0
@@ -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 +41 -3
56 lines not on this page · raw message
meson new file +1 -0
@@ -0,0 +1 @@ +Subproject commit d0c68dc11507a47b9b85de508e023d9590d60565
scripts/archive-source.sh +2 -1
@@ -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
Re: [PATCH 015/143] build-sys: add meson submodule
Quoted 62 lines · Paolo Bonzini
From: Marc-André Lureau <[email protected]>
Signed-off-by Marc-André Lureau <[email protected]>Signed-off-by Paolo Bonzini <[email protected]>--- .gitmodules | 3 +++ configure | 44 +++++++++++++++++++++++++++++++++++++++++--- meson | 1 + scripts/archive-source.sh | 3 ++- 4 files changed, 47 insertions(+), 4 deletions(-) create mode 160000 meson.gitmodules +3
-0@@ -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 +21
-3@@ -174,6 +174,25 @@ path_of() { return 1 } +version_ge () { + local_ver1=`echo $1 | tr . ' '` + local_ver2=`echo $2 | tr . ' '` + while true; do + set x $local_ver1 + local_first=${2-0} + # shift 2 does nothing if there are less than 2 arguments + shift; shift + local_ver1=$* + set x $local_ver2 + # the second argument finished, the first must be greater or equal + test $# = 1 && return 0 + test $local_first -lt $2 && return 1 + test $local_first -gt $2 && return 0 + shift; shift + local_ver2=$* + done +} + have_backend () { echo "$trace_backends" | grep "$1" >/dev/null }@@ -1965,9 +1984,28 @@ then error_exit "Python not found. Use --python=/path/to/python" fi -if ! has "$meson" -then - error_exit "Meson not found. Use --meson=/path/to/meson" +if test -z "$meson" ; then + if has meson && version_ge "$(meson --version)" 0.55.0; then
configure then · line 1998
Quoted 10 lines
configure +10
-0+ meson=meson + elif test -e "${source_path}/.git" && test $git_update = 'yes' ; then + meson=git + elif test -e "${source_path}/meson/meson.py" ; then + meson=internal + fi +fi + +case "$meson" in + git | internal)
Is "internal" meant to be synonymous with "git"? AFAICT we don't actually do anything with --meson=internal which is why it failed later.
Quoted 11 lines
configure +10
-0+ if test "$meson" = git; then + git_submodules="${git_submodules} meson" + (cd "${source_path}" && GIT="$git" "./scripts/git-submodule.sh" update meson) + fi + meson="${source_path}/meson/meson.py" + ;; +esac + +if ! has "$meson" ; then + error_exit "Meson not found. Use --meson=/path/to/meson|git|internal" fi
<snip>
Signature · 1 line
Alex Bennée
Re: [PATCH 015/143] build-sys: add meson submodule
Quoted 70 lines · Alex Bennée
Quoted 67 lines · Paolo Bonzini
From: Marc-André Lureau <[email protected]>
Signed-off-by Marc-André Lureau <[email protected]>Signed-off-by Paolo Bonzini <[email protected]>--- .gitmodules | 3 +++ configure | 44 +++++++++++++++++++++++++++++++++++++++++--- meson | 1 + scripts/archive-source.sh | 3 ++- 4 files changed, 47 insertions(+), 4 deletions(-) create mode 160000 meson.gitmodules +3
-0@@ -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 +26
-3@@ -174,6 +174,25 @@ path_of() { return 1 } +version_ge () { + local_ver1=`echo $1 | tr . ' '` + local_ver2=`echo $2 | tr . ' '` + while true; do + set x $local_ver1 + local_first=${2-0} + # shift 2 does nothing if there are less than 2 arguments + shift; shift + local_ver1=$* + set x $local_ver2 + # the second argument finished, the first must be greater or equal + test $# = 1 && return 0 + test $local_first -lt $2 && return 1 + test $local_first -gt $2 && return 0 + shift; shift + local_ver2=$* + done +} + have_backend () { echo "$trace_backends" | grep "$1" >/dev/null }@@ -1965,9 +1984,28 @@ then error_exit "Python not found. Use --python=/path/to/python" fi -if ! has "$meson" -then - error_exit "Meson not found. Use --meson=/path/to/meson" +if test -z "$meson" ; then + if has meson && version_ge "$(meson --version)" 0.55.0; then + meson=meson + elif test -e "${source_path}/.git" && test $git_update = 'yes' ; then + meson=git + elif test -e "${source_path}/meson/meson.py" ; then + meson=internal
Quoted 8 lines
configure then · line 1998
Quoted 5 lines
configure +5
-0+ fi +fi + +case "$meson" in + git | internal)Is "internal" meant to be synonymous with "git"? AFAICT we don't actually do anything with --meson=internal which is why it failed later.
"git" only works on checkouts, "internal" works on release builds as well. So the problem is that git_update is not set to "yes" for whatever reason.
Paolo
Quoted 14 lines
Quoted 12 lines
configure +10
-0+ if test "$meson" = git; then + git_submodules="${git_submodules} meson" + (cd "${source_path}" && GIT="$git" "./scripts/git-submodule.sh" update meson) + fi + meson="${source_path}/meson/meson.py" + ;; +esac + +if ! has "$meson" ; then + error_exit "Meson not found. Use --meson=/path/to/meson|git|internal" fi<snip>
PATCH 16/143 meson: move summary to meson.build
In reply to Paolo Bonzini--- configure | 235 --------------------------------------------------------- meson.build | 245 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 245 insertions(+), 235 deletions(-)
configure +0 -235
@@ -527,8 +527,6 @@ secret_keyring="" libdaxctl="" meson=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
@@ -6855,225 +6839,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 +245 -0
251 lines not on this page · raw message
Signature · 1 line
1.8.3.1
PATCH 17/143 meson: enable pie
In reply to Paolo BonziniFrom: Marc-André Lureau <[email protected]>
--- configure | 1 + 1 file changed, 1 insertion(+)
configure +1 -0
@@ -8443,6 +8443,7 @@ NINJA=$PWD/ninjatool $python $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
PATCH 18/143 meson: use coverage option
In reply to Paolo BonziniFrom: 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
@@ -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
@@ -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
@@ -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)
@@ -6530,8 +6526,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
@@ -7804,7 +7799,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
@@ -8444,6 +8438,7 @@ NINJA=$PWD/ninjatool $python $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
@@ -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
@@ -197,7 +197,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
PATCH 19/143 meson: add sparse support
In reply to Paolo BonziniDo 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
@@ -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
@@ -2986,7 +2986,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
@@ -7777,11 +7777,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
@@ -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
@@ -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
PATCH 20/143 meson: add testsuite Makefile generator
In reply to Paolo BonziniRules 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
@@ -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
@@ -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
Re: [PATCH 020/143] meson: add testsuite Makefile generator
Quoted 4 lines · 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.
Hmm not sure why check-tcg has broken then:
11:44:37 [alex.bennee@hackbox2:~/l/q/b/all] review/meson-for-5.2|✔ + make check-tcg make[1]: Entering directory '/home/alex.bennee/lsrc/qemu.git/slirp'
make[1]: Nothing to be done for 'all'.
make[1]: Leaving directory '/home/alex.bennee/lsrc/qemu.git/slirp'
make: *** No rule to make target 'run-tcg-tests-aarch64-softmmu', needed by 'check-tcg'. Stop.
Quoted 146 lines
The generated rules are based on QEMU's existing test harness
Makefileand TAP parser.Signed-off-by Paolo Bonzini <[email protected]>--- Makefile | 4 ++ scripts/mtest2make.py | 102 +++++++++++++++++++++++++++++++++++++++++++++++++ tests/Makefile.include | 1 - 3 files changed, 106 insertions(+), 1 deletion(-) create mode 100644 scripts/mtest2make.pyMakefile +4
-0@@ -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 fromscripts/mtest2make.py new file +102
-0@@ -0,0 +1,102 @@ +#! /usr/bin/env python3 + +# Create Makefile targets to run tests, from Meson's test introspection data. +# +# Author: Paolo Bonzini <[email protected]> + +from collections import defaultdict +import json +import os +import shlex +import sys + +class Suite(object): + def __init__(self): + self.tests = list() + self.slow_tests = list() + self.executables = set() + +print(''' +SPEED = quick + +# $1 = test command, $2 = test name +.test-human-tap = $1 < /dev/null | ./scripts/tap-driver.pl --test-name="$2" $(if $(V),, --show-failures-only) +.test-human-exitcode = $1 < /dev/null +.test-tap-tap = $1 < /dev/null | sed "s/^[a-z][a-z]* [0-9]*/& $2/" || true +.test-tap-exitcode = printf "%s\\n" 1..1 "`$1 < /dev/null > /dev/null || echo "not "`ok 1 $2" +.test.print = echo $(if $(V),'$1','Running test $2') >&3 +.test.env = MALLOC_PERTURB_=$${MALLOC_PERTURB_:-$$(( $${RANDOM:-0} % 255 + 1))} + +# $1 = test name, $2 = test target (human or tap) +.test.run = $(call .test.print,$(.test.cmd.$1),$(.test.name.$1)) && $(call .test-$2-$(.test.driver.$1),$(.test.cmd.$1),$(.test.name.$1)) + +define .test.human_k + @exec 3>&1; rc=0; $(foreach TEST, $1, $(call .test.run,$(TEST),human) || rc=$$?;) \\ + exit $$rc +endef +define .test.human_no_k + $(foreach TEST, $1, @exec 3>&1; $(call .test.run,$(TEST),human) +) +endef +.test.human = \\ + $(if $(findstring k, $(MAKEFLAGS)), $(.test.human_k), $(.test.human_no_k)) + +define .test.tap + @exec 3>&1; { $(foreach TEST, $1, $(call .test.run,$(TEST),tap); ) } \\ + | ./scripts/tap-merge.pl | tee "$@" \\ + | ./scripts/tap-driver.pl $(if $(V),, --show-failures-only) +endef +''') + +suites = defaultdict(Suite) +i = 0 +for test in json.load(sys.stdin): + env = ' '.join(('%s=%s' % (shlex.quote(k), shlex.quote(v)) + for k, v in test['env'].items())) + executable = os.path.relpath(test['cmd'][0]) + if test['workdir'] is not None: + test['cmd'][0] = os.path.relpath(test['cmd'][0], test['workdir']) + else: + test['cmd'][0] = executable + cmd = '$(.test.env) %s %s' % (env, ' '.join((shlex.quote(x) for x in test['cmd']))) + if test['workdir'] is not None: + cmd = '(cd %s && %s)' % (shlex.quote(test['workdir']), cmd) + driver = test['protocol'] if 'protocol' in test else 'exitcode' + + i += 1 + print('.test.name.%d := %s' % (i, test['name'])) + print('.test.driver.%d := %s' % (i, driver)) + print('.test.cmd.%d := %s' % (i, cmd)) + + test_suites = test['suite'] or ['default'] + is_slow = any(s.endswith('-slow') for s in test_suites) + for s in test_suites: + # The suite name in the introspection info is "PROJECT:SUITE" + s = s.split(':')[1] + if s.endswith('-slow'): + s = s[:-5] + if is_slow: + suites[s].slow_tests.append(i) + else: + suites[s].tests.append(i) + suites[s].executables.add(executable) + +print('.PHONY: check check-report.tap') +print('check:') +print('check-report.tap:') +print('\t@cat $^ | scripts/tap-merge.pl >$@') +for name, suite in suites.items(): + executables = ' '.join(suite.executables) + slow_test_numbers = ' '.join((str(x) for x in suite.slow_tests)) + test_numbers = ' '.join((str(x) for x in suite.tests)) + print('.test.suite-quick.%s := %s' % (name, test_numbers)) + print('.test.suite-slow.%s := $(.test.suite-quick.%s) %s' % (name, name, slow_test_numbers)) + print('check-build: %s' % executables) + print('.PHONY: check-%s' % name) + print('.PHONY: check-report-%s.tap' % name) + print('check: check-%s' % name) + print('check-%s: %s' % (name, executables)) + print('\t$(call .test.human, $(.test.suite-$(SPEED).%s))' % (name, )) + print('check-report.tap: check-report-%s.tap' % name) + print('check-report-%s.tap: %s' % (name, executables)) + print('\t$(call .test.tap, $(.test.suite-$(SPEED).%s))' % (name, ))tests/Makefile.include +0
-1@@ -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
Alex Bennée
Re: [PATCH 020/143] meson: add testsuite Makefile generator
Quoted 4 lines · Alex Bennée
Quoted 4 lines
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.
Quoted 9 lines
Hmm not sure why check-tcg has broken then:
11:44:37 [alex.bennee@hackbox2:~/l/q/b/all] review/meson-for-5.2|✔ + make check-tcg make[1]: Entering directory '
/home/alex.bennee/lsrc/qemu.git/slirp'
make[1]: Nothing to be done for 'all'.
make[1]: Leaving directory '/home/alex.bennee/lsrc/qemu.git/slirp'
make: *** No rule to make target 'run-tcg-tests-aarch64-softmmu', needed by 'check-tcg'. Stop.
Probably unrelated unless you bisected it to this patch. I'll check.
Paolo
Re: [PATCH 020/143] meson: add testsuite Makefile generator
Quoted 15 lines · Paolo Bonzini
Quoted 4 lines · Alex Bennée
Quoted 4 lines
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.
Quoted 9 lines
Hmm not sure why check-tcg has broken then:
11:44:37 [alex.bennee@hackbox2:~/l/q/b/all] review/meson-for-5.2|✔ + make check-tcg make[1]: Entering directory '
/home/alex.bennee/lsrc/qemu.git/slirp'
make[1]: Nothing to be done for 'all'.
make[1]: Leaving directory '/home/alex.bennee/lsrc/qemu.git/slirp'
make: *** No rule to make target 'run-tcg-tests-aarch64-softmmu', needed by 'check-tcg'. Stop.
Quoted 1 line
Probably unrelated unless you bisected it to this patch. I'll check.
I tried bisecting but there was too much breakage at the other commits.
Quoted 2 lines
Paolo
Signature · 1 line
Alex Bennée
PATCH 21/143 libqemuutil, qapi, trace: convert to meson
In reply to Paolo BonziniThis 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 | 178 ++++++++++++++++++++++++++++ qapi/Makefile.objs | 23 ---- qapi/meson.build | 120 +++++++++++++++++++ qobject/Makefile.objs | 3 - qobject/meson.build | 3 + rules.mak | 2 +- 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 | 82 +++++++++++++ util/Makefile.objs | 83 ------------- util/meson.build | 68 +++++++++++ 25 files changed, 576 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 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
@@ -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
@@ -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
@@ -7165,6 +7165,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
@@ -7175,6 +7177,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
@@ -7551,6 +7555,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
@@ -7776,6 +7782,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
@@ -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
@@ -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
@@ -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 +178 -0
190 lines not on this page · raw message
qapi/Makefile.objs +0 -23
@@ -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
@@ -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
@@ -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
@@ -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/tracetool/backend/dtrace.py +1 -1
@@ -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
@@ -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
@@ -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
@@ -0,0 +1 @@ +subdir('qapi')
storage-daemon/qapi/Makefile.objs deleted +0 -1
@@ -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
@@ -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 +82 -0
82 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
PATCH 22/143 meson: add remaining generated tcg trace helpers
In reply to Paolo BonziniFrom: Marc-André Lureau <[email protected]>
--- Makefile | 51 --------------------------------------------------- trace/meson.build | 14 ++++++++++++++ 2 files changed, 14 insertions(+), 51 deletions(-)
Makefile +0 -51
@@ -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
@@ -61,6 +61,20 @@ custom_target('trace-events-all', install: true, install_dir: config_host['qemu_datadir']) +foreach d : [ + ['generated-tcg-tracers.h', 'tcg-h'], + ['generated-helpers.c', 'tcg-helper-c'], + ['generated-helpers.h', 'tcg-helper-h'], + ['generated-helpers-wrappers.h', 'tcg-helper-wrapper-h'], +] + custom_target(d[0], + output: d[0], + input: meson.source_root() / 'trace-events', + command: [ tracetool, '--group=root', '--format=@0@'.format(d[1]), '@INPUT@' ], + build_by_default: true, # to be removed when added to a target + capture: true) +endforeach + if 'CONFIG_TRACE_UST' in config_host trace_ust_all_h = custom_target('trace-ust-all.h', output: 'trace-ust-all.h',
Signature · 1 line
1.8.3.1
PATCH 23/143 meson: add version.o
In reply to Paolo BonziniFrom: Marc-André Lureau <[email protected]>
--- meson.build | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)
meson.build +7 -1
@@ -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())
@@ -215,7 +221,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
PATCH 24/143 contrib/libvhost-user: convert to Meson
In reply to Paolo BonziniSince 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 | 2 ++ meson.build | 8 ++++++++ 5 files changed, 15 insertions(+), 13 deletions(-) delete mode 100644 contrib/libvhost-user/Makefile.objs create mode 100644 contrib/libvhost-user/meson.build
Makefile +5 -11
@@ -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
@@ -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
@@ -1 +0,0 @@ -libvhost-user-obj-y += libvhost-user.o libvhost-user-glib.o
contrib/libvhost-user/meson.build new file +2 -0
@@ -0,0 +1,2 @@ +libvhost_user = static_library('vhost-user', + [files('libvhost-user.c', 'libvhost-user-glib.c')])
meson.build +8 -0
@@ -223,6 +223,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
PATCH 25/143 tools/virtiofsd: convert to Meson
In reply to Paolo Bonzini---
Makefile | 12 ------------
Makefile.objs | 1 -
configure | 1 +
meson.build | 11 +++++++++++
tools/meson.build | 7 +++++++
tools/virtiofsd/Makefile.objs | 12 ------------
tools/virtiofsd/meson.build | 17 +++++++++++++++++
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, 38 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
@@ -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
@@ -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
@@ -6965,6 +6965,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
@@ -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
@@ -231,6 +240,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 +7 -0
@@ -0,0 +1,7 @@ +have_virtiofsd = (have_system and + 'CONFIG_LINUX' in config_host and + 'CONFIG_SECCOMP' in config_host and + 'CONFIG_LIBCAP_NG' in config_host) +if have_virtiofsd + subdir('virtiofsd') +endif
tools/virtiofsd/Makefile.objs deleted +0 -12
@@ -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 +17 -0
@@ -0,0 +1,17 @@ +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]) + +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
@@ -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
@@ -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
Signature · 1 line
1.8.3.1
PATCH 26/143 contrib/vhost-user-blk: convert to Meson
In reply to Paolo BonziniThe 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 | 3 +++ meson.build | 1 + 5 files changed, 4 insertions(+), 5 deletions(-) delete mode 100644 contrib/vhost-user-blk/Makefile.objs create mode 100644 contrib/vhost-user-blk/meson.build
Makefile +0 -3
@@ -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
@@ -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
@@ -1 +0,0 @@ -vhost-user-blk-obj-y = vhost-user-blk.o
contrib/vhost-user-blk/meson.build new file +3 -0
@@ -0,0 +1,3 @@ +executable('vhost-user-blk', files('vhost-user-blk.c'), + link_with: libvhost_user, + dependencies: qemuutil)
meson.build +1 -0
@@ -237,6 +237,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
PATCH 27/143 contrib/vhost-user-scsi: convert to Meson
In reply to Paolo BonziniThe libiscsi pkg-config information is extracted from config-host.mak and used to link vhost-user-blk.
--- Makefile | 3 --- Makefile.objs | 3 --- contrib/vhost-user-scsi/Makefile.objs | 1 - contrib/vhost-user-scsi/meson.build | 5 +++++ meson.build | 6 ++++++ 5 files changed, 11 insertions(+), 7 deletions(-) delete mode 100644 contrib/vhost-user-scsi/Makefile.objs create mode 100644 contrib/vhost-user-scsi/meson.build
Makefile +0 -3
@@ -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
@@ -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
@@ -1 +0,0 @@ -vhost-user-scsi-obj-y = vhost-user-scsi.o
contrib/vhost-user-scsi/meson.build new file +5 -0
@@ -0,0 +1,5 @@ +if 'CONFIG_LIBISCSI' in config_host + executable('vhost-user-scsi', files('vhost-user-scsi.c'), + link_with: libvhost_user, + dependencies: [qemuutil, libiscsi]) +endif
meson.build +6 -0
@@ -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
@@ -238,6 +243,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
PATCH 28/143 contrib/rdmacm-mux: convert to Meson
In reply to Paolo BonziniWe can use config-host.mak to decide whether the tool has to be built, apart from that the conversion is straightforward.
--- Makefile | 5 ----- Makefile.objs | 1 - contrib/rdmacm-mux/Makefile.objs | 3 --- contrib/rdmacm-mux/meson.build | 6 ++++++ meson.build | 2 ++ 5 files changed, 8 insertions(+), 9 deletions(-) delete mode 100644 contrib/rdmacm-mux/Makefile.objs create mode 100644 contrib/rdmacm-mux/meson.build
Makefile +0 -5
@@ -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
@@ -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
@@ -1,3 +0,0 @@ -ifdef CONFIG_PVRDMA -rdmacm-mux-obj-y = main.o -endif
contrib/rdmacm-mux/meson.build new file +6 -0
@@ -0,0 +1,6 @@ +if 'CONFIG_PVRDMA' in config_host + # if not found, CONFIG_PVRDMA should not be set + libumad = cc.find_library('ibumad', required: true) + executable('rdmacm-mux', files('main.c'), + dependencies: [glib, libumad]) +endif
meson.build +2 -0
@@ -240,6 +240,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
PATCH 29/143 contrib/vhost-user-input: convert to meson
In reply to Paolo BonziniFrom: Marc-André Lureau <[email protected]>
--- Makefile | 11 ----------- Makefile.objs | 1 - contrib/vhost-user-input/Makefile.objs | 1 - contrib/vhost-user-input/meson.build | 3 +++ meson.build | 1 + 5 files changed, 4 insertions(+), 13 deletions(-) delete mode 100644 contrib/vhost-user-input/Makefile.objs create mode 100644 contrib/vhost-user-input/meson.build
Makefile +0 -11
@@ -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
@@ -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
@@ -1 +0,0 @@ -vhost-user-input-obj-y = main.o
contrib/vhost-user-input/meson.build new file +3 -0
@@ -0,0 +1,3 @@ +executable('vhost-user-input', files('main.c'), + link_with: libvhost_user, + dependencies: qemuutil)
meson.build +1 -0
@@ -245,6 +245,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
PATCH 30/143 contrib/vhost-user-gpu: convert to meson
In reply to Paolo BonziniFrom: Marc-André Lureau <[email protected]>
--- Makefile | 18 +----------------- Makefile.objs | 1 - contrib/vhost-user-gpu/Makefile.objs | 10 ---------- contrib/vhost-user-gpu/meson.build | 11 +++++++++++ meson.build | 15 +++++++++++++++ rules.mak | 7 ------- 6 files changed, 27 insertions(+), 35 deletions(-) delete mode 100644 contrib/vhost-user-gpu/Makefile.objs create mode 100644 contrib/vhost-user-gpu/meson.build
Makefile +1 -17
@@ -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
@@ -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
@@ -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 +11 -0
@@ -0,0 +1,11 @@ +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]) + + 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
@@ -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
@@ -245,6 +257,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
@@ -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
PATCH 31/143 contrib/ivshmem: convert to meson
In reply to Paolo BonziniFrom: Marc-André Lureau <[email protected]>
--- Makefile | 9 --------- Makefile.objs | 2 -- configure | 3 --- contrib/ivshmem-client/Makefile.objs | 1 - contrib/ivshmem-client/meson.build | 3 +++ contrib/ivshmem-server/Makefile.objs | 1 - contrib/ivshmem-server/meson.build | 3 +++ meson.build | 6 ++++++ 8 files changed, 12 insertions(+), 16 deletions(-) delete mode 100644 contrib/ivshmem-client/Makefile.objs create mode 100644 contrib/ivshmem-client/meson.build delete mode 100644 contrib/ivshmem-server/Makefile.objs create mode 100644 contrib/ivshmem-server/meson.build
Makefile +0 -9
@@ -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
@@ -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
@@ -6647,9 +6647,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
@@ -1 +0,0 @@ -ivshmem-client-obj-y = ivshmem-client.o main.o
contrib/ivshmem-client/meson.build new file +3 -0
@@ -0,0 +1,3 @@ +executable('ivshmem-client', files('ivshmem-client.c', 'main.c'), + dependencies: glib, + install: true)
contrib/ivshmem-server/Makefile.objs deleted +0 -1
@@ -1 +0,0 @@ -ivshmem-server-obj-y = ivshmem-server.o main.o
contrib/ivshmem-server/meson.build new file +3 -0
@@ -0,0 +1,3 @@ +executable('ivshmem-server', files('ivshmem-server.c', 'main.c'), + dependencies: [qemuutil, rt], + install: true)
meson.build +6 -0
@@ -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(),
@@ -263,6 +264,11 @@ 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
PATCH 32/143 contrib/elf2dmp: convert to meson
In reply to Paolo BonziniFrom: Marc-André Lureau <[email protected]>
--- Makefile | 4 ---- Makefile.objs | 6 ------ configure | 3 --- contrib/elf2dmp/Makefile.objs | 4 ---- contrib/elf2dmp/meson.build | 4 ++++ meson.build | 6 ++++++ 6 files changed, 10 insertions(+), 17 deletions(-) delete mode 100644 contrib/elf2dmp/Makefile.objs create mode 100644 contrib/elf2dmp/meson.build
Makefile +0 -4
@@ -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
@@ -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
@@ -6647,9 +6647,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
@@ -1,4 +0,0 @@ -elf2dmp-obj-y = main.o addrspace.o download.o pdb.o qemu_elf.o - -download.o-cflags := $(CURL_CFLAGS) -download.o-libs := $(CURL_LIBS)
contrib/elf2dmp/meson.build new file +4 -0
@@ -0,0 +1,4 @@ +if 'CONFIG_CURL' in config_host + executable('elf2dmp', files('main.c', 'addrspace.c', 'download.c', 'pdb.c', 'qemu_elf.c'), + dependencies: [glib, curl]) +endif
meson.build +6 -0
@@ -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
@@ -254,6 +259,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
PATCH 33/143 meson: convert qemu-ga
In reply to Paolo Bonzini--- Makefile | 53 ++++++----------------------------------------- Makefile.objs | 1 - configure | 9 ++++---- meson.build | 22 ++++++++++++++++++-- qga/Makefile.objs | 9 -------- qga/installer/qemu-ga.wxs | 2 +- qga/meson.build | 45 ++++++++++++++++++++++++++++++++++++++++ tests/Makefile.include | 4 ++-- tests/test-qga.c | 8 +++---- 9 files changed, 82 insertions(+), 71 deletions(-) create mode 100644 qga/meson.build
Makefile +6 -47
@@ -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
@@ -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
@@ -3949,7 +3949,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
@@ -5169,7 +5168,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
@@ -5194,7 +5192,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()
@@ -6689,7 +6686,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
@@ -6935,6 +6931,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
@@ -7792,7 +7791,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 +20 -2
@@ -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
@@ -125,13 +129,23 @@ have_block = have_system or have_tools # Generators qapi_gen = find_program('scripts/qapi-gen.py') -qapi_gen_depends = [ meson.source_root() / 'scripts/qapi/events.py', +qapi_gen_depends = [ meson.source_root() / 'scripts/qapi/__init__.py', + meson.source_root() / 'scripts/qapi/commands.py', + meson.source_root() / 'scripts/qapi/common.py', + meson.source_root() / 'scripts/qapi/doc.py', + meson.source_root() / 'scripts/qapi/error.py', + meson.source_root() / 'scripts/qapi/events.py', + meson.source_root() / 'scripts/qapi/expr.py', + meson.source_root() / 'scripts/qapi/gen.py', meson.source_root() / 'scripts/qapi/introspect.py', + meson.source_root() / 'scripts/qapi/parser.py', + meson.source_root() / 'scripts/qapi/schema.py', + meson.source_root() / 'scripts/qapi/source.py', meson.source_root() / 'scripts/qapi/types.py', meson.source_root() / 'scripts/qapi/visit.py', meson.source_root() / 'scripts/qapi/common.py', meson.source_root() / 'scripts/qapi/doc.py', - meson.source_root() / 'scripts/qapi-gen.py' ] +] # Collect sourcesets.
@@ -257,6 +271,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
@@ -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
@@ -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 +45 -0
45 lines not on this page · raw message
tests/Makefile.include +2 -2
@@ -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
@@ -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
PATCH 34/143 meson: convert vss-win32
In reply to Paolo BonziniFrom: 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
@@ -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
@@ -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
@@ -1 +0,0 @@ -qga-vss-dll-obj-$(CONFIG_QGA_VSS) += vss-win32/
qga/meson.build +6 -0
@@ -43,3 +43,9 @@ qga_ss = qga_ss.apply(config_host, strict: false) qga = executable('qemu-ga', qga_ss.sources(), link_args: config_host['LIBS_QGA'].split(), dependencies: [qemuutil, libudev]) + +if host_machine.system() == 'windows' + if 'CONFIG_QGA_VSS' in config_host + subdir('vss-win32') + endif +endif
qga/vss-win32/Makefile.objs deleted +0 -23
@@ -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
@@ -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
PATCH 35/143 meson: add msi generation
In reply to Paolo BonziniFrom: 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
@@ -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
@@ -47,5 +47,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
@@ -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
PATCH 36/143 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
@@ -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
@@ -43,6 +43,7 @@ qga_ss = qga_ss.apply(config_host, strict: false) qga = executable('qemu-ga', qga_ss.sources(), link_args: config_host['LIBS_QGA'].split(), dependencies: [qemuutil, libudev]) +all_qga = [qga] if host_machine.system() == 'windows' if 'CONFIG_QGA_VSS' in config_host
@@ -71,6 +72,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 + + alias_target('qga/qemu-ga', all_qga) endif
qga/vss-win32/meson.build +2 -0
@@ -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
PATCH 37/143 meson: add qemu-bridge-helper
In reply to Paolo BonziniFrom: Marc-André Lureau <[email protected]>
--- Makefile | 4 ---- meson.build | 8 +++++++- 2 files changed, 7 insertions(+), 5 deletions(-)
Makefile +0 -4
@@ -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 +7 -1
@@ -270,7 +270,6 @@ qemuutil = declare_dependency(link_with: libqemuutil, sources: genh + version_res) # Other build targets - if 'CONFIG_GUEST_AGENT' in config_host subdir('qga') endif
@@ -289,6 +288,13 @@ if have_tools subdir('contrib/vhost-user-scsi') endif + if host_machine.system() == 'linux' + executable('qemu-bridge-helper', files('qemu-bridge-helper.c'), + dependencies: [qemuutil, libcap_ng], + install: true, + install_dir: get_option('libexecdir')) + endif + if 'CONFIG_IVSHMEM' in config_host subdir('contrib/ivshmem-client') subdir('contrib/ivshmem-server')
Signature · 1 line
1.8.3.1
Re: [PATCH 037/143] meson: add qemu-bridge-helper
Hi Paolo,
Quoted 44 lines · Paolo Bonzini
From: Marc-André Lureau <[email protected]>
Signed-off-by Marc-André Lureau <[email protected]>Signed-off-by Paolo Bonzini <[email protected]>--- Makefile | 4 ---- meson.build | 8 +++++++- 2 files changed, 7 insertions(+), 5 deletions(-)Makefile +0
-4@@ -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 +0
-1@@ -270,7 +270,6 @@ qemuutil = declare_dependency(link_with: libqemuutil, sources: genh + version_res) # Other build targets - if 'CONFIG_GUEST_AGENT' in config_host subdir('qga') endif
meson.build if have_tools · line 293
Quoted 6 lines
meson.build +3
-0@@ -289,6 +288,13 @@ if have_tools subdir('contrib/vhost-user-scsi') endif + if host_machine.system() == 'linux' + executable('qemu-bridge-helper', files('qemu-bridge-helper.c'), + dependencies: [qemuutil, libcap_ng],
Is libcap_ng still optional?
Quoted 8 lines
meson.build +4
-0+ install: true, + install_dir: get_option('libexecdir')) + endif + if 'CONFIG_IVSHMEM' in config_host subdir('contrib/ivshmem-client') subdir('contrib/ivshmem-server')
Re: [PATCH 037/143] meson: add qemu-bridge-helper
Quoted 7 lines · Philippe Mathieu-Daudé
meson.build if have_tools · line 293
Quoted 5 lines
endif
meson.build +3
-0+ if host_machine.system() == 'linux' + executable('qemu-bridge-helper', files('qemu-bridge-helper.c'), + dependencies: [qemuutil, libcap_ng],Is
libcap_ngstill optional?
Yes, if a dependency is absent it is simply left out. See contrib/vhost-user-scsi for an example where the executable is disabled.
Instead, if you want a dependency to be mandatory you have two choices:
- to break the build you use "required: true", see the SDL conversion for an example
- to disable executables there is a thing called disabler but we're not using it because it's confusing. I was thinking of adding an "or_disable()" method to dependency objects, but I have never contributed it.
Paolo
Philippe Mathieu-Daudé
Reviewed-byRe: [PATCH 037/143] meson: add qemu-bridge-helper
Quoted 9 lines · Paolo Bonzini
Quoted 7 lines · Philippe Mathieu-Daudé
meson.build if have_tools · line 293
Quoted 5 lines
endif
meson.build +3
-0+ if host_machine.system() == 'linux' + executable('qemu-bridge-helper', files('qemu-bridge-helper.c'), + dependencies: [qemuutil, libcap_ng],Is
libcap_ngstill optional?
Quoted 7 lines
Yes, if a dependency is absent it is simply left out. See contrib/vhost-user-scsi for an example where the executable is disabled.
Instead, if you want a dependency to be mandatory you have two choices:
- to break the build you use "required: true", see the SDL conversion for an example
OK, good :)
Quoted 8 lines
- to disable executables there is a thing called disabler but we're not using it because it's confusing. I was thinking of adding an "
or_disable()" method to dependency objects, but I have never contributed it.Paolo
PATCH 38/143 meson: add qemu-keymap
In reply to Paolo BonziniFrom: Marc-André Lureau <[email protected]>
--- Makefile | 5 ----- configure | 4 +--- meson.build | 10 ++++++++++ 3 files changed, 11 insertions(+), 8 deletions(-)
Makefile +0 -5
@@ -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
@@ -6675,9 +6675,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
@@ -6994,6 +6991,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
@@ -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
@@ -278,6 +283,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
PATCH 39/143 meson: add qemu-edid
In reply to Paolo BonziniFrom: Marc-André Lureau <[email protected]>
--- Makefile | 2 -- configure | 2 +- meson.build | 3 +++ 3 files changed, 4 insertions(+), 3 deletions(-)
Makefile +0 -2
@@ -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
@@ -6640,7 +6640,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 +3 -0
@@ -288,6 +288,9 @@ if have_tools dependencies: [qemuutil, xkbcommon], install: true) endif + executable('qemu-edid', files('qemu-edid.c', 'hw/display/edid-generate.c'), + dependencies: qemuutil) + if 'CONFIG_VHOST_USER' in config_host subdir('contrib/libvhost-user') subdir('contrib/vhost-user-blk')
Signature · 1 line
1.8.3.1
Re: [PATCH 039/143] meson: add qemu-edid
Quoted 9 lines · Paolo Bonzini
From: Marc-André Lureau <[email protected]>
Signed-off-by Marc-André Lureau <[email protected]>Signed-off-by Paolo Bonzini <[email protected]>--- Makefile | 2 -- configure | 2 +- meson.build | 3 +++ 3 files changed, 4 insertions(+), 3 deletions(-)
PATCH 40/143 meson: add virtfs-proxy-helper
In reply to Paolo BonziniFrom: Marc-André Lureau <[email protected]>
--- Makefile | 2 -- configure | 7 +++++-- fsdev/meson.build | 5 +++++ meson.build | 6 ++++++ 4 files changed, 16 insertions(+), 4 deletions(-) create mode 100644 fsdev/meson.build
Makefile +0 -2
@@ -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
@@ -4320,6 +4320,7 @@ fi ########################################## # attr probe +libattr_libs= if test "$attr" != "no" ; then cat > $TMPC <<EOF #include <stdio.h>
@@ -4336,7 +4337,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
@@ -6639,6 +6641,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
@@ -6649,7 +6652,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"
@@ -7231,6 +7233,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 +5 -0
@@ -0,0 +1,5 @@ +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]) +endif
meson.build +6 -0
@@ -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(),
@@ -274,6 +278,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
PATCH 41/143 meson: keymap-gen
In reply to Paolo BonziniFrom: 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
@@ -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.c \ - ui/input-keymap-linux-to-qcode.c \ - ui/input-keymap-qcode-to-atset1.c \ - ui/input-keymap-qcode-to-atset2.c \ - ui/input-keymap-qcode-to-atset3.c \ - ui/input-keymap-qcode-to-linux.c \ - ui/input-keymap-qcode-to-qnum.c \ - ui/input-keymap-qcode-to-sun.c \ - ui/input-keymap-qnum-to-qcode.c \ - ui/input-keymap-usb-to-qcode.c \ - ui/input-keymap-win32-to-qcode.c \ - ui/input-keymap-x11-to-qcode.c \ - ui/input-keymap-xorgevdev-to-qcode.c \ - ui/input-keymap-xorgkbd-to-qcode.c \ - ui/input-keymap-xorgxquartz-to-qcode.c \ - ui/input-keymap-xorgxwin-to-qcode.c \ - ui/input-keymap-osx-to-qcode.c \ - $(NULL) - -generated-files-$(CONFIG_SOFTMMU) += $(KEYCODEMAP_FILES) - -ui/input-keymap-%.c: $(KEYCODEMAP_GEN) $(KEYCODEMAP_CSV) $(SRC_PATH)/ui/Makefile.objs - $(call quiet-command,\ - stem=$* && src=$${stem%-to-*} dst=$${stem#*-to-} && \ - test -e $(KEYCODEMAP_GEN) && \ - $(PYTHON) $(KEYCODEMAP_GEN) \ - --lang glib2 \ - --varname qemu_input_map_$${src}_to_$${dst} \ - code-map $(KEYCODEMAP_CSV) $${src} $${dst} \ - > $@ || rm -f $@, "GEN", "$@") - -$(KEYCODEMAP_GEN): .git-submodule-status -$(KEYCODEMAP_CSV): .git-submodule-status - edk2-decompressed = $(basename $(wildcard pc-bios/edk2-*.fd.bz2)) pc-bios/edk2-%.fd: pc-bios/edk2-%.fd.bz2 $(call quiet-command,bzip2 -d -c $< > $@,"BUNZIP2",$<)
meson.build +1 -0
@@ -265,6 +265,7 @@ subdir('trace') subdir('util') subdir('crypto') subdir('storage-daemon') +subdir('ui') # Build targets from sourcesets
ui/meson.build new file +34 -0
@@ -0,0 +1,34 @@ +keymap_gen = find_program('keycodemapdb/tools/keymap-gen') + +keymaps = [ + ['atset1', 'qcode'], + ['linux', 'qcode'], + ['qcode', 'atset1'], + ['qcode', 'atset2'], + ['qcode', 'atset3'], + ['qcode', 'linux'], + ['qcode', 'qnum'], + ['qcode', 'sun'], + ['qnum', 'qcode'], + ['usb', 'qcode'], + ['win32', 'qcode'], + ['x11', 'qcode'], + ['xorgevdev', 'qcode'], + ['xorgkbd', 'qcode'], + ['xorgxquartz', 'qcode'], + ['xorgxwin', 'qcode'], + ['osx', 'qcode'], +] + +foreach e : keymaps + output = 'input-keymap-@0@-to-@[email protected]'.format(e[0], e[1]) + custom_target(output, + output: output, + capture: true, + build_by_default: true, # to be removed when added to a target + input: files('keycodemapdb/data/keymaps.csv'), + command: [keymap_gen, + '--lang', 'glib2', + '--varname', 'qemu_input_map_@0@_to_@1@'.format(e[0], e[1]), + 'code-map', '@INPUT0@', e[0], e[1]]) +endforeach
Signature · 1 line
1.8.3.1
PATCH 42/143 meson: generate qemu-version.h
In reply to Paolo BonziniFrom: 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
@@ -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
@@ -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',
@@ -156,6 +157,17 @@ qapi_gen_depends = [ meson.source_root() / 'scripts/qapi/__init__.py', meson.source_root() / 'scripts/qapi/doc.py', ] +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()
@@ -256,8 +268,6 @@ trace_events_subdirs += [ 'util', ] -genh = [] - subdir('qapi') subdir('qobject') subdir('stubs')
scripts/qemu-version.sh new file +25 -0
@@ -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
PATCH 43/143 meson: generate shader headers
In reply to Paolo BonziniFrom: 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
@@ -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
@@ -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
@@ -32,3 +32,5 @@ foreach e : keymaps '--varname', 'qemu_input_map_@0@_to_@1@'.format(e[0], e[1]), 'code-map', '@INPUT0@', e[0], e[1]]) endforeach + +subdir('shader')
ui/shader/meson.build new file +15 -0
@@ -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
PATCH 44/143 meson: generate hxtool files
In reply to Paolo BonziniFrom: Marc-André Lureau <[email protected]>
--- Makefile | 8 +------- Makefile.target | 6 ------ meson.build | 21 +++++++++++++++++++++ scripts/hxtool | 2 +- 4 files changed, 23 insertions(+), 14 deletions(-) mode change 100644 => 100755 scripts/hxtool
Makefile +1 -7
@@ -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
@@ -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 +21 -0
@@ -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',
@@ -169,6 +170,26 @@ 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 + # Collect sourcesets. util_ss = ss.source_set()
scripts/hxtool +1 -1
@@ -19,6 +19,6 @@ hxtoh() case "$1" in "-h") hxtoh ;; *) exit 1 ;; -esac +esac < "$2" exit 0
Signature · 1 line
1.8.3.1
PATCH 45/143 meson: uncompress edk2 bios
In reply to Paolo BonziniFrom: Marc-André Lureau <[email protected]>
--- Makefile | 7 ------- meson.build | 1 + pc-bios/meson.build | 23 +++++++++++++++++++++++ 3 files changed, 24 insertions(+), 7 deletions(-) create mode 100644 pc-bios/meson.build
Makefile +0 -7
@@ -112,9 +112,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 +255,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 +361,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)
meson.build +1 -0
@@ -354,6 +354,7 @@ if have_tools endif subdir('tools') +subdir('pc-bios') summary_info = {} summary_info += {'Install prefix': config_host['prefix']}
pc-bios/meson.build new file +23 -0
@@ -0,0 +1,23 @@ +bzip2 = find_program('bzip2') + +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, + build_by_default: true, + command: [ bzip2, '-dc', '@INPUT0@' ]) + endforeach +endif
Signature · 1 line
1.8.3.1
Re: [PATCH 045/143] meson: uncompress edk2 bios
Quoted 11 lines · Paolo Bonzini
From: Marc-André Lureau <[email protected]>
Signed-off-by Marc-André Lureau <[email protected]>Signed-off-by Paolo Bonzini <[email protected]>--- Makefile | 7 ------- meson.build | 1 + pc-bios/meson.build | 23 +++++++++++++++++++++++ 3 files changed, 24 insertions(+), 7 deletions(-) create mode 100644 pc-bios/meson.build
PATCH 46/143 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
@@ -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')
@@ -355,6 +356,7 @@ endif subdir('tools') subdir('pc-bios') +subdir('tests') summary_info = {} summary_info += {'Install prefix': config_host['prefix']}
tests/Makefile.include +1 -7
@@ -896,13 +896,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
@@ -964,6 +957,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
@@ -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
PATCH 47/143 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 | 628 +++++++++++++++++++++++++++++++++++++++++++++++++ tests/meson.build | 4 + 5 files changed, 636 insertions(+), 758 deletions(-) delete mode 100644 tests/fp/Makefile create mode 100644 tests/fp/meson.build
configure +1 -1
@@ -8319,7 +8319,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 +628 -0
628 lines not on this page · raw message
tests/meson.build +4 -0
@@ -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
PATCH 48/143 meson: convert check-qapi-schema
In reply to Paolo Bonzini--- tests/Makefile.include | 218 +----------------------------------------- tests/meson.build | 2 + tests/qapi-schema/meson.build | 215 +++++++++++++++++++++++++++++++++++++++++ 3 files changed, 219 insertions(+), 216 deletions(-) create mode 100644 tests/qapi-schema/meson.build
tests/Makefile.include +2 -216
@@ -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)
@@ -732,16 +529,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
@@ -795,15 +582,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
@@ -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 +215 -0
215 lines not on this page · raw message
Signature · 1 line
1.8.3.1
PATCH 49/143 meson: convert qom directory to Meson (tools part)
In reply to Paolo BonziniFrom: 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
@@ -233,7 +233,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)
@@ -254,6 +253,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
@@ -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
@@ -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
@@ -312,6 +312,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
@@ -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
@@ -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
PATCH 50/143 meson: convert authz directory to Meson
In reply to Paolo BonziniFrom: 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
@@ -226,7 +226,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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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())
@@ -313,6 +317,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
PATCH 51/143 meson: convert crypto directory to Meson
In reply to Paolo BonziniFrom: 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
@@ -231,7 +231,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
@@ -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
@@ -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
@@ -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
@@ -300,6 +300,8 @@ subdir('qobject') subdir('stubs') subdir('trace') subdir('util') +subdir('qom') +subdir('authz') subdir('crypto') subdir('storage-daemon') subdir('ui')
@@ -316,8 +318,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
@@ -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
PATCH 52/143 meson: convert io directory to Meson
In reply to Paolo BonziniFrom: 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
@@ -231,7 +231,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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -318,6 +318,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
PATCH 53/143 meson: convert target/s390x/gen-features.h
In reply to Paolo BonziniFrom: 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 | 8 ++++++++ 7 files changed, 14 insertions(+), 22 deletions(-) create mode 100644 target/meson.build create mode 100644 target/s390x/meson.build
Makefile +2 -0
@@ -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
@@ -320,6 +320,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
@@ -0,0 +1 @@ +subdir('s390x')
target/s390x/Makefile.objs +0 -20
@@ -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
@@ -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
@@ -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 +8 -0
@@ -0,0 +1,8 @@ +gen_features = executable('gen-features', 'gen-features.c', native: true) + +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
PATCH 54/143 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 + softmmu/qtest.c | 2 +- util/meson.build | 5 +- 16 files changed, 193 insertions(+), 106 deletions(-) create mode 100755 scripts/grepy.sh
Makefile +7 -67
@@ -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
@@ -163,65 +161,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
@@ -264,10 +203,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
@@ -354,7 +298,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 \
@@ -363,8 +306,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)
@@ -381,8 +322,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
@@ -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
@@ -8093,18 +8093,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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -0,0 +1,3 @@ +#!/bin/sh + +grep --no-filename '=y$' "$@" | sort -u
softmmu/qtest.c +1 -1
@@ -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
@@ -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
PATCH 55/143 meson: add macos dependencies
In reply to Paolo BonziniFrom: 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
@@ -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
PATCH 56/143 meson: add modules infrastructure
In reply to Paolo BonziniFrom: 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
@@ -251,7 +251,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))
@@ -461,14 +461,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
@@ -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
@@ -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
@@ -0,0 +1,20 @@ +#! /bin/bash + +# Before a shared module's DSO is produced, a static library is built for it +# and passed to this script. The script generates -Wl,-u options to force +# the inclusion of symbol from libqemuutil.a if the shared modules need them, +# This is necessary because the modules may use functions not needed by the +# executable itself, which would cause the function to not be linked in. +# Then the DSO loading would fail because of the missing symbol. + +if test $# -le 2; then + exit 0 +fi + +NM=$1 +staticlib=$2 +shift 2 +# Find symbols defined in static libraries and undefined in shared modules +comm -12 \ + <( $NM -P -g $staticlib | awk '$2!="U"{print "-Wl,-u," $1}' | sort -u) \ + <( $NM -P -g "$@" | awk '$2=="U"{print "-Wl,-u," $1}' | sort -u)
Signature · 1 line
1.8.3.1
PATCH 57/143 meson: convert chardev directory to Meson (tools part)
In reply to Paolo BonziniFrom: 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
@@ -167,7 +167,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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -435,6 +435,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
Re: [PATCH 057/143] meson: convert chardev directory to Meson (tools part)
Quoted 4 lines · Paolo Bonzini
From: Marc-André Lureau <[email protected]>
Signed-off-by Marc-André Lureau <[email protected]>Signed-off-by Paolo Bonzini <[email protected]>
Quoted 9 lines
--- 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