Commit 4ca1a9c62af1b98a359254546cd8e9999c892670
1 parent
153859be
Fix generation of CONFIG_KVM
When configuring for several targets, some with KVM and some without, CONFIG_KVM was accidentally disabled for some of the targets. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Showing
1 changed file
with
8 additions
and
7 deletions
configure
| @@ -1862,17 +1862,18 @@ target_nptl="no" | @@ -1862,17 +1862,18 @@ target_nptl="no" | ||
| 1862 | interp_prefix1=`echo "$interp_prefix" | sed "s/%M/$target_cpu/g"` | 1862 | interp_prefix1=`echo "$interp_prefix" | sed "s/%M/$target_cpu/g"` |
| 1863 | echo "#define CONFIG_QEMU_PREFIX \"$interp_prefix1\"" >> $config_h | 1863 | echo "#define CONFIG_QEMU_PREFIX \"$interp_prefix1\"" >> $config_h |
| 1864 | gdb_xml_files="" | 1864 | gdb_xml_files="" |
| 1865 | +target_kvm="$kvm" | ||
| 1865 | 1866 | ||
| 1866 | # Make sure the target and host cpus are compatible | 1867 | # Make sure the target and host cpus are compatible |
| 1867 | -if test "$kvm" = "yes" -a ! \( "$target_cpu" = "$cpu" -o \ | 1868 | +if test ! \( "$target_cpu" = "$cpu" -o \ |
| 1868 | \( "$target_cpu" = "ppcemb" -a "$cpu" = "ppc" \) -o \ | 1869 | \( "$target_cpu" = "ppcemb" -a "$cpu" = "ppc" \) -o \ |
| 1869 | \( "$target_cpu" = "x86_64" -a "$cpu" = "i386" \) -o \ | 1870 | \( "$target_cpu" = "x86_64" -a "$cpu" = "i386" \) -o \ |
| 1870 | \( "$target_cpu" = "i386" -a "$cpu" = "x86_64" \) \) ; then | 1871 | \( "$target_cpu" = "i386" -a "$cpu" = "x86_64" \) \) ; then |
| 1871 | - kvm="no" | 1872 | + target_kvm="no" |
| 1872 | fi | 1873 | fi |
| 1873 | # Disable KVM for linux-user | 1874 | # Disable KVM for linux-user |
| 1874 | -if test "$kvm" = "yes" -a "$target_softmmu" = "no" ; then | ||
| 1875 | - kvm="no" | 1875 | +if test "$target_softmmu" = "no" ; then |
| 1876 | + target_kvm="no" | ||
| 1876 | fi | 1877 | fi |
| 1877 | 1878 | ||
| 1878 | case "$target_cpu" in | 1879 | case "$target_cpu" in |
| @@ -1885,7 +1886,7 @@ case "$target_cpu" in | @@ -1885,7 +1886,7 @@ case "$target_cpu" in | ||
| 1885 | echo "CONFIG_KQEMU=yes" >> $config_mak | 1886 | echo "CONFIG_KQEMU=yes" >> $config_mak |
| 1886 | echo "#define CONFIG_KQEMU 1" >> $config_h | 1887 | echo "#define CONFIG_KQEMU 1" >> $config_h |
| 1887 | fi | 1888 | fi |
| 1888 | - if test "$kvm" = "yes" ; then | 1889 | + if test "$target_kvm" = "yes" ; then |
| 1889 | echo "CONFIG_KVM=yes" >> $config_mak | 1890 | echo "CONFIG_KVM=yes" >> $config_mak |
| 1890 | echo "KVM_CFLAGS=$kvm_cflags" >> $config_mak | 1891 | echo "KVM_CFLAGS=$kvm_cflags" >> $config_mak |
| 1891 | echo "#define CONFIG_KVM 1" >> $config_h | 1892 | echo "#define CONFIG_KVM 1" >> $config_h |
| @@ -1907,7 +1908,7 @@ case "$target_cpu" in | @@ -1907,7 +1908,7 @@ case "$target_cpu" in | ||
| 1907 | echo "CONFIG_KQEMU=yes" >> $config_mak | 1908 | echo "CONFIG_KQEMU=yes" >> $config_mak |
| 1908 | echo "#define CONFIG_KQEMU 1" >> $config_h | 1909 | echo "#define CONFIG_KQEMU 1" >> $config_h |
| 1909 | fi | 1910 | fi |
| 1910 | - if test "$kvm" = "yes" ; then | 1911 | + if test "$target_kvm" = "yes" ; then |
| 1911 | echo "CONFIG_KVM=yes" >> $config_mak | 1912 | echo "CONFIG_KVM=yes" >> $config_mak |
| 1912 | echo "KVM_CFLAGS=$kvm_cflags" >> $config_mak | 1913 | echo "KVM_CFLAGS=$kvm_cflags" >> $config_mak |
| 1913 | echo "#define CONFIG_KVM 1" >> $config_h | 1914 | echo "#define CONFIG_KVM 1" >> $config_h |
| @@ -1992,7 +1993,7 @@ case "$target_cpu" in | @@ -1992,7 +1993,7 @@ case "$target_cpu" in | ||
| 1992 | echo "#define TARGET_ARCH \"ppcemb\"" >> $config_h | 1993 | echo "#define TARGET_ARCH \"ppcemb\"" >> $config_h |
| 1993 | echo "#define TARGET_PPC 1" >> $config_h | 1994 | echo "#define TARGET_PPC 1" >> $config_h |
| 1994 | echo "#define TARGET_PPCEMB 1" >> $config_h | 1995 | echo "#define TARGET_PPCEMB 1" >> $config_h |
| 1995 | - if test "$kvm" = "yes" ; then | 1996 | + if test "$target_kvm" = "yes" ; then |
| 1996 | echo "CONFIG_KVM=yes" >> $config_mak | 1997 | echo "CONFIG_KVM=yes" >> $config_mak |
| 1997 | echo "KVM_CFLAGS=$kvm_cflags" >> $config_mak | 1998 | echo "KVM_CFLAGS=$kvm_cflags" >> $config_mak |
| 1998 | echo "#define CONFIG_KVM 1" >> $config_h | 1999 | echo "#define CONFIG_KVM 1" >> $config_h |