summaryrefslogtreecommitdiffstats
path: root/source/ap/vim/patches/7.3.093
blob: 9bf0fe8a4f25ad202c028093a5560bd89f0b838b (about) (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
To: vim_dev@googlegroups.com
Subject: Patch 7.3.093
Fcc: outbox
From: Bram Moolenaar <Bram@moolenaar.net>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
------------

Patch 7.3.093
Problem:    New DLL dependencies in MingW with gcc 4.5.0.
Solution:   Add STATIC_STDCPLUS, LDFLAGS and split up WINDRES. (Guopeng Wen)
Files:      src/GvimExt/Make_ming.mak, src/Make_ming.mak


*** ../vim-7.3.092/src/GvimExt/Make_ming.mak	2010-09-29 18:42:25.000000000 +0200
--- src/GvimExt/Make_ming.mak	2010-12-30 14:42:51.000000000 +0100
***************
*** 17,22 ****
--- 17,33 ----
  # 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)
***************
*** 33,39 ****
  endif
  endif
  CXX := $(CROSS_COMPILE)g++
! WINDRES := $(CROSS_COMPILE)windres --preprocessor="$(CXX) -E -xc" -DRC_INVOKED
  LIBS :=  -luuid
  RES  := gvimext.res
  DEFFILE = gvimext_ming.def
--- 44,52 ----
  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
***************
*** 46,52 ****
  all: all-before $(DLL) all-after
  
  $(DLL): $(OBJ) $(RES) $(DEFFILE)
! 	$(CXX) -shared $(CXXFLAGS) -s -o $@ \
  		-Wl,--enable-auto-image-base \
  		-Wl,--enable-auto-import \
  		-Wl,--whole-archive \
--- 59,65 ----
  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 \
***************
*** 58,64 ****
  	$(CXX) $(CXXFLAGS) -DFEAT_GETTEXT -c $? -o $@
  
  $(RES): gvimext_ming.rc
! 	$(WINDRES) --input-format=rc --output-format=coff -DMING $? -o $@
  
  clean: clean-custom
  	-$(DEL)  $(OBJ) $(RES) $(DLL)
--- 71,77 ----
  	$(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)
*** ../vim-7.3.092/src/Make_ming.mak	2010-11-03 21:59:23.000000000 +0100
--- src/Make_ming.mak	2010-12-30 14:42:51.000000000 +0100
***************
*** 56,61 ****
--- 56,67 ----
  NETBEANS=$(GUI)
  
  
+ # Link against the shared version of libstdc++ by default.  Set
+ # STATIC_STDCPLUS to "yes" to link against static version instead.
+ ifndef STATIC_STDCPLUS
+ STATIC_STDCPLUS=no
+ endif
+ 
  # If the user doesn't want gettext, undefine it.
  ifeq (no, $(GETTEXT))
  GETTEXT=
***************
*** 309,320 ****
  endif
  endif
  CC := $(CROSS_COMPILE)gcc
! WINDRES := $(CROSS_COMPILE)windres --preprocessor="$(CC) -E -xc" -DRC_INVOKED
  
  #>>>>> end of choices
  ###########################################################################
  
  CFLAGS = -Iproto $(DEFINES) -pipe -w -march=$(ARCH) -Wall
  
  ifdef GETTEXT
  DEFINES += -DHAVE_GETTEXT -DHAVE_LOCALE_H
--- 315,328 ----
  endif
  endif
  CC := $(CROSS_COMPILE)gcc
! WINDRES := $(CROSS_COMPILE)windres
! WINDRES_CC = $(CC)
  
  #>>>>> end of choices
  ###########################################################################
  
  CFLAGS = -Iproto $(DEFINES) -pipe -w -march=$(ARCH) -Wall
+ WINDRES_FLAGS = --preprocessor="$(WINDRES_CC) -E -xc" -DRC_INVOKED
  
  ifdef GETTEXT
  DEFINES += -DHAVE_GETTEXT -DHAVE_LOCALE_H
***************
*** 577,584 ****
  endif
  
  ifeq (yes, $(OLE))
! LIB += -loleaut32 -lstdc++
  OBJ += $(OUTDIR)/if_ole.o
  endif
  
  ifeq (yes, $(MBYTE))
--- 585,597 ----
  endif
  
  ifeq (yes, $(OLE))
! LIB += -loleaut32
  OBJ += $(OUTDIR)/if_ole.o
+ ifeq (yes, $(STATIC_STDCPLUS))
+ LIB += -Wl,-Bstatic -lstdc++ -Wl,-Bdynamic
+ else
+ LIB += -lstdc++
+ endif
  endif
  
  ifeq (yes, $(MBYTE))
***************
*** 656,665 ****
  	$(CC) -c $(CFLAGS) $< -o $@
  
  $(OUTDIR)/vimres.res: vim.rc version.h gui_w32_rc.h
! 	$(WINDRES) $(DEFINES) vim.rc $(OUTDIR)/vimres.res
  
  $(OUTDIR)/vimrc.o: $(OUTDIR)/vimres.res
! 	$(WINDRES) $(OUTDIR)/vimres.res $(OUTDIR)/vimrc.o
  
  $(OUTDIR):
  	$(MKDIR) $(OUTDIR)
--- 669,678 ----
  	$(CC) -c $(CFLAGS) $< -o $@
  
  $(OUTDIR)/vimres.res: vim.rc version.h gui_w32_rc.h
! 	$(WINDRES) $(WINDRES_FLAGS) $(DEFINES) vim.rc $(OUTDIR)/vimres.res
  
  $(OUTDIR)/vimrc.o: $(OUTDIR)/vimres.res
! 	$(WINDRES) $(WINDRES_FLAGS) $(OUTDIR)/vimres.res $(OUTDIR)/vimrc.o
  
  $(OUTDIR):
  	$(MKDIR) $(OUTDIR)
*** ../vim-7.3.092/src/version.c	2010-12-30 14:47:32.000000000 +0100
--- src/version.c	2010-12-30 14:48:34.000000000 +0100
***************
*** 716,717 ****
--- 716,719 ----
  {   /* Add new patch number below this line */
+ /**/
+     93,
  /**/

-- 
Creating the world with Emacs:   M-x let-there-be-light
Creating the world with Vim:     :make world

 /// 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    ///