qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Helge Deller <deller@gmx.de>
To: Paolo Bonzini <pbonzini@redhat.com>,
	Markus Armbruster <armbru@redhat.com>,
	Michael Roth <michael.roth@amd.com>,
	qemu-devel@nongnu.org
Cc: Michael Tokarev <mjt@tls.msk.ru>
Subject: [PATCH] meson: Clean up some dependencies regarding qemu-system
Date: Fri, 16 Dec 2022 20:07:39 +0100	[thread overview]
Message-ID: <Y5zB+5t5K0AEj6Rn@p100> (raw)

Reduce amount of compiled code and installed binaries if just the qemu
utilities such as qemu-img, qemu-io and qemu-nbd have to be built.  This
helps to make those tools easier available on hosts where qemu-system or
qemu-user isn't supported.

Reason for this patch is that qemu fail to build on debian for some
seconday non-release architectures (e.g. hppa, sh4, ia64), as can be
seen here:
https://buildd.debian.org/status/package.php?p=qemu&suite=sid
This patch helps to clean up the build so that these tools
can be provided on those platforms in future.

Signed-off-by: Helge Deller <deller@gmx.de>

diff --git a/docs/meson.build b/docs/meson.build
index 9136fed3b7..cfbde168b7 100644
--- a/docs/meson.build
+++ b/docs/meson.build
@@ -49,7 +49,7 @@ if build_docs
         'qemu-trace-stap.1': (stap.found() ? 'man1' : ''),
         'virtfs-proxy-helper.1': (have_virtfs_proxy_helper ? 'man1' : ''),
         'virtiofsd.1': (have_virtiofsd ? 'man1' : ''),
-        'qemu.1': 'man1',
+        'qemu.1': (have_system ? 'man1' : ''),
         'qemu-block-drivers.7': 'man7',
         'qemu-cpu-models.7': 'man7'
   }
diff --git a/meson.build b/meson.build
index 5c6b5a1c75..fe4c9c83bb 100644
--- a/meson.build
+++ b/meson.build
@@ -3021,7 +3021,6 @@ subdir('util')
 subdir('qom')
 subdir('authz')
 subdir('crypto')
-subdir('ui')
 subdir('hw')
 subdir('gdbstub')

@@ -3060,9 +3059,10 @@ if have_system or have_user
                          arguments: ['@INPUT@', '@EXTRA_ARGS@', '-o', '@OUTPUT@'])
   subdir('libdecnumber')
   subdir('target')
+  subdir('ui')
+  subdir('audio')
 endif

-subdir('audio')
 subdir('io')
 subdir('chardev')
 subdir('fsdev')
@@ -3581,7 +3581,7 @@ subdir('qga')

 # Don't build qemu-keymap if xkbcommon is not explicitly enabled
 # when we don't build tools or system
-if xkbcommon.found()
+if xkbcommon.found() and have_system
   # 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,
                            dependencies: [qemuutil, xkbcommon], install: have_tools)
@@ -3596,7 +3596,9 @@ if have_tools
                dependencies: [blockdev, qemuutil, gnutls, selinux],
                install: true)

-  subdir('storage-daemon')
+  if have_system
+    subdir('storage-daemon')
+  endif
   subdir('contrib/rdmacm-mux')
   subdir('contrib/elf2dmp')

@@ -3611,7 +3613,7 @@ if have_tools
     subdir('contrib/vhost-user-scsi')
   endif

-  if targetos == 'linux'
+  if targetos == 'linux' and have_system
     executable('qemu-bridge-helper', files('qemu-bridge-helper.c'),
                dependencies: [qemuutil, libcap_ng],
                install: true,
diff --git a/qapi/meson.build b/qapi/meson.build
index fbdb442fdf..4a499db441 100644
--- a/qapi/meson.build
+++ b/qapi/meson.build
@@ -51,12 +51,12 @@ qapi_all_modules = [
   'transaction',
   'virtio',
   'yank',
+  'qdev',
 ]
 if have_system
   qapi_all_modules += [
     'acpi',
     'audio',
-    'qdev',
     'pci',
     'rdma',
     'rocker',
diff --git a/tests/meson.build b/tests/meson.build
index 8e318ec513..a63a7de9f0 100644
--- a/tests/meson.build
+++ b/tests/meson.build
@@ -1,5 +1,7 @@
 subdir('bench')
-subdir('qemu-iotests')
+if have_system
+  subdir('qemu-iotests')
+endif

 test_qapi_outputs = [
   'qapi-builtin-types.c',
diff --git a/tools/meson.build b/tools/meson.build
index 10eb3a043f..740d572a94 100644
--- a/tools/meson.build
+++ b/tools/meson.build
@@ -5,7 +5,7 @@ have_virtiofsd = get_option('virtiofsd') \
              error_message: 'virtiofsd requires libcap-ng-devel and seccomp-devel') \
     .require(have_vhost_user,
              error_message: 'virtiofsd needs vhost-user-support') \
-    .disable_auto_if(not have_tools and not have_system) \
+    .disable_auto_if(not have_system) \
     .allowed()

 if have_virtiofsd


             reply	other threads:[~2022-12-16 19:19 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-16 19:07 Helge Deller [this message]
2022-12-17 13:28 ` [PATCH] meson: Clean up some dependencies regarding qemu-system Paolo Bonzini
2022-12-19 11:21   ` Helge Deller
2022-12-19 11:31     ` Peter Maydell
2022-12-19 11:40       ` Philippe Mathieu-Daudé
2022-12-19 11:52         ` Peter Maydell
2022-12-20 20:56           ` Helge Deller
2022-12-21  7:49             ` Michael Tokarev
2022-12-22  5:27               ` Helge Deller
2022-12-19 13:22     ` Alex Bennée
2022-12-19 11:35 ` Philippe Mathieu-Daudé
2022-12-19 12:13   ` Helge Deller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Y5zB+5t5K0AEj6Rn@p100 \
    --to=deller@gmx.de \
    --cc=armbru@redhat.com \
    --cc=michael.roth@amd.com \
    --cc=mjt@tls.msk.ru \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).