qemu-devel
[Top][All Lists]
Advanced

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

[Qemu-devel] [RFC PATCH 08/10] configure: add --disable-tcg configure op


From: Paolo Bonzini
Subject: [Qemu-devel] [RFC PATCH 08/10] configure: add --disable-tcg configure option
Date: Mon, 17 Sep 2012 18:00:47 +0200

From: Anthony Liguori <address@hidden>

This lets you build without TCG (KVM/Xen/qtest only).  When this flag
is passed to configure, it will automatically filter out the target list
to only those that support KVM or Xen.

Signed-off-by: Anthony Liguori <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>
---
 configure | 38 +++++++++++++++++++++++++++++++-------
 1 file modificato, 31 inserzioni(+), 7 rimozioni(-)

diff --git a/configure b/configure
index 3cdf9d9..bf8fd55 100755
--- a/configure
+++ b/configure
@@ -165,6 +165,7 @@ cap_ng=""
 attr=""
 libattr=""
 xfs=""
+tcg="yes"
 
 vhost_net="no"
 kvm="no"
@@ -748,6 +749,10 @@ for opt do
   ;;
   --enable-cap-ng) cap_ng="yes"
   ;;
+  --disable-tcg) tcg="no"
+  ;;
+  --enable-tcg) tcg="yes"
+  ;;
   --disable-spice) spice="no"
   ;;
   --enable-spice) spice="yes"
@@ -3259,7 +3264,6 @@ qemu_version=`head $source_path/VERSION`
 echo "VERSION=$qemu_version" >>$config_host_mak
 echo "PKGVERSION=$pkgversion" >>$config_host_mak
 echo "SRC_PATH=$source_path" >> $config_host_mak
-echo "TARGET_DIRS=$target_list" >> $config_host_mak
 if [ "$docs" = "yes" ] ; then
   echo "BUILD_DOCS=yes" >> $config_host_mak
 fi
@@ -3367,9 +3371,11 @@ fi
 if test "$signalfd" = "yes" ; then
   echo "CONFIG_SIGNALFD=y" >> $config_host_mak
 fi
-echo "CONFIG_TCG=y" >> $config_host_mak
-if test "$tcg_interpreter" = "yes" ; then
-  echo "CONFIG_TCG_INTERPRETER=y" >> $config_host_mak
+if test "$tcg" = "yes"; then
+  echo "CONFIG_TCG=y" >> $config_host_mak
+  if test "$tcg_interpreter" = "yes" ; then
+    echo "CONFIG_TCG_INTERPRETER=y" >> $config_host_mak
+  fi
 fi
 if test "$fdatasync" = "yes" ; then
   echo "CONFIG_FDATASYNC=y" >> $config_host_mak
@@ -3598,6 +3604,15 @@ supported_xen_target() {
     return 1
 }
 
+supported_target() {
+    test "$tcg" = "yes" && return 0
+    supported_kvm_target && return 0
+    supported_xen_target && return 0
+    return 1
+}
+
+target_list2=
+
 for target in $target_list; do
 target_dir="$target"
 config_target_mak=$target_dir/config-target.mak
@@ -3639,6 +3654,10 @@ case "$target" in
     ;;
 esac
 
+supported_target || continue
+
+target_list2="$target $target_list2"
+
 mkdir -p $target_dir
 echo "# Automatically generated by configure - do not modify" > 
$config_target_mak
 
@@ -4058,6 +4077,8 @@ echo "QEMU_INCLUDES+=$includes" >> $config_target_mak
 
 done # for target in $targets
 
+echo "TARGET_DIRS=$target_list2" >> $config_host_mak
+
 # build tree in object directory in case the source is not in the current 
directory
 DIRS="tests tests/tcg tests/tcg/cris tests/tcg/lm32"
 DIRS="$DIRS pc-bios/optionrom pc-bios/spapr-rtas"
@@ -4138,8 +4159,7 @@ if test "$slirp" = "yes" ; then
 fi
 echo "host CPU          $cpu"
 echo "host big endian   $bigendian"
-echo "target list       $target_list"
-echo "tcg debug enabled $debug_tcg"
+echo "target list       $target_list2"
 echo "gprof enabled     $gprof"
 echo "sparse enabled    $sparse"
 echo "strip binaries    $strip_opt"
@@ -4182,7 +4202,11 @@ echo "Linux AIO support $linux_aio"
 echo "ATTR/XATTR support $attr"
 echo "Install blobs     $blobs"
 echo "KVM support       $kvm"
-echo "TCG interpreter   $tcg_interpreter"
+echo "TCG support       $tcg"
+if test "$tcg" = "yes" ; then
+    echo "TCG debug enabled $debug_tcg"
+    echo "TCG interpreter   $tcg_interpreter"
+fi
 echo "fdt support       $fdt"
 echo "preadv support    $preadv"
 echo "fdatasync         $fdatasync"
-- 
1.7.12





reply via email to

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