Re: Fwd: Fwd: android support

Brooks Moses <[email protected]>
Newsgroups gmane.comp.gnu.libtool.patches
Message-ID <CAOxa4KrHu_L0pRuusP0=3buoP+dW4m9xwbAoeZGN0oeTR2wOAQ@mail.gmail.com>
On Tue, Sep 10, 2013 at 1:05 AM, David Turner <[email protected]> wrote:
> Also, in case you're interested, I've an updated patch that also prevents
> adding a DT_RUNPATH in the .dynamic section (the Android system linker
> doesn't support it). This is purely cosmetic though, the initial patch is ok
> too. Just let me know if you want the update.

Update received (off-list), and committed as attached.

Marco, let us know if this gives you any issues.

Thanks,
- Brooks
0001-libtool-Add-Android-Linux-support.patch (application/octet-stream, 1.6 KB)
From 8eeeb00daef8c4f720c9b79a0cdb89225d9909b6 Mon Sep 17 00:00:00 2001
From: David 'Digit' Turner <[email protected]>
Date: Tue, 8 Oct 2013 14:37:32 -0700
Subject: [PATCH] libtool: Add Android/Linux support.

This patch adds proper Android support to libtool. The main
issues are the following:

  - Versioned libraries are not supported by the platform and
    its build/packaging tools.

  - The dynamic linker is not GNU ld, there is no support for
    DT_RUNPATH.

  - Similarly, there is no ldconfig.
---
 m4/libtool.m4 | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)

diff --git a/m4/libtool.m4 b/m4/libtool.m4
index 80d7e44..080272c 100644
--- a/m4/libtool.m4
+++ b/m4/libtool.m4
@@ -2683,6 +2683,26 @@ linux*oldld* | linux*aout* | linux*coff*)
   dynamic_linker=no
   ;;
 
+linux*android*)
+  version_type=none # Android doesn't support versioned libraries.
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='$libname$release$shared_ext'
+  soname_spec='$libname$release$shared_ext'
+  finish_cmds=
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+
+  # This implies no fast_install, which is unacceptable.
+  # Some rework will be needed to allow for fast_install
+  # before this can be enabled.
+  hardcode_into_libs=yes
+
+  dynamic_linker='Android linker'
+  # Don't embed -rpath directories since the linker doesn't support them.
+  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+  ;;
+
 # This must be glibc/ELF.
 linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
   version_type=linux # correct to gnu/linux during the next big refactor
-- 
1.8.4
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.