Re: Cross compiling tests

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 12 Apr 2003, Alexandre Julliard wrote:

> The problem is that Mingw doesn't include import libraries for all the
> dlls we need, so some tests will fail to link. A better solution might
> be to give priority to Mingw libraries while still falling back to the
> Wine ones if needed.

What about this one then? The MinGW linker has an option that allows us
to fudge errors of type "multiple definitions of 'atexit'". With this 
patch tests link against Wine *and* MinGW import libraries, so more tests
compile, link and run.

urlmon is OK now since we still link against Wine imports. Thanks to 
your patch to the dsound test that one is OK too. Only one left failing
is oleaut32. I'm working on getting that one fixed as well. The
natively built test needs libuuid which is specified in $(EXTRALIBS),
but $(EXTRALIBS) is not specified in the linking target for cross 
compiled tests.


Index: configure.ac
===================================================================
RCS file: /home/wine/wine/configure.ac,v
retrieving revision 1.148
diff -u -r1.148 configure.ac
--- configure.ac	12 Apr 2003 00:00:57 -0000	1.148
+++ configure.ac	13 Apr 2003 19:52:21 -0000
@@ -846,11 +846,16 @@
 
     dnl Check for cross compiler to build test programs
     AC_SUBST(CROSSTEST,"")
+    AC_SUBST(LDCROSSFLAGS,"")
     if test "$cross_compiling" = "no"
     then
       AC_CHECK_PROGS(CROSSCC,i586-mingw32msvc-gcc i386-mingw32-gcc,false)
       AC_CHECK_PROGS(DLLTOOL,i586-mingw32msvc-dlltool i386-mingw32-dlltool,false)
-      if test "$CROSSCC" != "false"; then CROSSTEST="\$(CROSSTEST)"; fi
+      if test "$CROSSCC" != "false"
+      then
+        CROSSTEST="\$(CROSSTEST)"
+        LDCROSSFLAGS="-Wl,--allow-multiple-definition"
+      fi
     fi
     ;;
 esac
Index: dlls/Maketest.rules.in
===================================================================
RCS file: /home/wine/wine/dlls/Maketest.rules.in,v
retrieving revision 1.21
diff -u -r1.21 Maketest.rules.in
--- dlls/Maketest.rules.in	23 Mar 2003 01:12:31 -0000	1.21
+++ dlls/Maketest.rules.in	13 Apr 2003 19:52:21 -0000
@@ -26,6 +26,7 @@
 
 CROSSTEST    = $(TESTDLL:%.dll=%)_crosstest.exe
 CROSSOBJS    = $(C_SRCS:.c=.cross.o) $(TESTLIST:.c=.cross.o)
+LDCROSSFLAGS = @LDCROSSFLAGS@
 
 @MAKE_RULES@
 
@@ -64,7 +65,7 @@
 crosstest:: @CROSSTEST@
 
 $(CROSSTEST): $(CROSSOBJS) Makefile.in
-	$(CROSSCC) $(CROSSOBJS) -o $@ -L$(DLLDIR) $(DELAYIMPORTS:%=-l%) $(IMPORTS:%=-l%) $(LIBS)
+	$(CROSSCC) $(LDCROSSFLAGS) $(CROSSOBJS) -o $@ -L$(DLLDIR) $(DELAYIMPORTS:%=-l%) $(IMPORTS:%=-l%) $(LIBS)
 
 # Rules for cleaning
 



[Index of Archives]     [Gimp for Windows]     [Red Hat]     [Samba]     [Yosemite Camping]     [Graphics Cards]     [Wine Home]

  Powered by Linux