aboutsummaryrefslogtreecommitdiff
path: root/meson.build
AgeCommit message (Collapse)AuthorFilesLines
2020-09-08meson: fix migration/stress compilation with glibc>=2.30Marc-André Lureau1-0/+3
gettid() was introduced with glibc 2.30. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Message-Id: <20200828110734.1638685-16-marcandre.lureau@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2020-09-08meson: move keyutils dependency checkMarc-André Lureau1-4/+3
Since there is not minimum version specified, and it's a test-only dependency, it's fair to depend on a version that ships with a .pc I suppose. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Message-Id: <20200828110734.1638685-8-marcandre.lureau@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2020-09-08meson: declare keyutils dependencyMarc-André Lureau1-0/+4
Rename the variable to be more explicit. A further clean-up patch will move the actual to dependency check to meson entirely. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Message-Id: <20200828110734.1638685-4-marcandre.lureau@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2020-09-08meson: declare tasn1 dependencyMarc-André Lureau1-0/+5
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Message-Id: <20200828110734.1638685-3-marcandre.lureau@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2020-09-08meson: remove b_lundef optionPaolo Bonzini1-1/+1
Meson automatically adds "-undefined dynamic_lookup" to shared_module build targets; b_lundef is only needed for executables. Therefore, we can remove this option. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2020-09-08qemu-iotests: move check-block back to MakefilesPaolo Bonzini1-1/+0
check-block has its own test harness, unlike every other test. If we capture its output, as is in general nicer to do without V=1, there will be no sign of progress. So for lack of a better option just move the invocation of the test back to Makefile rules. As a side effect, this will also fix "make check" in --disable-tools builds, as they were trying to run qemu-iotests without having made qemu-img before. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2020-09-07crypto: fix build with gcrypt enabledDaniel P. Berrangé1-0/+5
If nettle is disabled and gcrypt enabled, the compiler and linker flags needed for gcrypt are not passed. Gnutls was also not added as a dependancy when gcrypt is enabled. Attempting to add the library dependencies at the same time as the source dependencies is error prone, as there are alot of different rules for picking which sources to use, and some of the source files use code level conditionals intead. It is thus clearer to add the library dependencies separately. Signed-off-by: Daniel P. Berrangé <berrange@redhat.com> Message-Id: <20200901133050.381844-2-berrange@redhat.com> Reviewed-by: Alex Bennée <alex.bennee@linaro.org> Tested-by: Alex Bennée <alex.bennee@linaro.org> Tested-by: Richard Henderson <richard.henderson@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Signed-off-by: Thomas Huth <thuth@redhat.com>
2020-09-02nbd: disable signals and forking on Windows buildsDaniel P. Berrangé1-5/+2
Disabling these parts are sufficient to get the qemu-nbd program compiling in a Windows build. Signed-off-by: Daniel P. Berrangé <berrange@redhat.com> Message-Id: <20200825103850.119911-4-berrange@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Eric Blake <eblake@redhat.com>
2020-09-01meson: use pkg-config method to find dependenciesPaolo Bonzini1-4/+4
We do not need to ask cmake for the dependencies, so just use the pkg-config mechanism. Keep "auto" for SDL so that it tries using sdl-config too. The documentation is adjusted to use SDL2_image as the example, rather than SDL which does not use the "pkg-config" method. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2020-09-01meson: add NSIS buildingMarc-André Lureau1-0/+25
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Message-Id: <20200826110419.528931-9-marcandre.lureau@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2020-09-01meson: use meson mandir instead of qemu_mandirMarc-André Lureau1-2/+2
When cross-compiling, by default qemu_mandir is 'c:\Program Files\QEMU', which is not recognized as being an absolute path, and meson will end up adding the prefix again. Use the pre-prefixed meson mandir option instead. Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Message-Id: <20200826110419.528931-8-marcandre.lureau@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2020-09-01meson: pass docdir optionMarc-André Lureau1-1/+3
When cross-compiling, by default qemu_docdir is 'c:\Program Files\QEMU\' which is not recognized as being an absolute path, and meson will end up adding the prefix again. Add an option to pass docdir location to meson, pre-prefixed like we do with other directories, build qemu_docdir with the common suffix and use that instead of config_host['qemu_docdir']. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Message-Id: <20200826110419.528931-7-marcandre.lureau@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2020-09-01meson: use meson datadir instead of qemu_datadirMarc-André Lureau1-1/+2
When cross-compiling, by default qemu_datadir is 'c:\Program Files\QEMU', which is not recognized as being an absolute path, and meson will end up adding the prefix again. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Message-Id: <20200826110419.528931-6-marcandre.lureau@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2020-09-01meson: move zlib detection to mesonPaolo Bonzini1-5/+1
Meson includes the same logic that tries to look for -lz if pkg-config (and cmake) cannot find zlib. The undocumented --disable-zlib-test option becomes a no-op. There is still an instance of "-lz" in the LIBS directory. It will go away as soon as tests are converted to meson, because the zlib dependency does not propagate from libblock.fa to the Makefile-build unit tests. Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2020-09-01meson: install scripts/qemu-trace-stapMarc-André Lureau1-0/+1
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Message-Id: <20200826130622.553318-3-marcandre.lureau@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2020-09-01meson: fix SDL2_image detectionVolker Rümelin1-1/+1
Configure used to probe for SDL2_image in sdl_image_probe (). Meson should do the same. This fixes the following error on my system: Run-time dependency sdl2 found: YES 2.0.8 Found CMake: /usr/bin/cmake (3.17.0) Run-time dependency sdl-image found: NO (tried pkgconfig and cmake) ../qemu-master/meson.build:256:2: ERROR: Dependency "sdl-image" not found, tried pkgconfig and cmake A full log can be found at /home/ruemelin/rpmbuild/BUILD /qemu-5.1.50-build/meson-logs/meson-log.txt ERROR: meson setup failed Signed-off-by: Volker Rümelin <vr_qemu@t-online.de> Message-Id: <20200829104158.7461-1-vr_qemu@t-online.de> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2020-08-31meson: Add U2F key to mesonCésar Belley1-0/+7
Signed-off-by: César Belley <cesar.belley@lse.epita.fr> Message-id: 20200826114209.28821-8-cesar.belley@lse.epita.fr [ fixes suggested by paolo ] Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2020-08-27meson: set colorout to autoGerd Hoffmann1-1/+2
Dunno why the default is set to "always". IMHO it should be "auto", i.e. only colorize in case stdout goes to a terminal. Cluttering logfiles and confusing compiler message parsers with terminal control sequences is not nice ... Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2020-08-27meson: Mingw64 gcc doesn't recognize system include_type for sdl2Yonggang Luo1-2/+1
Windows paths result in command lines like "-isystemC:/msys64/..." that are not recognized by GCC. "include_type: 'system'" was only included in an attempt to fix the -Wundef warnings in SDL 2.0.8, but it was not effective. Therefore we can fix this by remove the include_type. Signed-off-by: Yonggang Luo <luoyonggang@gmail.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2020-08-27meson: cleanup xkbcommon detectionPaolo Bonzini1-7/+5
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2020-08-27meson: skip SDL2 detection if --disable-systemPaolo Bonzini1-11/+16
SDL is only used for system emulation; avoid spurious warnings for static --disable-system emulation by skipping the detection of the library if there are no system emulation targets. Reported-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2020-08-27meson: move pixman detection to mesonPaolo Bonzini1-5/+8
When pixman is not installed (or too old), but virglrenderer is available and "configure" has been run with "--disable-system", the build currently aborts when trying to compile vhost-user-gpu (since it requires pixman). Let's skip the build of vhost-user-gpu when pixman is not installed or too old. Instead of adding CONFIG_PIXMAN, it is simpler to move the detection to pixman. Based on a patch by Thomas Huth. <thuth@redhat.com> Fixes: 9b52b17ba5 ("configure: Allow to build tools without pixman") Reported-by: Rafael Kitover <rkitover@gmail.com> Reported-by: Philippe Mathieu-Daudé <philmd@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2020-08-27meson: Fix meson build with --enable-libdaxctlBruce Rogers1-1/+5
The daxctl library needs to be linked against when daxctl is asked for in configure. Signed-off-by: Bruce Rogers <brogers@suse.com> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2020-08-27meson: Build qemu-nbd on macOS againThomas Huth1-1/+1
Before switching to the meson build system, we used to compile qemu-nbd for macOS, too, which is especially important for running the iotests there. Commit b7c70bf2c5 disabled it by accident, since it did not take into consideration that the $bsd variable in the configure script was also set to "yes" on macOS. Fix it by enabling qemu-nbd on all systems but Windows now instead (which was likely the original intention of the old code in the configure script). Fixes: b7c70bf2c5 ("meson: qemu-{img,io,nbd}") Signed-off-by: Thomas Huth <thuth@redhat.com> Acked-by: Eric Blake <eblake@redhat.com> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2020-08-27trace: fix creation of systemtap filesStefan Hajnoczi1-4/+4
The "exe_name" variable was renamed to exe['name'], so systemtap files fail to build. Reported-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2020-08-25meson: avoid compiling qemu-keymap by defaultLaurent Vivier1-0/+5
qemu-keymap is not needed with linux-user, so disable it by default if tools and system are disabled (tools are disabled by default with linux-user). Avoid this error with statically linked binaries: Linking target qemu-keymap /usr/bin/ld: cannot find -lxkbcommon Signed-off-by: Laurent Vivier <laurent@vivier.eu> Message-id: 20200824152430.1844159-3-laurent@vivier.eu Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2020-08-25meson: move xkbcommon to mesonLaurent Vivier1-5/+6
Signed-off-by: Laurent Vivier <laurent@vivier.eu> Message-id: 20200824152430.1844159-2-laurent@vivier.eu Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2020-08-21meson: Fix --disable-tools --enable-system buildsPhilippe Mathieu-Daudé1-1/+2
Fixes: $ ../configure --disable-tools --disable-user ../tests/qemu-iotests/meson.build:7:0: ERROR: Unknown variable "qemu_block_tools". Suggested-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com> Acked-by: Paolo Bonzini <pbonzini@redhat.com> Message-Id: <20200821150556.1235625-1-philmd@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2020-08-21meson: convert pc-bios/keymaps/MakefileMarc-André Lureau1-5/+6
Note that sl and sv keymaps were not created by qemu-keymap. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Tested-by: Philippe Mathieu-Daudé <philmd@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2020-08-21meson: avoid unstable module warning with Meson 0.56.0 or newerPaolo Bonzini1-1/+5
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2020-08-21meson: convert po/Marc-André Lureau1-0/+3
Meson warns if xgettext is not found. In the future we may want to add a required argument to i18n.gettext(); in the meanwhile, I am adding a --enable-gettext/--disable-gettext option and feature detection in configure. This preserves QEMU's default behavior of detecting system features, without any warning, if neither --enable-* nor --disable-* is requested. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2020-08-21meson: convert VNC and dependent libraries to mesonPaolo Bonzini1-16/+24
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2020-08-21meson: move SDL and SDL-image detection to mesonPaolo Bonzini1-9/+23
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2020-08-21meson: replace create-config with meson configure_filePaolo Bonzini1-28/+68
Move the create-config logic to meson.build; create a configuration_data object and let meson handle the quoting and output. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2020-08-21meson: convert check-blockPaolo Bonzini1-0/+2
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2020-08-21meson: build texi docPaolo Bonzini1-0/+85
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2020-08-21meson: sphinx-buildPaolo Bonzini1-0/+2
For now, sphinx is run on every invocation of make. The previous mechanism using $(wildcard) is not reproducible in Meson and was also brittle; for example some .rst.inc files were left out. The next patch will introduce a Sphinx extension to emit a depfile. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2020-08-21meson: convert systemtap filesMarc-André Lureau1-0/+24
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2020-08-21meson: link emulators without Makefile.targetPaolo Bonzini1-5/+68
The binaries move to the root directory, e.g. qemu-system-i386 or qemu-arm. This requires changes to qtests, CI, etc. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2020-08-21meson: pluginsPaolo Bonzini1-0/+5
For now link arguments end up in Makefile.target, they will move to the right place soon. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2020-08-21meson: cpu-emuMarc-André Lureau1-0/+37
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2020-08-21meson: bsd-userMarc-André Lureau1-0/+4
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2020-08-21meson: linux-userMarc-André Lureau1-1/+15
The most interesting or most complicated part here is the syscall_nr.h generators. In order to keep the generation logic all in meson.build, I am adding to config_target the name of the .tbl file, and making the generated file syscall<SUFFIX>_nr.h for input file syscall<SUFFIX>.tbl. For architectures where the input file is not named syscall_nr.tbl, syscall_nr.h has to be a source file; it's just a forwarder for x86 (i386/x86_64), while for MIPS64 it chooses between N32 and N64 ABIs. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2020-08-21meson: accelMarc-André Lureau1-0/+1
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2020-08-21meson: targetPaolo Bonzini1-0/+11
Similar to hw_arch, each architecture defines two sourceset which are placed in dictionaries target_arch and target_softmmu_arch. These are then picked up from there when building the per-emulator static_library. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2020-08-21meson: convert hw/arch*Marc-André Lureau1-0/+4
Each architecture's sourceset is placed in an hw_arch dictionary, and picked up from there when building the per-emulator static_library. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2020-08-21meson: convert hw/usbPaolo Bonzini1-0/+15
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2020-08-21meson: convert hw/xenMarc-André Lureau1-0/+6
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2020-08-21meson: convert disas directory to MesonMarc-André Lureau1-0/+1
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2020-08-21meson: convert backends directory to MesonMarc-André Lureau1-0/+5
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>