]> git.ipfire.org Git - thirdparty/libtool.git/commitdiff
libtool: Add Android/Linux support.
authorDavid 'Digit' Turner <digit@google.com>
Tue, 8 Oct 2013 21:37:32 +0000 (14:37 -0700)
committerBrooks Moses <bmoses@google.com>
Tue, 8 Oct 2013 21:42:07 +0000 (14:42 -0700)
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

index 80d7e4433a68ba2bb7ece45b76c4e9a6574495ff..080272c5cfe6a4c0b463b3216e285239f0c525fc 100644 (file)
@@ -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