Fix missing -static-libgcc for dlls
diff --git a/ChangeLog b/ChangeLog
index d0a98b6..51f3049 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -12,6 +12,8 @@
    * Fix thread-safety issue in SSL debug module (found by Edwin van Vliet).
    * Fix build error with CMake and pre-4.5 versions of GCC (found by Hugo
      Leisink).
+   * Fix missing -static-ligcc when building shared libraries for Windows with
+     make.
 
 Changes
    * Add SSL_MIN_DHM_BYTES configuration parameter in config.h to choose the
diff --git a/library/Makefile b/library/Makefile
index dffb8a4..8be2d4f 100644
--- a/library/Makefile
+++ b/library/Makefile
@@ -83,7 +83,7 @@
 
 libpolarssl.dll: libpolarssl.a
 	echo "  LD    $@"
-	$(CC) -shared -Wl,-soname,$@ -o $@ $(OBJS) -lws2_32 -lwinmm -lgdi32
+	$(CC) -shared -Wl,-soname,$@ -o $@ $(OBJS) -lws2_32 -lwinmm -lgdi32 -static-libgcc
 
 .c.o:
 	echo "  CC    $<"