diff options
author | Bram Moolenaar <Bram@vim.org> | 2016-07-12 21:17:03 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2016-07-12 21:17:03 +0200 |
commit | e048539195e1c0a060cf41b39fca118130bdc151 (patch) | |
tree | 877d04bdaeec8864daa2e54c2e74e94ec5d6fc30 /src | |
parent | 38ee6b041e73ad31c3b6b99d56d20833b59b2b57 (diff) | |
download | vim-git-e048539195e1c0a060cf41b39fca118130bdc151.tar.gz |
patch 7.4.2030v7.4.2030
Problem: ARCH must be set properly when using MinGW.
Solution: Detect the default value of ARCH from the current compiler. (Ken
Takata)
Diffstat (limited to 'src')
-rw-r--r-- | src/Make_cyg_ming.mak | 74 | ||||
-rw-r--r-- | src/version.c | 2 |
2 files changed, 44 insertions, 32 deletions
diff --git a/src/Make_cyg_ming.mak b/src/Make_cyg_ming.mak index e0638abb9..9bc24195f 100644 --- a/src/Make_cyg_ming.mak +++ b/src/Make_cyg_ming.mak @@ -42,7 +42,8 @@ DIRECTX=no FEATURES=HUGE # Set to one of i386, i486, i586, i686 as the minimum target processor. # For amd64/x64 architecture set ARCH=x86-64 . -ARCH=i686 +# If not set, it will be automatically detected. (Normally i686 or x86-64.) +#ARCH=i686 # Set to yes to cross-compile from unix; no=native Windows (and Cygwin). CROSS=no # Set to path to iconv.h and libiconv.a to enable using 'iconv.dll'. @@ -112,6 +113,46 @@ INTLLIB=gnu_gettext #INTLPATH=$(GETTEXT)/lib #INTLLIB=intl + +# Command definitions (depends on cross-compiling and shell) +ifeq ($(CROSS),yes) +# cross-compiler prefix: +ifndef CROSS_COMPILE +CROSS_COMPILE = i586-pc-mingw32msvc- +endif +DEL = rm +MKDIR = mkdir -p +DIRSLASH = / +else +# normal (Windows) compilation: +ifndef CROSS_COMPILE +CROSS_COMPILE = +endif +ifneq (sh.exe, $(SHELL)) +DEL = rm +MKDIR = mkdir -p +DIRSLASH = / +else +DEL = del +MKDIR = mkdir +DIRSLASH = \\ +endif +endif +CC := $(CROSS_COMPILE)gcc +CXX := $(CROSS_COMPILE)g++ +ifeq ($(UNDER_CYGWIN),yes) +WINDRES := $(CROSS_COMPILE)windres +else +WINDRES := windres +endif +WINDRES_CC = $(CC) + +# Get the default ARCH. +ifndef ARCH +ARCH := $(shell $(CC) -dumpmachine | sed -e 's/-.*//') +endif + + # Perl interface: # PERL=[Path to Perl directory] (Set inside Make_cyg.mak or Make_ming.mak) # DYNAMIC_PERL=yes (to load the Perl DLL dynamically) @@ -383,37 +424,6 @@ DEFINES=-DWIN32 -DWINVER=$(WINVER) -D_WIN32_WINNT=$(WINVER) \ ifeq ($(ARCH),x86-64) DEFINES+=-DMS_WIN64 endif -ifeq ($(CROSS),yes) -# cross-compiler prefix: -ifndef CROSS_COMPILE -CROSS_COMPILE = i586-pc-mingw32msvc- -endif -DEL = rm -MKDIR = mkdir -p -DIRSLASH = / -else -# normal (Windows) compilation: -ifndef CROSS_COMPILE -CROSS_COMPILE = -endif -ifneq (sh.exe, $(SHELL)) -DEL = rm -MKDIR = mkdir -p -DIRSLASH = / -else -DEL = del -MKDIR = mkdir -DIRSLASH = \\ -endif -endif -CC := $(CROSS_COMPILE)gcc -CXX := $(CROSS_COMPILE)g++ -ifeq ($(UNDER_CYGWIN),yes) -WINDRES := $(CROSS_COMPILE)windres -else -WINDRES := windres -endif -WINDRES_CC = $(CC) #>>>>> end of choices ########################################################################### diff --git a/src/version.c b/src/version.c index 301b406d2..1765e93aa 100644 --- a/src/version.c +++ b/src/version.c @@ -759,6 +759,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 2030, +/**/ 2029, /**/ 2028, |