CBuilder, link: On Android, always return absolute paths to libraries
authorBrian Fraser <fraserbn@gmail.com>
Mon, 3 Feb 2014 20:22:58 +0000 (21:22 +0100)
committerBrian Fraser <fraserbn@gmail.com>
Mon, 3 Feb 2014 21:46:32 +0000 (22:46 +0100)
commit0f8fd466a1b5d27fb08d8f768083393f9c3d3ffb
treeb20bcb5d90a1455a63c67fe45c3a9db2ce163c2c
parenta69492f5afa4bfb964605fd3f43c40392775c759
CBuilder, link: On Android, always return absolute paths to libraries

Several modules on CPAN expect being able to pass the library
name returned by ->link to DynaLoader::dl_load_file and have it Just Work.
However, because ->link returns relative paths, those modules ran afoul
of Android's linker, which will only look in a handful of hardcoded
system directories for relative libraries, plus whatever LD_LIBRARY_PATH
pointed to at the start of execution.

This commit makes ->link on Android always return an absolute path,
which will be found by the linker.
14 files changed:
dist/ExtUtils-CBuilder/lib/ExtUtils/CBuilder.pm
dist/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Base.pm
dist/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Platform/Unix.pm
dist/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Platform/VMS.pm
dist/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Platform/Windows.pm
dist/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Platform/Windows/BCC.pm
dist/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Platform/Windows/GCC.pm
dist/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Platform/Windows/MSVC.pm
dist/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Platform/aix.pm
dist/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Platform/android.pm
dist/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Platform/cygwin.pm
dist/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Platform/darwin.pm
dist/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Platform/dec_osf.pm
dist/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Platform/os2.pm