diff -Naur a/ld/configure.host b/ld/configure.host
--- a/ld/configure.host 2013-03-05 15:54:28.000000000 +0400
+++ b/ld/configure.host 2013-10-24 16:05:08.512000000 +0400
@@ -175,6 +175,10 @@
   HOSTING_LIBS="$HOSTING_LIBS"' -lcygwin -L/usr/lib/w32api -luser32 -lkernel32 -ladvapi32 -lshell32 `if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else ${CC} -print-libgcc-file-name; fi`'
   ;;
 
+i[3-7]86-*-msys* | x86_64-*-msys*)
+  HOSTING_LIBS="$HOSTING_LIBS"' -lmsys-2.0 -L/usr/lib/w32api -luser32 -lkernel32 -ladvapi32 -lshell32 `if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else ${CC} -print-libgcc-file-name; fi`'
+  ;;
+
 i[3-7]86-*-mingw*)
   #We only support msvcrt.dll, crtid == 2.
   HOSTING_CRT0='/mingw/lib/crt2.o'