lkundrak / rpms / vim

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