From: David Mitchell Date: Sat, 27 Jun 2009 23:57:45 +0000 (+0100) Subject: upgrade to ExtUtils::CBuilder 0.25 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=673223b5b27396bd3627d91146cf8611c03c304d;p=p5sagit%2Fp5-mst-13.2.git upgrade to ExtUtils::CBuilder 0.25 --- diff --git a/Porting/Maintainers.pl b/Porting/Maintainers.pl index 4cb8a01..6d3c2bf 100755 --- a/Porting/Maintainers.pl +++ b/Porting/Maintainers.pl @@ -600,7 +600,7 @@ package Maintainers; 'ExtUtils::CBuilder' => { 'MAINTAINER' => 'kwilliams', - 'DISTRIBUTION' => 'KWILLIAMS/ExtUtils-CBuilder-0.24.tar.gz', + 'DISTRIBUTION' => 'DAGOLDEN/ExtUtils-CBuilder-0.25.tar.gz', 'FILES' => q[lib/ExtUtils/CBuilder.pm lib/ExtUtils/CBuilder], 'EXCLUDED' => [ qw{bleadcheck.pl}, ], 'CPAN' => 1, diff --git a/lib/ExtUtils/CBuilder.pm b/lib/ExtUtils/CBuilder.pm index 87ac82d..b6ee7c0 100644 --- a/lib/ExtUtils/CBuilder.pm +++ b/lib/ExtUtils/CBuilder.pm @@ -5,7 +5,7 @@ use File::Path (); use File::Basename (); use vars qw($VERSION @ISA); -$VERSION = '0.24_01'; +$VERSION = '0.25'; $VERSION = eval $VERSION; # Okay, this is the brute-force method of finding out what kind of diff --git a/lib/ExtUtils/CBuilder/Base.pm b/lib/ExtUtils/CBuilder/Base.pm index a4c03ee..ed58384 100644 --- a/lib/ExtUtils/CBuilder/Base.pm +++ b/lib/ExtUtils/CBuilder/Base.pm @@ -9,7 +9,7 @@ use Text::ParseWords; use IO::File; use vars qw($VERSION); -$VERSION = '0.24'; +$VERSION = '0.25'; sub new { my $class = shift; diff --git a/lib/ExtUtils/CBuilder/Changes b/lib/ExtUtils/CBuilder/Changes index 5285e51..e56a8a6 100644 --- a/lib/ExtUtils/CBuilder/Changes +++ b/lib/ExtUtils/CBuilder/Changes @@ -1,5 +1,25 @@ Revision history for Perl extension ExtUtils::CBuilder. +0.25 - Fri Jun 26 16:18:13 EDT 2009 + + - Slight diagnostic improvements in link.t + +0.24_01 - Sun Mar 8 14:50:10 2009 + + - On Windows, don't generate "mt" command when CRT is statically + linked. [Jan Dubois] + + - On Cygwin, examine $Config{useshrplib} to see whether we're + supposed to be linking with a shared perl library or not. [Reini + Urban] + + - In link_executable() on Cygwin, trust $Config{ld} rather than using + $Config{cc} for linking. [Reini Urban] + + - Add 'haiku' as a Unix-like platform. [Ingo Weinhold] + +0.24 - Fri Aug 15 22:01:48 2008 + - Added 'gnu' and 'gnukfreebsd' as Unix variants. [Niko Tyni] - Brought in some VMS fixes from bleadperl: "Correct and complete diff --git a/lib/ExtUtils/CBuilder/Platform/Unix.pm b/lib/ExtUtils/CBuilder/Platform/Unix.pm index 9332c78..5671057 100644 --- a/lib/ExtUtils/CBuilder/Platform/Unix.pm +++ b/lib/ExtUtils/CBuilder/Platform/Unix.pm @@ -4,12 +4,15 @@ use strict; use ExtUtils::CBuilder::Base; use vars qw($VERSION @ISA); -$VERSION = '0.24'; +$VERSION = '0.25'; @ISA = qw(ExtUtils::CBuilder::Base); sub link_executable { my $self = shift; - # $Config{cc} is usually a better bet for linking executables than $Config{ld} + + # On some platforms (which ones??) $Config{cc} seems to be a better + # bet for linking executables than $Config{ld}. Cygwin is a notable + # exception. local $self->{config}{ld} = $self->{config}{cc} . " " . $self->{config}{ldflags}; return $self->SUPER::link_executable(@_); diff --git a/lib/ExtUtils/CBuilder/Platform/VMS.pm b/lib/ExtUtils/CBuilder/Platform/VMS.pm index 168e318..740356a 100644 --- a/lib/ExtUtils/CBuilder/Platform/VMS.pm +++ b/lib/ExtUtils/CBuilder/Platform/VMS.pm @@ -4,7 +4,7 @@ use strict; use ExtUtils::CBuilder::Base; use vars qw($VERSION @ISA); -$VERSION = '0.24'; +$VERSION = '0.25'; @ISA = qw(ExtUtils::CBuilder::Base); use File::Spec::Functions qw(catfile catdir); diff --git a/lib/ExtUtils/CBuilder/Platform/Windows.pm b/lib/ExtUtils/CBuilder/Platform/Windows.pm index c23347f..db15838 100644 --- a/lib/ExtUtils/CBuilder/Platform/Windows.pm +++ b/lib/ExtUtils/CBuilder/Platform/Windows.pm @@ -10,7 +10,7 @@ use ExtUtils::CBuilder::Base; use IO::File; use vars qw($VERSION @ISA); -$VERSION = '0.24'; +$VERSION = '0.25'; @ISA = qw(ExtUtils::CBuilder::Base); sub new { @@ -344,10 +344,12 @@ sub format_linker_cmd { $spec{output} , ) ]; - # Embed the manifest file if it exists - push @cmds, [ - 'if', 'exist', $spec{manifest}, 'mt', '-nologo', $spec{manifest}, '-outputresource:' . "$output;2" - ]; + # Embed the manifest file for VC 2005 (aka VC 8) or higher, but not for the 64-bit Platform SDK compiler + if ($cf->{ivsize} == 4 && $cf->{cc} eq 'cl' and $cf->{ccversion} =~ /^(\d+)/ and $1 >= 14) { + push @cmds, [ + 'if', 'exist', $spec{manifest}, 'mt', '-nologo', $spec{manifest}, '-outputresource:' . "$output;2" + ]; + } return @cmds; } diff --git a/lib/ExtUtils/CBuilder/Platform/aix.pm b/lib/ExtUtils/CBuilder/Platform/aix.pm index 9589e44..cb273e0 100644 --- a/lib/ExtUtils/CBuilder/Platform/aix.pm +++ b/lib/ExtUtils/CBuilder/Platform/aix.pm @@ -5,7 +5,7 @@ use ExtUtils::CBuilder::Platform::Unix; use File::Spec; use vars qw($VERSION @ISA); -$VERSION = '0.24'; +$VERSION = '0.25'; @ISA = qw(ExtUtils::CBuilder::Platform::Unix); sub need_prelink { 1 } diff --git a/lib/ExtUtils/CBuilder/Platform/cygwin.pm b/lib/ExtUtils/CBuilder/Platform/cygwin.pm index b787ceb..ade91a2 100644 --- a/lib/ExtUtils/CBuilder/Platform/cygwin.pm +++ b/lib/ExtUtils/CBuilder/Platform/cygwin.pm @@ -5,20 +5,22 @@ use File::Spec; use ExtUtils::CBuilder::Platform::Unix; use vars qw($VERSION @ISA); -$VERSION = '0.24_01'; # Change 34200 +$VERSION = '0.25'; @ISA = qw(ExtUtils::CBuilder::Platform::Unix); sub link_executable { my $self = shift; - # $Config{ld} is okay. revert the stupid Unix cc=ld override + # $Config{ld} is okay. Circumvent the Unix ld=cc override in the superclass. local $self->{config}{cc} = $self->{config}{ld}; return $self->SUPER::link_executable(@_); } sub link { my ($self, %args) = @_; + + my $lib = $self->{config}{useshrplib} ? 'libperl.dll.a' : 'libperl.a'; $args{extra_linker_flags} = [ - $self->perl_inc().'/'.($self->{config}{useshrplib} ? 'libperl.dll.a' : 'libperl.a'), + File::Spec->catfile($self->perl_inc(), $lib), $self->split_like_shell($args{extra_linker_flags}) ]; diff --git a/lib/ExtUtils/CBuilder/Platform/darwin.pm b/lib/ExtUtils/CBuilder/Platform/darwin.pm index ddb1af9..e4c5811 100644 --- a/lib/ExtUtils/CBuilder/Platform/darwin.pm +++ b/lib/ExtUtils/CBuilder/Platform/darwin.pm @@ -4,7 +4,7 @@ use strict; use ExtUtils::CBuilder::Platform::Unix; use vars qw($VERSION @ISA); -$VERSION = '0.24'; +$VERSION = '0.25'; @ISA = qw(ExtUtils::CBuilder::Platform::Unix); sub compile { diff --git a/lib/ExtUtils/CBuilder/Platform/dec_osf.pm b/lib/ExtUtils/CBuilder/Platform/dec_osf.pm index b0a1f9a..ae92b2c 100644 --- a/lib/ExtUtils/CBuilder/Platform/dec_osf.pm +++ b/lib/ExtUtils/CBuilder/Platform/dec_osf.pm @@ -6,7 +6,7 @@ use File::Spec; use vars qw($VERSION @ISA); @ISA = qw(ExtUtils::CBuilder::Platform::Unix); -$VERSION = '0.24'; +$VERSION = '0.25'; sub link_executable { my $self = shift; diff --git a/lib/ExtUtils/CBuilder/Platform/os2.pm b/lib/ExtUtils/CBuilder/Platform/os2.pm index b3dafcc..02d6780 100644 --- a/lib/ExtUtils/CBuilder/Platform/os2.pm +++ b/lib/ExtUtils/CBuilder/Platform/os2.pm @@ -4,7 +4,7 @@ use strict; use ExtUtils::CBuilder::Platform::Unix; use vars qw($VERSION @ISA); -$VERSION = '0.24'; +$VERSION = '0.25'; @ISA = qw(ExtUtils::CBuilder::Platform::Unix); sub need_prelink { 1 } diff --git a/lib/ExtUtils/CBuilder/t/02-link.t b/lib/ExtUtils/CBuilder/t/02-link.t index 30ecbe5..49b9274 100644 --- a/lib/ExtUtils/CBuilder/t/02-link.t +++ b/lib/ExtUtils/CBuilder/t/02-link.t @@ -49,7 +49,7 @@ ok $object_file = $b->compile(source => $source_file); # Link my ($exe_file, @temps); ($exe_file, @temps) = $b->link_executable(objects => $object_file); -ok $exe_file; +ok -e $exe_file; if ($^O eq 'os2') { # Analogue of LDLOADPATH... # Actually, not needed now, since we do not link with the generated DLL @@ -60,7 +60,10 @@ if ($^O eq 'os2') { # Analogue of LDLOADPATH... } # Try the executable -ok my_system($exe_file), 11; +my $ec = my_system($exe_file); +ok $ec, 11 + or print( $? == -1 ? "# Could not run '$exe_file'\n" + : "# Unexpected exit code '$ec'\n"); # Clean up for ($source_file, $object_file, $exe_file) {