Index: lib/core/src/perl/Makefile.PL =================================================================== --- lib/core/src/perl/Makefile.PL (revision 62dc73a78ff2d63da0d01959910b62b3e680ff7f) +++ lib/core/src/perl/Makefile.PL (revision c46f245e5da6c40839510fbcf49b9b209edd9456) @@ -90,10 +90,18 @@ $copy =~ s{(?= *> *\$\*\.xsc)}{| sed -e 's/\\.xxs\\.c"/.cc"/'}; } return $text.$copy; } +sub MY::c_o { + package MY; + my $text=(shift)->SUPER::c_o; + # remove harmful compilation rules for C++ modules + $text =~ s{^\.(?:C|c[^.\$]).*?:\n\t.*?\n}{}mg; + return $text; +} + my (@CCFiles, @CFiles); foreach (@sources) { if (/\.xxs$/) { push @CCFiles, "$`.cc"; } elsif (/\.xs$/) {