summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndres Freund2022-08-25 03:37:54 +0000
committerAndres Freund2022-08-25 03:37:54 +0000
commit3fb0687d328b8eef6ab0ff80300e5746f4a777cb (patch)
treea672556ddc62b6612834534a1dd62e2e0746f1eb
parent82ac34db2036ec5b3cb32c9180f40549aa790dc2 (diff)
solaris: Use versioning scripts instead of -Bsymbolic
-Bsymbolic causes a lot of "ld: warning: symbol referencing errors" warnings. It's quite easy to add the symbol versioning script, we just need a slightly different parameter name. Reviewed-by: Peter Eisentraut <peter.eisentraut@enterprisedb.com> Discussion: https://postgr.es/m/20220823083436.whtntk3bn3qpnvmb@awork3.anarazel.de Discussion: https://postgr.es/m/7dae5979-c6c0-cec5-7a36-76a85aa8053d@enterprisedb.com
-rw-r--r--src/Makefile.shlib7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/Makefile.shlib b/src/Makefile.shlib
index e4658320f8b..b868c8cea6b 100644
--- a/src/Makefile.shlib
+++ b/src/Makefile.shlib
@@ -188,10 +188,15 @@ ifeq ($(PORTNAME), linux)
endif
ifeq ($(PORTNAME), solaris)
- LINK.shared = $(COMPILER) -shared -Wl,-Bsymbolic
+ LINK.shared = $(COMPILER) -shared
ifdef soname
LINK.shared += -Wl,-soname,$(soname)
endif
+ BUILD.exports = ( echo '{ global:'; $(AWK) '/^[^\#]/ {printf "%s;\n",$$1}' $<; echo ' local: *; };' ) >$@
+ exports_file = $(SHLIB_EXPORTS:%.txt=%.list)
+ ifneq (,$(exports_file))
+ LINK.shared += -Wl,-M$(exports_file)
+ endif
endif
ifeq ($(PORTNAME), cygwin)