To: vim_dev@googlegroups.com Subject: Patch 7.4.2030 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 7.4.2030 Problem: ARCH must be set properly when using MinGW. Solution: Detect the default value of ARCH from the current compiler. (Ken Takata) Files: src/Make_cyg_ming.mak *** ../vim-7.4.2029/src/Make_cyg_ming.mak 2016-07-10 13:57:35.889542273 +0200 --- src/Make_cyg_ming.mak 2016-07-12 21:15:44.399541106 +0200 *************** *** 42,48 **** 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 # 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'. --- 42,49 ---- FEATURES=HUGE # Set to one of i386, i486, i586, i686 as the minimum target processor. # For amd64/x64 architecture set ARCH=x86-64 . ! # 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,117 **** --- 113,158 ---- #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,419 **** 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 ########################################################################### --- 424,429 ---- *** ../vim-7.4.2029/src/version.c 2016-07-12 21:11:28.711223556 +0200 --- src/version.c 2016-07-12 21:16:14.451108150 +0200 *************** *** 760,761 **** --- 760,763 ---- { /* Add new patch number below this line */ + /**/ + 2030, /**/ -- The greatest lies of all time: (1) The check is in the mail. (2) We have a really challenging assignment for you. (3) I love you. (4) All bugs have been fixed. (5) This won't hurt a bit. (6) Honey, I just need to debug this program and be home in 5 minutes. (7) I have just sent you an e-mail about that. (8) Of course I'll respect you in the morning. (9) I'm from the government, and I'm here to help you. /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ an exciting new programming language -- http://www.Zimbu.org /// \\\ help me help AIDS victims -- http://ICCF-Holland.org ///