Commit 07f4ddbf7ead5e01316b3579f7d7a11ac1f9489d
1 parent
5516d670
kqemu build fix
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1370 c046a42c-6fe2-441c-8c8c-71466251a162
Showing
2 changed files
with
22 additions
and
8 deletions
Makefile
| @@ -18,8 +18,12 @@ all: dyngen$(EXESUF) $(TOOLS) $(DOCS) | @@ -18,8 +18,12 @@ all: dyngen$(EXESUF) $(TOOLS) $(DOCS) | ||
| 18 | $(MAKE) -C $$d $@ || exit 1 ; \ | 18 | $(MAKE) -C $$d $@ || exit 1 ; \ |
| 19 | done | 19 | done |
| 20 | ifdef CONFIG_KQEMU | 20 | ifdef CONFIG_KQEMU |
| 21 | +ifdef CONFIG_WIN32 | ||
| 22 | + $(MAKE) -C kqemu -f Makefile.winnt | ||
| 23 | +else | ||
| 21 | $(MAKE) -C kqemu | 24 | $(MAKE) -C kqemu |
| 22 | endif | 25 | endif |
| 26 | +endif | ||
| 23 | 27 | ||
| 24 | qemu-img$(EXESUF): qemu-img.c block.c block-cow.c block-qcow.c aes.c block-vmdk.c block-cloop.c block-dmg.c | 28 | qemu-img$(EXESUF): qemu-img.c block.c block-cow.c block-qcow.c aes.c block-vmdk.c block-cloop.c block-dmg.c |
| 25 | $(CC) -DQEMU_TOOL $(CFLAGS) $(LDFLAGS) $(DEFINES) -o $@ $^ -lz $(LIBS) | 29 | $(CC) -DQEMU_TOOL $(CFLAGS) $(LDFLAGS) $(DEFINES) -o $@ $^ -lz $(LIBS) |
configure
| @@ -94,6 +94,9 @@ mingw32="yes" | @@ -94,6 +94,9 @@ mingw32="yes" | ||
| 94 | FreeBSD) | 94 | FreeBSD) |
| 95 | bsd="yes" | 95 | bsd="yes" |
| 96 | oss="yes" | 96 | oss="yes" |
| 97 | +if [ "$cpu" = "i386" ] ; then | ||
| 98 | + kqemu="yes" | ||
| 99 | +fi | ||
| 97 | ;; | 100 | ;; |
| 98 | NetBSD) | 101 | NetBSD) |
| 99 | bsd="yes" | 102 | bsd="yes" |
| @@ -110,7 +113,7 @@ darwin="yes" | @@ -110,7 +113,7 @@ darwin="yes" | ||
| 110 | *) | 113 | *) |
| 111 | oss="yes" | 114 | oss="yes" |
| 112 | linux="yes" | 115 | linux="yes" |
| 113 | -if [ "$cpu" = "i386" ] ; then | 116 | +if [ "$cpu" = "i386" -o "$cpu" = "x86_64" ] ; then |
| 114 | kqemu="yes" | 117 | kqemu="yes" |
| 115 | fi | 118 | fi |
| 116 | ;; | 119 | ;; |
| @@ -198,7 +201,9 @@ if test "$mingw32" = "yes" ; then | @@ -198,7 +201,9 @@ if test "$mingw32" = "yes" ; then | ||
| 198 | EXESUF=".exe" | 201 | EXESUF=".exe" |
| 199 | gdbstub="no" | 202 | gdbstub="no" |
| 200 | oss="no" | 203 | oss="no" |
| 201 | - kqemu="no" | 204 | + if [ "$cpu" = "i386" ] ; then |
| 205 | + kqemu="yes" | ||
| 206 | + fi | ||
| 202 | fi | 207 | fi |
| 203 | 208 | ||
| 204 | if test -z "$target_list" ; then | 209 | if test -z "$target_list" ; then |
| @@ -350,7 +355,7 @@ docdir="$prefix/share/doc/qemu" | @@ -350,7 +355,7 @@ docdir="$prefix/share/doc/qemu" | ||
| 350 | bindir="$prefix/bin" | 355 | bindir="$prefix/bin" |
| 351 | fi | 356 | fi |
| 352 | 357 | ||
| 353 | -# kernel module support | 358 | +# kqemu support |
| 354 | if test $kqemu = "yes" ; then | 359 | if test $kqemu = "yes" ; then |
| 355 | # test if the source code is installed | 360 | # test if the source code is installed |
| 356 | if test '!' -f "kqemu/Makefile" ; then | 361 | if test '!' -f "kqemu/Makefile" ; then |
| @@ -358,7 +363,8 @@ if test $kqemu = "yes" ; then | @@ -358,7 +363,8 @@ if test $kqemu = "yes" ; then | ||
| 358 | fi | 363 | fi |
| 359 | fi | 364 | fi |
| 360 | 365 | ||
| 361 | -if test $kqemu = "yes" ; then | 366 | +# Linux specific kqemu configuration |
| 367 | +if test $kqemu = "yes" -a $linux = "yes" ; then | ||
| 362 | # find the kernel path | 368 | # find the kernel path |
| 363 | if test -z "$kernel_path" ; then | 369 | if test -z "$kernel_path" ; then |
| 364 | kernel_version=`uname -r` | 370 | kernel_version=`uname -r` |
| @@ -388,7 +394,7 @@ fi | @@ -388,7 +394,7 @@ fi | ||
| 388 | 394 | ||
| 389 | fi # kqemu | 395 | fi # kqemu |
| 390 | 396 | ||
| 391 | -fi # kqemu | 397 | +fi # kqemu and linux |
| 392 | 398 | ||
| 393 | 399 | ||
| 394 | echo "Install prefix $prefix" | 400 | echo "Install prefix $prefix" |
| @@ -418,9 +424,10 @@ if test $fmod = "yes"; then | @@ -418,9 +424,10 @@ if test $fmod = "yes"; then | ||
| 418 | echo -n " (lib='$fmod_lib' include='$fmod_inc')" | 424 | echo -n " (lib='$fmod_lib' include='$fmod_inc')" |
| 419 | fi | 425 | fi |
| 420 | echo "" | 426 | echo "" |
| 421 | -if test $kqemu = "yes" ; then | 427 | +echo "kqemu support $kqemu" |
| 428 | +if test $kqemu = "yes" -a $linux = "yes" ; then | ||
| 422 | echo "" | 429 | echo "" |
| 423 | -echo "KQEMU module configuration:" | 430 | +echo "KQEMU Linux module configuration:" |
| 424 | echo "kernel sources $kernel_path" | 431 | echo "kernel sources $kernel_path" |
| 425 | echo -n "kbuild type " | 432 | echo -n "kbuild type " |
| 426 | if test $kbuild26 = "yes"; then | 433 | if test $kbuild26 = "yes"; then |
| @@ -617,7 +624,7 @@ if test "$target_cpu" = "i386" ; then | @@ -617,7 +624,7 @@ if test "$target_cpu" = "i386" ; then | ||
| 617 | echo "TARGET_ARCH=i386" >> $config_mak | 624 | echo "TARGET_ARCH=i386" >> $config_mak |
| 618 | echo "#define TARGET_ARCH \"i386\"" >> $config_h | 625 | echo "#define TARGET_ARCH \"i386\"" >> $config_h |
| 619 | echo "#define TARGET_I386 1" >> $config_h | 626 | echo "#define TARGET_I386 1" >> $config_h |
| 620 | - if test $kqemu = "yes" -a "$target_softmmu" = "yes" ; then | 627 | + if test $kqemu = "yes" -a "$target_softmmu" = "yes" -a $cpu = "i386" ; then |
| 621 | echo "#define USE_KQEMU 1" >> $config_h | 628 | echo "#define USE_KQEMU 1" >> $config_h |
| 622 | fi | 629 | fi |
| 623 | elif test "$target_cpu" = "arm" -o "$target_cpu" = "armeb" ; then | 630 | elif test "$target_cpu" = "arm" -o "$target_cpu" = "armeb" ; then |
| @@ -642,6 +649,9 @@ elif test "$target_cpu" = "x86_64" ; then | @@ -642,6 +649,9 @@ elif test "$target_cpu" = "x86_64" ; then | ||
| 642 | echo "#define TARGET_ARCH \"x86_64\"" >> $config_h | 649 | echo "#define TARGET_ARCH \"x86_64\"" >> $config_h |
| 643 | echo "#define TARGET_I386 1" >> $config_h | 650 | echo "#define TARGET_I386 1" >> $config_h |
| 644 | echo "#define TARGET_X86_64 1" >> $config_h | 651 | echo "#define TARGET_X86_64 1" >> $config_h |
| 652 | + if test $kqemu = "yes" -a "$target_softmmu" = "yes" -a $cpu = "x86_64" ; then | ||
| 653 | + echo "#define USE_KQEMU 1" >> $config_h | ||
| 654 | + fi | ||
| 645 | else | 655 | else |
| 646 | echo "Unsupported target CPU" | 656 | echo "Unsupported target CPU" |
| 647 | exit 1 | 657 | exit 1 |