From b7a204175abb9441225e42d993ad40f9ea688652 Mon Sep 17 00:00:00 2001 From: Jarkko Hietaniemi Date: Tue, 13 Mar 2001 14:22:45 +0000 Subject: [PATCH] =?utf8?q?Workaround=20for=20the=20buggy=20("internal=20co?= =?utf8?q?mpiler=20error")=20AIX=20C=20compiler=205.0.1.0:=20skip=20the=20?= =?utf8?q?optimization=20for=20regcomp.c=20(and=20ext/re/re=5Fcomp.c).=20?= =?utf8?q?=20The=20MakeMaker=20dark=20magic=20courtesy=20of=20Andreas=20K?= =?utf8?q?=C3=B6nig.?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit p4raw-id: //depot/perl@9124 --- ext/re/Makefile.PL | 19 +++++++++++++++++++ hints/aix.sh | 21 +++++++++++++++++++-- 2 files changed, 38 insertions(+), 2 deletions(-) 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 <