summaryrefslogtreecommitdiff
path: root/ext/re
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2001-03-13 14:22:45 +0000
committerJarkko Hietaniemi <jhi@iki.fi>2001-03-13 14:22:45 +0000
commitb7a204175abb9441225e42d993ad40f9ea688652 (patch)
treed06a62d61d1610e25c66aa1d3aad8f2e2120c6fa /ext/re
parentcaf85fe8439bfc0ff87181eff62bb3b5ad8c826d (diff)
downloadperl-b7a204175abb9441225e42d993ad40f9ea688652.tar.gz
Workaround for the buggy ("internal compiler error")
AIX C compiler 5.0.1.0: skip the optimization for regcomp.c (and ext/re/re_comp.c). The MakeMaker dark magic courtesy of Andreas König. p4raw-id: //depot/perl@9124
Diffstat (limited to 'ext/re')
-rw-r--r--ext/re/Makefile.PL19
1 files changed, 19 insertions, 0 deletions
diff --git a/ext/re/Makefile.PL b/ext/re/Makefile.PL
index b8d25bd0d6..537704cf52 100644
--- a/ext/re/Makefile.PL
+++ b/ext/re/Makefile.PL
@@ -39,3 +39,22 @@ re_exec\$(OBJ_EXT) : re_exec.c
EOF
}
+
+sub MY::c_o {
+ my($self) = @_;
+ package MY; # so that "SUPER" works right
+ my $inh = $self->SUPER::c_o(@_);
+ use Config;
+ if ($Config{osname} eq 'aix' && $Config{ccversion} eq '5.0.1.0') {
+ # Known buggy optimizer.
+ my $cccmd = $self->const_cccmd;
+ $cccmd =~ s/^CCCMD\s*=\s*//;
+ $cccmd =~ s/\s\$\(OPTIMIZE\)\s/ /;
+ $inh .= qq{
+
+re_comp\$\(OBJ_EXT\): re_comp.c
+\t$cccmd \$(CCCDLFLAGS) -I\$(PERL_INC) \$(DEFINE) \$*.c
+};
+ }
+ $inh;
+}