Skip to content

Instantly share code, notes, and snippets.

@k-takata
Created December 15, 2012 10:14
Show Gist options
  • Save k-takata/4292488 to your computer and use it in GitHub Desktop.
Save k-takata/4292488 to your computer and use it in GitHub Desktop.
Use mingw-gcc as a default compiler when using Make_cyg.mak
# HG changeset patch
# Parent cb52fbcc69d35e71fad330ae6de6f6a53fb2bdb0
diff --git a/src/Make_cyg.mak b/src/Make_cyg.mak
--- a/src/Make_cyg.mak
+++ b/src/Make_cyg.mak
@@ -47,9 +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
-# -L/lib/w32api to EXTRA_LIBS.
+# For "no" the mingw-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)
# WINVER Lowest Win32 version to support. (0x0500)
@@ -114,9 +113,17 @@
INCLUDES = -march=$(ARCH) -Iproto
#>>>>> name of the compiler and linker, name of lib directory
-CROSS_COMPILE =
+ifeq (yes, $(USEDLL))
+CROSS_COMPILE = i686-pc-mingw32-
CC = gcc
RC = windres
+else
+# i686-pc-mingw32-gcc or gcc-3 can be used.
+# (i686-w64-mingw32-gcc doesn't seem to work for +ruby.)
+CROSS_COMPILE = i686-pc-mingw32-
+CC = $(CROSS_COMPILE)gcc
+RC = $(CROSS_COMPILE)windres
+endif
##############################
# DYNAMIC_PERL=yes and no both work
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment