[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL v8 048/152] meson: add virtfs-proxy-helper
From: |
Paolo Bonzini |
Subject: |
[PULL v8 048/152] meson: add virtfs-proxy-helper |
Date: |
Fri, 21 Aug 2020 06:21:45 -0400 |
From: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
Makefile | 2 --
configure | 7 +++++--
fsdev/meson.build | 8 ++++++++
meson.build | 6 ++++++
4 files changed, 19 insertions(+), 4 deletions(-)
create mode 100644 fsdev/meson.build
diff --git a/Makefile b/Makefile
index da1e556efe..39633ec7db 100644
--- a/Makefile
+++ b/Makefile
@@ -429,8 +429,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
diff --git a/configure b/configure
index 518491d234..d3d022c3b4 100755
--- a/configure
+++ b/configure
@@ -4384,6 +4384,7 @@ fi
##########################################
# attr probe
+libattr_libs=
if test "$attr" != "no" ; then
cat > $TMPC <<EOF
#include <stdio.h>
@@ -4400,7 +4401,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
@@ -6712,6 +6714,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
@@ -6722,7 +6725,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"
@@ -7304,6 +7306,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
diff --git a/fsdev/meson.build b/fsdev/meson.build
new file mode 100644
index 0000000000..30e2319960
--- /dev/null
+++ b/fsdev/meson.build
@@ -0,0 +1,8 @@
+have_virtfs_proxy_helper = have_tools and libattr.found() and
libcap_ng.found() and 'CONFIG_VIRTFS' in config_host
+if have_virtfs_proxy_helper
+ executable('virtfs-proxy-helper',
+ files('virtfs-proxy-helper.c', '9p-marshal.c',
'9p-iov-marshal.c'),
+ dependencies: [qemuutil, libattr, libcap_ng],
+ install: true,
+ install_dir: get_option('libexecdir'))
+endif
diff --git a/meson.build b/meson.build
index f49f5e08d6..3e9e0a9b33 100644
--- a/meson.build
+++ b/meson.build
@@ -102,6 +102,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(),
@@ -301,6 +305,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')
--
2.26.2
- [PULL v8 039/152] meson: add macos dependencies, (continued)
- [PULL v8 039/152] meson: add macos dependencies, Paolo Bonzini, 2020/08/21
- [PULL v8 045/152] meson: add qemu-bridge-helper, Paolo Bonzini, 2020/08/21
- [PULL v8 044/152] meson: convert dummy Windows qga/qemu-ga target, Paolo Bonzini, 2020/08/21
- [PULL v8 042/152] meson: convert vss-win32, Paolo Bonzini, 2020/08/21
- [PULL v8 046/152] meson: add qemu-keymap, Paolo Bonzini, 2020/08/21
- [PULL v8 034/152] contrib/rdmacm-mux: convert to Meson, Paolo Bonzini, 2020/08/21
- [PULL v8 036/152] contrib/vhost-user-gpu: convert to meson, Paolo Bonzini, 2020/08/21
- [PULL v8 043/152] meson: add msi generation, Paolo Bonzini, 2020/08/21
- [PULL v8 041/152] meson: convert qemu-ga, Paolo Bonzini, 2020/08/21
- [PULL v8 049/152] meson: keymap-gen, Paolo Bonzini, 2020/08/21
- [PULL v8 048/152] meson: add virtfs-proxy-helper,
Paolo Bonzini <=
- [PULL v8 050/152] meson: generate qemu-version.h, Paolo Bonzini, 2020/08/21
- [PULL v8 047/152] meson: add qemu-edid, Paolo Bonzini, 2020/08/21
- [PULL v8 051/152] meson: generate shader headers, Paolo Bonzini, 2020/08/21
- [PULL v8 057/152] meson: convert qom directory to Meson (tools part), Paolo Bonzini, 2020/08/21
- [PULL v8 054/152] meson: convert check-decodetree, Paolo Bonzini, 2020/08/21
- [PULL v8 061/152] meson: convert target/s390x/gen-features.h, Paolo Bonzini, 2020/08/21
- [PULL v8 056/152] meson: convert check-qapi-schema, Paolo Bonzini, 2020/08/21
- [PULL v8 052/152] meson: generate hxtool files, Paolo Bonzini, 2020/08/21
- [PULL v8 063/152] meson: add modules infrastructure, Paolo Bonzini, 2020/08/21
- [PULL v8 059/152] meson: convert crypto directory to Meson, Paolo Bonzini, 2020/08/21