Hi everyone,
Apologies for the rambling email, but here's a bit of a brain-dump. I don't know how much of this people already know about ...
After banging my head against a wall for the past week or so, I've put together a script that builds a cross-compiling mingw. The cross-compiler should be suitable for building .EXE conformance test executables and is available from: http://www.astro.gla.ac.uk/users/paulm/Scripts/build-mingw-cross.sh Have a look at the top of the script to see how to get things working. (yes, I know /. has just done this, but their HOWTO is old, circa '99)
That should be enough to get mingw for cross-compiling under wine, but there's still problems with the crosstest target for me.
Using the current CVS, crosstest depends on winebuild. But the cross-compilation doesn't actually use winebuild. Worse, it fails whilst trying to building winebuild (missing libraries), if you haven't already built wine. I guess winebuild is missing some dependencies.
A simple patch: --- Index: dlls/Makefile.in =================================================================== RCS file: /home/wine/wine/dlls/Makefile.in,v retrieving revision 1.168 diff -u -r1.168 Makefile.in --- dlls/Makefile.in 24 Jan 2003 01:08:15 -0000 1.168 +++ dlls/Makefile.in 4 Feb 2003 00:15:22 -0000 @@ -1181,7 +1181,6 @@ x11drv/x11drv.spec.def: $(WINEBUILD)
$(SUBDIRS): $(IMPORT_LIBS:%=%.$(IMPLIBEXT)) -$(SUBDIRS:%=%/__crosstest__): $(IMPORT_LIBS:%=%.a)
# Map library name to the corresponding directory
--- fixes this, although I'm not 100% its correct. It stops the .a libraries from being built, but are they needed for crosstest?
After this, it builds the advapi32 tests ok, but there's problems parsing the files include/winsock{,2}.h when it tries to build the dsound tests...
Just thought people would be interested.
---- Paul Millar
Hello!
On Tue, Feb 04, 2003 at 09:08:02AM +0000, Paul Millar wrote:
Apologies for the rambling email, but here's a bit of a brain-dump. I don't know how much of this people already know about ...
After banging my head against a wall for the past week or so, I've put together a script that builds a cross-compiling mingw. The cross-compiler should be suitable for building .EXE conformance test executables and is available from: http://www.astro.gla.ac.uk/users/paulm/Scripts/build-mingw-cross.sh
Thanks for the script.
That should be enough to get mingw for cross-compiling under wine, but there's still problems with the crosstest target for me.
Using the current CVS, crosstest depends on winebuild. But the cross-compilation doesn't actually use winebuild. Worse, it fails whilst trying to building winebuild (missing libraries), if you haven't already built wine. I guess winebuild is missing some dependencies.
[patch snipped]
fixes this, although I'm not 100% its correct. It stops the .a libraries from being built, but are they needed for crosstest?
Probably they are needed for things mingw hasn't an .a for like urlmon but ... having all the *.a in $wine/dlls makes the crosstest build fail with linker errors: i586-mingw32msvc-gcc registry.cross.o testlist.cross.o -o advapi32_crosstest.exe -L../../../ dlls -ladvapi32 -lkernel32 -lntdll -lm ../../../dlls/libmsvcrt.a(ds00432.o)(.text+0x0): multiple definition of `atexit' /usr/local/mingw/lib/gcc-lib/i586-mingw32msvc/3.2.1/../../../../i586-mingw32msvc/lib/crt2.o(.text+0x230):/home/michi/work/mingw/build-mingw-runtime/../mingw-runtime-2.3/crt1.c:259: first defined here ../../../dlls/libmsvcrt.a(ds00312.o)(.text+0x0): multiple definition of `_onexit' /usr/local/mingw/lib/gcc-lib/i586-mingw32msvc/3.2.1/../../../../i586-mingw32msvc/lib/crt2.o(.text+0x250):/home/michi/work/mingw/build-mingw-runtime/../mingw-runtime-2.3/crt1.c:267: first defined here So i first do a "rm $wine/dlls/*.a" before doing "make crosstest"
After this, it builds the advapi32 tests ok, but there's problems parsing the files include/winsock{,2}.h when it tries to build the dsound tests...
Francois sent once a patch to fix thix. Should be in the archives.
bye michael