From f2b95d5434b1692df81ebadbdab8bcd7b9ad7bcc Mon Sep 17 00:00:00 2001 From: Pavan Deolasee Date: Wed, 17 Jun 2015 15:11:55 +0530 Subject: Do not add pthread to LDFLAGS at the top level Makefile. 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 | 4 ++-- src/backend/Makefile | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/Makefile.global.in b/src/Makefile.global.in index 0d103f1e53..1287c0d2eb 100644 --- a/src/Makefile.global.in +++ b/src/Makefile.global.in @@ -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@ diff --git a/src/backend/Makefile b/src/backend/Makefile index 517bafee77..ad175be511 100644 --- a/src/backend/Makefile +++ b/src/backend/Makefile @@ -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 -- cgit v1.2.3