shithub: choc

Download patch

ref: fc9ba5db9bce99fb2a4a4210df76a1ed62f17133
parent: c70ac8af1e4c4ec821d4353d09bd16d2350f05bc
author: Fabian Greffrath <fabian@greffrath.com>
date: Tue Jan 3 11:25:50 EST 2017

Link MinGW builds with static libgcc

Fixes #833

--- a/configure.ac
+++ b/configure.ac
@@ -13,6 +13,7 @@
 AC_CANONICAL_HOST
 
 orig_CFLAGS="$CFLAGS"
+orig_LDFLAGS="$LDFLAGS"
 
 AC_PROG_CC
 AC_PROG_RANLIB
@@ -27,6 +28,11 @@
 then
         WARNINGS="-Wall -Wdeclaration-after-statement -Wredundant-decls"
         CFLAGS="-O$OPT_LEVEL -g $WARNINGS $orig_CFLAGS"
+        case "$host" in
+          *-*-mingw*)
+            LDFLAGS="-static-libgcc $orig_LDFLAGS"
+            ;;
+        esac
 fi
 
 dnl Search for SDL ...