qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Anthony Liguori <aliguori@us.ibm.com>
To: qemu-devel@nongnu.org
Cc: Anthony Liguori <aliguori@us.ibm.com>, Alex Graf <agraf@suse.de>,
	Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Subject: [Qemu-devel] [PATCH 1/5] configure: add --disable-tcg configure option
Date: Fri,  2 Sep 2011 16:47:59 -0500	[thread overview]
Message-ID: <1315000083-20576-2-git-send-email-aliguori@us.ibm.com> (raw)
In-Reply-To: <1315000083-20576-1-git-send-email-aliguori@us.ibm.com>

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

I guess the same could be done for Xen but I'll let the Xen folks figure that
one out :-)

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
---
 configure |   40 +++++++++++++++++++++++++++++++++++++++-
 1 files changed, 39 insertions(+), 1 deletions(-)

diff --git a/configure b/configure
index a8ea688..04f121c 100755
--- a/configure
+++ b/configure
@@ -130,6 +130,7 @@ xen_ctrl_version=""
 linux_aio=""
 attr=""
 xfs=""
+tcg="yes"
 
 vhost_net="no"
 kvm="no"
@@ -643,6 +644,10 @@ for opt do
   ;;
   --enable-kvm) kvm="yes"
   ;;
+  --disable-tcg) tcg="no"
+  ;;
+  --enable-tcg) tcg="yes"
+  ;;
   --disable-spice) spice="no"
   ;;
   --enable-spice) spice="yes"
@@ -2877,7 +2882,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
@@ -3135,6 +3139,23 @@ if test "$static" = "no" -a "$user_pie" = "yes" ; then
   echo "QEMU_CFLAGS+=-fpie" > libdis-user/config.mak
 fi
 
+kvm_incompatible() {
+    if test "$kvm" = "yes" -a \
+      \( "$1" = "$cpu" -o \
+      \( "$1" = "ppcemb" -a "$cpu" = "ppc" \) -o \
+      \( "$1" = "ppc64"  -a "$cpu" = "ppc" \) -o \
+      \( "$1" = "ppc"    -a "$cpu" = "ppc64" \) -o \
+      \( "$1" = "ppcemb" -a "$cpu" = "ppc64" \) -o \
+      \( "$1" = "x86_64" -a "$cpu" = "i386"   \) -o \
+      \( "$1" = "i386"   -a "$cpu" = "x86_64" \) \) ; then
+	return 1
+    else
+	return 0
+    fi
+}
+
+target_list2=
+
 for target in $target_list; do
 target_dir="$target"
 config_target_mak=$target_dir/config-target.mak
@@ -3185,6 +3206,17 @@ case "$target" in
     ;;
 esac
 
+if test "$tcg" = "no"; then
+    if test "$target_softmmu" = "no"; then
+	continue;
+    fi
+    if kvm_incompatible "$target_arch2"; then
+	continue;
+    fi
+fi
+
+target_list2="$target $target_list2"
+
 mkdir -p $target_dir
 mkdir -p $target_dir/fpu
 mkdir -p $target_dir/tcg
@@ -3213,6 +3245,10 @@ TARGET_ARCH="$target_arch2"
 TARGET_BASE_ARCH=""
 TARGET_ABI_DIR=""
 
+if test "$tcg" = "yes"; then
+  echo "CONFIG_TCG=1" >> $config_target_mak
+fi
+
 case "$target_arch2" in
   i386)
     target_phys_bits=64
@@ -3598,6 +3634,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/cris slirp audio block net pc-bios/optionrom"
 DIRS="$DIRS pc-bios/spapr-rtas"
-- 
1.7.4.1

  reply	other threads:[~2011-09-02 21:48 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-09-02 21:47 [Qemu-devel] [RFC PATCH 0/5] Add configure flag to disable TCG Anthony Liguori
2011-09-02 21:47 ` Anthony Liguori [this message]
2011-09-02 21:48 ` [Qemu-devel] [PATCH 2/5] vl: don't expose TCG as a supported accelerator if TCG is disabled Anthony Liguori
2011-09-02 21:48 ` [Qemu-devel] [PATCH 3/5] tcg: add tcg_enabled() and stop compiling translate.o when " Anthony Liguori
2011-09-02 23:51   ` Peter Maydell
2011-09-02 21:48 ` [Qemu-devel] [PATCH 4/5] tcg: don't build tcg/tcg.o, tcg/optimize.o, or translate-all.o when TCG disabled Anthony Liguori
2011-09-03 12:07   ` Blue Swirl
2011-09-02 21:48 ` [Qemu-devel] [PATCH 5/5] tcg: don't build cpu-exec.o, op_helper.o, or fpu/softloat.o " Anthony Liguori
2011-09-02 23:26   ` Peter Maydell
2011-09-03 12:02   ` Blue Swirl
2011-09-03 11:58 ` [Qemu-devel] [RFC PATCH 0/5] Add configure flag to disable TCG Blue Swirl
2011-09-03 12:50   ` Alexander Graf
2011-09-05 14:53 ` Stefano Stabellini

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1315000083-20576-2-git-send-email-aliguori@us.ibm.com \
    --to=aliguori@us.ibm.com \
    --cc=agraf@suse.de \
    --cc=qemu-devel@nongnu.org \
    --cc=stefano.stabellini@eu.citrix.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).