Index: build-tree/ocaml-3.12.1/otherlibs/win32unix/Makefile.nt
===================================================================
--- build-tree.orig/ocaml-3.12.1/otherlibs/win32unix/Makefile.nt	2010-05-20 11:40:41.000000000 +0200
+++ build-tree/ocaml-3.12.1/otherlibs/win32unix/Makefile.nt	2011-10-09 04:22:50.179255499 +0200
@@ -40,7 +40,7 @@
 COBJS=$(ALL_FILES:.c=.$(O))
 CAMLOBJS=unix.cmo unixLabels.cmo
 LINKOPTS=-cclib $(WSOCKLIB)
-LDOPTS=-ldopt $(WSOCKLIB)
+LDOPTS=-L/usr/i686-w64-mingw32/lib -ldopt $(WSOCKLIB)
 EXTRACAMLFLAGS=-nolabels
 EXTRACFLAGS=-I../unix
 HEADERS=unixsupport.h socketaddr.h
Index: build-tree/ocaml-3.12.1/otherlibs/str/Makefile
===================================================================
--- build-tree.orig/ocaml-3.12.1/otherlibs/str/Makefile	2010-01-22 13:48:24.000000000 +0100
+++ build-tree/ocaml-3.12.1/otherlibs/str/Makefile	2011-10-09 04:22:50.187251500 +0200
@@ -20,6 +20,7 @@
 COBJS=strstubs.$(O)
 CLIBNAME=camlstr
 CAMLOBJS=str.cmo
+LDOPTS=-L/usr/i686-w64-mingw32/lib
 
 include ../Makefile
 
Index: build-tree/ocaml-3.12.1/otherlibs/num/Makefile
===================================================================
--- build-tree.orig/ocaml-3.12.1/otherlibs/num/Makefile	2010-02-09 15:17:20.000000000 +0100
+++ build-tree/ocaml-3.12.1/otherlibs/num/Makefile	2011-10-09 04:22:50.187251500 +0200
@@ -21,6 +21,7 @@
   ratio.cmo num.cmo arith_status.cmo
 CMIFILES=big_int.cmi nat.cmi num.cmi ratio.cmi arith_status.cmi
 COBJS=bng.$(O) nat_stubs.$(O)
+LDOPTS=-L/usr/i686-w64-mingw32/lib
 
 include ../Makefile
 
Index: build-tree/ocaml-3.12.1/otherlibs/win32graph/Makefile.nt
===================================================================
--- build-tree.orig/ocaml-3.12.1/otherlibs/win32graph/Makefile.nt	2007-11-06 16:16:56.000000000 +0100
+++ build-tree/ocaml-3.12.1/otherlibs/win32graph/Makefile.nt	2011-10-09 04:22:50.187251500 +0200
@@ -18,7 +18,7 @@
 CAMLOBJS=graphics.cmo
 WIN32LIBS=$(call SYSLIB,kernel32) $(call SYSLIB,gdi32) $(call SYSLIB,user32)
 LINKOPTS=-cclib "\"$(WIN32LIBS)\""
-LDOPTS=-ldopt "$(WIN32LIBS)"
+LDOPTS=-L/usr/i686-w64-mingw32/lib -ldopt "$(WIN32LIBS)"
 
 include ../Makefile.nt
 
Index: build-tree/ocaml-3.12.1/otherlibs/bigarray/Makefile.nt
===================================================================
--- build-tree.orig/ocaml-3.12.1/otherlibs/bigarray/Makefile.nt	2008-01-04 16:01:48.000000000 +0100
+++ build-tree/ocaml-3.12.1/otherlibs/bigarray/Makefile.nt	2011-10-09 04:22:50.187251500 +0200
@@ -19,6 +19,7 @@
 COBJS=bigarray_stubs.$(O) mmap_win32.$(O)
 CAMLOBJS=bigarray.cmo
 HEADERS=bigarray.h
+LDOPTS=-L/usr/i686-w64-mingw32/lib
 
 include ../Makefile.nt
 
Index: build-tree/ocaml-3.12.1/otherlibs/systhreads/Makefile.nt
===================================================================
--- build-tree.orig/ocaml-3.12.1/otherlibs/systhreads/Makefile.nt	2010-04-27 09:55:08.000000000 +0200
+++ build-tree/ocaml-3.12.1/otherlibs/systhreads/Makefile.nt	2011-10-09 04:24:23.804421287 +0200
@@ -21,6 +21,7 @@
 COMPFLAGS=-warn-error A -g
 MKLIB=../../boot/ocamlrun ../../tools/ocamlmklib
 CFLAGS=-I../../byterun $(EXTRACFLAGS)
+LDOPTS=-L/usr/i686-w64-mingw32/lib
 
 CAMLOBJS=thread.cmo mutex.cmo condition.cmo event.cmo threadUnix.cmo
 CMIFILES=$(CAMLOBJS:.cmo=.cmi)
