diff options
author | Brian Fraser <fraserbn@gmail.com> | 2014-02-05 22:38:41 -0300 |
---|---|---|
committer | Brian Fraser <fraserbn@gmail.com> | 2014-02-05 23:12:17 -0300 |
commit | da3056236f3adff9cb89b3fa6b5247a94527f38e (patch) | |
tree | b4ee1c66fa4fb41c9093898ec57893621d302f11 /ext | |
parent | c172110d040a37bfa910a9d0785a260671569c5c (diff) | |
download | perl-da3056236f3adff9cb89b3fa6b5247a94527f38e.tar.gz |
DynaLoader: On Android, define DLOPEN_WONT_DO_RELATIVE_PATHS
Android's linker will actually do relative paths just fine; the problem
is that it won't search from the current directory, only on
/vendor/lib, /system/lib, and whatever is in LD_LIBRARY_PATH.
While the core handles that just fine, bits of CPAN rather rightfully
expect this to work:
use lib 'foo' # puts foo/ in @INC
use My::Module::In::Foo; # calls dlopen() with foo/My/Module/...
# which will likely fail
So we take this route instead.
Diffstat (limited to 'ext')
-rw-r--r-- | ext/DynaLoader/hints/android.pl | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/ext/DynaLoader/hints/android.pl b/ext/DynaLoader/hints/android.pl new file mode 100644 index 0000000000..2b9a7aafbf --- /dev/null +++ b/ext/DynaLoader/hints/android.pl @@ -0,0 +1,11 @@ +# Android's linker will actually do relative paths just fine; the problem +# is that it won't search from the current directory, only on +# /vendor/lib, /system/lib, and whatever is in LD_LIBRARY_PATH. +# The core handles that just fine, but bits of CPAN rather rightfully +# expect things like these to work: +# use lib 'foo' # puts foo/ in @INC +# use My::Module::In::Foo; # calls dlopen() with foo/My/Module/... +# # which will likely fail +# So we take this route instead. +$self->{CCFLAGS} = $Config{ccflags} . ' -DDLOPEN_WONT_DO_RELATIVE_PATHS'; +1; |