diff options
author | David Mitchell <davem@iabyn.com> | 2009-06-28 00:57:45 +0100 |
---|---|---|
committer | David Mitchell <davem@iabyn.com> | 2009-06-28 00:57:45 +0100 |
commit | 673223b5b27396bd3627d91146cf8611c03c304d (patch) | |
tree | 67ef601843890de81323146aa833018b4c154f08 /lib/ExtUtils | |
parent | 6653081c26e47ff513afff9907ee295b58e4ccd8 (diff) | |
download | perl-673223b5b27396bd3627d91146cf8611c03c304d.tar.gz |
upgrade to ExtUtils::CBuilder 0.25
Diffstat (limited to 'lib/ExtUtils')
-rw-r--r-- | lib/ExtUtils/CBuilder.pm | 2 | ||||
-rw-r--r-- | lib/ExtUtils/CBuilder/Base.pm | 2 | ||||
-rw-r--r-- | lib/ExtUtils/CBuilder/Changes | 20 | ||||
-rw-r--r-- | lib/ExtUtils/CBuilder/Platform/Unix.pm | 7 | ||||
-rw-r--r-- | lib/ExtUtils/CBuilder/Platform/VMS.pm | 2 | ||||
-rw-r--r-- | lib/ExtUtils/CBuilder/Platform/Windows.pm | 12 | ||||
-rw-r--r-- | lib/ExtUtils/CBuilder/Platform/aix.pm | 2 | ||||
-rw-r--r-- | lib/ExtUtils/CBuilder/Platform/cygwin.pm | 8 | ||||
-rw-r--r-- | lib/ExtUtils/CBuilder/Platform/darwin.pm | 2 | ||||
-rw-r--r-- | lib/ExtUtils/CBuilder/Platform/dec_osf.pm | 2 | ||||
-rw-r--r-- | lib/ExtUtils/CBuilder/Platform/os2.pm | 2 | ||||
-rw-r--r-- | lib/ExtUtils/CBuilder/t/02-link.t | 7 |
12 files changed, 49 insertions, 19 deletions
diff --git a/lib/ExtUtils/CBuilder.pm b/lib/ExtUtils/CBuilder.pm index 87ac82d667..b6ee7c06cd 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 a4c03ee7ca..ed58384e00 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 5285e516e6..e56a8a6d71 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 9332c78cb5..5671057733 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 168e318095..740356acaa 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 c23347fcb3..db15838c15 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 9589e4466d..cb273e07b8 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 b787cebedb..ade91a2e0f 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 ddb1af9511..e4c5811135 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 b0a1f9ad71..ae92b2c4d6 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 b3dafccae1..02d6780613 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 30ecbe5d3b..49b9274536 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) { |