summaryrefslogtreecommitdiff
path: root/dist
diff options
context:
space:
mode:
authorDavid Mitchell <davem@iabyn.com>2016-09-27 16:43:30 +0100
committerDavid Mitchell <davem@iabyn.com>2016-09-27 16:48:53 +0100
commit850e14d313dc5493e5162c407f21ae0a9fec2805 (patch)
tree651944acd830f8bb26e5e297652949a83850c32d /dist
parent92683b8bd24649980234088f109e31c4633c1b67 (diff)
downloadperl-850e14d313dc5493e5162c407f21ae0a9fec2805.tar.gz
Cwd.xs: avoid blib better while building
RT # 125603 There's an old line in Cwd's Makefile.PL: BEGIN { @INC = grep {!/blib/} @INC } This was added 12 years ago to solve a problem with a static perl and building a newer Cwd (but no-one's quite sure what *exactly* the issue was any more). However, this breaks building perl under a directory that has 'blib' in the pathname. This commit estricts the grep to just exclusing exactly blib/lib and blib/arch. This should hopefully still workaround the static build issue, while no longer breaking perl builds.
Diffstat (limited to 'dist')
-rw-r--r--dist/PathTools/Makefile.PL8
1 files changed, 7 insertions, 1 deletions
diff --git a/dist/PathTools/Makefile.PL b/dist/PathTools/Makefile.PL
index 6cd70fafeb..71b9a60d09 100644
--- a/dist/PathTools/Makefile.PL
+++ b/dist/PathTools/Makefile.PL
@@ -1,5 +1,11 @@
-BEGIN { @INC = grep {!/blib/} @INC }
+# See https://rt.cpan.org/Public/Bug/Display.html?id=4681
+# and https://rt.perl.org/Ticket/Display.html?id=125603
+# When installing a newer Cwd on a system with an existing Cwd,
+# under some circumstances the old Cwd.pm and the new Cwd.xs could
+# get mixed up and SEGVs ensue.
+
+BEGIN { @INC = grep { $_ ne "blib/arch" and $_ ne "blib/lib" } @INC }
require 5.005;
use ExtUtils::MakeMaker;