summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAmit Khandekar2011-12-22 04:47:17 +0000
committerAmit Khandekar2011-12-22 04:47:17 +0000
commit2140b647f169e236dbe652106245e240ce2aa865 (patch)
tree71601e217c69218f74b25870529789de7f831d9f
parentef0e9f95e51e4828f69da452f0eb97b413bbc2c9 (diff)
Fix for Bug id:3425212:
Failed to build on Ubuntu 11.10 Ubuntu 11 no longer has the libpthread.so in the usual locations like /lib or /usr/lib. We have hardcoded -lpthread linker option used in gtm module. The fix is to instead use PTHREAD_CFLAGS macro that is defined in src/Makefile.global. This macro has the correct pthread options already. In this particular issue, the -pthread (not -lpthread) option was the one that was needed to resolve the compile errors. The backend postgres executable also needs this option in case of XC, because it uses functions from src/interfaces/libpq/fe-secure.c which in turn uses pthread calls.
-rw-r--r--src/backend/Makefile4
-rw-r--r--src/gtm/main/Makefile4
-rw-r--r--src/gtm/proxy/Makefile4
3 files changed, 12 insertions, 0 deletions
diff --git a/src/backend/Makefile b/src/backend/Makefile
index 905ba06414..ecca4cf36d 100644
--- a/src/backend/Makefile
+++ b/src/backend/Makefile
@@ -17,6 +17,10 @@ subdir = src/backend
top_builddir = ../..
include $(top_builddir)/src/Makefile.global
+ifneq ($(PORTNAME), win32)
+override CFLAGS += $(PTHREAD_CFLAGS)
+endif
+
SUBDIRS = access bootstrap catalog parser commands executor foreign lib libpq \
pgxc main nodes optimizer port postmaster regex replication rewrite \
storage tcop tsearch utils $(top_builddir)/src/timezone $(top_builddir)/src/interfaces/libpq
diff --git a/src/gtm/main/Makefile b/src/gtm/main/Makefile
index dec85372ee..506685cc75 100644
--- a/src/gtm/main/Makefile
+++ b/src/gtm/main/Makefile
@@ -3,6 +3,10 @@
top_builddir=../../..
include $(top_builddir)/src/Makefile.global
+ifneq ($(PORTNAME), win32)
+override CFLAGS += $(PTHREAD_CFLAGS)
+endif
+
OBJS=main.o gtm_thread.o gtm_txn.o gtm_seq.o gtm_snap.o gtm_time.o gtm_standby.o gtm_opt.o
OTHERS= ../libpq/libpqcomm.a ../path/libgtmpath.a ../recovery/libgtmrecovery.a ../client/libgtmclient.a ../common/libgtm.a ../../port/libpgport.a
diff --git a/src/gtm/proxy/Makefile b/src/gtm/proxy/Makefile
index b2faab35eb..7d319a609d 100644
--- a/src/gtm/proxy/Makefile
+++ b/src/gtm/proxy/Makefile
@@ -3,6 +3,10 @@
top_builddir=../../..
include $(top_builddir)/src/Makefile.global
+ifneq ($(PORTNAME), win32)
+override CFLAGS += $(PTHREAD_CFLAGS)
+endif
+
OBJS=proxy_main.o proxy_thread.o proxy_utils.o gtm_proxy_opt.o
OTHERS= ../libpq/libpqcomm.a ../path/libgtmpath.a ../recovery/libgtmrecovery.a ../client/libgtmclient.a ../common/libgtm.a