From: Jarkko Hietaniemi Date: Tue, 13 Mar 2001 14:22:45 +0000 (+0000) Subject: Workaround for the buggy ("internal compiler error") X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=b7a204175abb9441225e42d993ad40f9ea688652;p=p5sagit%2Fp5-mst-13.2.git 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 --- diff --git a/ext/re/Makefile.PL b/ext/re/Makefile.PL index b8d25bd..537704c 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; +} diff --git a/hints/aix.sh b/hints/aix.sh index b14aad0..31d189f 100644 --- a/hints/aix.sh +++ b/hints/aix.sh @@ -138,8 +138,25 @@ case "$cc" in 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 <&4 <