summaryrefslogtreecommitdiff
path: root/configpm
diff options
context:
space:
mode:
authorH.Merijn Brand <h.m.brand@xs4all.nl>2017-10-13 13:56:47 +0200
committerH.Merijn Brand <h.m.brand@xs4all.nl>2017-10-13 13:56:47 +0200
commit02817d9f7e110de9a281b1ccae6129d111fa51d0 (patch)
tree741584b72b31822c21d58762c5f465b61e5cd8a5 /configpm
parent4b16761913d3c9769bf32f002f5baf2e59bc55e1 (diff)
downloadperl-02817d9f7e110de9a281b1ccae6129d111fa51d0.tar.gz
Strip ccache from $Config{cc}
When building with -Dcc="ccache cc", $Config{cc} would also end up with this setting. If that perl is then distributed, no XS will be able to build if the target machine has no ccache installed/available With this change, the whole build of perl itself will use ccache, but $Config{cc} will have it stripped, so all modules (lib/cpan/ext) will not use ccache. A correct installation of ccache however does not need $CC to include the ccache prefix, so it is essentially a setup problem on the building host.
Diffstat (limited to 'configpm')
-rwxr-xr-xconfigpm3
1 files changed, 3 insertions, 0 deletions
diff --git a/configpm b/configpm
index 877bff1f30..09b9e67aab 100755
--- a/configpm
+++ b/configpm
@@ -248,6 +248,9 @@ my %seen_quotes;
else {
$quote = $2;
($name,$val) = ($1,$3);
+ if ($name eq 'cc') {
+ $val =~ s{^(['"]?+).*\bccache\s+}{$1};
+ }
}
$in_v = $val !~ /$quote\n/;
next if $in_v;