aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoraliguori <aliguori@c046a42c-6fe2-441c-8c8c-71466251a162>2008-11-05 19:59:25 +0000
committeraliguori <aliguori@c046a42c-6fe2-441c-8c8c-71466251a162>2008-11-05 19:59:25 +0000
commit5985eceeaa45d35c4a447c164627a1aa5e23319a (patch)
treef40d8b5052dc94eccf247421f0aaf384cdc1fb85
parent5c6602c5468a1408686abce6cdb2617ee462a333 (diff)
Allow KVM to be used on either 32-bit or 64-bit x86
Inspired by a patch from Glauber Costa. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5631 c046a42c-6fe2-441c-8c8c-71466251a162
-rwxr-xr-xconfigure8
1 files changed, 5 insertions, 3 deletions
diff --git a/configure b/configure
index 067c3c572d..cf76e9c357 100755
--- a/configure
+++ b/configure
@@ -1447,8 +1447,10 @@ interp_prefix1=`echo "$interp_prefix" | sed "s/%M/$target_cpu/g"`
echo "#define CONFIG_QEMU_PREFIX \"$interp_prefix1\"" >> $config_h
gdb_xml_files=""
-# FIXME allow i386 to build on x86_64 and vice versa
-if test "$kvm" = "yes" -a "$target_cpu" != "$cpu" ; then
+# Make sure the target and host cpus are compatible
+if test "$kvm" = "yes" -a ! \( "$target_cpu" = "$cpu" -o \
+ \( "$target_cpu" = "x86_64" -a "$cpu" = "i386" \) -o \
+ \( "$target_cpu" = "i386" -a "$cpu" = "x86_64" \) \) ; then
kvm="no"
fi
# Disable KVM for linux-user
@@ -1468,7 +1470,7 @@ case "$target_cpu" in
if test "$kvm" = "yes" ; then
echo "CONFIG_KVM=yes" >> $config_mak
echo "KVM_CFLAGS=$kvm_cflags" >> $config_mak
- echo "#define CONFIG_KVM" >> $config_h
+ echo "#define CONFIG_KVM 1" >> $config_h
fi
gcc3minver=`$cc --version 2> /dev/null| fgrep "(GCC) 3." | awk '{ print $3 }' | cut -f2 -d.`
if test -n "$gcc3minver" && test $gcc3minver -gt 3