postgres.git / summary / log / commit / refs
commit 3aa082f37aca0b14ffdd90167e236c228d73b586
Author: Tom Lane <tgl@sss.pgh.pa.us>
Date: Wed Oct 10 01:04:30 2012 +0000
First released in: 9.3.0, 8.3.22, 8.4.15, 9.0.11, 9.1.7, 9.2.2
Fix PGXS support for building loadable modules on AIX.
Building a shlib on AIX requires use of the mkldexport.sh script, but we
failed to install that, preventing its use from non-source-tree contexts.
Also, Makefile.aix had the wrong idea about where to find the installed
copy of the postgres.imp symbol file used by AIX.
Per report from John Pierce. Patch all the way back, since this has been
broken since the beginning of PGXS.
src/backend/Makefile | 3 +++
src/makefiles/Makefile.aix | 5 +++--
2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/backend/Makefile b/src/backend/Makefile
index 7e67bd3adf2..45e275e57d9 100644
--- a/src/backend/Makefile
+++ b/src/backend/Makefile
@@ -183,6 +183,7 @@ else
endif
ifeq ($(MAKE_EXPORTS), true)
$(INSTALL_DATA) $(POSTGRES_IMP) '$(DESTDIR)$(pkglibdir)/$(POSTGRES_IMP)'
+ $(INSTALL_PROGRAM) $(MKLDEXPORT) '$(DESTDIR)$(pgxsdir)/$(MKLDEXPORT_DIR)/mkldexport.sh'
endif
.PHONY: install-bin
@@ -201,6 +202,7 @@ endif
endif
ifeq ($(MAKE_EXPORTS), true)
$(mkinstalldirs) '$(DESTDIR)$(pkglibdir)'
+ $(mkinstalldirs) '$(DESTDIR)$(pgxsdir)/$(MKLDEXPORT_DIR)'
endif
@@ -210,6 +212,7 @@ uninstall:
rm -f '$(DESTDIR)$(bindir)/postgres$(X)' '$(DESTDIR)$(bindir)/postmaster'
ifeq ($(MAKE_EXPORTS), true)
rm -f '$(DESTDIR)$(pkglibdir)/$(POSTGRES_IMP)'
+ rm -f '$(DESTDIR)$(pgxsdir)/$(MKLDEXPORT_DIR)/mkldexport.sh'
endif
ifeq ($(PORTNAME), cygwin)
ifeq ($(MAKE_DLL), true)
diff --git a/src/makefiles/Makefile.aix b/src/makefiles/Makefile.aix
index 8a789352b63..4e48ac3797f 100644
--- a/src/makefiles/Makefile.aix
+++ b/src/makefiles/Makefile.aix
@@ -30,12 +30,13 @@ IMPSUFF= .imp
POSTGRES_IMP= postgres$(IMPSUFF)
ifdef PGXS
-BE_DLLLIBS= -Wl,-bI:$(bindir)/postgres/$(POSTGRES_IMP)
+BE_DLLLIBS= -Wl,-bI:$(pkglibdir)/$(POSTGRES_IMP)
else
BE_DLLLIBS= -Wl,-bI:$(top_builddir)/src/backend/$(POSTGRES_IMP)
endif
-MKLDEXPORT=$(top_srcdir)/src/backend/port/aix/mkldexport.sh
+MKLDEXPORT_DIR=src/backend/port/aix
+MKLDEXPORT=$(top_srcdir)/$(MKLDEXPORT_DIR)/mkldexport.sh
%$(EXPSUFF): %.o
$(MKLDEXPORT) $*.o > $*$(EXPSUFF)
[parent: 36df743a4ab6]