qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[RFC PATCH 01/12] configure: Add iovisor/ubpf project as a submodule for


From: Zhang Chen
Subject: [RFC PATCH 01/12] configure: Add iovisor/ubpf project as a submodule for QEMU
Date: Fri, 17 Jun 2022 15:36:19 +0800

Make iovisor/ubpf project be a git submodule for QEMU.
It will auto clone ubpf project when configure QEMU.

Signed-off-by: Zhang Chen <chen.zhang@intel.com>
---
 .gitmodules |  3 +++
 configure   | 20 ++++++++++++++++++++
 ubpf        |  1 +
 3 files changed, 24 insertions(+)
 create mode 160000 ubpf

diff --git a/.gitmodules b/.gitmodules
index b8bff47df8..30fb082f39 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -64,3 +64,6 @@
 [submodule "tests/lcitool/libvirt-ci"]
        path = tests/lcitool/libvirt-ci
        url = https://gitlab.com/libvirt/libvirt-ci.git
+[submodule "ubpf"]
+       path = ubpf
+       url = https://github.com/iovisor/ubpf.git
diff --git a/configure b/configure
index e69537c756..7dde1429dc 100755
--- a/configure
+++ b/configure
@@ -326,6 +326,7 @@ else
   slirp="auto"
 fi
 fdt="auto"
+ubpf="auto"
 
 # 2. Automatically enable/disable other options
 tcg="enabled"
@@ -820,6 +821,14 @@ for opt do
   ;;
   --enable-slirp=*) slirp="$optarg"
   ;;
+  --disable-ubpf) ubpf="disabled"
+  ;;
+  --enable-ubpf) ubpf="enabled"
+  ;;
+  --enable-ubpf=git) ubpf="internal"
+  ;;
+  --enable-ubpf=*) ubpf="$optarg"
+  ;;
   --disable-tcg) tcg="disabled"
                  plugins="no"
   ;;
@@ -2176,6 +2185,16 @@ if test "$have_ubsan" = "yes"; then
   QEMU_LDFLAGS="-fsanitize=undefined $QEMU_LDFLAGS"
 fi
 
+##########################################
+# check for ubpf
+
+case "$ubpf" in
+  auto | enabled | internal)
+    # Simpler to always update submodule, even if not needed.
+    git_submodules="${git_submodules} ubpf"
+    ;;
+esac
+
 ##########################################
 
 # Exclude --warn-common with TSan to suppress warnings from the TSan libraries.
@@ -2664,6 +2683,7 @@ if test "$skip_meson" = no; then
   # QEMU options
   test "$cfi" != false && meson_option_add "-Dcfi=$cfi"
   test "$fdt" != auto && meson_option_add "-Dfdt=$fdt"
+  test "$ubpf" != auto && meson_option_add "-Dubpf=$ubpf"
   test -n "${LIB_FUZZING_ENGINE+xxx}" && meson_option_add 
"-Dfuzzing_engine=$LIB_FUZZING_ENGINE"
   test "$qemu_suffix" != qemu && meson_option_add "-Dqemu_suffix=$qemu_suffix"
   test "$slirp" != auto && meson_option_add "-Dslirp=$slirp"
diff --git a/ubpf b/ubpf
new file mode 160000
index 0000000000..0dd334daf4
--- /dev/null
+++ b/ubpf
@@ -0,0 +1 @@
+Subproject commit 0dd334daf4849137fa40d2b7676d2bf920d5c81d
-- 
2.25.1




reply via email to

[Prev in Thread] Current Thread [Next in Thread]