On 09/02/2014 14:10, Andrew Dunstan wrote:
On 02/09/2014 01:12 AM, Marco Atzeri wrote:
On 09/02/2014 00:06, Andrew Dunstan wrote:
On 02/08/2014 05:34 PM, Tom Lane wrote:
Hiroshi Inoue <in...@tpf.co.jp> writes:
Though I'm not a MINGW expert at all, I know dllwrap is a deprecated
tool and dlltool is almost a deprecated tool. Cygwin port is removing
the use of dllwrap and dlltool now. Isn't it better for MINGW port to
follow it?
Only way to make that happen is to prepare and test a patch ...
Yeah. Incidentally, we didn't quite get rid of dlltool for Cygwin. We
did get rid of dllwrap. But I agree this is worth trying for Mingw.
we should have get rid of dlltool on cygwin.
At least it is not used on my build
Regards
Marco
The send in a patch. The patch you sent in previously did not totally
remove it IIRC.
cheers
andrew
attached patch versus latest git.
except prepared_xacts test all others are fine
=======================
All 140 tests passed.
=======================
Regards
Marco
diff --git a/src/Makefile.global.in b/src/Makefile.global.in
index e0e9b79..eaf6ddf 100644
--- a/src/Makefile.global.in
+++ b/src/Makefile.global.in
@@ -518,6 +518,11 @@ ifeq ($(PORTNAME),win32)
LIBS += -lws2_32 -lshfolder
endif
+# missing for link on cygwin ?
+ifeq ($(PORTNAME),cygwin)
+libpq_pgport += $(LDAP_LIBS_FE)
+endif
+
# Not really standard libc functions, used by the backend.
TAS = @TAS@
diff --git a/src/Makefile.shlib b/src/Makefile.shlib
index a95e4d6..3d4b989 100644
--- a/src/Makefile.shlib
+++ b/src/Makefile.shlib
@@ -273,7 +273,7 @@ endif
ifeq ($(PORTNAME), cygwin)
LINK.shared = $(CC) -shared
ifdef SO_MAJOR_VERSION
- shlib = cyg$(NAME)$(DLSUFFIX)
+ shlib = cyg$(NAME)-$(SO_MAJOR_VERSION)$(DLSUFFIX)
endif
haslibarule = yes
endif
diff --git a/src/backend/Makefile b/src/backend/Makefile
index 356890d..bc744b9 100644
--- a/src/backend/Makefile
+++ b/src/backend/Makefile
@@ -62,18 +62,8 @@ endif
ifeq ($(PORTNAME), cygwin)
-postgres: $(OBJS) postgres.def libpostgres.a
- $(DLLTOOL) --dllname $@$(X) --output-exp $@.exp --def postgres.def
- $(CC) $(CFLAGS) $(LDFLAGS) $(LDFLAGS_EX) -o $@$(X)
-Wl,--base-file,$@.base $@.exp $(call expand_subsys,$(OBJS)) $(LIBS)
- $(DLLTOOL) --dllname $@$(X) --base-file $@.base --output-exp $@.exp
--def postgres.def
- $(CC) $(CFLAGS) $(LDFLAGS) $(LDFLAGS_EX)
-Wl,--stack,$(WIN32_STACK_RLIMIT) -o $@$(X) $@.exp $(call
expand_subsys,$(OBJS)) $(LIBS)
- rm -f $@.exp $@.base
-
-postgres.def: $(OBJS)
- $(DLLTOOL) --export-all --output-def $@ $(call expand_subsys,$^)
-
-libpostgres.a: postgres.def
- $(DLLTOOL) --dllname postgres.exe --def postgres.def --output-lib $@
+postgres libpostgres.a: $(OBJS)
+ $(CC) $(CFLAGS) $(LDFLAGS) $(LDFLAGS_EX) $(export_dynamic) $(call
expand_subsys,$^) $(LIBS) -o $@ -Wl,--stack,$(WIN32_STACK_RLIMIT)
-Wl,--export-all-symbols -Wl,--out-implib=libpostgres.a
endif # cygwin
diff --git a/src/interfaces/libpq/Makefile b/src/interfaces/libpq/Makefile
index 7f2d901..721e248 100644
--- a/src/interfaces/libpq/Makefile
+++ b/src/interfaces/libpq/Makefile
@@ -45,7 +45,7 @@ OBJS += ip.o md5.o
OBJS += encnames.o wchar.o
ifeq ($(PORTNAME), cygwin)
-override shlib = cyg$(NAME)$(DLSUFFIX)
+override shlib = cyg$(NAME)-$(SO_MAJOR_VERSION)$(DLSUFFIX)
endif
ifeq ($(PORTNAME), win32)
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers