doc: Update mingw cross compile instructions

The "Cross compilation for Windows with Linux" section of qemu-doc.texi
still instructs the user to use 'configure --enable-mingw32'
even after the option was removed in Aug 2008:
http://git.savannah.gnu.org/cgit/qemu.git/commit/?id=cd01b4a312248dd4e12c3d389d1a349cea4015d8

This documentation only change updates the instructions to:
* Remove use of '--enable-mingw32' in the configure example
* Correct the 'sdl-config' script name
* Remove references to i386-mingw32msvc.tar.gz which no longer exists in
  recent SDL releases
* Document the zlib dependency

Signed-off-by: Scott Tsai <scottt.tw@gmail.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
This commit is contained in:
Scott Tsai 2010-01-30 03:28:58 +08:00 committed by Anthony Liguori
parent afc535acb5
commit d0a96f3d2a
1 changed files with 31 additions and 14 deletions

View File

@ -2313,11 +2313,14 @@ instructions in the download section and the FAQ.
@item Download @item Download
the MinGW development library of SDL 1.2.x the MinGW development library of SDL 1.2.x
(@file{SDL-devel-1.2.x-@/mingw32.tar.gz}) from (@file{SDL-devel-1.2.x-@/mingw32.tar.gz}) from
@url{http://www.libsdl.org}. Unpack it in a temporary place, and @url{http://www.libsdl.org}. Unpack it in a temporary place and
unpack the archive @file{i386-mingw32msvc.tar.gz} in the MinGW tool edit the @file{sdl-config} script so that it gives the
directory. Edit the @file{sdl-config} script so that it gives the
correct SDL directory when invoked. correct SDL directory when invoked.
@item Install the MinGW version of zlib and make sure
@file{zlib.h} and @file{libz.dll.a} are in
MingGW's default header and linker search paths.
@item Extract the current version of QEMU. @item Extract the current version of QEMU.
@item Start the MSYS shell (file @file{msys.bat}). @item Start the MSYS shell (file @file{msys.bat}).
@ -2340,29 +2343,43 @@ correct SDL directory when invoked.
Install the MinGW cross compilation tools available at Install the MinGW cross compilation tools available at
@url{http://www.mingw.org/}. @url{http://www.mingw.org/}.
@item @item Download
Install the Win32 version of SDL (@url{http://www.libsdl.org}) by the MinGW development library of SDL 1.2.x
unpacking @file{i386-mingw32msvc.tar.gz}. Set up the PATH environment (@file{SDL-devel-1.2.x-@/mingw32.tar.gz}) from
variable so that @file{i386-mingw32msvc-sdl-config} can be launched by @url{http://www.libsdl.org}. Unpack it in a temporary place and
edit the @file{sdl-config} script so that it gives the
correct SDL directory when invoked. Set up the @code{PATH} environment
variable so that @file{sdl-config} can be launched by
the QEMU configuration script. the QEMU configuration script.
@item Install the MinGW version of zlib and make sure
@file{zlib.h} and @file{libz.dll.a} are in
MingGW's default header and linker search paths.
@item @item
Configure QEMU for Windows cross compilation: Configure QEMU for Windows cross compilation:
@example @example
./configure --enable-mingw32 PATH=/usr/i686-pc-mingw32/sys-root/mingw/bin:$PATH ./configure --cross-prefix='i686-pc-mingw32-'
@end example @end example
If necessary, you can change the cross-prefix according to the prefix The example assumes @file{sdl-config} is installed under @file{/usr/i686-pc-mingw32/sys-root/mingw/bin} and
chosen for the MinGW tools with --cross-prefix. You can also use MinGW cross compilation tools have names like @file{i686-pc-mingw32-gcc} and @file{i686-pc-mingw32-strip}.
--prefix to set the Win32 install path. We set the @code{PATH} environment variable to ensure the MingW version of @file{sdl-config} is used and
use --cross-prefix to specify the name of the cross compiler.
You can also use --prefix to set the Win32 install path which defaults to @file{c:/Program Files/Qemu}.
Under Fedora Linux, you can run:
@example
yum -y install mingw32-gcc mingw32-SDL mingw32-zlib
@end example
to get a suitable cross compilation environment.
@item You can install QEMU in the installation directory by typing @item You can install QEMU in the installation directory by typing
@file{make install}. Don't forget to copy @file{SDL.dll} in the @code{make install}. Don't forget to copy @file{SDL.dll} and @file{zlib1.dll} into the
installation directory. installation directory.
@end itemize @end itemize
Note: Currently, Wine does not seem able to launch Wine can be used to launch the resulting qemu.exe compiled for Win32.
QEMU for Win32.
@node Mac OS X @node Mac OS X
@section Mac OS X @section Mac OS X