Browse files

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.
  • Loading branch information...
Tux committed Oct 13, 2017
1 parent 4b16761 commit 02817d9f7e110de9a281b1ccae6129d111fa51d0
Showing with 3 additions and 0 deletions.
  1. +3 −0 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;

0 comments on commit 02817d9

Please sign in to comment.