aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/Makefile.shlib4
-rw-r--r--src/port/README4
2 files changed, 6 insertions, 2 deletions
diff --git a/src/Makefile.shlib b/src/Makefile.shlib
index 1e08698b497..b8cbc96b28b 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 c446b46e26e..97f18a62338 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.