Skip to contentSkip to conversation

[5046] Fix windows build

Qemu-devel Anthony Liguori 1 participant 1 message Aug 21, 2008 Kbuild

lore
Share & tools
lore
#0 lore raw

Revision: 5046

          http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=5046
Author:   aliguori
Date:     2008-08-21 19:25:45 +0000 (Thu, 21 Aug 2008)

Log Message:
-----------
Fix windows build

Right now, the Windows build is broken because of NBD. Using a mingw32 cross compiler is also badly broken.

This patch fixes the Windows build by stubbing out NBD support until someone fixes it for Windows. It also santizing the mingw32 cross compiler support by replacing the --enable-mingw32 option with a compiler check to determine if we're on windows or not.

Also remove the weird SDL pseudo-detection for mingw32 using a cross compiler. The hardcoded sdl-config name is seemly arbitrary. If you cross compiler SDL correctly and modify your PATH variable appropriately, it will Just Work when cross compiling.

The audio driver detection is also broken for cross compiling so you have to specify the audio drivers explicitly for now.

Modified Paths:
--------------
trunk/Makefile
trunk/block.c
trunk/configure

Modified: trunk/Makefile
===================================================================

Makefile +11 -4
@@ -46,7 +46,10 @@
 BLOCK_OBJS=cutils.o qemu-malloc.o
 BLOCK_OBJS+=block-cow.o block-qcow.o aes.o block-vmdk.o block-cloop.o
 BLOCK_OBJS+=block-dmg.o block-bochs.o block-vpc.o block-vvfat.o
-BLOCK_OBJS+=block-qcow2.o block-parallels.o block-nbd.o
+BLOCK_OBJS+=block-qcow2.o block-parallels.o
+ifndef CONFIG_WIN32
+BLOCK_OBJS+=block-nbd.o
+endif
 
 ######################################################################
 # libqemu_common.a: Target independent part of system emulation. The
@@ -54,10 +57,14 @@
 # system emulation, i.e. a single QEMU executable should support all
 # CPUs and machines.
 
-OBJS=nbd.o $(BLOCK_OBJS)
+OBJS=$(BLOCK_OBJS)
 OBJS+=readline.o console.o
 OBJS+=block.o
 
+ifndef CONFIG_WIN32
+OBJS+=nbd.o
+endif
+
 OBJS+=irq.o
 OBJS+=i2c.o smbus.o smbus_eeprom.o max7310.o max111x.o wm8750.o
 OBJS+=ssd0303.o ssd0323.o ads7846.o stellaris_input.o twl92230.o
@@ -166,11 +173,11 @@
 	rm -f $@ 
 	$(AR) rcs $@ $(USER_OBJS)
 
-QEMU_IMG_BLOCK_OBJS = nbd.o $(BLOCK_OBJS)
+QEMU_IMG_BLOCK_OBJS = $(BLOCK_OBJS)
 ifdef CONFIG_WIN32
 QEMU_IMG_BLOCK_OBJS += qemu-img-block-raw-win32.o
 else
-QEMU_IMG_BLOCK_OBJS += qemu-img-block-raw-posix.o
+QEMU_IMG_BLOCK_OBJS += nbd.o qemu-img-block-raw-posix.o
 endif
 
 ######################################################################

Modified: trunk/block.c
===================================================================

block.c +2 -0
@@ -1332,7 +1332,9 @@
     bdrv_register(&bdrv_vvfat);
     bdrv_register(&bdrv_qcow2);
     bdrv_register(&bdrv_parallels);
+#ifndef _WIN32
     bdrv_register(&bdrv_nbd);
+#endif
 }
 
 void *qemu_aio_get(BlockDriverState *bs, BlockDriverCompletionFunc *cb,

Modified: trunk/configure
===================================================================

configure +42 -38

124 lines not on this page · raw message