]> xenbits.xensource.com Git - people/sstabellini/xen-unstable.git/.git/commitdiff
pvshim: make PV shim build selectable from configure
authorRoger Pau Monne <roger.pau@citrix.com>
Tue, 14 May 2019 13:59:22 +0000 (15:59 +0200)
committerWei Liu <wei.liu2@citrix.com>
Wed, 15 May 2019 09:49:30 +0000 (10:49 +0100)
So a user can decide whether to compile a PV shim as part of the tools
build. Note that the default behavior is preserved, which is to build
a PV shim when the target or host (if target is unset) architecture is
64bit x86.

Requested-by: Olaf Hering <olaf@aepfle.de>
Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Acked-by: Wei Liu <wei.liu2@citrix.com>
[ wei: run autogen.s ]
Signed-off-by: Wei Liu <wei.liu2@citrix.com>
config/Tools.mk.in
tools/configure
tools/configure.ac
tools/firmware/Makefile

index 98245f63c90c2bc0d09836b6389d3a82de4ded7a..84ddb1a5427cbee8e63c8877d3033babd524f39f 100644 (file)
@@ -75,3 +75,5 @@ TINFO_LIBS          := @TINFO_LIBS@
 ARGP_LDFLAGS        := @argp_ldflags@
 
 FILE_OFFSET_BITS    := @FILE_OFFSET_BITS@
+
+CONFIG_PV_SHIM      := @pvshim@
index 92ead93335470fa41605274328370332c2fd6ded..0be0be75de6a7fdaacbd3314a04ea5135127d1c1 100755 (executable)
@@ -624,6 +624,7 @@ ac_includes_default="\
 
 ac_subst_vars='LTLIBOBJS
 LIBOBJS
+pvshim
 ninepfs
 SYSTEMD_LIBS
 SYSTEMD_CFLAGS
@@ -822,6 +823,7 @@ enable_systemd
 with_systemd
 with_systemd_modules_load
 enable_9pfs
+enable_pvshim
 '
       ac_precious_vars='build_alias
 host_alias
@@ -1504,6 +1506,8 @@ Optional Features:
   --enable-systemd        Enable systemd support (default is DISABLED)
   --enable-9pfs           Explicitly enable 9pfs support in QEMU build
                           (default is to defer to QEMU configure default)
+  --disable-pvshim        Disable pvshim build (enabled by default on 64bit
+                          x86)
 
 Optional Packages:
   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
@@ -9774,6 +9778,26 @@ fi
 
 
 
+# Check whether --enable-pvshim was given.
+if test "${enable_pvshim+set}" = set; then :
+  enableval=$enable_pvshim; if test "x$enable_pvshim" = "xno"; then :
+  pvshim=n
+else
+  pvshim=y
+fi
+else
+
+    cpu=`test -z "$target_cpu" && echo "$host_cpu" || echo "$target_cpu"`
+    case "$cpu" in
+        x86_64)
+           pvshim="y";;
+        *) pvshim="n";;
+    esac
+
+fi
+
+
+
 cat >confcache <<\_ACEOF
 # This file is a shell script that caches the results of configure
 # tests run on this system so they can be shared between configure
index c9fd69ddfa1403d0c5de02bc5da9eb97b154b074..fcf282e74e9411b35ad2b1ca70a9052726c58d69 100644 (file)
@@ -492,4 +492,17 @@ AC_ARG_ENABLE([9pfs],
 
 AC_SUBST(ninepfs)
 
+AC_ARG_ENABLE([pvshim],
+    AS_HELP_STRING([--disable-pvshim],
+                   [Disable pvshim build (enabled by default on 64bit x86)]),
+    [AS_IF([test "x$enable_pvshim" = "xno"], [pvshim=n], [pvshim=y])], [
+    cpu=`test -z "$target_cpu" && echo "$host_cpu" || echo "$target_cpu"`
+    case "$cpu" in
+        x86_64)
+           pvshim="y";;
+        *) pvshim="n";;
+    esac
+])
+AC_SUBST(pvshim)
+
 AC_OUTPUT()
index cf304fc578a748439a96dccaaac39a9566c94e07..809a5fd0255e19b15abda6daf891ed1f5e63e9ad 100644 (file)
@@ -1,10 +1,6 @@
 XEN_ROOT = $(CURDIR)/../..
 include $(XEN_ROOT)/tools/Rules.mk
 
-ifneq ($(XEN_TARGET_ARCH),x86_32)
-CONFIG_PV_SHIM := y
-endif
-
 # hvmloader is a 32-bit protected mode binary.
 TARGET      := hvmloader/hvmloader
 INST_DIR := $(DESTDIR)$(XENFIRMWAREDIR)