diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2006-09-10 22:07:02 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2006-09-10 22:07:02 +0000 |
commit | 4ee24cbb55a17c6808338f22ca86bd8f24d6955b (patch) | |
tree | f9ee9385d806bcb380411cea23d1b5d278544ff9 /src | |
parent | 723af8e67a14c7ed4ba164929aeb6d6c5aa238f0 (diff) | |
download | postgresql-4ee24cbb55a17c6808338f22ca86bd8f24d6955b.tar.gz postgresql-4ee24cbb55a17c6808338f22ca86bd8f24d6955b.zip |
Install a cleaner solution to the AIX libpq linking problem, as per
an earlier discussion. Centralize assumptions about what libpq depends
on in one place in Makefile.global. I am unconvinced that this list
is complete, but since ecpg seems to have gotten along with just these
entries, we'll try it this way and see what happens.
Diffstat (limited to 'src')
-rw-r--r-- | src/Makefile.global.in | 23 | ||||
-rw-r--r-- | src/interfaces/ecpg/compatlib/Makefile | 5 | ||||
-rw-r--r-- | src/interfaces/ecpg/ecpglib/Makefile | 5 |
3 files changed, 16 insertions, 17 deletions
diff --git a/src/Makefile.global.in b/src/Makefile.global.in index f2a3a255f8c..a9ac4f6179f 100644 --- a/src/Makefile.global.in +++ b/src/Makefile.global.in @@ -1,5 +1,5 @@ # -*-makefile-*- -# $PostgreSQL: pgsql/src/Makefile.global.in,v 1.227 2006/09/09 03:15:40 tgl Exp $ +# $PostgreSQL: pgsql/src/Makefile.global.in,v 1.228 2006/09/10 22:07:02 tgl Exp $ #------------------------------------------------------------------------------ # All PostgreSQL makefiles include this file and use the variables it sets, @@ -336,23 +336,24 @@ libpq_srcdir = $(top_srcdir)/src/interfaces/libpq libpq_builddir = $(top_builddir)/src/interfaces/libpq endif -# This is for use for libraries linking to libpq. Because libpqport -# isn't created with the same link flags as libpq, it can't be used. -libpq = -L$(libpq_builddir) -lpq +# This macro is for use by libraries linking to libpq. (Because libpgport +# isn't created with the same link flags as libpq, it can't be used.) +libpq := -L$(libpq_builddir) -lpq -# If doing static linking, shared library dependency can't be -# used so we specify pthread libs for every usage of libpq +# If doing static linking, shared library dependency info isn't available, +# so add in the libraries that libpq depends on. ifeq ($(enable_shared), no) -libpq += $(PTHREAD_LIBS) +libpq += $(filter -lintl -lssl -lcrypto -lkrb5 -lcrypt, $(LIBS)) $(PTHREAD_LIBS) else -# AIX libraries do not remember their required libs so we have to force -# thread dependent libraires in the link +# On AIX even shared libraries do not remember their required libs, +# so again add in what libpq depends on. ifeq ($(PORTNAME), aix) -libpq += $(PTHREAD_LIBS) +libpq += $(filter -lintl -lssl -lcrypto -lkrb5 -lcrypt, $(LIBS)) $(PTHREAD_LIBS) endif endif -# Force clients to pull symbols from the non-shared library libpgport +# This macro is for use by client executables (not libraries) that use libpq. +# We 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 diff --git a/src/interfaces/ecpg/compatlib/Makefile b/src/interfaces/ecpg/compatlib/Makefile index f385d8b745e..6372e351fc0 100644 --- a/src/interfaces/ecpg/compatlib/Makefile +++ b/src/interfaces/ecpg/compatlib/Makefile @@ -4,7 +4,7 @@ # # Copyright (c) 1994, Regents of the University of California # -# $PostgreSQL: pgsql/src/interfaces/ecpg/compatlib/Makefile,v 1.24 2006/08/28 16:13:10 tgl Exp $ +# $PostgreSQL: pgsql/src/interfaces/ecpg/compatlib/Makefile,v 1.25 2006/09/10 22:07:02 tgl Exp $ # #------------------------------------------------------------------------- @@ -20,8 +20,7 @@ DLTYPE= library override CPPFLAGS := -I../include -I$(top_srcdir)/src/interfaces/ecpg/include \ -I$(libpq_srcdir) -I$(top_srcdir)/src/include/utils $(CPPFLAGS) override CFLAGS += $(PTHREAD_CFLAGS) -SHLIB_LINK = -L../ecpglib -lecpg -L../pgtypeslib -lpgtypes $(libpq) \ - $(filter -lintl -lssl -lcrypto -lkrb5 -lcrypt -lm, $(LIBS)) \ +SHLIB_LINK = -L../ecpglib -lecpg -L../pgtypeslib -lpgtypes $(libpq) -lm \ $(PTHREAD_LIBS) OBJS= informix.o diff --git a/src/interfaces/ecpg/ecpglib/Makefile b/src/interfaces/ecpg/ecpglib/Makefile index 3528133aa66..374432dd66e 100644 --- a/src/interfaces/ecpg/ecpglib/Makefile +++ b/src/interfaces/ecpg/ecpglib/Makefile @@ -4,7 +4,7 @@ # # Copyright (c) 1994, Regents of the University of California # -# $PostgreSQL: pgsql/src/interfaces/ecpg/ecpglib/Makefile,v 1.41 2006/08/28 16:13:11 tgl Exp $ +# $PostgreSQL: pgsql/src/interfaces/ecpg/ecpglib/Makefile,v 1.42 2006/09/10 22:07:02 tgl Exp $ # #------------------------------------------------------------------------- @@ -34,8 +34,7 @@ ifneq ($(PORTNAME), win32) OBJS += thread.o endif -SHLIB_LINK = -L../pgtypeslib -lpgtypes $(libpq) \ - $(filter -lintl -lssl -lcrypto -lkrb5 -lcrypt -lm, $(LIBS)) $(PTHREAD_LIBS) +SHLIB_LINK = -L../pgtypeslib -lpgtypes $(libpq) -lm $(PTHREAD_LIBS) ifeq ($(PORTNAME), win32) # Link to shfolder.dll instead of shell32.dll |