8000 Use exported symbols list on macOS for loadable modules as well · petergeoghegan/postgres@3feff39 · GitHub
[go: up one dir, main page]

Skip to content

Commit 3feff39

Browse files
committed
Use exported symbols list on macOS for loadable modules as well
On macOS, when building with the make system, the exported symbols list $(SHLIB_EXPORTS) was ignored. This was probably not intentional, it was probably just forgotten, since that combination has never actually been used until now (for libpq-oauth). The meson build system handles this correctly. Also, other platforms have been doing this correctly. This fixes it. It also does a bit of refactoring to make the code match the layout for other platforms. Reviewed-by: Jacob Champion <jacob.champion@enterprisedb.com> Discussion: https://www.postgresql.org/message-id/flat/c70ca32e-b109-460d-9810-6e23ebb4473f%40eisentraut.org
1 parent 166b4f4 commit 3feff39

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Makefile.shlib

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ ifeq ($(PORTNAME), darwin)
112112
ifneq ($(SO_MAJOR_VERSION), 0)
113113
version_link = -compatibility_version $(SO_MAJOR_VERSION) -current_version $(SO_MAJOR_VERSION).$(SO_MINOR_VERSION)
114114
endif
115-
LINK.shared = $(COMPILER) -dynamiclib -install_name '$(libdir)/lib$(NAME).$(SO_MAJOR_VERSION)$(DLSUFFIX)' $(version_link) $(exported_symbols_list)
115+
LINK.shared = $(COMPILER) -dynamiclib -install_name '$(libdir)/lib$(NAME).$(SO_MAJOR_VERSION)$(DLSUFFIX)' $(version_link)
116116
shlib = lib$(NAME).$(SO_MAJOR_VERSION)$(DLSUFFIX)
117117
shlib_major = lib$(NAME).$(SO_MAJOR_VERSION)$(DLSUFFIX)
118118
else
@@ -122,7 +122,7 @@ ifeq ($(PORTNAME), darwin)
122122
BUILD.exports = $(AWK) '/^[^\#]/ {printf "_%s\n",$$1}' $< >$@
123123
exports_file = $(SHLIB_EXPORTS:%.txt=%.list)
124124
ifneq (,$(exports_file))
125-
exported_symbols_list = -exported_symbols_list $(exports_file)
125+
LINK.shared += -exported_symbols_list $(exports_file)
126126
endif
127127
endif
128128

0 commit comments

Comments
 (0)
0