mirror of
https://github.com/postgres/postgres.git
synced 2025-07-21 16:02:15 +03:00
AIX: Link TRANSFORM modules with their dependencies.
The result closely resembles linking of these modules for the "win32" port. Augment the $(exports_file) header so the file is also usable as an import file. Unfortunately, relocating an AIX installation will now require adding $(pkglibdir) to LD_LIBRARY_PATH. Back-patch to 9.5, where the modules were introduced.
This commit is contained in:
@ -23,10 +23,15 @@ include $(top_builddir)/src/Makefile.global
|
|||||||
include $(top_srcdir)/contrib/contrib-global.mk
|
include $(top_srcdir)/contrib/contrib-global.mk
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
# In configurations that forbid undefined symbols in libraries, link with each
|
||||||
|
# dependency. This does preclude pgxs builds.
|
||||||
|
ifeq ($(PORTNAME), aix)
|
||||||
|
rpathdir = $(pkglibdir):$(perl_archlibexp)/CORE
|
||||||
|
SHLIB_LINK += ../hstore/libhstore.exp $(perl_embed_ldflags)
|
||||||
|
endif
|
||||||
ifeq ($(PORTNAME), win32)
|
ifeq ($(PORTNAME), win32)
|
||||||
# these settings are the same as for plperl
|
# these settings are the same as for plperl
|
||||||
override CPPFLAGS += -DPLPERL_HAVE_UID_GID -Wno-comment
|
override CPPFLAGS += -DPLPERL_HAVE_UID_GID -Wno-comment
|
||||||
# This means we need an in-tree build on Windows, not a pgxs build
|
|
||||||
SHLIB_LINK += ../hstore/libhstore.a $(wildcard ../../src/pl/plperl/libperl*.a)
|
SHLIB_LINK += ../hstore/libhstore.a $(wildcard ../../src/pl/plperl/libperl*.a)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
@ -23,8 +23,13 @@ include $(top_builddir)/src/Makefile.global
|
|||||||
include $(top_srcdir)/contrib/contrib-global.mk
|
include $(top_srcdir)/contrib/contrib-global.mk
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
# In configurations that forbid undefined symbols in libraries, link with each
|
||||||
|
# dependency. This does preclude pgxs builds.
|
||||||
|
ifeq ($(PORTNAME), aix)
|
||||||
|
rpathdir = $(pkglibdir):$(python_libdir)
|
||||||
|
SHLIB_LINK += ../hstore/libhstore.exp $(python_libspec) $(python_additional_libs) $(wildcard ../../src/pl/plpython/libplpython*.exp)
|
||||||
|
endif
|
||||||
ifeq ($(PORTNAME), win32)
|
ifeq ($(PORTNAME), win32)
|
||||||
# This means we need an in-tree build on Windows, not a pgxs build
|
|
||||||
SHLIB_LINK += ../hstore/libhstore.a $(wildcard ../../src/pl/plpython/libpython*.a) $(wildcard ../../src/pl/plpython/libplpython*.a)
|
SHLIB_LINK += ../hstore/libhstore.a $(wildcard ../../src/pl/plpython/libpython*.a) $(wildcard ../../src/pl/plpython/libplpython*.a)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
@ -23,8 +23,13 @@ include $(top_builddir)/src/Makefile.global
|
|||||||
include $(top_srcdir)/contrib/contrib-global.mk
|
include $(top_srcdir)/contrib/contrib-global.mk
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
# In configurations that forbid undefined symbols in libraries, link with each
|
||||||
|
# dependency. This does preclude pgxs builds.
|
||||||
|
ifeq ($(PORTNAME), aix)
|
||||||
|
rpathdir = $(pkglibdir):$(python_libdir)
|
||||||
|
SHLIB_LINK += $(python_libspec) $(python_additional_libs) $(wildcard ../../src/pl/plpython/libplpython*.exp)
|
||||||
|
endif
|
||||||
ifeq ($(PORTNAME), win32)
|
ifeq ($(PORTNAME), win32)
|
||||||
# This means we need an in-tree build on Windows, not a pgxs build
|
|
||||||
SHLIB_LINK += $(wildcard ../../src/pl/plpython/libpython*.a) $(wildcard ../../src/pl/plpython/libplpython*.a)
|
SHLIB_LINK += $(wildcard ../../src/pl/plpython/libpython*.a) $(wildcard ../../src/pl/plpython/libplpython*.a)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
@ -111,6 +111,7 @@ ifeq ($(PORTNAME), aix)
|
|||||||
shlib = lib$(NAME)$(DLSUFFIX).$(SO_MAJOR_VERSION)
|
shlib = lib$(NAME)$(DLSUFFIX).$(SO_MAJOR_VERSION)
|
||||||
endif
|
endif
|
||||||
haslibarule = yes
|
haslibarule = yes
|
||||||
|
# $(exports_file) is also usable as an import file
|
||||||
exports_file = lib$(NAME).exp
|
exports_file = lib$(NAME).exp
|
||||||
endif
|
endif
|
||||||
|
|
||||||
@ -341,7 +342,7 @@ $(shlib) $(stlib): $(OBJS) | $(SHLIB_PREREQS)
|
|||||||
rm -f $(stlib)
|
rm -f $(stlib)
|
||||||
$(LINK.static) $(stlib) $^
|
$(LINK.static) $(stlib) $^
|
||||||
$(RANLIB) $(stlib)
|
$(RANLIB) $(stlib)
|
||||||
$(MKLDEXPORT) $(stlib) >$(exports_file)
|
$(MKLDEXPORT) $(stlib) $(shlib) >$(exports_file)
|
||||||
$(COMPILER) -o $(shlib) $(stlib) -Wl,-bE:$(exports_file) $(LDFLAGS) $(LDFLAGS_SL) $(SHLIB_LINK)
|
$(COMPILER) -o $(shlib) $(stlib) -Wl,-bE:$(exports_file) $(LDFLAGS) $(LDFLAGS_SL) $(SHLIB_LINK)
|
||||||
rm -f $(stlib)
|
rm -f $(stlib)
|
||||||
$(AR) $(AROPT) $(stlib) $(shlib)
|
$(AR) $(AROPT) $(stlib) $(shlib)
|
||||||
|
Reference in New Issue
Block a user