Irix: MIPSpro 7.4 compiler has broken memcmp.

(Supposedly 7.4.1m is okay in this regard, and there is also 7.5.)

The commit that 'broke' Perl build on IRIX was 57620943
which of course wasn't to blame, the IRIX compiler was.
(Symptom: miniperl crashing, can be narrowed to just /[[:alpha:]]/)

Furthermore: IRIX build was also earlier broken for a long time by
another problem (in the preprocessor), see for example perl #33849.
(Symptom: compile failing in gv.c RvDEEPCP)

Summary: building Perls on IRIX needs either this very commit,
or undoing the 57620943 (for the memcmp brokenness), and possibly
applying both the c297d531 and 08c5d564 (for the cpp brokenness).
(The latter were applied between 5.10.0 and 5.10.1.)
This commit is contained in:
Jarkko Hietaniemi 2014-10-14 22:47:33 -04:00
parent 8bc5de207a
commit 1764d98bf4

View File

@ -360,6 +360,26 @@ case "$ccversion" in
;;
esac
# There is a devious bug in the MIPSpro 7.4 compiler:
# memcmp() is an inlined intrinsic, and "sometimes" it gets compiled wrong.
#
# In Perl the most obvious hit is regcomp.c:S_regpposixcc(),
# causing bus errors when compiling the POSIX character classes like
# /[[:digit:]], which means that miniperl cannot build perl.
# (That is almost only the one victim: one single test in re/pat fails, also.)
#
# Therefore let's turn the inline intrinsics off and let the normal
# libc versions be used instead. This may cause a performance hit
# but a little slower is better than zero speed.
#
# MIPSpro C 7.4.1m is supposed to have fixed this bug.
#
case "$ccversion" in
"MIPSpro Compilers: Version 7.4")
ccflags="$ccflags -U__INLINE_INTRINSICS"
;;
esac
EOCCBU
# End of cc.cbu callback unit. - Allen