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 | 18 | $(MAKE) -C $$d $@ || exit 1 ; \ |
19 | 19 | done |
20 | 20 | ifdef CONFIG_KQEMU |
21 | +ifdef CONFIG_WIN32 | |
22 | + $(MAKE) -C kqemu -f Makefile.winnt | |
23 | +else | |
21 | 24 | $(MAKE) -C kqemu |
22 | 25 | endif |
26 | +endif | |
23 | 27 | |
24 | 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 | 29 | $(CC) -DQEMU_TOOL $(CFLAGS) $(LDFLAGS) $(DEFINES) -o $@ $^ -lz $(LIBS) | ... | ... |
configure
... | ... | @@ -94,6 +94,9 @@ mingw32="yes" |
94 | 94 | FreeBSD) |
95 | 95 | bsd="yes" |
96 | 96 | oss="yes" |
97 | +if [ "$cpu" = "i386" ] ; then | |
98 | + kqemu="yes" | |
99 | +fi | |
97 | 100 | ;; |
98 | 101 | NetBSD) |
99 | 102 | bsd="yes" |
... | ... | @@ -110,7 +113,7 @@ darwin="yes" |
110 | 113 | *) |
111 | 114 | oss="yes" |
112 | 115 | linux="yes" |
113 | -if [ "$cpu" = "i386" ] ; then | |
116 | +if [ "$cpu" = "i386" -o "$cpu" = "x86_64" ] ; then | |
114 | 117 | kqemu="yes" |
115 | 118 | fi |
116 | 119 | ;; |
... | ... | @@ -198,7 +201,9 @@ if test "$mingw32" = "yes" ; then |
198 | 201 | EXESUF=".exe" |
199 | 202 | gdbstub="no" |
200 | 203 | oss="no" |
201 | - kqemu="no" | |
204 | + if [ "$cpu" = "i386" ] ; then | |
205 | + kqemu="yes" | |
206 | + fi | |
202 | 207 | fi |
203 | 208 | |
204 | 209 | if test -z "$target_list" ; then |
... | ... | @@ -350,7 +355,7 @@ docdir="$prefix/share/doc/qemu" |
350 | 355 | bindir="$prefix/bin" |
351 | 356 | fi |
352 | 357 | |
353 | -# kernel module support | |
358 | +# kqemu support | |
354 | 359 | if test $kqemu = "yes" ; then |
355 | 360 | # test if the source code is installed |
356 | 361 | if test '!' -f "kqemu/Makefile" ; then |
... | ... | @@ -358,7 +363,8 @@ if test $kqemu = "yes" ; then |
358 | 363 | fi |
359 | 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 | 368 | # find the kernel path |
363 | 369 | if test -z "$kernel_path" ; then |
364 | 370 | kernel_version=`uname -r` |
... | ... | @@ -388,7 +394,7 @@ fi |
388 | 394 | |
389 | 395 | fi # kqemu |
390 | 396 | |
391 | -fi # kqemu | |
397 | +fi # kqemu and linux | |
392 | 398 | |
393 | 399 | |
394 | 400 | echo "Install prefix $prefix" |
... | ... | @@ -418,9 +424,10 @@ if test $fmod = "yes"; then |
418 | 424 | echo -n " (lib='$fmod_lib' include='$fmod_inc')" |
419 | 425 | fi |
420 | 426 | echo "" |
421 | -if test $kqemu = "yes" ; then | |
427 | +echo "kqemu support $kqemu" | |
428 | +if test $kqemu = "yes" -a $linux = "yes" ; then | |
422 | 429 | echo "" |
423 | -echo "KQEMU module configuration:" | |
430 | +echo "KQEMU Linux module configuration:" | |
424 | 431 | echo "kernel sources $kernel_path" |
425 | 432 | echo -n "kbuild type " |
426 | 433 | if test $kbuild26 = "yes"; then |
... | ... | @@ -617,7 +624,7 @@ if test "$target_cpu" = "i386" ; then |
617 | 624 | echo "TARGET_ARCH=i386" >> $config_mak |
618 | 625 | echo "#define TARGET_ARCH \"i386\"" >> $config_h |
619 | 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 | 628 | echo "#define USE_KQEMU 1" >> $config_h |
622 | 629 | fi |
623 | 630 | elif test "$target_cpu" = "arm" -o "$target_cpu" = "armeb" ; then |
... | ... | @@ -642,6 +649,9 @@ elif test "$target_cpu" = "x86_64" ; then |
642 | 649 | echo "#define TARGET_ARCH \"x86_64\"" >> $config_h |
643 | 650 | echo "#define TARGET_I386 1" >> $config_h |
644 | 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 | 655 | else |
646 | 656 | echo "Unsupported target CPU" |
647 | 657 | exit 1 | ... | ... |