Karsten Hopp 89bda3
To: vim_dev@googlegroups.com
Karsten Hopp 89bda3
Subject: Patch 7.3.093
Karsten Hopp 89bda3
Fcc: outbox
Karsten Hopp 89bda3
From: Bram Moolenaar <Bram@moolenaar.net>
Karsten Hopp 89bda3
Mime-Version: 1.0
Karsten Hopp 89bda3
Content-Type: text/plain; charset=UTF-8
Karsten Hopp 89bda3
Content-Transfer-Encoding: 8bit
Karsten Hopp 89bda3
------------
Karsten Hopp 89bda3
Karsten Hopp 89bda3
Patch 7.3.093
Karsten Hopp 89bda3
Problem:    New DLL dependencies in MingW with gcc 4.5.0.
Karsten Hopp 89bda3
Solution:   Add STATIC_STDCPLUS, LDFLAGS and split up WINDRES. (Guopeng Wen)
Karsten Hopp 89bda3
Files:      src/GvimExt/Make_ming.mak, src/Make_ming.mak
Karsten Hopp 89bda3
Karsten Hopp 89bda3
Karsten Hopp 89bda3
*** ../vim-7.3.092/src/GvimExt/Make_ming.mak	2010-09-29 18:42:25.000000000 +0200
Karsten Hopp 89bda3
--- src/GvimExt/Make_ming.mak	2010-12-30 14:42:51.000000000 +0100
Karsten Hopp 89bda3
***************
Karsten Hopp 89bda3
*** 17,22 ****
Karsten Hopp 89bda3
--- 17,33 ----
Karsten Hopp 89bda3
  # check also the executables
Karsten Hopp 89bda3
  MINGWOLD = no
Karsten Hopp 89bda3
  
Karsten Hopp 89bda3
+ # Link against the shared versions of libgcc/libstdc++ by default.  Set
Karsten Hopp 89bda3
+ # STATIC_STDCPLUS to "yes" to link against static versions instead.
Karsten Hopp 89bda3
+ STATIC_STDCPLUS=no
Karsten Hopp 89bda3
+ #STATIC_STDCPLUS=yes
Karsten Hopp 89bda3
+ 
Karsten Hopp 89bda3
+ # Note: -static-libstdc++ is not available until gcc 4.5.x.
Karsten Hopp 89bda3
+ LDFLAGS += -shared
Karsten Hopp 89bda3
+ ifeq (yes, $(STATIC_STDCPLUS))
Karsten Hopp 89bda3
+ LDFLAGS += -static-libgcc -static-libstdc++
Karsten Hopp 89bda3
+ endif
Karsten Hopp 89bda3
+ 
Karsten Hopp 89bda3
  ifeq ($(CROSS),yes)
Karsten Hopp 89bda3
  DEL = rm
Karsten Hopp 89bda3
  ifeq ($(MINGWOLD),yes)
Karsten Hopp 89bda3
***************
Karsten Hopp 89bda3
*** 33,39 ****
Karsten Hopp 89bda3
  endif
Karsten Hopp 89bda3
  endif
Karsten Hopp 89bda3
  CXX := $(CROSS_COMPILE)g++
Karsten Hopp 89bda3
! WINDRES := $(CROSS_COMPILE)windres --preprocessor="$(CXX) -E -xc" -DRC_INVOKED
Karsten Hopp 89bda3
  LIBS :=  -luuid
Karsten Hopp 89bda3
  RES  := gvimext.res
Karsten Hopp 89bda3
  DEFFILE = gvimext_ming.def
Karsten Hopp 89bda3
--- 44,52 ----
Karsten Hopp 89bda3
  endif
Karsten Hopp 89bda3
  endif
Karsten Hopp 89bda3
  CXX := $(CROSS_COMPILE)g++
Karsten Hopp 89bda3
! WINDRES := $(CROSS_COMPILE)windres
Karsten Hopp 89bda3
! WINDRES_CXX = $(CXX)
Karsten Hopp 89bda3
! WINDRES_FLAGS = --preprocessor="$(WINDRES_CXX) -E -xc" -DRC_INVOKED
Karsten Hopp 89bda3
  LIBS :=  -luuid
Karsten Hopp 89bda3
  RES  := gvimext.res
Karsten Hopp 89bda3
  DEFFILE = gvimext_ming.def
Karsten Hopp 89bda3
***************
Karsten Hopp 89bda3
*** 46,52 ****
Karsten Hopp 89bda3
  all: all-before $(DLL) all-after
Karsten Hopp 89bda3
  
Karsten Hopp 89bda3
  $(DLL): $(OBJ) $(RES) $(DEFFILE)
Karsten Hopp 89bda3
! 	$(CXX) -shared $(CXXFLAGS) -s -o $@ \
Karsten Hopp 89bda3
  		-Wl,--enable-auto-image-base \
Karsten Hopp 89bda3
  		-Wl,--enable-auto-import \
Karsten Hopp 89bda3
  		-Wl,--whole-archive \
Karsten Hopp 89bda3
--- 59,65 ----
Karsten Hopp 89bda3
  all: all-before $(DLL) all-after
Karsten Hopp 89bda3
  
Karsten Hopp 89bda3
  $(DLL): $(OBJ) $(RES) $(DEFFILE)
Karsten Hopp 89bda3
! 	$(CXX) $(LDFLAGS) $(CXXFLAGS) -s -o $@ \
Karsten Hopp 89bda3
  		-Wl,--enable-auto-image-base \
Karsten Hopp 89bda3
  		-Wl,--enable-auto-import \
Karsten Hopp 89bda3
  		-Wl,--whole-archive \
Karsten Hopp 89bda3
***************
Karsten Hopp 89bda3
*** 58,64 ****
Karsten Hopp 89bda3
  	$(CXX) $(CXXFLAGS) -DFEAT_GETTEXT -c $? -o $@
Karsten Hopp 89bda3
  
Karsten Hopp 89bda3
  $(RES): gvimext_ming.rc
Karsten Hopp 89bda3
! 	$(WINDRES) --input-format=rc --output-format=coff -DMING $? -o $@
Karsten Hopp 89bda3
  
Karsten Hopp 89bda3
  clean: clean-custom
Karsten Hopp 89bda3
  	-$(DEL)  $(OBJ) $(RES) $(DLL)
Karsten Hopp 89bda3
--- 71,77 ----
Karsten Hopp 89bda3
  	$(CXX) $(CXXFLAGS) -DFEAT_GETTEXT -c $? -o $@
Karsten Hopp 89bda3
  
Karsten Hopp 89bda3
  $(RES): gvimext_ming.rc
Karsten Hopp 89bda3
! 	$(WINDRES) $(WINDRES_FLAGS) --input-format=rc --output-format=coff -DMING $? -o $@
Karsten Hopp 89bda3
  
Karsten Hopp 89bda3
  clean: clean-custom
Karsten Hopp 89bda3
  	-$(DEL)  $(OBJ) $(RES) $(DLL)
Karsten Hopp 89bda3
*** ../vim-7.3.092/src/Make_ming.mak	2010-11-03 21:59:23.000000000 +0100
Karsten Hopp 89bda3
--- src/Make_ming.mak	2010-12-30 14:42:51.000000000 +0100
Karsten Hopp 89bda3
***************
Karsten Hopp 89bda3
*** 56,61 ****
Karsten Hopp 89bda3
--- 56,67 ----
Karsten Hopp 89bda3
  NETBEANS=$(GUI)
Karsten Hopp 89bda3
  
Karsten Hopp 89bda3
  
Karsten Hopp 89bda3
+ # Link against the shared version of libstdc++ by default.  Set
Karsten Hopp 89bda3
+ # STATIC_STDCPLUS to "yes" to link against static version instead.
Karsten Hopp 89bda3
+ ifndef STATIC_STDCPLUS
Karsten Hopp 89bda3
+ STATIC_STDCPLUS=no
Karsten Hopp 89bda3
+ endif
Karsten Hopp 89bda3
+ 
Karsten Hopp 89bda3
  # If the user doesn't want gettext, undefine it.
Karsten Hopp 89bda3
  ifeq (no, $(GETTEXT))
Karsten Hopp 89bda3
  GETTEXT=
Karsten Hopp 89bda3
***************
Karsten Hopp 89bda3
*** 309,320 ****
Karsten Hopp 89bda3
  endif
Karsten Hopp 89bda3
  endif
Karsten Hopp 89bda3
  CC := $(CROSS_COMPILE)gcc
Karsten Hopp 89bda3
! WINDRES := $(CROSS_COMPILE)windres --preprocessor="$(CC) -E -xc" -DRC_INVOKED
Karsten Hopp 89bda3
  
Karsten Hopp 89bda3
  #>>>>> end of choices
Karsten Hopp 89bda3
  ###########################################################################
Karsten Hopp 89bda3
  
Karsten Hopp 89bda3
  CFLAGS = -Iproto $(DEFINES) -pipe -w -march=$(ARCH) -Wall
Karsten Hopp 89bda3
  
Karsten Hopp 89bda3
  ifdef GETTEXT
Karsten Hopp 89bda3
  DEFINES += -DHAVE_GETTEXT -DHAVE_LOCALE_H
Karsten Hopp 89bda3
--- 315,328 ----
Karsten Hopp 89bda3
  endif
Karsten Hopp 89bda3
  endif
Karsten Hopp 89bda3
  CC := $(CROSS_COMPILE)gcc
Karsten Hopp 89bda3
! WINDRES := $(CROSS_COMPILE)windres
Karsten Hopp 89bda3
! WINDRES_CC = $(CC)
Karsten Hopp 89bda3
  
Karsten Hopp 89bda3
  #>>>>> end of choices
Karsten Hopp 89bda3
  ###########################################################################
Karsten Hopp 89bda3
  
Karsten Hopp 89bda3
  CFLAGS = -Iproto $(DEFINES) -pipe -w -march=$(ARCH) -Wall
Karsten Hopp 89bda3
+ WINDRES_FLAGS = --preprocessor="$(WINDRES_CC) -E -xc" -DRC_INVOKED
Karsten Hopp 89bda3
  
Karsten Hopp 89bda3
  ifdef GETTEXT
Karsten Hopp 89bda3
  DEFINES += -DHAVE_GETTEXT -DHAVE_LOCALE_H
Karsten Hopp 89bda3
***************
Karsten Hopp 89bda3
*** 577,584 ****
Karsten Hopp 89bda3
  endif
Karsten Hopp 89bda3
  
Karsten Hopp 89bda3
  ifeq (yes, $(OLE))
Karsten Hopp 89bda3
! LIB += -loleaut32 -lstdc++
Karsten Hopp 89bda3
  OBJ += $(OUTDIR)/if_ole.o
Karsten Hopp 89bda3
  endif
Karsten Hopp 89bda3
  
Karsten Hopp 89bda3
  ifeq (yes, $(MBYTE))
Karsten Hopp 89bda3
--- 585,597 ----
Karsten Hopp 89bda3
  endif
Karsten Hopp 89bda3
  
Karsten Hopp 89bda3
  ifeq (yes, $(OLE))
Karsten Hopp 89bda3
! LIB += -loleaut32
Karsten Hopp 89bda3
  OBJ += $(OUTDIR)/if_ole.o
Karsten Hopp 89bda3
+ ifeq (yes, $(STATIC_STDCPLUS))
Karsten Hopp 89bda3
+ LIB += -Wl,-Bstatic -lstdc++ -Wl,-Bdynamic
Karsten Hopp 89bda3
+ else
Karsten Hopp 89bda3
+ LIB += -lstdc++
Karsten Hopp 89bda3
+ endif
Karsten Hopp 89bda3
  endif
Karsten Hopp 89bda3
  
Karsten Hopp 89bda3
  ifeq (yes, $(MBYTE))
Karsten Hopp 89bda3
***************
Karsten Hopp 89bda3
*** 656,665 ****
Karsten Hopp 89bda3
  	$(CC) -c $(CFLAGS) $< -o $@
Karsten Hopp 89bda3
  
Karsten Hopp 89bda3
  $(OUTDIR)/vimres.res: vim.rc version.h gui_w32_rc.h
Karsten Hopp 89bda3
! 	$(WINDRES) $(DEFINES) vim.rc $(OUTDIR)/vimres.res
Karsten Hopp 89bda3
  
Karsten Hopp 89bda3
  $(OUTDIR)/vimrc.o: $(OUTDIR)/vimres.res
Karsten Hopp 89bda3
! 	$(WINDRES) $(OUTDIR)/vimres.res $(OUTDIR)/vimrc.o
Karsten Hopp 89bda3
  
Karsten Hopp 89bda3
  $(OUTDIR):
Karsten Hopp 89bda3
  	$(MKDIR) $(OUTDIR)
Karsten Hopp 89bda3
--- 669,678 ----
Karsten Hopp 89bda3
  	$(CC) -c $(CFLAGS) $< -o $@
Karsten Hopp 89bda3
  
Karsten Hopp 89bda3
  $(OUTDIR)/vimres.res: vim.rc version.h gui_w32_rc.h
Karsten Hopp 89bda3
! 	$(WINDRES) $(WINDRES_FLAGS) $(DEFINES) vim.rc $(OUTDIR)/vimres.res
Karsten Hopp 89bda3
  
Karsten Hopp 89bda3
  $(OUTDIR)/vimrc.o: $(OUTDIR)/vimres.res
Karsten Hopp 89bda3
! 	$(WINDRES) $(WINDRES_FLAGS) $(OUTDIR)/vimres.res $(OUTDIR)/vimrc.o
Karsten Hopp 89bda3
  
Karsten Hopp 89bda3
  $(OUTDIR):
Karsten Hopp 89bda3
  	$(MKDIR) $(OUTDIR)
Karsten Hopp 89bda3
*** ../vim-7.3.092/src/version.c	2010-12-30 14:47:32.000000000 +0100
Karsten Hopp 89bda3
--- src/version.c	2010-12-30 14:48:34.000000000 +0100
Karsten Hopp 89bda3
***************
Karsten Hopp 89bda3
*** 716,717 ****
Karsten Hopp 89bda3
--- 716,719 ----
Karsten Hopp 89bda3
  {   /* Add new patch number below this line */
Karsten Hopp 89bda3
+ /**/
Karsten Hopp 89bda3
+     93,
Karsten Hopp 89bda3
  /**/
Karsten Hopp 89bda3
Karsten Hopp 89bda3
-- 
Karsten Hopp 89bda3
Creating the world with Emacs:   M-x let-there-be-light
Karsten Hopp 89bda3
Creating the world with Vim:     :make world
Karsten Hopp 89bda3
Karsten Hopp 89bda3
 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
Karsten Hopp 89bda3
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
Karsten Hopp 89bda3
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
Karsten Hopp 89bda3
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///