From 6f15b37494a3335b3e110ce45d8ef6c2bb5b8d76 Mon Sep 17 00:00:00 2001 From: Jeffrey Walton Date: Wed, 15 Jun 2016 03:55:49 -0400 Subject: [PATCH] Make Sun Studio 12.4 default compiler for testing --- cryptest.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/cryptest.sh b/cryptest.sh index 5302a85b..5dc89f77 100755 --- a/cryptest.sh +++ b/cryptest.sh @@ -101,12 +101,12 @@ if [ "$CXX" == "gcc" ]; then CXX=g++ fi -# Fixup -if [ "$IS_SOLARIS" -ne "0" ]; then - if [ -e "/opt/solarisstudio12.3/bin/CC" ]; then - CXX=/opt/solarisstudio12.3/bin/CC - elif [ -e "/opt/solarisstudio12.4/bin/CC" ]; then +# Fixup. See if the user already set it to CC +if [ "$IS_SOLARIS" -ne "0" ] && [ $(echo $CXX | grep -c "CC" 2>/dev/null) -ne "0" ]; then + if [ -e "/opt/solarisstudio12.4/bin/CC" ]; then CXX=/opt/solarisstudio12.4/bin/CC + elif [ -e "/opt/solarisstudio12.3/bin/CC" ]; then + CXX=/opt/solarisstudio12.3/bin/CC fi fi SUN_COMPILER=$($CXX -V 2>&1 | $EGREP -i -c "CC: Sun")