build: Add -static for mingw builds

This avoids a dependency on libssp-0.dll when built with
-fstack-protector-all.
This commit is contained in:
Wladimir J. van der Laan 2014-01-22 08:44:24 +01:00 committed by Philip Kaufmann
parent 4e57e23833
commit 6ac0b3be2d

View File

@ -175,6 +175,7 @@ case $host in
AC_CHECK_LIB([iphlpapi], [main],, AC_MSG_ERROR(lib missing))
AC_CHECK_LIB([crypt32], [main],, AC_MSG_ERROR(lib missing))
AX_CHECK_LINK_FLAG([[-static]],[LDFLAGS="$LDFLAGS -static"])
AX_CHECK_LINK_FLAG([[-static-libgcc]],[LDFLAGS="$LDFLAGS -static-libgcc"])
AX_CHECK_LINK_FLAG([[-static-libstdc++]],[LDFLAGS="$LDFLAGS -static-libstdc++"])