From cece912f1d5e5e80dc8d64364b0ddc4bf729bd85 Mon Sep 17 00:00:00 2001 From: Tony Cook <tony@develop-help.com> Date: Mon, 30 Jul 2018 21:00:52 +1000 Subject: (perl #133411) don't try to load Storable with -Dusecrosscompile Origin: https://perl5.git.perl.org/perl.git/commit/edf639fce3e8c8852ee4179ab902b357b1deba98 Bug: https://rt.perl.org/Public/Bug/Display.html?id=133411 Patch-Name: fixes/storable-probing/prereq2.diff --- dist/Storable/Makefile.PL | 9 ++++++++- dist/Storable/stacksize | 10 +++++++--- 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/dist/Storable/Makefile.PL b/dist/Storable/Makefile.PL index 4f0213277..69efc8294 100644 --- a/dist/Storable/Makefile.PL +++ b/dist/Storable/Makefile.PL @@ -92,11 +92,18 @@ sub depend { # blib.pm needs arch/lib $extra_deps = ' Storable.pm'; } + my $whichperl; + if ($Config::Config{usecrosscompile}) { + $whichperl = '$(PERLRUN)'; + } + else { + $whichperl = '$(FULLPERLRUNINST)'; + } my $linktype = uc($_[0]->{LINKTYPE}); " $limit_pm : stacksize \$(INST_$linktype)$extra_deps \$(MKPATH) \$(INST_LIB) - \$(FULLPERLRUNINST) stacksize $options + $whichperl stacksize $options release : dist git tag \$(VERSION) diff --git a/dist/Storable/stacksize b/dist/Storable/stacksize index 7abd3a84c..14e073973 100644 --- a/dist/Storable/stacksize +++ b/dist/Storable/stacksize @@ -7,6 +7,9 @@ use Cwd; use File::Spec; use strict; +-d "lib" or mkdir "lib"; +-d "lib/Storable" or mkdir "lib/Storable"; + my $fn = "lib/Storable/Limit.pm"; my $ptrsize = $Config{ptrsize}; my ($bad1, $bad2) = (65001, 25000); @@ -29,6 +32,10 @@ sub is_miniperl { } if (is_miniperl()) { + if ($Config{usecrosscompile}) { + write_limits(500, 265); + exit; + } die "Should not run during miniperl\n"; } my $prefix = ""; @@ -68,9 +75,6 @@ if ($ENV{PERL_CORE}) { } } --d "lib" or mkdir "lib"; --d "lib/Storable" or mkdir "lib/Storable"; - if ($^O eq "MSWin32") { require Win32; my ($str, $major, $minor) = Win32::GetOSVersion();