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
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;
+}
optimize='none'
;;
4.4.0.0|4.4.0.1|4.4.0.2)
- echo >&4 "*** This C compiler ($ccversion) is outdated."
- echo >&4 "*** Please upgrade to at least 4.4.0.3."
+ cat >&4 <<EOF
+***
+*** This C compiler ($ccversion) is outdated.
+***
+*** Please upgrade to at least 4.4.0.3.
+***
+EOF
+ ;;
+ 5.0.1.0)
+ cat >&4 <<EOF
+***
+*** This C compiler ($ccversion) is known to have optimizer problems
+*** when compiling regcomp.c.
+***
+*** Disabling optimization for that file but consider upgrading
+*** your C compiler.
+***
+EOF
+regcomp_cflags='optimize='
;;
esac
esac