Author: kwilliams
Date: Sun Dec 21 20:20:48 2008
New Revision: 12276
Modified:
ExtUtils-CBuilder/trunk/Changes
ExtUtils-CBuilder/trunk/lib/ExtUtils/CBuilder/Platform/Unix.pm
ExtUtils-CBuilder/trunk/lib/ExtUtils/CBuilder/Platform/Windows.pm
ExtUtils-CBuilder/trunk/lib/ExtUtils/CBuilder/Platform/cygwin.pm
Log:
Trust $Config{ld} when linking on Cygwin.
Modified: ExtUtils-CBuilder/trunk/Changes
==============================================================================
--- ExtUtils-CBuilder/trunk/Changes (original)
+++ ExtUtils-CBuilder/trunk/Changes Sun Dec 21 20:20:48 2008
@@ -4,6 +4,9 @@
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]
+
0.24 - Fri Aug 15 22:01:48 2008
- Added 'gnu' and 'gnukfreebsd' as Unix variants. [Niko Tyni]
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 Dec
21 20:20:48 2008
@@ -9,9 +9,14 @@
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};
+ $self->isa('ExtUtils::CBuilder::Platform::cygwin')
+ ? $self->{config}{ld}
+ : ($self->{config}{cc} . " " . $self->{config}{ldflags});
return $self->SUPER::link_executable(@_);
}
Modified: ExtUtils-CBuilder/trunk/lib/ExtUtils/CBuilder/Platform/Windows.pm
==============================================================================
--- ExtUtils-CBuilder/trunk/lib/ExtUtils/CBuilder/Platform/Windows.pm
(original)
+++ ExtUtils-CBuilder/trunk/lib/ExtUtils/CBuilder/Platform/Windows.pm Sun Dec
21 20:20:48 2008
@@ -347,7 +347,7 @@
# 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, [
- 'mt', '-nologo', $spec{manifest}, '-outputresource:' . "$output;2"
+ 'if', 'exist', $spec{manifest}, 'mt', '-nologo', $spec{manifest},
'-outputresource:' . "$output;2"
];
}
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 Dec
21 20:20:48 2008
@@ -8,14 +8,6 @@
$VERSION = '0.24';
@ISA = qw(ExtUtils::CBuilder::Platform::Unix);
-sub link_executable {
- my $self = shift;
- # $Config{ld} is set up as a special script for building
- # perl-linkable libraries. We don't want that here.
- local $self->{config}{ld} = 'gcc';
- return $self->SUPER::link_executable(@_);
-}
-
sub link {
my ($self, %args) = @_;