Skip to contentSkip to conversation

qemu on Cygwin

Qemu-devel Alexander Voropay 4 participants 5 messages Jan 31, 2007 – Feb 4, 2007 Kbuild

lore
Share & tools
lore
#0 lore raw

Hi!

Did anyone try the latest CVS qemu on Cygwin ?

The build environment adds spacial "-mno-cygwin" option
which among other effects removes defaul *.h path (/usr/include/) from the search list.

For example:

-- a.c --
#include <zlib.h>
main () {}
----

$ gcc -c a.c    --- OK
$ gcc -mno-cygwin -c a.c
a.c:1:18: zlib.h: No such file or directory

--
-=AV=-

#1 lore raw
Quoted 8 lines

Hi!

Did anyone try the latest CVS qemu on Cygwin ?

The build environment adds spacial "-mno-cygwin" option
which among other effects removes defaul *.h path (/usr/include/) from the search list.

Default path with -mno-cygwin is /usr/include/mingw, so zlib.h must be installed there...

You can see the search list with "gcc -mno-cygwin -E -v -".

Stefan

#2 lore raw
In reply to Alexander Voropay

Hi,

Quoted 5 lines · Alexander Voropay

Did anyone try the latest CVS qemu on Cygwin ?

The build environment adds spacial "-mno-cygwin" option
which among other effects removes defaul *.h path (/usr/include/)

Quoted 1 line

from the search list.

AFAICT this is due to SDL. I did not succeed in compiling any SDL related stuff in cygwin, but then, I did not really try, since the MinGW compilation is easy enough. (Also, the executables are slightly faster, since they don't have to emulate a POSIX layer on top of the Windows crAPI.)

Ciao,
Dscho

#3 lore raw
Quoted 3 lines · Johannes Schindelin
Quoted 1 line

Did anyone try the latest CVS qemu on Cygwin ?

AFAICT this is due to SDL. I did not succeed in compiling any SDL related stuff in cygwin, but then, I did not really try, since the MinGW compilation is easy enough.

I've successfully compiled SDL 1.2.11 on the fresh-installed Cygwin 1.5.24. The following test SDL application works:
http://www.cse.nd.edu/courses/cse20211/www/code/sdl.html

The SDL/test contains a bunch of SDL testing applications. Most of them works too, even sound- and OpenGL related.

--
-=AV=-

#4 lore raw

Hi,

Quoted 9 lines · Alexander Voropay
Quoted 5 lines · Johannes Schindelin
Quoted 1 line

Did anyone try the latest CVS qemu on Cygwin ?

AFAICT this is due to SDL. I did not succeed in compiling any SDL related stuff in cygwin, but then, I did not really try, since the MinGW compilation is easy enough.

I've successfully compiled SDL 1.2.11 on the fresh-installed Cygwin

1.5.24.

Quoted 6 lines

The following test SDL application works:
http://www.cse.nd.edu/courses/cse20211/www/code/sdl.html

The SDL/test contains a bunch of SDL testing applications. Most of them works too, even sound- and OpenGL related.

sdl-config adds -mno-cygwin option so that SDL on Cygwin uses MinGW compiler.
An attached patch makes compile on Cygwin. But I have to downgrade mingw-runtime from 3.11 to 3.10.

Regards,
Kazu

Index: Makefile.target
===================================================================
RCS file: /sources/qemu/qemu/Makefile.target,v
retrieving revision 1.144

Makefile.target +1 -0
diff -u -r1.144 Makefile.target
@@ -177,6 +177,7 @@
 BASE_LDFLAGS+=-Wl,-segaddr,__STD_PROG_ZONE,0x1000 -image_base 0x0e000000
 endif
 
+BASE_CFLAGS+=$(OS_CFLAGS)
 OP_CFLAGS+=$(OS_CFLAGS)
 
 #########################################################