diff options
Diffstat (limited to 'lib/ExtUtils')
-rw-r--r-- | lib/ExtUtils/CBuilder/Platform/cygwin.pm | 9 | ||||
-rw-r--r-- | lib/ExtUtils/t/Embed.t | 7 |
2 files changed, 5 insertions, 11 deletions
diff --git a/lib/ExtUtils/CBuilder/Platform/cygwin.pm b/lib/ExtUtils/CBuilder/Platform/cygwin.pm index 186bf7fde9..f72f5f7aa3 100644 --- a/lib/ExtUtils/CBuilder/Platform/cygwin.pm +++ b/lib/ExtUtils/CBuilder/Platform/cygwin.pm @@ -10,17 +10,16 @@ $VERSION = '0.23'; 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'; + # $Config{ld} is okay. revert the stupid Unix cc=ld override + local $self->{config}{cc} = $self->{config}{ld}; return $self->SUPER::link_executable(@_); } sub link { my ($self, %args) = @_; - + # libperl.dll.a fails with -Uusedl. -L../CORE -lperl is better $args{extra_linker_flags} = [ - File::Spec->catdir($self->perl_inc(), 'libperl.dll.a'), + '-L'.$self->perl_inc().' -lperl', $self->split_like_shell($args{extra_linker_flags}) ]; diff --git a/lib/ExtUtils/t/Embed.t b/lib/ExtUtils/t/Embed.t index 79f6dbca3f..b9e954bab5 100644 --- a/lib/ExtUtils/t/Embed.t +++ b/lib/ExtUtils/t/Embed.t @@ -105,11 +105,6 @@ if ($^O eq 'VMS') { s!-bE:(\S+)!-bE:$perl_exp!; } } - elsif ($^O eq 'cygwin') { # Cygwin needs the shared libperl copied - my $v_e_r_s = substr($Config{version},0,-2); - $v_e_r_s =~ tr/./_/; - system("cp ../cygperl$v_e_r_s.dll ./"); # for test 1 - } elsif ($Config{'libperl'} !~ /\Alibperl\./) { # Everyone needs libperl copied if it's not found by '-lperl'. $testlib = $Config{'libperl'}; @@ -137,7 +132,7 @@ print "# $_\n" foreach @out; if ($^O eq 'VMS' && !$status) { print "# @cmd2\n"; - $status = system(join(' ',@cmd2)); + $status = system(join(' ',@cmd2)); } print (($status? 'not ': '')."ok 1\n"); |