From: Graham Knop Date: Tue, 19 Apr 2016 11:45:04 +0000 (-0400) Subject: update bundled ExtUtils::HasCompiler to 0.013 X-Git-Tag: v0.31~3 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=gitmo%2FClass-C3.git;a=commitdiff_plain;h=42540a11d837aebeea83a57607ab75a42289f10f update bundled ExtUtils::HasCompiler to 0.013 --- diff --git a/Changes b/Changes index 31e28be..3163c44 100644 --- a/Changes +++ b/Changes @@ -1,5 +1,8 @@ Revision history for Perl extension Class::C3. + - update bundled ExtUtils::HasCompiler to 0.013 to fix possible false + negative (RT#113635) + 0.30 - 2015-10-19 - include ExtUtils::HasCompiler in dist as intended so it doesn't need to be installed 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