From 3ffb1f35658eb31961e9605ce7658d2d6871b7d0 Mon Sep 17 00:00:00 2001 From: Jeffrey Walton Date: Sun, 31 Jul 2016 04:18:01 -0400 Subject: [PATCH] Fix failed self tests under -Ofast and -O5. It appears to be a SunCC compiler bug --- cryptest.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/cryptest.sh b/cryptest.sh index 6d26d468..1821c365 100755 --- a/cryptest.sh +++ b/cryptest.sh @@ -133,7 +133,6 @@ if [[ ((-z "$CXX") || ("$CXX" == "gcc")) ]]; then if [[ "$IS_DARWIN" -ne "0" ]]; then CXX=c++ elif [[ "$IS_SOLARIS" -ne "0" ]]; then - # SunCC 12.5 is mostly broken if [[ (-e "/opt/developerstudio12.5/bin/CC") ]]; then CXX=/opt/developerstudio12.5/bin/CC elif [[ (-e "/opt/solarisstudio12.4/bin/CC") ]]; then @@ -194,6 +193,12 @@ else MAKE=make fi +# Fixup, bad code generation +if [[ ("$SUNCC_121_OR_ABOVE" -ne "0" ]]; then + HAVE_O5=0 + HAVE_OFAST=0 +fi + if [[ (-z "$TMP") ]]; then if [[ (-d "/tmp") ]]; then TMP=/tmp