summarylogtreecommitdiffstats
path: root/postgresql-9.4.1-pl-tcl.patch
blob: 99e62633a9bf3b9cae658d35876de6209742db3b (plain)
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
--- postgresql-9.4.1/src/pl/tcl/Makefile.orig	2015-02-10 21:23:07.259800000 +0300
+++ postgresql-9.4.1/src/pl/tcl/Makefile	2015-02-10 21:24:31.189800000 +0300
@@ -29,9 +29,10 @@
 endif
 
 
+SHLIB_LINK = $(TCL_LIB_SPEC) $(TCL_LIBS)
 # On Windows, we don't link directly with the Tcl library; see below
 ifneq ($(PORTNAME), win32)
-SHLIB_LINK = $(TCL_LIB_SPEC) $(TCL_LIBS) -lc
+SHLIB_LINK += -lc
 endif
 
 
@@ -47,25 +48,6 @@
 # where to find psql for running the tests
 PSQLDIR = $(bindir)
 
-# Tcl on win32 ships with import libraries only for Microsoft Visual C++,
-# which are not compatible with mingw gcc. Therefore we need to build a
-# new import library to link with.
-ifeq ($(PORTNAME), win32)
-
-tclwithver = $(subst -l,,$(filter -l%, $(TCL_LIB_SPEC)))
-TCLDLL = $(dir $(TCLSH))/$(tclwithver).dll
-
-OBJS += lib$(tclwithver).a
-
-lib$(tclwithver).a: $(tclwithver).def
-	dlltool --dllname $(tclwithver).dll --def $(tclwithver).def --output-lib lib$(tclwithver).a
-
-$(tclwithver).def: $(TCLDLL)
-	pexports $^ > $@
-
-endif # win32
-
-
 include $(top_srcdir)/src/Makefile.shlib
 
 ifeq ($(TCL_SHARED_BUILD), 1)
@@ -116,7 +98,4 @@
 clean distclean maintainer-clean: clean-lib
 	rm -f $(OBJS)
 	rm -rf $(pg_regress_clean_files)
-ifeq ($(PORTNAME), win32)
-	rm -f $(tclwithver).def
-endif
 	$(MAKE) -C modules $@