Skip to content

Commit 6975dcd

Browse files
committed
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.
1 parent 875406a commit 6975dcd

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

src/backend/Makefile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -219,6 +219,7 @@ else
219219
endif
220220
ifeq ($(MAKE_EXPORTS), true)
221221
$(INSTALL_DATA) $(POSTGRES_IMP) '$(DESTDIR)$(pkglibdir)/$(POSTGRES_IMP)'
222+
$(INSTALL_PROGRAM) $(MKLDEXPORT) '$(DESTDIR)$(pgxsdir)/$(MKLDEXPORT_DIR)/mkldexport.sh'
222223
endif
223224

224225
.PHONY: install-bin
@@ -237,6 +238,7 @@ endif
237238
endif
238239
ifeq ($(MAKE_EXPORTS), true)
239240
$(MKDIR_P) '$(DESTDIR)$(pkglibdir)'
241+
$(MKDIR_P) '$(DESTDIR)$(pgxsdir)/$(MKLDEXPORT_DIR)'
240242
endif
241243

242244

@@ -246,6 +248,7 @@ uninstall:
246248
rm -f '$(DESTDIR)$(bindir)/postgres$(X)' '$(DESTDIR)$(bindir)/postmaster'
247249
ifeq ($(MAKE_EXPORTS), true)
248250
rm -f '$(DESTDIR)$(pkglibdir)/$(POSTGRES_IMP)'
251+
rm -f '$(DESTDIR)$(pgxsdir)/$(MKLDEXPORT_DIR)/mkldexport.sh'
249252
endif
250253
ifeq ($(PORTNAME), cygwin)
251254
ifeq ($(MAKE_DLL), true)

src/makefiles/Makefile.aix

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,13 @@ endif
2727
POSTGRES_IMP= postgres.imp
2828

2929
ifdef PGXS
30-
BE_DLLLIBS= -Wl,-bI:$(bindir)/postgres/$(POSTGRES_IMP)
30+
BE_DLLLIBS= -Wl,-bI:$(pkglibdir)/$(POSTGRES_IMP)
3131
else
3232
BE_DLLLIBS= -Wl,-bI:$(top_builddir)/src/backend/$(POSTGRES_IMP)
3333
endif
3434

35-
MKLDEXPORT=$(top_srcdir)/src/backend/port/aix/mkldexport.sh
35+
MKLDEXPORT_DIR=src/backend/port/aix
36+
MKLDEXPORT=$(top_srcdir)/$(MKLDEXPORT_DIR)/mkldexport.sh
3637

3738
%.exp: %.o
3839
$(MKLDEXPORT) $^ >$@

0 commit comments

Comments
 (0)