Breakthrough! Can now crosscompile unit tests!

Alexandre Julliard julliard at
Sat May 11 22:18:49 CDT 2002

Jakob Eriksson <jakob at> writes:

> What I want is for the Wine configure to detect that mingw32
> is present, then modify Makefiles so that when "make tests"
> is run, EXE-files are modified.
> I also don't want to do #ifdef REAL_EXE or whatever in every
> c-file, I want all that to happen automagically in wine/test.h !
> I want the configure script to take care of all that and always
> compile unit tests twice, once for linux target, once for Windows
> target. (EXE)

OK I have hacked the makefiles to make cross-compilation
possible. It's a bit tricky because some parts of Wine need to be
compiled twice, since they are used both at compile-time and at
run-time. The way to do it is:

- create 3 empty directories: wine-src, wine-gcc, wine-mingw

- put the full source in wine-src, making sure you don't have any
  binaries in there

- in wine-gcc, do:
     make depend
     make tools

- then in wine-mingw do:
     ../wine-src/configure --host=i586-mingw32msvc --with-wine-tools=../wine-gcc
     make depend

This should build a full cross-compiled Wine. Of course most of it
doesn't actually compile at this point, but fixing that is left as an
exercise for the reader...

Alexandre Julliard
julliard at

More information about the wine-devel mailing list