From: Reini Urban Date: Sun, 24 Aug 2008 10:47:23 +0000 (+0200) Subject: Re: Fix 34200 on Cygwin X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=b5920ff0f6b65443a39b58d7cf4cd21351bedd92;p=p5sagit%2Fp5-mst-13.2.git Re: Fix 34200 on Cygwin Message-ID: <48B1201B.3080705@x-ray.at> p4raw-id: //depot/perl@34219 --- diff --git a/installperl b/installperl index c717750..b014f80 100755 --- a/installperl +++ b/installperl @@ -364,7 +364,14 @@ if ($Is_VMS) { # We did core file selection during build $coredir =~ tr/./_/; map { s|^$coredir/||i; } @corefiles = <$coredir/*.*>; } -else { +elsif ($Is_Cygwin) { # On Cygwin symlink it to CORE to make Makefile happy + my $coredll = "$installarchlib/CORE/$libperl"; + ( $Config{'d_link'} eq 'define' && + eval { CORE::link "$installbin/$libperl", $coredll } ) || + eval { symlink "$installbin/$libperl", $coredll } || + copy("$installbin/$libperl", $coredll); + @corefiles = <*.h libperl*.* perl*$Config{lib_ext}>; +} else { # [als] hard-coded 'libperl' name... not good! @corefiles = <*.h libperl*.* perl*$Config{lib_ext}>; diff --git a/lib/ExtUtils/CBuilder/Platform/cygwin.pm b/lib/ExtUtils/CBuilder/Platform/cygwin.pm index f72f5f7..99ff6d8 100644 --- a/lib/ExtUtils/CBuilder/Platform/cygwin.pm +++ b/lib/ExtUtils/CBuilder/Platform/cygwin.pm @@ -17,9 +17,8 @@ sub link_executable { sub link { my ($self, %args) = @_; - # libperl.dll.a fails with -Uusedl. -L../CORE -lperl is better $args{extra_linker_flags} = [ - '-L'.$self->perl_inc().' -lperl', + $self->perl_inc().'/'.($self->{config}{useshrplib} ? 'libperl.dll.a' : 'libperl.a'), $self->split_like_shell($args{extra_linker_flags}) ]; diff --git a/lib/ExtUtils/t/Embed.t b/lib/ExtUtils/t/Embed.t index b9e954b..2aece54 100644 --- a/lib/ExtUtils/t/Embed.t +++ b/lib/ExtUtils/t/Embed.t @@ -105,6 +105,9 @@ if ($^O eq 'VMS') { s!-bE:(\S+)!-bE:$perl_exp!; } } + elsif ($^O eq 'cygwin') { # Cygwin needs no special treatment like below + ; + } elsif ($Config{'libperl'} !~ /\Alibperl\./) { # Everyone needs libperl copied if it's not found by '-lperl'. $testlib = $Config{'libperl'};