diff options
author | Piotr Roszatycki <piotr.roszatycki@gmail.com> | 2014-01-15 23:34:57 +0100 |
---|---|---|
committer | Brian Fraser <fraserbn@gmail.com> | 2014-01-26 14:44:25 -0300 |
commit | c90d5ec59020989afd7b7e3516ec1aa04b6ad39d (patch) | |
tree | a1a5fc40163e5acbcb65c0c7f94af391046a6185 /dist | |
parent | d639e0aecc2eda6c070c5a9e99189b931537a9b6 (diff) | |
download | perl-c90d5ec59020989afd7b7e3516ec1aa04b6ad39d.tar.gz |
ExtUtils::CBuilder: Android with useshrplib needs -lperl
Diffstat (limited to 'dist')
-rw-r--r-- | dist/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Platform/android.pm | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/dist/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Platform/android.pm b/dist/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Platform/android.pm new file mode 100644 index 0000000000..5e3e29b44a --- /dev/null +++ b/dist/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Platform/android.pm @@ -0,0 +1,27 @@ +package ExtUtils::CBuilder::Platform::android; + +use strict; +use File::Spec; +use ExtUtils::CBuilder::Platform::Unix; + +use vars qw($VERSION @ISA); +$VERSION = '0.280212'; +@ISA = qw(ExtUtils::CBuilder::Platform::Unix); + +# The Android linker will not recognize symbols from +# libperl unless the module explicitly depends on it. +sub link { + my ($self, %args) = @_; + + if ($self->{config}{useshrplib}) { + $args{extra_linker_flags} = [ + $self->split_like_shell($args{extra_linker_flags}), + '-L' . $self->perl_inc(), + '-lperl', + ]; + } + + return $self->SUPER::link(%args); +} + +1; |