> > Matsushita Shougo wrote: > >> Hi, I built Vim in Windows and found below error message. >> >> % mingw32-make.exe -f Make_ming.mak GUI=yes IME=yes MBYTE=yes ICONV=yes >> DEBUG=no >> E:/MinGW/bin/mingw32-make.exe -C xxd -f Make_cyg.mak CC=gcc >> mingw32-make.exe[1]: Entering directory `H:/Work/vim/src/xxd' >> gcc -O2 -Wall -DWIN32 -mno-cygwin -s -o xxd.exe xxd.c >> >> This behavior is : xxd(and GVimExt) is using -mno-cygwin option in >> MinGW environment. >> But, MinGW gcc(ver.4.6 or above) is deleted -mno-cygwin option. >> http://lists.gnu.org/archive/html/mingw-cross-env-list/2011-03/msg00119.html >> So appeared error message. >> >> I made this patch, and error message doesn't appear. > > It looks like you rely on making a copy of GvimExt/Make_ming.mak to > GvimExt/Make_cyg.mak. Before you make the change to Make_ming.mak. > The copied version of xxd/Make_ming.mak is included, the copy in > GvimExt/ not.
Sorry, I fixed the patch. -- 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
diff -r 5e84f6567623 -r 31b8c682a0ee src/GvimExt/Make_cyg.mak --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/GvimExt/Make_cyg.mak Mon Sep 26 21:27:03 2011 +0900 @@ -0,0 +1,78 @@ +# Project: gvimext +# Generates gvimext.dll with gcc. +# Can be used for Cygwin +# +# Originally, the DLL base address was fixed: -Wl,--image-base=0x1C000000 +# Now it is allocated dymanically by the linker by evaluating all DLLs +# already loaded in memory. The binary image contains as well information +# for automatic pseudo-rebasing, if needed by the system. ALV 2004-02-29 + +# If cross-compiling set this to yes, else set it to no +CROSS = no +#CROSS = yes +# For the old MinGW 2.95 (the one you get e.g. with debian woody) +# set the following variable to yes and check if the executables are +# really named that way. +# If you have a newer MinGW or you are using cygwin set it to no and +# check also the executables +MINGWOLD = no + +# Link against the shared versions of libgcc/libstdc++ by default. Set +# STATIC_STDCPLUS to "yes" to link against static versions instead. +STATIC_STDCPLUS=no +#STATIC_STDCPLUS=yes + +# Note: -static-libstdc++ is not available until gcc 4.5.x. +LDFLAGS += -shared +ifeq (yes, $(STATIC_STDCPLUS)) +LDFLAGS += -static-libgcc -static-libstdc++ +endif + +ifeq ($(CROSS),yes) +DEL = rm +ifeq ($(MINGWOLD),yes) +CXXFLAGS := -O2 -mno-cygwin -fvtable-thunks +else +CXXFLAGS := -O2 -mno-cygwin +endif +else +CXXFLAGS := -O2 -mno-cygwin +ifneq (sh.exe, $(SHELL)) +DEL = rm +else +DEL = del +endif +endif +CXX := $(CROSS_COMPILE)g++ +WINDRES := $(CROSS_COMPILE)windres +WINDRES_CXX = $(CXX) +WINDRES_FLAGS = --preprocessor="$(WINDRES_CXX) -E -xc" -DRC_INVOKED +LIBS := -luuid +RES := gvimext.res +DEFFILE = gvimext_ming.def +OBJ := gvimext.o + +DLL := gvimext.dll + +.PHONY: all all-before all-after clean clean-custom + +all: all-before $(DLL) all-after + +$(DLL): $(OBJ) $(RES) $(DEFFILE) + $(CXX) $(LDFLAGS) $(CXXFLAGS) -s -o $@ \ + -Wl,--enable-auto-image-base \ + -Wl,--enable-auto-import \ + -Wl,--whole-archive \ + $^ \ + -Wl,--no-whole-archive \ + $(LIBS) + +gvimext.o: gvimext.cpp + $(CXX) $(CXXFLAGS) -DFEAT_GETTEXT -c $? -o $@ + +$(RES): gvimext_ming.rc + $(WINDRES) $(WINDRES_FLAGS) --input-format=rc --output-format=coff -DMING $? -o $@ + +clean: clean-custom + -$(DEL) $(OBJ) $(RES) $(DLL) + diff -r 5e84f6567623 -r 31b8c682a0ee src/GvimExt/Make_ming.mak --- a/src/GvimExt/Make_ming.mak Wed Sep 21 20:09:42 2011 +0200 +++ b/src/GvimExt/Make_ming.mak Mon Sep 26 21:27:03 2011 +0900 @@ -1,6 +1,6 @@ # Project: gvimext # Generates gvimext.dll with gcc. -# Can be used for Cygwin and MingW (MingW ignores -mno-cygwin) +# Can be used for Cygwin and MingW (MingW doesn't ignore -mno-cygwin) # # Originally, the DLL base address was fixed: -Wl,--image-base=0x1C000000 # Now it is allocated dymanically by the linker by evaluating all DLLs @@ -31,12 +31,12 @@ ifeq ($(CROSS),yes) DEL = rm ifeq ($(MINGWOLD),yes) -CXXFLAGS := -O2 -mno-cygwin -fvtable-thunks +CXXFLAGS := -O2 -fvtable-thunks else -CXXFLAGS := -O2 -mno-cygwin +CXXFLAGS := -O2 endif else -CXXFLAGS := -O2 -mno-cygwin +CXXFLAGS := -O2 ifneq (sh.exe, $(SHELL)) DEL = rm else diff -r 5e84f6567623 -r 31b8c682a0ee src/Make_cyg.mak --- a/src/Make_cyg.mak Wed Sep 21 20:09:42 2011 +0200 +++ b/src/Make_cyg.mak Mon Sep 26 21:27:03 2011 +0900 @@ -536,7 +536,7 @@ $(MAKE) -C xxd -f Make_cyg.mak CC=$(CC) USEDLL=$(USEDLL) GvimExt/gvimext.dll: GvimExt/gvimext.cpp GvimExt/gvimext.rc GvimExt/gvimext.h - $(MAKE) -C GvimExt -f Make_ming.mak CROSS_COMPILE=$(CROSS_COMPILE) + $(MAKE) -C GvimExt -f Make_cyg.mak CROSS_COMPILE=$(CROSS_COMPILE) vimrun.exe: vimrun.c $(CC) $(CFLAGS) -o vimrun.exe vimrun.c $(LIBS) @@ -565,7 +565,7 @@ endif -$(DEL) pathdef.c $(MAKE) -C xxd -f Make_cyg.mak clean - $(MAKE) -C GvimExt -f Make_ming.mak clean + $(MAKE) -C GvimExt -f Make_cyg.mak clean distclean: clean -$(DEL) obj$(DIRSLASH)*.o diff -r 5e84f6567623 -r 31b8c682a0ee src/Make_ming.mak --- a/src/Make_ming.mak Wed Sep 21 20:09:42 2011 +0200 +++ b/src/Make_ming.mak Mon Sep 26 21:27:03 2011 +0900 @@ -641,7 +641,7 @@ upx vim.exe xxd/xxd.exe: xxd/xxd.c - $(MAKE) -C xxd -f Make_cyg.mak CC=$(CC) + $(MAKE) -C xxd -f Make_ming.mak CC=$(CC) GvimExt/gvimext.dll: GvimExt/gvimext.cpp GvimExt/gvimext.rc GvimExt/gvimext.h $(MAKE) -C GvimExt -f Make_ming.mak CROSS=$(CROSS) CROSS_COMPILE=$(CROSS_COMPILE) @@ -659,7 +659,7 @@ -$(DEL) mzscheme_base.c endif $(MAKE) -C GvimExt -f Make_ming.mak clean - $(MAKE) -C xxd -f Make_cyg.mak clean + $(MAKE) -C xxd -f Make_ming.mak clean ########################################################################### INCL = vim.h feature.h os_win32.h os_dos.h ascii.h keymap.h term.h macros.h \ diff -r 5e84f6567623 -r 31b8c682a0ee src/xxd/Make_ming.mak --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/xxd/Make_ming.mak Mon Sep 26 21:27:03 2011 +0900 @@ -0,0 +1,28 @@ +# The most simplistic Makefile, for MinGW gcc on MS-DOS + +ifndef USEDLL +USEDLL = no +endif + +ifeq (yes, $(USEDLL)) +DEFINES = +LIBS = -lc +else +DEFINES = +LIBS = +endif + +CC = gcc +CFLAGS = -O2 -Wall -DWIN32 $(DEFINES) + +ifneq (sh.exe, $(SHELL)) +DEL = rm +else +DEL = del +endif + +xxd.exe: xxd.c + $(CC) $(CFLAGS) -s -o xxd.exe xxd.c $(LIBS) + +clean: + -$(DEL) xxd.exe
