summaryrefslogtreecommitdiffstats
path: root/src/Make_cyg_ming.mak
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2016-12-01 20:37:47 +0100
committerBram Moolenaar <Bram@vim.org>2016-12-01 20:37:47 +0100
commite3af763d5e6b90a9b5d5706920e669fd8f0b6c77 (patch)
tree0c6bc9f1f0610904c717b08718810702c7c86226 /src/Make_cyg_ming.mak
parentb04a98f6c3cca14bf055934b0a793f4dc376858b (diff)
patch 8.0.0115v8.0.0115
Problem: When building with Cygwin libwinpthread isn't found. Solution: Link winpthread statically. (jmmerz, closes #1255, closes #1256)
Diffstat (limited to 'src/Make_cyg_ming.mak')
-rw-r--r--src/Make_cyg_ming.mak11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/Make_cyg_ming.mak b/src/Make_cyg_ming.mak
index 63f7fa9a32..b2927200a3 100644
--- a/src/Make_cyg_ming.mak
+++ b/src/Make_cyg_ming.mak
@@ -81,6 +81,13 @@ ifndef STATIC_STDCPLUS
STATIC_STDCPLUS=no
endif
+
+# Link against the shared version of libwinpthread by default. Set
+# STATIC_WINPTHREAD to "yes" to link against static version instead.
+ifndef STATIC_WINPTHREAD
+STATIC_WINPTHREAD=$(STATIC_STDCPLUS)
+endif
+
# If the user doesn't want gettext, undefine it.
ifeq (no, $(GETTEXT))
GETTEXT=
@@ -817,6 +824,10 @@ LIB += -lstdc++
endif
endif
+ifeq (yes, $(STATIC_WINPTHREAD))
+LIB += -Wl,-Bstatic -lwinpthread -Wl,-Bdynamic
+endif
+
all: $(TARGET) vimrun.exe xxd/xxd.exe install.exe uninstal.exe GvimExt/gvimext.dll
vimrun.exe: vimrun.c