Change 34200 by [EMAIL PROTECTED] on 2008/08/11 13:15:08
Subject: [PATCH] Cygwin build harmonization, remove cygwin/Makefile.SHs
From: "Reini Urban" <[EMAIL PROTECTED]>
Date: Mon, 28 Jul 2008 12:55:40 +0200
Message-ID: <[EMAIL PROTECTED]>
Affected files ...
... //depot/perl/MANIFEST#1714 edit
... //depot/perl/Makefile.SH#406 edit
... //depot/perl/cygwin/Makefile.SHs#25 delete
... //depot/perl/installperl#158 edit
... //depot/perl/lib/ExtUtils/CBuilder/Platform/cygwin.pm#6 edit
... //depot/perl/lib/ExtUtils/t/Embed.t#24 edit
Differences ...
==== //depot/perl/MANIFEST#1714 (text) ====
Index: perl/MANIFEST
--- perl/MANIFEST#1713~34169~ 2008-07-31 14:27:36.000000000 -0700
+++ perl/MANIFEST 2008-08-11 06:15:08.000000000 -0700
@@ -42,7 +42,6 @@
Cross/warp Cross-compilation
cv.h Code value header
cygwin/cygwin.c Additional code for Cygwin port
-cygwin/Makefile.SHs Shared library generation for Cygwin port
deb.c Debugging routines
djgpp/config.over DOS/DJGPP port
djgpp/configure.bat DOS/DJGPP port
==== //depot/perl/Makefile.SH#406 (text) ====
Index: perl/Makefile.SH
--- perl/Makefile.SH#405~34192~ 2008-08-09 13:11:55.000000000 -0700
+++ perl/Makefile.SH 2008-08-11 06:15:08.000000000 -0700
@@ -68,7 +68,8 @@
-install_name \$(shrpdir)/\$@"
;;
cygwin*)
- linklibperl="-lperl"
+ shrpldflags="$shrpldflags -Wl,--out-implib=libperl.dll.a
-Wl,--image-base,0x52000000"
+ linklibperl="-L. -lperl"
;;
sunos*)
linklibperl="-lperl"
@@ -516,19 +517,9 @@
perlmain.c: miniperlmain.c config.sh $(FIRSTMAKEFILE)
sh writemain $(DYNALOADER) $(static_ext) > perlmain.c
-!NO!SUBS!
-case "$osname" in
-cygwin)
- ;; # Let cygwin/Makefile.SHs do its work.
-*)
- $spitshell >>Makefile <<'!NO!SUBS!'
perlmain$(OBJ_EXT): perlmain.c
$(CCCMD) $(PLDLFLAGS) $*.c
-!NO!SUBS!
- ;;
-esac
-$spitshell >>Makefile <<'!NO!SUBS!'
# The file ext.libs is a list of libraries that must be linked in
# for static extensions, e.g. -lm -lgdbm, etc. The individual
# static extension Makefile's add to it.
@@ -601,9 +592,22 @@
!NO!SUBS!
;;
+cygwin)
+ $spitshell >>Makefile <<'!NO!SUBS!'
+cygwin.c: cygwin/cygwin.c
+ $(LNS) cygwin/cygwin.c
+
+LIBPERL_NONSHR = libperl$(LIB_EXT)
+
+$(LIBPERL_NONSHR): $(obj)
+ $(RMS) $(LIBPERL_NONSHR)
+ $(AR) rcu $(LIBPERL_NONSHR) $(obj)
+
+!NO!SUBS!
+ ;;
esac
-if test -r $Makefile_s ; then
+if test -s $Makefile_s ; then
. $Makefile_s
$spitshell >>Makefile <<!GROK!THIS!
@@ -1172,7 +1176,6 @@
-rmdir lib/threads lib/XS
-rmdir lib/CPANPLUS/Dist/Build/t/dummy-*
-rmdir lib/CPANPLUS/t/dummy-cpanplus lib/CPANPLUS/t/dummy-localmirror
- -rm -f cygcrypt-0.dll cygwin1.dll
-rm -f lib/ExtUtils/CBuilder/t/libcompilet.dll.a
-rm -f lib/ExtUtils/ParseXS/t/libXSTest.dll.a
==== //depot/perl/installperl#158 (xtext) ====
Index: perl/installperl
--- perl/installperl#157~33864~ 2008-05-19 05:59:10.000000000 -0700
+++ perl/installperl 2008-08-11 06:15:08.000000000 -0700
@@ -253,11 +253,8 @@
if ($Is_Cygwin) {
$perldll = $libperl;
- my $v_e_r_s = substr($ver,0,-2); $v_e_r_s =~ tr/./_/;
- $perldll =~ s/(\..*)?$/$v_e_r_s.$dlext/;
- $perldll =~ s/^lib/cyg/;
} else {
- $perldll = 'perl511.' . $dlext;
+ $perldll = 'perl5'.$Config{patchlevel}.'.'.$dlext;
}
if ($dlsrc ne "dl_none.xs") {
@@ -338,7 +335,7 @@
# Install library files.
my ($do_installarchlib, $do_installprivlib) = (0, 0);
-my $vershort = $Is_Cygwin ? substr($ver,0,-2) : $ver;
+my $vershort = ($Is_Cygwin and !$Config{usedevel}) ? substr($ver,0,-2) : $ver;
mkpath($installprivlib, $opts{verbose}, 0777);
mkpath($installarchlib, $opts{verbose}, 0777);
==== //depot/perl/lib/ExtUtils/CBuilder/Platform/cygwin.pm#6 (text) ====
Index: perl/lib/ExtUtils/CBuilder/Platform/cygwin.pm
--- perl/lib/ExtUtils/CBuilder/Platform/cygwin.pm#5~33721~ 2008-04-22
02:41:44.000000000 -0700
+++ perl/lib/ExtUtils/CBuilder/Platform/cygwin.pm 2008-08-11
06:15:08.000000000 -0700
@@ -10,17 +10,16 @@
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})
];
==== //depot/perl/lib/ExtUtils/t/Embed.t#24 (text) ====
Index: perl/lib/ExtUtils/t/Embed.t
--- perl/lib/ExtUtils/t/Embed.t#23~33481~ 2008-03-11 12:47:44.000000000
-0700
+++ perl/lib/ExtUtils/t/Embed.t 2008-08-11 06:15:08.000000000 -0700
@@ -105,11 +105,6 @@
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 @@
if ($^O eq 'VMS' && !$status) {
print "# @cmd2\n";
- $status = system(join(' ',@cmd2));
+ $status = system(join(' ',@cmd2));
}
print (($status? 'not ': '')."ok 1\n");
End of Patch.