Do not add pthread to LDFLAGS at the top level Makefile.
authorPavan Deolasee <pavan.deolasee@gmail.com>
Wed, 17 Jun 2015 09:41:55 +0000 (15:11 +0530)
committerPavan Deolasee <pavan.deolasee@gmail.com>
Wed, 17 Jun 2015 09:41:55 +0000 (15:11 +0530)
This was added in XC/XL, may be for building GTM, but this creates problems in
symbol resolution where the system library symbols are used over those
redefined in src/port. This patch fixes that issue

src/Makefile.global.in
src/backend/Makefile

index 0d103f1e53c2f8b4f21865e8a2fc08ca1b2bdc4f..1287c0d2eb10d3972a78fa72e02e52082e80427d 100644 (file)
@@ -257,9 +257,9 @@ ld_R_works = @ld_R_works@
 # something.
 # PGXC_BEGIN
 ifdef PGXS
-  LDFLAGS = -L$(libdir) -lpthread
+  LDFLAGS = -L$(libdir)
 else
-  LDFLAGS = -L$(top_builddir)/src/port -L$(top_builddir)/src/common -lpthread
+  LDFLAGS = -L$(top_builddir)/src/port -L$(top_builddir)/src/common
 endif
 # PGXC_END
 LDFLAGS += @LDFLAGS@
index 517bafee77ff183329bc155271768f3ccf74a7fe..ad175be511293472d764d6544b13a338cbc00367 100644 (file)
@@ -40,6 +40,8 @@ endif
 endif
 
 OBJS = $(SUBDIROBJS) $(LOCALOBJS) \
+       $(top_builddir)/src/port/libpgport_srv.a \
+       $(top_builddir)/src/common/libpgcommon_srv.a \
        $(top_builddir)/src/interfaces/libpq/fe-connect.o \
        $(top_builddir)/src/interfaces/libpq/fe-secure.o \
        $(top_builddir)/src/interfaces/libpq/fe-misc.o \
@@ -48,11 +50,9 @@ OBJS = $(SUBDIROBJS) $(LOCALOBJS) \
        $(top_builddir)/src/interfaces/libpq/fe-exec.o \
        $(top_builddir)/src/interfaces/libpq/fe-auth.o \
        $(top_builddir)/src/interfaces/libpq/pqexpbuffer.o \
-       $(top_builddir)/src/port/libpgport_srv.a \
        $(top_builddir)/src/gtm/client/libgtmclient.a \
        $(top_builddir)/src/gtm/common/libgtm.a \
-       $(top_builddir)/src/gtm/libpq/libpqcomm.a        \
-       $(top_builddir)/src/common/libpgcommon_srv.a
+       $(top_builddir)/src/gtm/libpq/libpqcomm.a
 
 # We put libpgport and libpgcommon into OBJS, so remove it from LIBS; also add
 # libldap