mirror of
https://github.com/vim/vim.git
synced 2025-09-25 03:54:15 -04:00
updated for version 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)
This commit is contained in:
@@ -17,6 +17,17 @@ CROSS = no
|
|||||||
# check also the executables
|
# check also the executables
|
||||||
MINGWOLD = no
|
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)
|
ifeq ($(CROSS),yes)
|
||||||
DEL = rm
|
DEL = rm
|
||||||
ifeq ($(MINGWOLD),yes)
|
ifeq ($(MINGWOLD),yes)
|
||||||
@@ -33,7 +44,9 @@ DEL = del
|
|||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
CXX := $(CROSS_COMPILE)g++
|
CXX := $(CROSS_COMPILE)g++
|
||||||
WINDRES := $(CROSS_COMPILE)windres --preprocessor="$(CXX) -E -xc" -DRC_INVOKED
|
WINDRES := $(CROSS_COMPILE)windres
|
||||||
|
WINDRES_CXX = $(CXX)
|
||||||
|
WINDRES_FLAGS = --preprocessor="$(WINDRES_CXX) -E -xc" -DRC_INVOKED
|
||||||
LIBS := -luuid
|
LIBS := -luuid
|
||||||
RES := gvimext.res
|
RES := gvimext.res
|
||||||
DEFFILE = gvimext_ming.def
|
DEFFILE = gvimext_ming.def
|
||||||
@@ -46,7 +59,7 @@ DLL := gvimext.dll
|
|||||||
all: all-before $(DLL) all-after
|
all: all-before $(DLL) all-after
|
||||||
|
|
||||||
$(DLL): $(OBJ) $(RES) $(DEFFILE)
|
$(DLL): $(OBJ) $(RES) $(DEFFILE)
|
||||||
$(CXX) -shared $(CXXFLAGS) -s -o $@ \
|
$(CXX) $(LDFLAGS) $(CXXFLAGS) -s -o $@ \
|
||||||
-Wl,--enable-auto-image-base \
|
-Wl,--enable-auto-image-base \
|
||||||
-Wl,--enable-auto-import \
|
-Wl,--enable-auto-import \
|
||||||
-Wl,--whole-archive \
|
-Wl,--whole-archive \
|
||||||
@@ -58,7 +71,7 @@ gvimext.o: gvimext.cpp
|
|||||||
$(CXX) $(CXXFLAGS) -DFEAT_GETTEXT -c $? -o $@
|
$(CXX) $(CXXFLAGS) -DFEAT_GETTEXT -c $? -o $@
|
||||||
|
|
||||||
$(RES): gvimext_ming.rc
|
$(RES): gvimext_ming.rc
|
||||||
$(WINDRES) --input-format=rc --output-format=coff -DMING $? -o $@
|
$(WINDRES) $(WINDRES_FLAGS) --input-format=rc --output-format=coff -DMING $? -o $@
|
||||||
|
|
||||||
clean: clean-custom
|
clean: clean-custom
|
||||||
-$(DEL) $(OBJ) $(RES) $(DLL)
|
-$(DEL) $(OBJ) $(RES) $(DLL)
|
||||||
|
@@ -56,6 +56,12 @@ CSCOPE=yes
|
|||||||
NETBEANS=$(GUI)
|
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.
|
# If the user doesn't want gettext, undefine it.
|
||||||
ifeq (no, $(GETTEXT))
|
ifeq (no, $(GETTEXT))
|
||||||
GETTEXT=
|
GETTEXT=
|
||||||
@@ -309,12 +315,14 @@ DIRSLASH = \\
|
|||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
CC := $(CROSS_COMPILE)gcc
|
CC := $(CROSS_COMPILE)gcc
|
||||||
WINDRES := $(CROSS_COMPILE)windres --preprocessor="$(CC) -E -xc" -DRC_INVOKED
|
WINDRES := $(CROSS_COMPILE)windres
|
||||||
|
WINDRES_CC = $(CC)
|
||||||
|
|
||||||
#>>>>> end of choices
|
#>>>>> end of choices
|
||||||
###########################################################################
|
###########################################################################
|
||||||
|
|
||||||
CFLAGS = -Iproto $(DEFINES) -pipe -w -march=$(ARCH) -Wall
|
CFLAGS = -Iproto $(DEFINES) -pipe -w -march=$(ARCH) -Wall
|
||||||
|
WINDRES_FLAGS = --preprocessor="$(WINDRES_CC) -E -xc" -DRC_INVOKED
|
||||||
|
|
||||||
ifdef GETTEXT
|
ifdef GETTEXT
|
||||||
DEFINES += -DHAVE_GETTEXT -DHAVE_LOCALE_H
|
DEFINES += -DHAVE_GETTEXT -DHAVE_LOCALE_H
|
||||||
@@ -577,8 +585,13 @@ endif
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq (yes, $(OLE))
|
ifeq (yes, $(OLE))
|
||||||
LIB += -loleaut32 -lstdc++
|
LIB += -loleaut32
|
||||||
OBJ += $(OUTDIR)/if_ole.o
|
OBJ += $(OUTDIR)/if_ole.o
|
||||||
|
ifeq (yes, $(STATIC_STDCPLUS))
|
||||||
|
LIB += -Wl,-Bstatic -lstdc++ -Wl,-Bdynamic
|
||||||
|
else
|
||||||
|
LIB += -lstdc++
|
||||||
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq (yes, $(MBYTE))
|
ifeq (yes, $(MBYTE))
|
||||||
@@ -656,10 +669,10 @@ $(OUTDIR)/%.o : %.c $(INCL)
|
|||||||
$(CC) -c $(CFLAGS) $< -o $@
|
$(CC) -c $(CFLAGS) $< -o $@
|
||||||
|
|
||||||
$(OUTDIR)/vimres.res: vim.rc version.h gui_w32_rc.h
|
$(OUTDIR)/vimres.res: vim.rc version.h gui_w32_rc.h
|
||||||
$(WINDRES) $(DEFINES) vim.rc $(OUTDIR)/vimres.res
|
$(WINDRES) $(WINDRES_FLAGS) $(DEFINES) vim.rc $(OUTDIR)/vimres.res
|
||||||
|
|
||||||
$(OUTDIR)/vimrc.o: $(OUTDIR)/vimres.res
|
$(OUTDIR)/vimrc.o: $(OUTDIR)/vimres.res
|
||||||
$(WINDRES) $(OUTDIR)/vimres.res $(OUTDIR)/vimrc.o
|
$(WINDRES) $(WINDRES_FLAGS) $(OUTDIR)/vimres.res $(OUTDIR)/vimrc.o
|
||||||
|
|
||||||
$(OUTDIR):
|
$(OUTDIR):
|
||||||
$(MKDIR) $(OUTDIR)
|
$(MKDIR) $(OUTDIR)
|
||||||
|
@@ -714,6 +714,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
93,
|
||||||
/**/
|
/**/
|
||||||
92,
|
92,
|
||||||
/**/
|
/**/
|
||||||
|
Reference in New Issue
Block a user