aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBruce Momjian <bruce@momjian.us>2005-03-24 19:33:40 +0000
committerBruce Momjian <bruce@momjian.us>2005-03-24 19:33:40 +0000
commitd5595f986d643e5e0927d69a5f80e8c70633da71 (patch)
treed819704c3e66145760c772b47f14df1a12939f92 /src
parentb741e9d4199e03b40c68c6a6a2ac935fb09d983a (diff)
downloadpostgresql-d5595f986d643e5e0927d69a5f80e8c70633da71.tar.gz
postgresql-d5595f986d643e5e0927d69a5f80e8c70633da71.zip
Force PG client applications to link to non-shared libpgport before
linking to libpq. This insulates applications from changes in libpq's usage of libpgport functions. Backpatched to 8.0.X.
Diffstat (limited to 'src')
-rw-r--r--src/Makefile.global.in14
1 files changed, 12 insertions, 2 deletions
diff --git a/src/Makefile.global.in b/src/Makefile.global.in
index 68672e58966..908611489b0 100644
--- a/src/Makefile.global.in
+++ b/src/Makefile.global.in
@@ -1,5 +1,5 @@
# -*-makefile-*-
-# $PostgreSQL: pgsql/src/Makefile.global.in,v 1.208.4.1 2005/01/26 19:24:15 tgl Exp $
+# $PostgreSQL: pgsql/src/Makefile.global.in,v 1.208.4.2 2005/03/24 19:33:40 momjian Exp $
#------------------------------------------------------------------------------
# All PostgreSQL makefiles include this file and use the variables it sets,
@@ -306,7 +306,17 @@ libpq_srcdir = $(top_srcdir)/src/interfaces/libpq
libpq_builddir = $(top_builddir)/src/interfaces/libpq
endif
-libpq = -L$(libpq_builddir) -lpq
+# Force clients to pull symbols from the non-shared library libpgport
+# rather than pulling some libpgport symbols from libpq just because
+# libpq uses those functions too. This makes applications less
+# dependent on changes in libpq's usage of pgport. To do this we link to
+# pgport before libpq. This does cause duplicate -lpgport's to appear
+# on client link lines.
+ifdef PGXS
+libpq = -L$(libdir) -lpgport -L$(libpq_builddir) -lpq
+else
+libpq = -L$(top_builddir)/src/port -lpgport -L$(libpq_builddir) -lpq
+endif
# If doing static linking, shared library dependency can't be
# used so we specify pthread libs for every usage of libpq