--- /dev/null
+--- flexdll/reloc.ml 2008-11-06 12:54:58.000000000 +0000
++++ flexdll.mingw/reloc.ml 2008-11-14 10:44:01.000000000 +0000
+@@ -106,7 +106,7 @@
+ | `MINGW -> "-mno-cygwin "\r
+ | _ -> ""\r
+ in\r
+- Filename.dirname (get_output1 (Printf.sprintf "gcc %s-print-libgcc-file-name" extra))\r
++ Filename.dirname (get_output1 (Printf.sprintf "i686-pc-mingw32-gcc %s-print-libgcc-file-name" extra))\r
+ \r
+ let file_exists fn =\r
+ if Sys.file_exists fn then Some fn\r
+@@ -788,7 +788,7 @@
+ extra_args\r
+ | `MINGW ->\r
+ Printf.sprintf\r
+- "gcc -mno-cygwin %s%s -L. %s %s -o %s %s %s %s %s"\r
++ "i686-pc-mingw32-gcc %s%s -L. %s %s -o %s %s %s %s %s"\r
+ (if link_exe = `EXE then "" else "-shared ")\r
+ (if main_pgm then "" else if !noentry then "-Wl,-e0 " else "-Wl,-e_FlexDLLiniter@12 ")\r
+ (mk_dirs_opt "-I")\r
+@@ -860,9 +860,7 @@
+ | `MINGW ->\r
+ search_path :=\r
+ !dirs @\r
+- [ "/lib";\r
+- "/lib/mingw";\r
+- "/lib/w32api";\r
++ [ "/usr/i686-pc-mingw32/sys-root/mingw/lib";\r
+ gcclib () ];\r
+ default_libs :=\r
+ ["-lmingw32"; "-lgcc"; "-lmoldname"; "-lmingwex"; "-lmsvcrt";\r
+@@ -891,7 +889,7 @@
+ file\r
+ | `MINGW ->\r
+ Printf.sprintf\r
+- "gcc -mno-cygwin -c -o %s %s %s"\r
++ "i686-pc-mingw32-gcc -c -o %s %s %s"\r
+ (Filename.quote tmp_obj)\r
+ (mk_dirs_opt "-I")\r
+ file\r
+--- flexdll/Makefile 2008-11-10 13:26:25.000000000 +0000
++++ flexdll.mingw/Makefile 2008-11-14 10:57:15.000000000 +0000
+@@ -113,7 +113,7 @@
+ upload_bin_64:\r
+ PACKAGE_BIN_SUFFIX=-amd64 $(MAKE) upload_bin\r
+ \r
+-include $(shell cygpath -ad "$(shell ocamlopt -where)/Makefile.config")\r
++#include $(shell cygpath -ad "$(shell ocamlopt -where)/Makefile.config")\r
+ \r
+ show_toolchain:\r
+ @echo Toolchain for the visible ocamlopt: $(TOOLCHAIN)\r