Skip to content

Commit d0c01f2

Browse files
committed
Allow --enable-thread-safety with --disable-shared libraries by passing
PTHREAD_LIBS to all libpq-usage builds.
1 parent b549816 commit d0c01f2

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/Makefile.global.in

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# -*-makefile-*-
2-
# $PostgreSQL: pgsql/src/Makefile.global.in,v 1.206 2004/12/16 17:48:29 momjian Exp $
2+
# $PostgreSQL: pgsql/src/Makefile.global.in,v 1.207 2004/12/16 18:13:07 momjian Exp $
33

44
#------------------------------------------------------------------------------
55
# All PostgreSQL makefiles include this file and use the variables it sets,
@@ -308,11 +308,17 @@ endif
308308

309309
libpq = -L$(libpq_builddir) -lpq
310310

311+
# If doing static linking, shared library dependency can't be
312+
# used so we specify pthread libs for every usage of libpq
313+
ifeq ($(enable_shared), no)
314+
libpq += $(PTHREAD_LIBS)
315+
else
311316
# AIX libraries do not remember their required libs so we have to force
312317
# thread dependent libraires in the link
313318
ifeq ($(PORTNAME), aix)
314319
libpq += $(PTHREAD_LIBS)
315320
endif
321+
endif
316322

317323
submake-libpq:
318324
$(MAKE) -C $(libpq_builddir) all

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy