On 25/01/2014 22:42, Marco Atzeri wrote:
On 25/01/2014 19:23, Andrew Dunstan wrote:

On 01/24/2014 07:50 AM, Marco Atzeri wrote:


  * LDAP libraries - the way you have proposed surely isn't right. What
    we want is something more like this in the Makefile.global.in:
        ifeq ($(PORTNAME), cygwin)
        libpq_pgport += $(LDAP_LIBS_FE)
        endif

I will test in this way. I have no preferance on
the implemented solution.


your proposal builds fine.
----------------------------------------------------------------
--- origsrc/postgresql-9.3.2/src/Makefile.global.in 2013-12-02 21:57:48.000000000 +0100 +++ src/postgresql-9.3.2/src/Makefile.global.in 2014-01-25 22:46:36.484816700 +0100
@@ -508,6 +508,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.
----------------------------------------------------------------

Of course no difference on test results, as expected

Attached full patch as I am currently testing on 9.3.2

Regards
Marco
--- origsrc/postgresql-9.3.2/src/Makefile.global.in     2013-12-02 
21:57:48.000000000 +0100
+++ src/postgresql-9.3.2/src/Makefile.global.in 2014-01-25 22:46:36.484816700 
+0100
@@ -508,6 +508,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@
 
--- origsrc/postgresql-9.3.2/src/Makefile.shlib 2013-12-02 21:57:48.000000000 
+0100
+++ src/postgresql-9.3.2/src/Makefile.shlib     2014-01-24 23:05:08.601675200 
+0100
@@ -281,8 +281,9 @@ ifeq ($(PORTNAME), unixware)
 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
@@ -371,6 +372,12 @@ else # PORTNAME == cygwin || PORTNAME ==
 
 # If SHLIB_EXPORTS is set, the rules below will build a .def file from
 # that.  Else we build a temporary one here.
+ifeq ($(PORTNAME), cygwin)
+$(shlib) $(stlib): $(OBJS) | $(SHLIB_PREREQS)
+       $(CC) $(CFLAGS)  -shared -o $(shlib)  -Wl,--out-implib=$(stlib) $(OBJS) 
$(LDFLAGS) $(LDFLAGS_SL) $(SHLIB_LINK) $(LIBS) $(LDAP_LIBS_BE)
+
+
+else
 ifeq (,$(SHLIB_EXPORTS))
 DLL_DEFFILE = lib$(NAME)dll.def
 exports_file = $(DLL_DEFFILE)
@@ -387,6 +394,7 @@ $(shlib): $(OBJS) $(DLL_DEFFILE) | $(SHL
 $(stlib): $(shlib) $(DLL_DEFFILE) | $(SHLIB_PREREQS)
        $(DLLTOOL) --dllname $(shlib) $(DLLTOOL_LIBFLAGS) --def $(DLL_DEFFILE) 
--output-lib $@
 
+endif # PORTNAME == cygwin 
 endif # PORTNAME == cygwin || PORTNAME == win32
 
 
--- origsrc/postgresql-9.3.2/src/backend/Makefile       2013-12-02 
21:57:48.000000000 +0100
+++ src/postgresql-9.3.2/src/backend/Makefile   2014-01-24 23:05:08.621675200 
+0100
@@ -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
 
--- origsrc/postgresql-9.3.2/src/interfaces/libpq/Makefile      2013-12-02 
21:57:48.000000000 +0100
+++ src/postgresql-9.3.2/src/interfaces/libpq/Makefile  2014-01-24 
23:05:08.621675200 +0100
@@ -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)
--- origsrc/postgresql-9.3.2/src/makefiles/Makefile.cygwin      2013-12-02 
21:57:48.000000000 +0100
+++ src/postgresql-9.3.2/src/makefiles/Makefile.cygwin  2014-01-24 
23:05:08.641675200 +0100
@@ -1,6 +1,4 @@
 # src/makefiles/Makefile.cygwin
-DLLTOOL= dlltool
-DLLWRAP= dllwrap
 ifdef PGXS
 BE_DLLLIBS= -L$(libdir) -lpostgres
 else
@@ -44,6 +42,4 @@ endif
 
 # Rule for building a shared library from a single .o file
 %.dll: %.o
-       $(DLLTOOL) --export-all --output-def $*.def $<
-       $(DLLWRAP) -o $@ --def $*.def $< $(LDFLAGS) $(LDFLAGS_SL) $(BE_DLLLIBS)
-       rm -f $*.def
+        $(CC) $(CFLAGS)  -shared -o $@ $<  $(LDFLAGS) $(LDFLAGS_SL) 
$(BE_DLLLIBS)
--- origsrc/postgresql-9.3.2/src/test/regress/parallel_schedule 2013-12-02 
21:57:48.000000000 +0100
+++ src/postgresql-9.3.2/src/test/regress/parallel_schedule     2014-01-24 
23:05:08.651675200 +0100
@@ -78,7 +78,8 @@ ignore: random
 # ----------
 # Another group of parallel tests
 # ----------
-test: select_into select_distinct select_distinct_on select_implicit 
select_having subselect union case join aggregates transactions random portals 
arrays btree_index hash_index update namespace prepared_xacts delete
+test: select_into select_distinct select_distinct_on select_implicit 
select_having subselect union case join aggregates transactions random portals 
arrays btree_index hash_index update namespace  delete
+# test: prepared_xacts
 
 # ----------
 # Another group of parallel tests
-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to