Skip to content

Commit 90adf5e

Browse files
peterepull[bot]
authored andcommitted
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
1 parent 3a49f4e commit 90adf5e

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/Makefile.shlib

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,11 @@ endif
183183
ifeq ($(PORTNAME), linux)
184184
LINK.shared = $(COMPILER) -shared
185185
ifdef soname
186+
ifneq (,$(findstring linux-android,$(host_os)))
187+
# Android uses unversioned shared libraries
188+
shlib = $(shlib_bare)
189+
soname = $(shlib_bare)
190+
endif
186191
LINK.shared += -Wl,-soname,$(soname)
187192
endif
188193
BUILD.exports = ( echo '{ global:'; $(AWK) '/^[^\#]/ {printf "%s;\n",$$1}' $<; echo ' local: *; };' ) >$@

0 commit comments

Comments
 (0)