summaryrefslogtreecommitdiffstats
path: root/win/tcl.m4
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2013-09-27 09:45:46 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2013-09-27 09:45:46 (GMT)
commita567d4cd88f2fb3d6feeebcfa4d6ddf984e4cb70 (patch)
treef5091e9505b6993d4245b9b2159eeed15c51ebde /win/tcl.m4
parentcd619dfd1b22f4313a03f048399fa4981ae43f83 (diff)
downloadtk-a567d4cd88f2fb3d6feeebcfa4d6ddf984e4cb70.zip
tk-a567d4cd88f2fb3d6feeebcfa4d6ddf984e4cb70.tar.gz
tk-a567d4cd88f2fb3d6feeebcfa4d6ddf984e4cb70.tar.bz2
Cherrypick [132bf978f2] from trunk:
Workaround for [http://sourceforge.net/p/mingw/bugs/2065/|MinGW bug #2065]. Both MinGW and MinGW-w64 (32-bit) are affected. Even though Win64 is not affected, adding -static-libgcc doesn't harm there, and we don't want to distrubute additional dll's with MinGW-compiled Tcl anyway.
Diffstat (limited to 'win/tcl.m4')
-rw-r--r--win/tcl.m418
1 files changed, 1 insertions, 17 deletions
diff --git a/win/tcl.m4 b/win/tcl.m4
index 589a8c0..7de3013 100644
--- a/win/tcl.m4
+++ b/win/tcl.m4
@@ -633,7 +633,7 @@ AC_DEFUN([SC_CONFIG_CFLAGS], [
if test "${GCC}" = "yes" ; then
extra_cflags="-pipe"
- extra_ldflags="-pipe"
+ extra_ldflags="-pipe -static-libgcc"
AC_CACHE_CHECK(for mingw32 version of gcc,
ac_cv_win32,
AC_TRY_COMPILE([
@@ -647,22 +647,6 @@ AC_DEFUN([SC_CONFIG_CFLAGS], [
if test "$ac_cv_win32" != "yes"; then
AC_MSG_ERROR([${CC} cannot produce win32 executables.])
fi
-
- hold_cflags=$CFLAGS; CFLAGS="$CFLAGS -mwindows -municode -Dmain=xxmain"
- AC_CACHE_CHECK(for working -municode linker flag,
- ac_cv_municode,
- AC_TRY_LINK([
- #include <windows.h>
- int APIENTRY wWinMain(HINSTANCE a, HINSTANCE b, LPWSTR c, int d) {return 0;}
- ],
- [],
- ac_cv_municode=yes,
- ac_cv_municode=no)
- )
- CFLAGS=$hold_cflags
- if test "$ac_cv_municode" = "no" ; then
- extra_ldflags="$extra_ldflags -static-libgcc"
- fi
fi
AC_MSG_CHECKING([compiler flags])