summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cygwin/Makefile.SHs11
-rwxr-xr-xinstallperl7
-rw-r--r--lib/ExtUtils/t/Embed.t2
3 files changed, 15 insertions, 5 deletions
diff --git a/cygwin/Makefile.SHs b/cygwin/Makefile.SHs
index 4673d8ae1e..b360b01d0d 100644
--- a/cygwin/Makefile.SHs
+++ b/cygwin/Makefile.SHs
@@ -34,7 +34,15 @@ cygwin.c: cygwin/cygwin.c
libperl=`echo $libperl|sed -e s,\\\..*,,`
linklibperl=-l`echo $libperl|sed -e s,^lib,,`
vers=`echo $version|tr '.' '_'`
-dllname=`echo $libperl|sed -e s,^lib,cyg,`$vers
+dllname=`echo $libperl|sed -e s,^lib,cyg,``echo $vers|sed -e s,_[0-9]$,,`
+# append "d" suffix to -DDEBUGGING build: cygperl5_10d.dll
+case $config_args in
+ *DEBUGGING*)
+ dllname="${dllname}"d
+ ;;
+esac
+# added -mms-bitfields to be able to link to MSVC win32 bitfields libs
+# (4 byte instead of 2 byte alignment)
$spitshell >>Makefile <<!GROK!THIS!
LIBPERL = $libperl
@@ -42,6 +50,7 @@ LLIBPERL= $linklibperl
DLLNAME= $dllname
CLDFLAGS= -L$addtopath $ldflags
LDDLFLAGS = --shared -L$addtopath $ldflags
+CCFLAGS=$ccflags -mms-bitfields
PLDLFLAGS =
CAT = $cat
AWK = $awk
diff --git a/installperl b/installperl
index f635918796..b89990b9cb 100755
--- a/installperl
+++ b/installperl
@@ -283,7 +283,7 @@ if (($Is_W32 and ! $Is_NetWare) or $Is_Cygwin) {
if ($Is_Cygwin) {
$perldll = $libperl;
- my $v_e_r_s = $ver; $v_e_r_s =~ tr/./_/;
+ 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 {
@@ -368,6 +368,7 @@ if ($d_dosuid) {
# Install library files.
my ($do_installarchlib, $do_installprivlib) = (0, 0);
+my $vershort = $Is_Cygwin ? substr($ver,0,-2) : $ver;
mkpath($installprivlib, $verbose, 0777);
mkpath($installarchlib, $verbose, 0777);
@@ -377,7 +378,7 @@ mkpath($installsitearch, $verbose, 0777) if ($installsitearch);
if (chdir "lib") {
$do_installarchlib = ! samepath($installarchlib, '.');
$do_installprivlib = ! samepath($installprivlib, '.');
- $do_installprivlib = 0 if $versiononly && !($installprivlib =~ m/\Q$ver/);
+ $do_installprivlib = 0 if $versiononly && !($installprivlib =~ m/\Q$vershort/);
if ($do_installarchlib || $do_installprivlib) {
find(\&installlib, '.');
@@ -570,7 +571,7 @@ if ($versiononly) {
# ($installprivlib/pods for cygwin).
my $pod = ($Is_Cygwin || $Is_Darwin || $Is_VMS || $Is_W32) ? 'pods' : 'pod';
-if ( !$versiononly || ($installprivlib =~ m/\Q$ver/)) {
+if ( !$versiononly || ($installprivlib =~ m/\Q$vershort/)) {
mkpath("${installprivlib}/$pod", $verbose, 0777);
# If Perl 5.003's perldiag.pod is there, rename it.
diff --git a/lib/ExtUtils/t/Embed.t b/lib/ExtUtils/t/Embed.t
index d1edcbbcba..79f6dbca3f 100644
--- a/lib/ExtUtils/t/Embed.t
+++ b/lib/ExtUtils/t/Embed.t
@@ -106,7 +106,7 @@ if ($^O eq 'VMS') {
}
}
elsif ($^O eq 'cygwin') { # Cygwin needs the shared libperl copied
- my $v_e_r_s = $Config{version};
+ 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
}