Commit 3f88fa97 authored by Tom Lane's avatar Tom Lane

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.
parent 7e0cce02
...@@ -235,6 +235,7 @@ else ...@@ -235,6 +235,7 @@ else
endif endif
ifeq ($(MAKE_EXPORTS), true) ifeq ($(MAKE_EXPORTS), true)
$(INSTALL_DATA) $(POSTGRES_IMP) '$(DESTDIR)$(pkglibdir)/$(POSTGRES_IMP)' $(INSTALL_DATA) $(POSTGRES_IMP) '$(DESTDIR)$(pkglibdir)/$(POSTGRES_IMP)'
$(INSTALL_PROGRAM) $(MKLDEXPORT) '$(DESTDIR)$(pgxsdir)/$(MKLDEXPORT_DIR)/mkldexport.sh'
endif endif
.PHONY: install-bin .PHONY: install-bin
...@@ -253,6 +254,7 @@ endif ...@@ -253,6 +254,7 @@ endif
endif endif
ifeq ($(MAKE_EXPORTS), true) ifeq ($(MAKE_EXPORTS), true)
$(MKDIR_P) '$(DESTDIR)$(pkglibdir)' $(MKDIR_P) '$(DESTDIR)$(pkglibdir)'
$(MKDIR_P) '$(DESTDIR)$(pgxsdir)/$(MKLDEXPORT_DIR)'
endif endif
...@@ -262,6 +264,7 @@ uninstall: ...@@ -262,6 +264,7 @@ uninstall:
rm -f '$(DESTDIR)$(bindir)/postgres$(X)' '$(DESTDIR)$(bindir)/postmaster' rm -f '$(DESTDIR)$(bindir)/postgres$(X)' '$(DESTDIR)$(bindir)/postmaster'
ifeq ($(MAKE_EXPORTS), true) ifeq ($(MAKE_EXPORTS), true)
rm -f '$(DESTDIR)$(pkglibdir)/$(POSTGRES_IMP)' rm -f '$(DESTDIR)$(pkglibdir)/$(POSTGRES_IMP)'
rm -f '$(DESTDIR)$(pgxsdir)/$(MKLDEXPORT_DIR)/mkldexport.sh'
endif endif
ifeq ($(PORTNAME), cygwin) ifeq ($(PORTNAME), cygwin)
ifeq ($(MAKE_DLL), true) ifeq ($(MAKE_DLL), true)
......
...@@ -27,12 +27,13 @@ endif ...@@ -27,12 +27,13 @@ endif
POSTGRES_IMP= postgres.imp POSTGRES_IMP= postgres.imp
ifdef PGXS ifdef PGXS
BE_DLLLIBS= -Wl,-bI:$(bindir)/postgres/$(POSTGRES_IMP) BE_DLLLIBS= -Wl,-bI:$(pkglibdir)/$(POSTGRES_IMP)
else else
BE_DLLLIBS= -Wl,-bI:$(top_builddir)/src/backend/$(POSTGRES_IMP) BE_DLLLIBS= -Wl,-bI:$(top_builddir)/src/backend/$(POSTGRES_IMP)
endif endif
MKLDEXPORT=$(top_srcdir)/src/backend/port/aix/mkldexport.sh MKLDEXPORT_DIR=src/backend/port/aix
MKLDEXPORT=$(top_srcdir)/$(MKLDEXPORT_DIR)/mkldexport.sh
%.exp: %.o %.exp: %.o
$(MKLDEXPORT) $^ >$@ $(MKLDEXPORT) $^ >$@
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment