All of lore.kernel.org
 help / color / mirror / Atom feed
* [PULL 00/17] Meson fixes for 2020-08-27
@ 2020-08-27 16:59 Paolo Bonzini
  2020-08-27 16:59 ` [PULL 01/17] trace: fix creation of systemtap files Paolo Bonzini
                   ` (17 more replies)
  0 siblings, 18 replies; 22+ messages in thread
From: Paolo Bonzini @ 2020-08-27 16:59 UTC (permalink / raw)
  To: qemu-devel

The following changes since commit d1a2b51f868d09ca8489ee9aee9c55632ed8fb92:

  Merge remote-tracking branch 'remotes/berrange/tags/socket-next-pull-request' into staging (2020-08-25 15:01:43 +0100)

are available in the Git repository at:

  https://gitlab.com/bonzini/qemu.git tags/for-upstream

for you to fetch changes up to 666ab710f83c29966cca3a5d3ac2776c2b5f1afa

  ninjatool: Fixes E$$: in generated Makefile.ninja (2020-08-27 08:31:54 +0200)

Since I am officially on vacation I don't have access to the full set
of tests I run, but it passes both gitlab CI and the docker-mingw build.
It does not include the submodule update for Meson 0.55.1.

----------------------------------------------------------------
meson fixes:
* fix PIE default for Windows
* tweak conditions for requiring SDL2 and pixman
* move NSIS building to Meson
* fix creation of systemtap files
* add --ninja option for Windows builds
* other fixes for stupid bugs and for Windows paths

meson related:
* forward port of dtrace fix for MacOS
* change colorout option to auto

----------------------------------------------------------------
Bruce Rogers (2):
      meson: Fix meson build with --enable-libdaxctl
      meson: Fix chardev-baum.so name

Daniel P. Berrangé (1):
      configure: default to PIE disabled on Windows platforms

Gerd Hoffmann (1):
      meson: set colorout to auto

Mark Cave-Ayland (1):
      meson: don't require CONFIG_VTE for the GTK UI

Paolo Bonzini (5):
      meson: move pixman detection to meson
      meson: skip SDL2 detection if --disable-system
      configure: add --ninja option
      meson: cleanup xkbcommon detection
      ninjatool: quote dollars in variables

Roman Bolshakov (1):
      meson: Don't make object files for dtrace on macOS

Stefan Hajnoczi (1):
      trace: fix creation of systemtap files

Thomas Huth (2):
      meson: Build qemu-nbd on macOS again
      scripts/qemu-version.sh: Add missing space before ']'

Yonggang Luo (3):
      meson: fix relpath failure on Win32
      meson: Mingw64 gcc doesn't recognize system include_type for sdl2
      ninjatool: Fixes E$$: in generated Makefile.ninja

 chardev/meson.build                |  2 +-
 configure                          | 39 +++++++++++----------
 contrib/vhost-user-gpu/meson.build |  3 +-
 meson.build                        | 70 ++++++++++++++++++++++----------------
 scripts/mtest2make.py              | 11 ++++--
 scripts/ninjatool.py               |  5 +--
 scripts/qemu-version.sh            |  2 +-
 trace/meson.build                  | 13 ++++---
 ui/meson.build                     |  6 ++--
 9 files changed, 87 insertions(+), 64 deletions(-)
-- 
2.26.2



^ permalink raw reply	[flat|nested] 22+ messages in thread

* [PULL 01/17] trace: fix creation of systemtap files
  2020-08-27 16:59 [PULL 00/17] Meson fixes for 2020-08-27 Paolo Bonzini
@ 2020-08-27 16:59 ` Paolo Bonzini
  2020-08-27 16:59 ` [PULL 02/17] meson: Build qemu-nbd on macOS again Paolo Bonzini
                   ` (16 subsequent siblings)
  17 siblings, 0 replies; 22+ messages in thread
From: Paolo Bonzini @ 2020-08-27 16:59 UTC (permalink / raw)
  To: qemu-devel; +Cc: Peter Maydell, Stefan Hajnoczi

From: Stefan Hajnoczi <stefanha@redhat.com>

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>
---
 meson.build | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/meson.build b/meson.build
index f0fe5f8799..f2aa5a7700 100644
--- a/meson.build
+++ b/meson.build
@@ -1029,14 +1029,14 @@ foreach target : target_dirs
 
     if 'CONFIG_TRACE_SYSTEMTAP' in config_host
       foreach stp: [
-        {'ext': '.stp-build', 'fmt': 'stap', 'bin': meson.current_build_dir() / exe_name, 'install': false},
-        {'ext': '.stp', 'fmt': 'stap', 'bin': get_option('prefix') / get_option('bindir') / exe_name, 'install': true},
+        {'ext': '.stp-build', 'fmt': 'stap', 'bin': meson.current_build_dir() / exe['name'], 'install': false},
+        {'ext': '.stp', 'fmt': 'stap', 'bin': get_option('prefix') / get_option('bindir') / exe['name'], 'install': true},
         {'ext': '-simpletrace.stp', 'fmt': 'simpletrace-stap', 'bin': '', 'install': true},
         {'ext': '-log.stp', 'fmt': 'log-stap', 'bin': '', 'install': true},
       ]
-        custom_target(exe_name + stp['ext'],
+        custom_target(exe['name'] + stp['ext'],
                       input: trace_events_all,
-                      output: exe_name + stp['ext'],
+                      output: exe['name'] + stp['ext'],
                       capture: true,
                       install: stp['install'],
                       install_dir: config_host['qemu_datadir'] / '../systemtap/tapset',
-- 
2.26.2




^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [PULL 02/17] meson: Build qemu-nbd on macOS again
  2020-08-27 16:59 [PULL 00/17] Meson fixes for 2020-08-27 Paolo Bonzini
  2020-08-27 16:59 ` [PULL 01/17] trace: fix creation of systemtap files Paolo Bonzini
@ 2020-08-27 16:59 ` Paolo Bonzini
  2020-08-27 18:06   ` Thomas Huth
  2020-08-27 16:59 ` [PULL 03/17] meson: Don't make object files for dtrace on macOS Paolo Bonzini
                   ` (15 subsequent siblings)
  17 siblings, 1 reply; 22+ messages in thread
From: Paolo Bonzini @ 2020-08-27 16:59 UTC (permalink / raw)
  To: qemu-devel; +Cc: Marc-André Lureau, Thomas Huth

From: Thomas Huth <thuth@redhat.com>

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>
---
 meson.build | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meson.build b/meson.build
index f2aa5a7700..38d0abc0ea 100644
--- a/meson.build
+++ b/meson.build
@@ -1081,7 +1081,7 @@ if have_tools
   qemu_io = executable('qemu-io', files('qemu-io.c'),
              dependencies: [block, qemuutil], install: true)
   qemu_block_tools += [qemu_img, qemu_io]
-  if targetos == 'linux' or targetos == 'sunos' or targetos.endswith('bsd')
+  if targetos != 'windows'
     qemu_nbd = executable('qemu-nbd', files('qemu-nbd.c'),
                dependencies: [block, qemuutil], install: true)
     qemu_block_tools += [qemu_nbd]
-- 
2.26.2




^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [PULL 03/17] meson: Don't make object files for dtrace on macOS
  2020-08-27 16:59 [PULL 00/17] Meson fixes for 2020-08-27 Paolo Bonzini
  2020-08-27 16:59 ` [PULL 01/17] trace: fix creation of systemtap files Paolo Bonzini
  2020-08-27 16:59 ` [PULL 02/17] meson: Build qemu-nbd on macOS again Paolo Bonzini
@ 2020-08-27 16:59 ` Paolo Bonzini
  2020-08-27 16:59 ` [PULL 04/17] scripts/qemu-version.sh: Add missing space before ']' Paolo Bonzini
                   ` (14 subsequent siblings)
  17 siblings, 0 replies; 22+ messages in thread
From: Paolo Bonzini @ 2020-08-27 16:59 UTC (permalink / raw)
  To: qemu-devel; +Cc: Roman Bolshakov, Daniel P . Berrangé, Cameron Esfahani

From: Roman Bolshakov <r.bolshakov@yadro.com>

dtrace on macOS uses unresolved symbols with a special prefix to define
probes [1], only headers should be generated for USDT (dtrace(1)). But
it doesn't support backwards compatible no-op -G flag [2] and implicit
build rules fail.

1. https://markmail.org/message/6grq2ygr5nwdwsnb
2. https://markmail.org/message/5xrxt2w5m42nojkz

Cc: Daniel P. Berrangé <berrange@redhat.com>
Cc: Cameron Esfahani <dirty@apple.com>
Signed-off-by: Roman Bolshakov <r.bolshakov@yadro.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 trace/meson.build | 13 ++++++++-----
 1 file changed, 8 insertions(+), 5 deletions(-)

diff --git a/trace/meson.build b/trace/meson.build
index 56e870848e..1c1fb31a61 100644
--- a/trace/meson.build
+++ b/trace/meson.build
@@ -39,12 +39,15 @@ foreach dir : [ '.' ] + trace_events_subdirs
                                    output: fmt.format('trace-dtrace', 'h'),
                                    input: trace_dtrace,
                                    command: [ 'dtrace', '-o', '@OUTPUT@', '-h', '-s', '@INPUT@' ])
-    trace_dtrace_o = custom_target(fmt.format('trace-dtrace', 'o'),
-                                   output: fmt.format('trace-dtrace', 'o'),
-                                   input: trace_dtrace,
-                                   command: [ 'dtrace', '-o', '@OUTPUT@', '-G', '-s', '@INPUT@' ])
+    trace_ss.add(trace_dtrace_h)
+    if host_machine.system() != 'darwin'
+      trace_dtrace_o = custom_target(fmt.format('trace-dtrace', 'o'),
+                                     output: fmt.format('trace-dtrace', 'o'),
+                                     input: trace_dtrace,
+                                     command: [ 'dtrace', '-o', '@OUTPUT@', '-G', '-s', '@INPUT@' ])
+      trace_ss.add(trace_dtrace_o)
+    endif
 
-    trace_ss.add(trace_dtrace_h, trace_dtrace_o)
     genh += trace_dtrace_h
   endif
 endforeach
-- 
2.26.2




^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [PULL 04/17] scripts/qemu-version.sh: Add missing space before ']'
  2020-08-27 16:59 [PULL 00/17] Meson fixes for 2020-08-27 Paolo Bonzini
                   ` (2 preceding siblings ...)
  2020-08-27 16:59 ` [PULL 03/17] meson: Don't make object files for dtrace on macOS Paolo Bonzini
@ 2020-08-27 16:59 ` Paolo Bonzini
  2020-08-27 16:59 ` [PULL 05/17] meson: Fix meson build with --enable-libdaxctl Paolo Bonzini
                   ` (13 subsequent siblings)
  17 siblings, 0 replies; 22+ messages in thread
From: Paolo Bonzini @ 2020-08-27 16:59 UTC (permalink / raw)
  To: qemu-devel; +Cc: Marc-André Lureau, Thomas Huth

From: Thomas Huth <thuth@redhat.com>

When configure has been run with --with-pkgversion=xyz, the shell complains
about a missing ']' in this script.

Fixes: 2c273f32d3 ("meson: generate qemu-version.h")
Signed-off-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 scripts/qemu-version.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/qemu-version.sh b/scripts/qemu-version.sh
index 4847385e42..03128c56a2 100755
--- a/scripts/qemu-version.sh
+++ b/scripts/qemu-version.sh
@@ -6,7 +6,7 @@ dir="$1"
 pkgversion="$2"
 version="$3"
 
-if [ -z "$pkgversion"]; then
+if [ -z "$pkgversion" ]; then
     cd "$dir"
     if [ -e .git ]; then
         pkgversion=$(git describe --match 'v*' --dirty | echo "")
-- 
2.26.2




^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [PULL 05/17] meson: Fix meson build with --enable-libdaxctl
  2020-08-27 16:59 [PULL 00/17] Meson fixes for 2020-08-27 Paolo Bonzini
                   ` (3 preceding siblings ...)
  2020-08-27 16:59 ` [PULL 04/17] scripts/qemu-version.sh: Add missing space before ']' Paolo Bonzini
@ 2020-08-27 16:59 ` Paolo Bonzini
  2020-08-27 16:59 ` [PULL 06/17] meson: Fix chardev-baum.so name Paolo Bonzini
                   ` (12 subsequent siblings)
  17 siblings, 0 replies; 22+ messages in thread
From: Paolo Bonzini @ 2020-08-27 16:59 UTC (permalink / raw)
  To: qemu-devel; +Cc: Marc-André Lureau, Bruce Rogers

From: Bruce Rogers <brogers@suse.com>

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>
---
 configure   | 1 +
 meson.build | 6 +++++-
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/configure b/configure
index b1e11397a8..a3f95f2b22 100755
--- a/configure
+++ b/configure
@@ -7467,6 +7467,7 @@ fi
 
 if test "$libdaxctl" = "yes" ; then
   echo "CONFIG_LIBDAXCTL=y" >> $config_host_mak
+  echo "LIBDAXCTL_LIBS=$libdaxctl_libs" >> $config_host_mak
 fi
 
 if test "$bochs" = "yes" ; then
diff --git a/meson.build b/meson.build
index 38d0abc0ea..b44901dfe1 100644
--- a/meson.build
+++ b/meson.build
@@ -380,6 +380,10 @@ if 'CONFIG_LIBPMEM' in config_host
   libpmem = declare_dependency(compile_args: config_host['LIBPMEM_CFLAGS'].split(),
                                link_args: config_host['LIBPMEM_LIBS'].split())
 endif
+libdaxctl = not_found
+if 'CONFIG_LIBDAXCTL' in config_host
+  libdaxctl = declare_dependency(link_args: config_host['LIBDAXCTL_LIBS'].split())
+endif
 
 # Create config-host.h
 
@@ -787,7 +791,7 @@ common_ss.add(files('cpus-common.c'))
 
 subdir('softmmu')
 
-specific_ss.add(files('disas.c', 'exec.c', 'gdbstub.c'), capstone, libpmem)
+specific_ss.add(files('disas.c', 'exec.c', 'gdbstub.c'), capstone, libpmem, libdaxctl)
 specific_ss.add(files('exec-vary.c'))
 specific_ss.add(when: 'CONFIG_TCG', if_true: files(
   'fpu/softfloat.c',
-- 
2.26.2




^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [PULL 06/17] meson: Fix chardev-baum.so name
  2020-08-27 16:59 [PULL 00/17] Meson fixes for 2020-08-27 Paolo Bonzini
                   ` (4 preceding siblings ...)
  2020-08-27 16:59 ` [PULL 05/17] meson: Fix meson build with --enable-libdaxctl Paolo Bonzini
@ 2020-08-27 16:59 ` Paolo Bonzini
  2020-08-27 16:59 ` [PULL 07/17] configure: default to PIE disabled on Windows platforms Paolo Bonzini
                   ` (11 subsequent siblings)
  17 siblings, 0 replies; 22+ messages in thread
From: Paolo Bonzini @ 2020-08-27 16:59 UTC (permalink / raw)
  To: qemu-devel; +Cc: Marc-André Lureau, Bruce Rogers

From: Bruce Rogers <brogers@suse.com>

Somehow in the conversion to meson, the module named chardev-baum got
renamed to chardev-brlapi. Change it back.

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>
---
 chardev/meson.build | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/chardev/meson.build b/chardev/meson.build
index a46a6237be..7726837e34 100644
--- a/chardev/meson.build
+++ b/chardev/meson.build
@@ -39,7 +39,7 @@ chardev_modules = {}
 if config_host.has_key('CONFIG_BRLAPI') and sdl.found()
   module_ss = ss.source_set()
   module_ss.add(when: [sdl, brlapi], if_true: files('baum.c'))
-  chardev_modules += { 'brlapi': module_ss }
+  chardev_modules += { 'baum': module_ss }
 endif
 
 modules += { 'chardev': chardev_modules }
-- 
2.26.2




^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [PULL 07/17] configure: default to PIE disabled on Windows platforms
  2020-08-27 16:59 [PULL 00/17] Meson fixes for 2020-08-27 Paolo Bonzini
                   ` (5 preceding siblings ...)
  2020-08-27 16:59 ` [PULL 06/17] meson: Fix chardev-baum.so name Paolo Bonzini
@ 2020-08-27 16:59 ` Paolo Bonzini
  2020-08-27 16:59 ` [PULL 08/17] meson: move pixman detection to meson Paolo Bonzini
                   ` (10 subsequent siblings)
  17 siblings, 0 replies; 22+ messages in thread
From: Paolo Bonzini @ 2020-08-27 16:59 UTC (permalink / raw)
  To: qemu-devel; +Cc: Marc-André Lureau, Thomas Huth, Daniel P. Berrangé

From: Daniel P. Berrangé <berrange@redhat.com>

If Windows EXE files are built with -pie/-fpie they will fail to
launch. Historically QEMU defaulted to disabling PIE for Windows,
but this setting was accidentally lost when the configure summary
text was removed in

  commit f9332757898a764d85e19d339ec421236e885b68
  Author: Paolo Bonzini <pbonzini@redhat.com>
  Date:   Mon Feb 3 13:28:38 2020 +0100

    meson: move summary to meson.build

    Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>

Fixes: f9332757898a764d85e19d339ec421236e885b68
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 configure | 1 +
 1 file changed, 1 insertion(+)

diff --git a/configure b/configure
index a3f95f2b22..0b78577236 100755
--- a/configure
+++ b/configure
@@ -857,6 +857,7 @@ MINGW32*)
     audio_drv_list=""
   fi
   supported_os="yes"
+  pie="no"
 ;;
 GNU/kFreeBSD)
   bsd="yes"
-- 
2.26.2




^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [PULL 08/17] meson: move pixman detection to meson
  2020-08-27 16:59 [PULL 00/17] Meson fixes for 2020-08-27 Paolo Bonzini
                   ` (6 preceding siblings ...)
  2020-08-27 16:59 ` [PULL 07/17] configure: default to PIE disabled on Windows platforms Paolo Bonzini
@ 2020-08-27 16:59 ` Paolo Bonzini
  2020-08-27 16:59 ` [PULL 09/17] meson: skip SDL2 detection if --disable-system Paolo Bonzini
                   ` (9 subsequent siblings)
  17 siblings, 0 replies; 22+ messages in thread
From: Paolo Bonzini @ 2020-08-27 16:59 UTC (permalink / raw)
  To: qemu-devel; +Cc: Philippe Mathieu-Daudé, Rafael Kitover

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>
---
 configure                          | 21 ++-------------------
 contrib/vhost-user-gpu/meson.build |  3 ++-
 meson.build                        | 13 ++++++++-----
 ui/meson.build                     |  4 +++-
 4 files changed, 15 insertions(+), 26 deletions(-)

diff --git a/configure b/configure
index 0b78577236..9db9bb89b9 100755
--- a/configure
+++ b/configure
@@ -3923,20 +3923,6 @@ if test "$modules" = yes; then
     fi
 fi
 
-##########################################
-# pixman support probe
-
-if test "$softmmu" = "no"; then
-  pixman_cflags=
-  pixman_libs=
-elif $pkg_config --atleast-version=0.21.8 pixman-1 > /dev/null 2>&1; then
-  pixman_cflags=$($pkg_config --cflags pixman-1)
-  pixman_libs=$($pkg_config --libs pixman-1)
-else
-  error_exit "pixman >= 0.21.8 not present." \
-      "Please install the pixman devel package."
-fi
-
 ##########################################
 # libmpathpersist probe
 
@@ -6649,8 +6635,8 @@ echo_version() {
     fi
 }
 
-# prepend pixman and ftd flags after all config tests are done
-QEMU_CFLAGS="$pixman_cflags $fdt_cflags $QEMU_CFLAGS"
+# prepend ftd flags after all config tests are done
+QEMU_CFLAGS="$fdt_cflags $QEMU_CFLAGS"
 QEMU_LDFLAGS="$fdt_ldflags $QEMU_LDFLAGS"
 
 config_host_mak="config-host.mak"
@@ -8056,9 +8042,6 @@ fi
 
 done # for target in $targets
 
-echo "PIXMAN_CFLAGS=$pixman_cflags" >> $config_host_mak
-echo "PIXMAN_LIBS=$pixman_libs" >> $config_host_mak
-
 if [ "$fdt" = "git" ]; then
   subdirs="$subdirs dtc"
 fi
diff --git a/contrib/vhost-user-gpu/meson.build b/contrib/vhost-user-gpu/meson.build
index 6c1459f54a..12d608c2e7 100644
--- a/contrib/vhost-user-gpu/meson.build
+++ b/contrib/vhost-user-gpu/meson.build
@@ -1,5 +1,6 @@
 if 'CONFIG_TOOLS' in config_host and 'CONFIG_VIRGL' in config_host \
-    and 'CONFIG_GBM' in config_host and 'CONFIG_LINUX' in config_host
+    and 'CONFIG_GBM' in config_host and 'CONFIG_LINUX' in config_host \
+    and pixman.found()
   executable('vhost-user-gpu', files('vhost-user-gpu.c', 'virgl.c', 'vugbm.c'),
              link_with: libvhost_user,
              dependencies: [qemuutil, pixman, gbm, virgl],
diff --git a/meson.build b/meson.build
index b44901dfe1..86a6d13192 100644
--- a/meson.build
+++ b/meson.build
@@ -113,8 +113,11 @@ if 'CONFIG_GNUTLS' in config_host
   gnutls = declare_dependency(compile_args: config_host['GNUTLS_CFLAGS'].split(),
                               link_args: config_host['GNUTLS_LIBS'].split())
 endif
-pixman = declare_dependency(compile_args: config_host['PIXMAN_CFLAGS'].split(),
-                            link_args: config_host['PIXMAN_LIBS'].split())
+pixman = not_found
+if have_system or have_tools
+  pixman = dependency('pixman-1', required: have_system, version:'>=0.21.8',
+                      static: enable_static)
+endif
 pam = not_found
 if 'CONFIG_AUTH_PAM' in config_host
   pam = cc.find_library('pam')
@@ -981,6 +984,7 @@ foreach target : target_dirs
 
   lib = static_library('qemu-' + target,
                  sources: arch_srcs + genh,
+                 dependencies: arch_deps,
                  objects: objects,
                  include_directories: target_inc,
                  c_args: c_args,
@@ -1102,9 +1106,7 @@ 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-gpu')
     subdir('contrib/vhost-user-input')
     subdir('contrib/vhost-user-scsi')
   endif
@@ -1285,6 +1287,7 @@ summary_info += {'SDL image support': sdl_image.found()}
 # TODO: add back version
 summary_info += {'GTK support':       config_host.has_key('CONFIG_GTK')}
 summary_info += {'GTK GL support':    config_host.has_key('CONFIG_GTK_GL')}
+summary_info += {'pixman':            pixman.found()}
 # TODO: add back version
 summary_info += {'VTE support':       config_host.has_key('CONFIG_VTE')}
 summary_info += {'TLS priority':      config_host['CONFIG_TLS_PRIORITY']}
diff --git a/ui/meson.build b/ui/meson.build
index 018c5698bf..393c9bcb53 100644
--- a/ui/meson.build
+++ b/ui/meson.build
@@ -1,3 +1,6 @@
+softmmu_ss.add(pixman)
+specific_ss.add(pixman)   # for the include path
+
 softmmu_ss.add(files(
   'console.c',
   'cursor.c',
@@ -9,7 +12,6 @@ softmmu_ss.add(files(
   'keymaps.c',
   'qemu-pixman.c',
 ))
-softmmu_ss.add(pixman)
 
 softmmu_ss.add(when: 'CONFIG_LINUX', if_true: files('input-linux.c'))
 softmmu_ss.add(when: 'CONFIG_SPICE', if_true: files('spice-core.c', 'spice-input.c', 'spice-display.c'))
-- 
2.26.2




^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [PULL 09/17] meson: skip SDL2 detection if --disable-system
  2020-08-27 16:59 [PULL 00/17] Meson fixes for 2020-08-27 Paolo Bonzini
                   ` (7 preceding siblings ...)
  2020-08-27 16:59 ` [PULL 08/17] meson: move pixman detection to meson Paolo Bonzini
@ 2020-08-27 16:59 ` Paolo Bonzini
  2020-08-27 16:59 ` [PULL 10/17] configure: add --ninja option Paolo Bonzini
                   ` (8 subsequent siblings)
  17 siblings, 0 replies; 22+ messages in thread
From: Paolo Bonzini @ 2020-08-27 16:59 UTC (permalink / raw)
  To: qemu-devel; +Cc: Peter Maydell

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>
---
 meson.build | 27 ++++++++++++++++-----------
 1 file changed, 16 insertions(+), 11 deletions(-)

diff --git a/meson.build b/meson.build
index 86a6d13192..a3baa2dbf0 100644
--- a/meson.build
+++ b/meson.build
@@ -20,6 +20,16 @@ build_docs = 'BUILD_DOCS' in config_host
 config_host_data = configuration_data()
 genh = []
 
+target_dirs = config_host['TARGET_DIRS'].split()
+have_user = false
+have_system = false
+foreach target : target_dirs
+  have_user = have_user or target.endswith('-user')
+  have_system = have_system or target.endswith('-softmmu')
+endforeach
+have_tools = 'CONFIG_TOOLS' in config_host
+have_block = have_system or have_tools
+
 add_project_arguments(config_host['QEMU_CFLAGS'].split(),
                       native: false, language: ['c', 'objc'])
 add_project_arguments(config_host['QEMU_CXXFLAGS'].split(),
@@ -227,9 +237,12 @@ if 'CONFIG_BRLAPI' in config_host
   brlapi = declare_dependency(link_args: config_host['BRLAPI_LIBS'].split())
 endif
 
-sdl = dependency('sdl2', required: get_option('sdl'), static: enable_static,
-                 include_type: 'system')
-sdl_image = not_found
+sdl = not_found
+if have_system
+  sdl = dependency('sdl2', required: get_option('sdl'), static: enable_static,
+                   include_type: 'system')
+  sdl_image = not_found
+endif
 if sdl.found()
   # work around 2.0.8 bug
   sdl = declare_dependency(compile_args: '-Wno-undef',
@@ -426,9 +439,6 @@ endforeach
 genh += configure_file(output: 'config-host.h', configuration: config_host_data)
 
 minikconf = find_program('scripts/minikconf.py')
-target_dirs = config_host['TARGET_DIRS'].split()
-have_user = false
-have_system = false
 config_devices_mak_list = []
 config_devices_h = {}
 config_target_h = {}
@@ -449,7 +459,6 @@ kconfig_external_symbols = [
 ]
 ignored = ['TARGET_XML_FILES', 'TARGET_ABI_DIR', 'TARGET_DIRS']
 foreach target : target_dirs
-  have_user = have_user or target.endswith('-user')
   config_target = keyval.load(meson.current_build_dir() / target / 'config-target.mak')
 
   config_target_data = configuration_data()
@@ -472,8 +481,6 @@ foreach target : target_dirs
                                                configuration: config_target_data)}
 
   if target.endswith('-softmmu')
-    have_system = true
-
     base_kconfig = []
     foreach sym : kconfig_external_symbols
       if sym in config_target or sym in config_host
@@ -503,8 +510,6 @@ foreach target : target_dirs
   endif
   config_target_mak += {target: config_target}
 endforeach
-have_tools = 'CONFIG_TOOLS' in config_host
-have_block = have_system or have_tools
 
 grepy = find_program('scripts/grepy.sh')
 # This configuration is used to build files that are shared by
-- 
2.26.2




^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [PULL 10/17] configure: add --ninja option
  2020-08-27 16:59 [PULL 00/17] Meson fixes for 2020-08-27 Paolo Bonzini
                   ` (8 preceding siblings ...)
  2020-08-27 16:59 ` [PULL 09/17] meson: skip SDL2 detection if --disable-system Paolo Bonzini
@ 2020-08-27 16:59 ` Paolo Bonzini
  2020-08-27 16:59 ` [PULL 11/17] meson: cleanup xkbcommon detection Paolo Bonzini
                   ` (7 subsequent siblings)
  17 siblings, 0 replies; 22+ messages in thread
From: Paolo Bonzini @ 2020-08-27 16:59 UTC (permalink / raw)
  To: qemu-devel; +Cc: Mark Cave-Ayland

On Windows it is not possible to invoke a Python script as $NINJA.
If ninja is present use it directly, while if it is not we can
keep using ninjatool.

Reported-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 configure | 16 +++++++++++++++-
 1 file changed, 15 insertions(+), 1 deletion(-)

diff --git a/configure b/configure
index 9db9bb89b9..6ecaff429b 100755
--- a/configure
+++ b/configure
@@ -568,6 +568,7 @@ rng_none="no"
 secret_keyring=""
 libdaxctl=""
 meson=""
+ninja=""
 skip_meson=no
 gettext=""
 
@@ -1052,6 +1053,8 @@ for opt do
   ;;
   --meson=*) meson="$optarg"
   ;;
+  --ninja=*) ninja="$optarg"
+  ;;
   --smbd=*) smbd="$optarg"
   ;;
   --extra-cflags=*)
@@ -1820,6 +1823,7 @@ Advanced options (experts only):
   --python=PYTHON          use specified python [$python]
   --sphinx-build=SPHINX    use specified sphinx-build [$sphinx_build]
   --meson=MESON            use specified meson [$meson]
+  --ninja=NINJA            use specified ninja [$ninja]
   --smbd=SMBD              use specified smbd [$smbd]
   --with-git=GIT           use specified git [$git]
   --static                 enable static build [$static]
@@ -2058,6 +2062,16 @@ case "$meson" in
     *) meson=$(command -v meson) ;;
 esac
 
+# Probe for ninja (used for compdb)
+
+if test -z "$ninja"; then
+    for c in ninja ninja-build samu; do
+        if has $c; then
+            ninja=$(command -v "$c")
+            break
+        fi
+    done
+fi
 
 # Check that the C compiler works. Doing this here before testing
 # the host CPU ensures that we had a valid CC to autodetect the
@@ -8197,7 +8211,7 @@ fi
 mv $cross config-meson.cross
 
 rm -rf meson-private meson-info meson-logs
-NINJA=$PWD/ninjatool $meson setup \
+NINJA=${ninja:-$PWD/ninjatool} $meson setup \
         --prefix "${pre_prefix}$prefix" \
         --libdir "${pre_prefix}$libdir" \
         --libexecdir "${pre_prefix}$libexecdir" \
-- 
2.26.2




^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [PULL 11/17] meson: cleanup xkbcommon detection
  2020-08-27 16:59 [PULL 00/17] Meson fixes for 2020-08-27 Paolo Bonzini
                   ` (9 preceding siblings ...)
  2020-08-27 16:59 ` [PULL 10/17] configure: add --ninja option Paolo Bonzini
@ 2020-08-27 16:59 ` Paolo Bonzini
  2020-08-27 16:59 ` [PULL 12/17] meson: don't require CONFIG_VTE for the GTK UI Paolo Bonzini
                   ` (6 subsequent siblings)
  17 siblings, 0 replies; 22+ messages in thread
From: Paolo Bonzini @ 2020-08-27 16:59 UTC (permalink / raw)
  To: qemu-devel

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 meson.build | 12 +++++-------
 1 file changed, 5 insertions(+), 7 deletions(-)

diff --git a/meson.build b/meson.build
index a3baa2dbf0..90128616e5 100644
--- a/meson.build
+++ b/meson.build
@@ -165,10 +165,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 = dependency('xkbcommon', required: get_option('xkbcommon'), static: enable_static,
-                       include_type: 'system')
-if xkbcommon.found()
-  xkbcommon = declare_dependency(dependencies: xkbcommon)
+if get_option('xkbcommon').auto() and not have_system and not have_tools
+  xkbcommon = not_found
+else
+  xkbcommon = dependency('xkbcommon', required: get_option('xkbcommon'),
+                         static: enable_static)
 endif
 slirp = not_found
 if config_host.has_key('CONFIG_SLIRP')
@@ -1078,9 +1079,6 @@ endif
 
 # Don't build qemu-keymap if xkbcommon is not explicitly enabled
 # when we don't build tools or system
-if get_option('xkbcommon').auto() and not have_system and not have_tools
-  xkbcommon = not_found
-endif
 if xkbcommon.found()
   # used for the update-keymaps target, so include rules even if !have_tools
   qemu_keymap = executable('qemu-keymap', files('qemu-keymap.c', 'ui/input-keymap.c') + genh,
-- 
2.26.2




^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [PULL 12/17] meson: don't require CONFIG_VTE for the GTK UI
  2020-08-27 16:59 [PULL 00/17] Meson fixes for 2020-08-27 Paolo Bonzini
                   ` (10 preceding siblings ...)
  2020-08-27 16:59 ` [PULL 11/17] meson: cleanup xkbcommon detection Paolo Bonzini
@ 2020-08-27 16:59 ` Paolo Bonzini
  2020-08-27 16:59 ` [PULL 13/17] ninjatool: quote dollars in variables Paolo Bonzini
                   ` (5 subsequent siblings)
  17 siblings, 0 replies; 22+ messages in thread
From: Paolo Bonzini @ 2020-08-27 16:59 UTC (permalink / raw)
  To: qemu-devel; +Cc: Mark Cave-Ayland, Gerd Hoffmann

From: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>

Prevously CONFIG_VTE was not required to build QEMU with GTK UI support as not
all platforms have VTE available (in particular Windows).

Remove this requirement from the meson build system to enable QEMU to be built
with GTK UI support for Windows once again.

Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Reviewed-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 ui/meson.build | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ui/meson.build b/ui/meson.build
index 393c9bcb53..962e776569 100644
--- a/ui/meson.build
+++ b/ui/meson.build
@@ -44,7 +44,7 @@ if config_host.has_key('CONFIG_CURSES')
   ui_modules += {'curses' : curses_ss}
 endif
 
-if config_host.has_key('CONFIG_GTK') and config_host.has_key('CONFIG_VTE')
+if config_host.has_key('CONFIG_GTK')
   softmmu_ss.add(when: 'CONFIG_WIN32', if_true: files('win32-kbd-hook.c'))
 
   gtk_ss = ss.source_set()
-- 
2.26.2




^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [PULL 13/17] ninjatool: quote dollars in variables
  2020-08-27 16:59 [PULL 00/17] Meson fixes for 2020-08-27 Paolo Bonzini
                   ` (11 preceding siblings ...)
  2020-08-27 16:59 ` [PULL 12/17] meson: don't require CONFIG_VTE for the GTK UI Paolo Bonzini
@ 2020-08-27 16:59 ` Paolo Bonzini
  2020-08-27 16:59 ` [PULL 14/17] meson: fix relpath failure on Win32 Paolo Bonzini
                   ` (4 subsequent siblings)
  17 siblings, 0 replies; 22+ messages in thread
From: Paolo Bonzini @ 2020-08-27 16:59 UTC (permalink / raw)
  To: qemu-devel; +Cc: Laurent Vivier

Otherwise, dollars (such as in the special $ORIGIN rpath) are
eaten by Make.

Reported-by: Laurent Vivier <lvivier@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 scripts/ninjatool.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/scripts/ninjatool.py b/scripts/ninjatool.py
index cc77d51aa8..c33eafb5a0 100755
--- a/scripts/ninjatool.py
+++ b/scripts/ninjatool.py
@@ -834,7 +834,8 @@ class Ninja2Make(NinjaParserEventsWithVars):
         self.print()
         for targets in self.build_vars:
             for name, value in self.build_vars[targets].items():
-                self.print('%s: private .var.%s := %s' % (targets, name, value))
+                self.print('%s: private .var.%s := %s' %
+                           (targets, name, value.replace('$', '$$')))
             self.print()
         if not self.seen_default:
             default_targets = sorted(self.all_outs - self.all_ins, key=natural_sort_key)
-- 
2.26.2




^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [PULL 14/17] meson: fix relpath failure on Win32
  2020-08-27 16:59 [PULL 00/17] Meson fixes for 2020-08-27 Paolo Bonzini
                   ` (12 preceding siblings ...)
  2020-08-27 16:59 ` [PULL 13/17] ninjatool: quote dollars in variables Paolo Bonzini
@ 2020-08-27 16:59 ` Paolo Bonzini
  2020-08-27 16:59 ` [PULL 15/17] meson: Mingw64 gcc doesn't recognize system include_type for sdl2 Paolo Bonzini
                   ` (3 subsequent siblings)
  17 siblings, 0 replies; 22+ messages in thread
From: Paolo Bonzini @ 2020-08-27 16:59 UTC (permalink / raw)
  To: qemu-devel; +Cc: Yonggang Luo

From: Yonggang Luo <luoyonggang@gmail.com>

On win32, os.path.relpath can raise an exception when computing
for example C:/msys64/mingw64/x.exe relative to E:/path/qemu-build.
Use try...except to avoid this, just using an absolute path in
this case.

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 scripts/mtest2make.py | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/scripts/mtest2make.py b/scripts/mtest2make.py
index bdb257bbd9..d7a51bf97e 100644
--- a/scripts/mtest2make.py
+++ b/scripts/mtest2make.py
@@ -53,9 +53,16 @@ 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])
+    executable = test['cmd'][0]
+    try:
+        executable = os.path.relpath(executable)
+    except:
+        pass
     if test['workdir'] is not None:
-        test['cmd'][0] = os.path.relpath(test['cmd'][0], test['workdir'])
+        try:
+            test['cmd'][0] = os.path.relpath(executable, test['workdir'])
+        except:
+            test['cmd'][0] = executable
     else:
         test['cmd'][0] = executable
     cmd = '$(.test.env) %s %s' % (env, ' '.join((shlex.quote(x) for x in test['cmd'])))
-- 
2.26.2




^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [PULL 15/17] meson: Mingw64 gcc doesn't recognize system include_type for sdl2
  2020-08-27 16:59 [PULL 00/17] Meson fixes for 2020-08-27 Paolo Bonzini
                   ` (13 preceding siblings ...)
  2020-08-27 16:59 ` [PULL 14/17] meson: fix relpath failure on Win32 Paolo Bonzini
@ 2020-08-27 16:59 ` Paolo Bonzini
  2020-08-27 16:59 ` [PULL 16/17] meson: set colorout to auto Paolo Bonzini
                   ` (2 subsequent siblings)
  17 siblings, 0 replies; 22+ messages in thread
From: Paolo Bonzini @ 2020-08-27 16:59 UTC (permalink / raw)
  To: qemu-devel; +Cc: Yonggang Luo

From: Yonggang Luo <luoyonggang@gmail.com>

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>
---
 meson.build | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/meson.build b/meson.build
index 90128616e5..e6aa44be54 100644
--- a/meson.build
+++ b/meson.build
@@ -240,8 +240,7 @@ endif
 
 sdl = not_found
 if have_system
-  sdl = dependency('sdl2', required: get_option('sdl'), static: enable_static,
-                   include_type: 'system')
+  sdl = dependency('sdl2', required: get_option('sdl'), static: enable_static)
   sdl_image = not_found
 endif
 if sdl.found()
-- 
2.26.2




^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [PULL 16/17] meson: set colorout to auto
  2020-08-27 16:59 [PULL 00/17] Meson fixes for 2020-08-27 Paolo Bonzini
                   ` (14 preceding siblings ...)
  2020-08-27 16:59 ` [PULL 15/17] meson: Mingw64 gcc doesn't recognize system include_type for sdl2 Paolo Bonzini
@ 2020-08-27 16:59 ` Paolo Bonzini
  2020-08-27 16:59 ` [PULL 17/17] ninjatool: Fixes E$$: in generated Makefile.ninja Paolo Bonzini
  2020-08-28 10:04 ` [PULL 00/17] Meson fixes for 2020-08-27 Peter Maydell
  17 siblings, 0 replies; 22+ messages in thread
From: Paolo Bonzini @ 2020-08-27 16:59 UTC (permalink / raw)
  To: qemu-devel; +Cc: Marc-André Lureau, Gerd Hoffmann

From: Gerd Hoffmann <kraxel@redhat.com>

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>
---
 meson.build | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/meson.build b/meson.build
index e6aa44be54..74f8ea0c2e 100644
--- a/meson.build
+++ b/meson.build
@@ -1,5 +1,6 @@
 project('qemu', ['c'], meson_version: '>=0.55.0',
-        default_options: ['warning_level=1', 'c_std=gnu99', 'cpp_std=gnu++11', 'b_lundef=false'],
+        default_options: ['warning_level=1', 'c_std=gnu99', 'cpp_std=gnu++11',
+                          'b_lundef=false','b_colorout=auto'],
         version: run_command('head', meson.source_root() / 'VERSION').stdout().strip())
 
 not_found = dependency('', required: false)
-- 
2.26.2




^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [PULL 17/17] ninjatool: Fixes E$$: in generated Makefile.ninja
  2020-08-27 16:59 [PULL 00/17] Meson fixes for 2020-08-27 Paolo Bonzini
                   ` (15 preceding siblings ...)
  2020-08-27 16:59 ` [PULL 16/17] meson: set colorout to auto Paolo Bonzini
@ 2020-08-27 16:59 ` Paolo Bonzini
  2020-08-28 10:04 ` [PULL 00/17] Meson fixes for 2020-08-27 Peter Maydell
  17 siblings, 0 replies; 22+ messages in thread
From: Paolo Bonzini @ 2020-08-27 16:59 UTC (permalink / raw)
  To: qemu-devel; +Cc: Yonggang Luo, Mark Cave-Ayland

From: Yonggang Luo <luoyonggang@gmail.com>

Even though SIMPLE_PATH_RE is used with re.match (which anchors the
match implictly to the beginning of the string) it also needs an
end-of-string anchor in order to match the full path token.

Otherwise, the match would succeed incorrectly for $ and : characters
contained in the path, for example if the path starts with C:/ or E:/.

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Tested-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 scripts/ninjatool.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/ninjatool.py b/scripts/ninjatool.py
index c33eafb5a0..ba6bd9a2a6 100755
--- a/scripts/ninjatool.py
+++ b/scripts/ninjatool.py
@@ -55,7 +55,7 @@ else:
 
 PATH_RE = r"[^$\s:|]+|\$[$ :]|\$[a-zA-Z0-9_-]+|\$\{[a-zA-Z0-9_.-]+\}"
 
-SIMPLE_PATH_RE = re.compile(r"[^$\s:|]+")
+SIMPLE_PATH_RE = re.compile(r"^[^$\s:|]+$")
 IDENT_RE = re.compile(r"[a-zA-Z0-9_.-]+$")
 STRING_RE = re.compile(r"(" + PATH_RE + r"|[\s:|])(?:\r?\n)?|.")
 TOPLEVEL_RE = re.compile(r"([=:#]|\|\|?|^ +|(?:" + PATH_RE + r")+)\s*|.")
-- 
2.26.2



^ permalink raw reply related	[flat|nested] 22+ messages in thread

* Re: [PULL 02/17] meson: Build qemu-nbd on macOS again
  2020-08-27 16:59 ` [PULL 02/17] meson: Build qemu-nbd on macOS again Paolo Bonzini
@ 2020-08-27 18:06   ` Thomas Huth
  2020-08-27 20:00     ` Eric Blake
  0 siblings, 1 reply; 22+ messages in thread
From: Thomas Huth @ 2020-08-27 18:06 UTC (permalink / raw)
  To: Paolo Bonzini, qemu-devel
  Cc: Marc-André Lureau, Daniel P. Berrange, Peter Maydell

On 27/08/2020 18.59, Paolo Bonzini wrote:
> From: Thomas Huth <thuth@redhat.com>
> 
> 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>
> ---
>  meson.build | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/meson.build b/meson.build
> index f2aa5a7700..38d0abc0ea 100644
> --- a/meson.build
> +++ b/meson.build
> @@ -1081,7 +1081,7 @@ if have_tools
>    qemu_io = executable('qemu-io', files('qemu-io.c'),
>               dependencies: [block, qemuutil], install: true)
>    qemu_block_tools += [qemu_img, qemu_io]
> -  if targetos == 'linux' or targetos == 'sunos' or targetos.endswith('bsd')
> +  if targetos != 'windows'
>      qemu_nbd = executable('qemu-nbd', files('qemu-nbd.c'),
>                 dependencies: [block, qemuutil], install: true)
>      qemu_block_tools += [qemu_nbd]
> 

 Hi Paolo!

Daniel posted some better patches that even enable qemu-nbd on Windows
(see the "nbd: build qemu-nbd on Windows" v2 patch series)... in case
you have to respin this pull request, please use his patches instead!

 Thanks,
  Thomas



^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [PULL 02/17] meson: Build qemu-nbd on macOS again
  2020-08-27 18:06   ` Thomas Huth
@ 2020-08-27 20:00     ` Eric Blake
  2020-08-27 20:46       ` Paolo Bonzini
  0 siblings, 1 reply; 22+ messages in thread
From: Eric Blake @ 2020-08-27 20:00 UTC (permalink / raw)
  To: Thomas Huth, Paolo Bonzini, qemu-devel
  Cc: Marc-André Lureau, Daniel P. Berrange, Peter Maydell

On 8/27/20 1:06 PM, Thomas Huth wrote:
> On 27/08/2020 18.59, Paolo Bonzini wrote:
>> From: Thomas Huth <thuth@redhat.com>
>>
>> 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>
>> ---
>>   meson.build | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>

>> -  if targetos == 'linux' or targetos == 'sunos' or targetos.endswith('bsd')
>> +  if targetos != 'windows'
>>       qemu_nbd = executable('qemu-nbd', files('qemu-nbd.c'),
>>                  dependencies: [block, qemuutil], install: true)
>>       qemu_block_tools += [qemu_nbd]
>>
> 
>   Hi Paolo!
> 
> Daniel posted some better patches that even enable qemu-nbd on Windows
> (see the "nbd: build qemu-nbd on Windows" v2 patch series)... in case
> you have to respin this pull request, please use his patches instead!

And if not, I'll get them in through my NBD queue; it's not too hard to 
rebase them.

-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3226
Virtualization:  qemu.org | libvirt.org



^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [PULL 02/17] meson: Build qemu-nbd on macOS again
  2020-08-27 20:00     ` Eric Blake
@ 2020-08-27 20:46       ` Paolo Bonzini
  0 siblings, 0 replies; 22+ messages in thread
From: Paolo Bonzini @ 2020-08-27 20:46 UTC (permalink / raw)
  To: Eric Blake
  Cc: Marc-André Lureau, Thomas Huth, Daniel P. Berrange,
	qemu-devel, Peter Maydell

[-- Attachment #1: Type: text/plain, Size: 2087 bytes --]

Even though I did include some patches for other subsystems, I would rather
avoid doing that unless they only touch meson.build files. So I went with
the minimal regression fix.

Paolo

Il gio 27 ago 2020, 22:00 Eric Blake <eblake@redhat.com> ha scritto:

> On 8/27/20 1:06 PM, Thomas Huth wrote:
> > On 27/08/2020 18.59, Paolo Bonzini wrote:
> >> From: Thomas Huth <thuth@redhat.com>
> >>
> >> 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>
> >> ---
> >>   meson.build | 2 +-
> >>   1 file changed, 1 insertion(+), 1 deletion(-)
> >>
>
> >> -  if targetos == 'linux' or targetos == 'sunos' or
> targetos.endswith('bsd')
> >> +  if targetos != 'windows'
> >>       qemu_nbd = executable('qemu-nbd', files('qemu-nbd.c'),
> >>                  dependencies: [block, qemuutil], install: true)
> >>       qemu_block_tools += [qemu_nbd]
> >>
> >
> >   Hi Paolo!
> >
> > Daniel posted some better patches that even enable qemu-nbd on Windows
> > (see the "nbd: build qemu-nbd on Windows" v2 patch series)... in case
> > you have to respin this pull request, please use his patches instead!
>
> And if not, I'll get them in through my NBD queue; it's not too hard to
> rebase them.
>
> --
> Eric Blake, Principal Software Engineer
> Red Hat, Inc.           +1-919-301-3226
> Virtualization:  qemu.org | libvirt.org
>
>

[-- Attachment #2: Type: text/html, Size: 3312 bytes --]

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [PULL 00/17] Meson fixes for 2020-08-27
  2020-08-27 16:59 [PULL 00/17] Meson fixes for 2020-08-27 Paolo Bonzini
                   ` (16 preceding siblings ...)
  2020-08-27 16:59 ` [PULL 17/17] ninjatool: Fixes E$$: in generated Makefile.ninja Paolo Bonzini
@ 2020-08-28 10:04 ` Peter Maydell
  17 siblings, 0 replies; 22+ messages in thread
From: Peter Maydell @ 2020-08-28 10:04 UTC (permalink / raw)
  To: Paolo Bonzini; +Cc: QEMU Developers

On Thu, 27 Aug 2020 at 18:02, Paolo Bonzini <pbonzini@redhat.com> wrote:
>
> The following changes since commit d1a2b51f868d09ca8489ee9aee9c55632ed8fb92:
>
>   Merge remote-tracking branch 'remotes/berrange/tags/socket-next-pull-request' into staging (2020-08-25 15:01:43 +0100)
>
> are available in the Git repository at:
>
>   https://gitlab.com/bonzini/qemu.git tags/for-upstream
>
> for you to fetch changes up to 666ab710f83c29966cca3a5d3ac2776c2b5f1afa
>
>   ninjatool: Fixes E$$: in generated Makefile.ninja (2020-08-27 08:31:54 +0200)
>
> Since I am officially on vacation I don't have access to the full set
> of tests I run, but it passes both gitlab CI and the docker-mingw build.
> It does not include the submodule update for Meson 0.55.1.
>
> ----------------------------------------------------------------
> meson fixes:
> * fix PIE default for Windows
> * tweak conditions for requiring SDL2 and pixman
> * move NSIS building to Meson
> * fix creation of systemtap files
> * add --ninja option for Windows builds
> * other fixes for stupid bugs and for Windows paths


Applied, thanks.

Please update the changelog at https://wiki.qemu.org/ChangeLog/5.2
for any user-visible changes.

-- PMM


^ permalink raw reply	[flat|nested] 22+ messages in thread

end of thread, other threads:[~2020-08-28 10:05 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-27 16:59 [PULL 00/17] Meson fixes for 2020-08-27 Paolo Bonzini
2020-08-27 16:59 ` [PULL 01/17] trace: fix creation of systemtap files Paolo Bonzini
2020-08-27 16:59 ` [PULL 02/17] meson: Build qemu-nbd on macOS again Paolo Bonzini
2020-08-27 18:06   ` Thomas Huth
2020-08-27 20:00     ` Eric Blake
2020-08-27 20:46       ` Paolo Bonzini
2020-08-27 16:59 ` [PULL 03/17] meson: Don't make object files for dtrace on macOS Paolo Bonzini
2020-08-27 16:59 ` [PULL 04/17] scripts/qemu-version.sh: Add missing space before ']' Paolo Bonzini
2020-08-27 16:59 ` [PULL 05/17] meson: Fix meson build with --enable-libdaxctl Paolo Bonzini
2020-08-27 16:59 ` [PULL 06/17] meson: Fix chardev-baum.so name Paolo Bonzini
2020-08-27 16:59 ` [PULL 07/17] configure: default to PIE disabled on Windows platforms Paolo Bonzini
2020-08-27 16:59 ` [PULL 08/17] meson: move pixman detection to meson Paolo Bonzini
2020-08-27 16:59 ` [PULL 09/17] meson: skip SDL2 detection if --disable-system Paolo Bonzini
2020-08-27 16:59 ` [PULL 10/17] configure: add --ninja option Paolo Bonzini
2020-08-27 16:59 ` [PULL 11/17] meson: cleanup xkbcommon detection Paolo Bonzini
2020-08-27 16:59 ` [PULL 12/17] meson: don't require CONFIG_VTE for the GTK UI Paolo Bonzini
2020-08-27 16:59 ` [PULL 13/17] ninjatool: quote dollars in variables Paolo Bonzini
2020-08-27 16:59 ` [PULL 14/17] meson: fix relpath failure on Win32 Paolo Bonzini
2020-08-27 16:59 ` [PULL 15/17] meson: Mingw64 gcc doesn't recognize system include_type for sdl2 Paolo Bonzini
2020-08-27 16:59 ` [PULL 16/17] meson: set colorout to auto Paolo Bonzini
2020-08-27 16:59 ` [PULL 17/17] ninjatool: Fixes E$$: in generated Makefile.ninja Paolo Bonzini
2020-08-28 10:04 ` [PULL 00/17] Meson fixes for 2020-08-27 Peter Maydell

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.