summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorReini Urban <rurban@x-ray.at>2008-08-24 12:47:23 +0200
committerH.Merijn Brand <h.m.brand@xs4all.nl>2008-08-24 08:58:40 +0000
commitb5920ff0f6b65443a39b58d7cf4cd21351bedd92 (patch)
tree0aca057232f7c811f1d427ebc2171527526e2d87
parent56e771c1bc71c994cd5a877d8b2eadd47e254ff8 (diff)
downloadperl-b5920ff0f6b65443a39b58d7cf4cd21351bedd92.tar.gz
Re: Fix 34200 on Cygwin
Message-ID: <48B1201B.3080705@x-ray.at> p4raw-id: //depot/perl@34219
-rwxr-xr-xinstallperl9
-rw-r--r--lib/ExtUtils/CBuilder/Platform/cygwin.pm3
-rw-r--r--lib/ExtUtils/t/Embed.t3
3 files changed, 12 insertions, 3 deletions
diff --git a/installperl b/installperl
index c717750c50..b014f80761 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 f72f5f7aa3..99ff6d820f 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 b9e954bab5..2aece548bf 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'};