Fix linking tests with MinGW and Wine imports
Hans Leidekker
hans at it.vu.nl
Mon Apr 14 04:56:04 CDT 2003
As described in my mail to wine-devel, this gets us past linking
errors caused by symbols present both in MinGW's C runtime and
Wine's. This may serve as a temporary workaround, because as of
yet MinGW can't be persuaded to not link against it's own C runtime.
Changelog
Add linker flags 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
More information about the wine-patches
mailing list