diff --git a/src/Makefile.shlib b/src/Makefile.shlib index 1e08698b49..b8cbc96b28 100644 --- a/src/Makefile.shlib +++ b/src/Makefile.shlib @@ -329,7 +329,11 @@ $(shlib): $(OBJS) | $(SHLIB_PREREQS) rm -f $(stlib) $(LINK.static) $(stlib) $^ $(RANLIB) $(stlib) +ifeq (,$(SHLIB_EXPORTS)) $(MKLDEXPORT) $(stlib) $(shlib) >$(exports_file) +else + ( echo '#! $(shlib)'; $(AWK) '/^[^#]/ {printf "%s\n",$$1}' $(SHLIB_EXPORTS) ) >$(exports_file) +endif $(COMPILER) -o $(shlib) $(stlib) -Wl,-bE:$(exports_file) $(LDFLAGS) $(LDFLAGS_SL) $(SHLIB_LINK) rm -f $(stlib) $(AR) $(AROPT) $(stlib) $(shlib) diff --git a/src/port/README b/src/port/README index c446b46e26..97f18a6233 100644 --- a/src/port/README +++ b/src/port/README @@ -28,5 +28,5 @@ applications. from libpgport are linked first. This avoids having applications dependent on symbols that are _used_ by libpq, but not intended to be exported by libpq. libpq's libpgport usage changes over time, so such a -dependency is a problem. Windows, Linux, and macOS use an export list to -control the symbols exported by libpq. +dependency is a problem. Windows, Linux, AIX, and macOS use an export +list to control the symbols exported by libpq.