Author: kwilliams
Date: Sun Mar 8 12:24:50 2009
New Revision: 12582
Modified:
ExtUtils-CBuilder/trunk/lib/ExtUtils/CBuilder/Platform/Unix.pm
ExtUtils-CBuilder/trunk/lib/ExtUtils/CBuilder/Platform/cygwin.pm
Log:
Pull from blead, different way to override link_executable() behavior on Cygwin
Modified: ExtUtils-CBuilder/trunk/lib/ExtUtils/CBuilder/Platform/Unix.pm
==============================================================================
--- ExtUtils-CBuilder/trunk/lib/ExtUtils/CBuilder/Platform/Unix.pm
(original)
+++ ExtUtils-CBuilder/trunk/lib/ExtUtils/CBuilder/Platform/Unix.pm Sun Mar
8 12:24:50 2009
@@ -14,9 +14,7 @@
# bet for linking executables than $Config{ld}. Cygwin is a notable
# exception.
local $self->{config}{ld} =
- $self->isa('ExtUtils::CBuilder::Platform::cygwin')
- ? $self->{config}{ld}
- : ($self->{config}{cc} . " " . $self->{config}{ldflags});
+ $self->{config}{cc} . " " . $self->{config}{ldflags};
return $self->SUPER::link_executable(@_);
}
Modified: ExtUtils-CBuilder/trunk/lib/ExtUtils/CBuilder/Platform/cygwin.pm
==============================================================================
--- ExtUtils-CBuilder/trunk/lib/ExtUtils/CBuilder/Platform/cygwin.pm
(original)
+++ ExtUtils-CBuilder/trunk/lib/ExtUtils/CBuilder/Platform/cygwin.pm Sun Mar
8 12:24:50 2009
@@ -8,6 +8,13 @@
$VERSION = '0.24';
@ISA = qw(ExtUtils::CBuilder::Platform::Unix);
+sub link_executable {
+ my $self = shift;
+ # $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) = @_;