Blame SOURCES/kvm-virtiofsd-Add-Makefile-wiring-for-virtiofsd-contrib.patch

ddf19c
From 709408de33112d32b7c6675f8c9320b8bebccd58 Mon Sep 17 00:00:00 2001
ddf19c
From: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
ddf19c
Date: Mon, 27 Jan 2020 19:01:05 +0100
ddf19c
Subject: [PATCH 034/116] virtiofsd: Add Makefile wiring for virtiofsd contrib
ddf19c
MIME-Version: 1.0
ddf19c
Content-Type: text/plain; charset=UTF-8
ddf19c
Content-Transfer-Encoding: 8bit
ddf19c
ddf19c
RH-Author: Dr. David Alan Gilbert <dgilbert@redhat.com>
ddf19c
Message-id: <20200127190227.40942-31-dgilbert@redhat.com>
ddf19c
Patchwork-id: 93482
ddf19c
O-Subject: [RHEL-AV-8.2 qemu-kvm PATCH 030/112] virtiofsd: Add Makefile wiring for virtiofsd contrib
ddf19c
Bugzilla: 1694164
ddf19c
RH-Acked-by: Philippe Mathieu-Daudé <philmd@redhat.com>
ddf19c
RH-Acked-by: Stefan Hajnoczi <stefanha@redhat.com>
ddf19c
RH-Acked-by: Sergio Lopez Pascual <slp@redhat.com>
ddf19c
ddf19c
From: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
ddf19c
ddf19c
Wire up the building of the virtiofsd in tools.
ddf19c
ddf19c
virtiofsd relies on Linux-specific system calls and seccomp.  Anyone
ddf19c
wishing to port it to other host operating systems should do so
ddf19c
carefully and without reducing security.
ddf19c
ddf19c
Only allow building on Linux hosts.
ddf19c
ddf19c
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
ddf19c
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
ddf19c
Reviewed-by: Liam Merwick <liam.merwick@oracle.com>
ddf19c
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
ddf19c
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
ddf19c
(cherry picked from commit 81bfc42dcf473bc8d3790622633410da72d8e622)
ddf19c
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
ddf19c
---
ddf19c
 Makefile                      | 10 ++++++++++
ddf19c
 Makefile.objs                 |  1 +
ddf19c
 tools/virtiofsd/Makefile.objs |  9 +++++++++
ddf19c
 3 files changed, 20 insertions(+)
ddf19c
 create mode 100644 tools/virtiofsd/Makefile.objs
ddf19c
ddf19c
diff --git a/Makefile b/Makefile
ddf19c
index 4254950..1526775 100644
ddf19c
--- a/Makefile
ddf19c
+++ b/Makefile
ddf19c
@@ -330,6 +330,10 @@ endif
ddf19c
 endif
ddf19c
 endif
ddf19c
 
ddf19c
+ifdef CONFIG_LINUX
ddf19c
+HELPERS-y += virtiofsd$(EXESUF)
ddf19c
+endif
ddf19c
+
ddf19c
 # Sphinx does not allow building manuals into the same directory as
ddf19c
 # the source files, so if we're doing an in-tree QEMU build we must
ddf19c
 # build the manuals into a subdirectory (and then install them from
ddf19c
@@ -430,6 +434,7 @@ dummy := $(call unnest-vars,, \
ddf19c
                 elf2dmp-obj-y \
ddf19c
                 ivshmem-client-obj-y \
ddf19c
                 ivshmem-server-obj-y \
ddf19c
+                virtiofsd-obj-y \
ddf19c
                 rdmacm-mux-obj-y \
ddf19c
                 libvhost-user-obj-y \
ddf19c
                 vhost-user-scsi-obj-y \
ddf19c
@@ -675,6 +680,11 @@ rdmacm-mux$(EXESUF): LIBS += "-libumad"
ddf19c
 rdmacm-mux$(EXESUF): $(rdmacm-mux-obj-y) $(COMMON_LDADDS)
ddf19c
 	$(call LINK, $^)
ddf19c
 
ddf19c
+ifdef CONFIG_LINUX # relies on Linux-specific syscalls
ddf19c
+virtiofsd$(EXESUF): $(virtiofsd-obj-y) libvhost-user.a $(COMMON_LDADDS)
ddf19c
+	$(call LINK, $^)
ddf19c
+endif
ddf19c
+
ddf19c
 vhost-user-gpu$(EXESUF): $(vhost-user-gpu-obj-y) $(libvhost-user-obj-y) libqemuutil.a libqemustub.a
ddf19c
 	$(call LINK, $^)
ddf19c
 
ddf19c
diff --git a/Makefile.objs b/Makefile.objs
ddf19c
index fcf63e1..1a8f288 100644
ddf19c
--- a/Makefile.objs
ddf19c
+++ b/Makefile.objs
ddf19c
@@ -125,6 +125,7 @@ vhost-user-blk-obj-y = contrib/vhost-user-blk/
ddf19c
 rdmacm-mux-obj-y = contrib/rdmacm-mux/
ddf19c
 vhost-user-input-obj-y = contrib/vhost-user-input/
ddf19c
 vhost-user-gpu-obj-y = contrib/vhost-user-gpu/
ddf19c
+virtiofsd-obj-y = tools/virtiofsd/
ddf19c
 
ddf19c
 ######################################################################
ddf19c
 trace-events-subdirs =
ddf19c
diff --git a/tools/virtiofsd/Makefile.objs b/tools/virtiofsd/Makefile.objs
ddf19c
new file mode 100644
ddf19c
index 0000000..45a8075
ddf19c
--- /dev/null
ddf19c
+++ b/tools/virtiofsd/Makefile.objs
ddf19c
@@ -0,0 +1,9 @@
ddf19c
+virtiofsd-obj-y = buffer.o \
ddf19c
+                  fuse_opt.o \
ddf19c
+                  fuse_log.o \
ddf19c
+                  fuse_lowlevel.o \
ddf19c
+                  fuse_signals.o \
ddf19c
+                  fuse_virtio.o \
ddf19c
+                  helper.o \
ddf19c
+                  passthrough_ll.o
ddf19c
+
ddf19c
-- 
ddf19c
1.8.3.1
ddf19c