From: Graham Knop Date: Mon, 18 Apr 2016 20:22:47 +0000 (-0400) Subject: update bundled ExtUtils::HasCompiler to 0.013 X-Git-Tag: v2.000003~4 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=d1fb38f211f41ff3dc2c078b32d25a3de07d5af3;p=p5sagit%2Fstrictures.git update bundled ExtUtils::HasCompiler to 0.013 --- diff --git a/inc/ExtUtils/HasCompiler.pm b/inc/ExtUtils/HasCompiler.pm index 06d4efc..b767232 100644 --- a/inc/ExtUtils/HasCompiler.pm +++ b/inc/ExtUtils/HasCompiler.pm @@ -1,5 +1,5 @@ package ExtUtils::HasCompiler; -$ExtUtils::HasCompiler::VERSION = '0.012'; +$ExtUtils::HasCompiler::VERSION = '0.013'; use strict; use warnings; @@ -108,8 +108,8 @@ sub can_compile_loadable_object { else { my @extra; if ($^O eq 'MSWin32') { - push @extra, "$abs_basename.def"; - push @extra, '-l' . ($libperl =~ /lib([^.]+)\./)[0]; + my $lib = '-l' . ($libperl =~ /lib([^.]+)\./)[0]; + push @extra, "$abs_basename.def", $lib, $perllibs; } elsif ($^O eq 'cygwin') { push @extra, catfile($incdir, $config->get('useshrplib') ? 'libperl.dll.a' : 'libperl.a'); @@ -118,8 +118,11 @@ sub can_compile_loadable_object { $lddlflags =~ s/\Q$(BASEEXT)\E/$abs_basename/; $lddlflags =~ s/\Q$(PERL_INC)\E/$incdir/; } + elsif ($^O eq 'android') { + push @extra, qq{"-L$incdir"}, '-lperl', $perllibs; + } push @commands, qq{$cc $ccflags $optimize "-I$incdir" $cccdlflags -c $source_name -o $object_file}; - push @commands, qq{$cc $optimize $object_file -o $loadable_object $lddlflags @extra $perllibs}; + push @commands, qq{$cc $optimize $object_file -o $loadable_object $lddlflags @extra}; } for my $command (@commands) { @@ -132,7 +135,7 @@ sub can_compile_loadable_object { require DynaLoader; local @DynaLoader::dl_require_symbols = "boot_$basename"; - my $handle = DynaLoader::dl_load_file($loadable_object, 0); + my $handle = DynaLoader::dl_load_file(File::Spec->rel2abs($loadable_object), 0); if ($handle) { my $symbol = DynaLoader::dl_find_symbol($handle, "boot_$basename") or do { carp "Couldn't find boot symbol for $basename"; return }; my $compilet = DynaLoader::dl_install_xsub('__ANON__::__ANON__', $symbol, $source_name); @@ -168,7 +171,7 @@ ExtUtils::HasCompiler - Check for the presence of a compiler =head1 VERSION -version 0.012 +version 0.013 =head1 DESCRIPTION