Hi,

In order to ship libpq on Android, it needs to be built without a version
suffix on the .so file.
The attached patch will make sure that no version is added when built for
Android.
I was wondering if there are a) any comments on the approach and if I
should be handed in for a commitfest (currently waiting for the cooldown
period after account activation, I am not sure how long that is)

Thank you for any feedback
Matthias
diff --git a/src/Makefile.shlib b/src/Makefile.shlib
index 92d893e..4801b7a 100644
--- a/src/Makefile.shlib
+++ b/src/Makefile.shlib
@@ -187,7 +187,13 @@ endif
 ifeq ($(PORTNAME), linux)
   LINK.shared		= $(COMPILER) -shared
   ifdef soname
-    LINK.shared		+= -Wl,-soname,$(soname)
+    ifeq (linux-android,$(findstring linux-android,$(host_os)))
+        #crosscompiling for android needs to create unvesioned libs
+        shlib		= lib$(NAME)$(DLSUFFIX)
+        LINK.shared		+= -Wl,-soname,lib$(NAME)$(DLSUFFIX)
+    else
+        LINK.shared		+= -Wl,-soname,$(soname)
+    endif
   endif
   BUILD.exports		= ( echo '{ global:'; $(AWK) '/^[^\#]/ {printf "%s;\n",$$1}' $<; echo ' local: *; };' ) >$@
   exports_file		= $(SHLIB_EXPORTS:%.txt=%.list)

Reply via email to