aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPeter Eisentraut <peter@eisentraut.org>2024-01-23 20:37:49 +0100
committerPeter Eisentraut <peter@eisentraut.org>2024-01-23 20:37:49 +0100
commit79b03dbb3304539c6599593397c6a6b63b6a6ad9 (patch)
treeca97dacd4eee80d45193e8fe4e14cb6110c328ab /src
parentf4447af5b1a644af89e065410cdb12fe776cac47 (diff)
downloadpostgresql-79b03dbb3304539c6599593397c6a6b63b6a6ad9.tar.gz
postgresql-79b03dbb3304539c6599593397c6a6b63b6a6ad9.zip
Support shared libraries on Android (using make)
While the rest of the make build system maps Android to Linux, Android uses unversioned shared libraries (like "libpq.so"). This patch makes it so. (Meson already supported it.) Reported-by: Matthias Kuhn <matthias@opengis.ch> Discussion: https://www.postgresql.org/message-id/flat/CAC7zN94TdsHhY88XkroJzSMx7E%3DBQpV9LKKjNSEnTM04ihoWCA%40mail.gmail.com
Diffstat (limited to 'src')
-rw-r--r--src/Makefile.shlib5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/Makefile.shlib b/src/Makefile.shlib
index f94d59d1c59..8ca51ca03f7 100644
--- a/src/Makefile.shlib
+++ b/src/Makefile.shlib
@@ -183,6 +183,11 @@ endif
ifeq ($(PORTNAME), linux)
LINK.shared = $(COMPILER) -shared
ifdef soname
+ ifneq (,$(findstring linux-android,$(host_os)))
+ # Android uses unversioned shared libraries
+ shlib = $(shlib_bare)
+ soname = $(shlib_bare)
+ endif
LINK.shared += -Wl,-soname,$(soname)
endif
BUILD.exports = ( echo '{ global:'; $(AWK) '/^[^\#]/ {printf "%s;\n",$$1}' $<; echo ' local: *; };' ) >$@