Hi,

There are some problems with Make_cyg.mak.

1. i686-w64-mingw32-gcc cannot be used for the ruby interface

  This is already reported in the following URL.
  https://groups.google.com/d/topic/vim_dev/F5lB1SjCFtM/discussion

2. RUBY_INSTALL_NAME and RUBY_PLATFORM are not set properly

  Some problems with the ruby interface was fixed in 7.3.735,
  but actually it was not enough.  I think these settings should be
  copied from Make_ming.mak.

3. CC=gcc does not work, because the latest cygwin-gcc does not support
   -mno-cygwin option

  I think the default value of CC should be changed from gcc to
  i686-pc-mingw32-gcc, i686-w64-mingw32-gcc or gcc-3.

Attached patches fix these problems.

Best regards,
Ken Takata

-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
# HG changeset patch
# Parent 8244a397313b7ec2b1ea4e1b383439c7395ac8f2

diff --git a/src/Make_cyg.mak b/src/Make_cyg.mak
--- a/src/Make_cyg.mak
+++ b/src/Make_cyg.mak
@@ -226,6 +226,10 @@
 endif
 
 DEFINES += -DFEAT_RUBY
+ifneq ($(findstring w64-mingw32,$(CC)),)
+# A workaround for mingw-w64
+DEFINES += -DHAVE_STRUCT_TIMESPEC -DHAVE_STRUCT_TIMEZONE
+endif
 INCLUDES += -I$(RUBY)/lib/ruby/$(RUBY_VER_LONG)/$(RUBY_PLATFORM)
 ifdef RUBY_19_OR_LATER
 INCLUDES += -I$(RUBY)/include/ruby-$(RUBY_VER_LONG) -I$(RUBY)/include/ruby-$(RUBY_VER_LONG)/$(RUBY_PLATFORM)
# HG changeset patch
# Parent 12e327f895c2ed1ecc0072b3c82dd01875d3bde1

diff --git a/src/Make_cyg.mak b/src/Make_cyg.mak
--- a/src/Make_cyg.mak
+++ b/src/Make_cyg.mak
@@ -193,31 +193,37 @@
 ##############################
 ifdef RUBY
 
+ifndef DYNAMIC_RUBY
+DYNAMIC_RUBY=yes
+endif
+#  Set default value
 ifndef RUBY_VER
-RUBY_VER=16
+RUBY_VER = 16
+endif
+ifndef RUBY_VER_LONG
+RUBY_VER_LONG = 1.6
+endif
+ifndef RUBY_API_VER
+RUBY_API_VER = $(subst .,,$(RUBY_VER_LONG))
 endif
 
-ifndef RUBY_VER_LONG
-RUBY_VER_LONG=1.6
+ifndef RUBY_PLATFORM
+ifeq ($(RUBY_VER), 16)
+RUBY_PLATFORM = i586-mswin32
+else
+ifneq ($(wildcard $(RUBY)/lib/ruby/$(RUBY_VER_LONG)/i386-mingw32),)
+RUBY_PLATFORM = i386-mingw32
+else
+RUBY_PLATFORM = i386-mswin32
+endif
+endif
 endif
 
-ifndef DYNAMIC_RUBY
-DYNAMIC_RUBY = yes
-endif
-
+ifndef RUBY_INSTALL_NAME
 ifeq ($(RUBY_VER), 16)
-ifndef RUBY_PLATFORM
-RUBY_PLATFORM = i586-mswin32
-endif
-ifndef RUBY_INSTALL_NAME
-RUBY_INSTALL_NAME = mswin32-ruby$(RUBY_VER)
-endif
+RUBY_INSTALL_NAME = mswin32-ruby$(RUBY_API_VER)
 else
-ifndef RUBY_PLATFORM
-RUBY_PLATFORM = i386-mswin32
-endif
-ifndef RUBY_INSTALL_NAME
-RUBY_INSTALL_NAME = msvcrt-ruby$(RUBY_VER)
+RUBY_INSTALL_NAME = msvcrt-ruby$(RUBY_API_VER)
 endif
 endif
 
# HG changeset patch
# Parent 637e7976fe628e55d944d51c11b31ca1996ac97e

diff --git a/src/Make_cyg.mak b/src/Make_cyg.mak
--- a/src/Make_cyg.mak
+++ b/src/Make_cyg.mak
@@ -47,8 +47,8 @@
 #               (i386)
 # USEDLL	no or yes: set to yes to use the Runtime library DLL (no)
 #		For USEDLL=yes the cygwin1.dll is required to run Vim.
-#		"no" does not work with latest version of Cygwin, use
-#		Make_ming.mak instead.  Or set CC to gcc-3 and add
+#		For "no" the mingw-gcc-g++ package or the mingw64-i686-gcc-g++
+#		package is required to complie Vim.  Or set CC to gcc-3 and add
 #		-L/lib/w32api to EXTRA_LIBS.
 # POSTSCRIPT	no or yes: set to yes for PostScript printing (no)
 # FEATURES	TINY, SMALL, NORMAL, BIG or HUGE (BIG)
@@ -114,9 +114,17 @@
 INCLUDES = -march=$(ARCH) -Iproto
 
 #>>>>> name of the compiler and linker, name of lib directory
-CROSS_COMPILE =
+ifeq (yes, $(USEDLL))
+# CROSS_COMPILE is used for the gvimext DLL.
+CROSS_COMPILE = i686-pc-mingw32-
 CC = gcc
 RC = windres
+else
+# i686-pc-mingw32-gcc, i686-w64-mingw32-gcc or gcc-3 can be used.
+CROSS_COMPILE = i686-pc-mingw32-
+CC = $(CROSS_COMPILE)gcc
+RC = $(CROSS_COMPILE)windres
+endif
 
 ##############################
 # DYNAMIC_PERL=yes and no both work

Raspunde prin e-mail lui