From e6f19111e09f02801a66a66ca9ec37af95bf82ea Mon Sep 17 00:00:00 2001 From: Jeffrey Walton Date: Sat, 9 Sep 2017 16:26:16 -0400 Subject: [PATCH] Fix IBM XL C/C++ compiler version output in test script --- TestScripts/cryptest.sh | 5 +++++ cryptest.sh | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/TestScripts/cryptest.sh b/TestScripts/cryptest.sh index b620420e..694bed8d 100755 --- a/TestScripts/cryptest.sh +++ b/TestScripts/cryptest.sh @@ -466,6 +466,9 @@ if [[ (-z "$HAVE_PIC") ]]; then if [[ "$PIC_PROBLEMS" -eq "0" ]]; then HAVE_PIC=1 OPT_PIC=-fPIC + if [[ ("$XLC_COMPILER" -eq "1") ]]; then + OPT_PIC=-qpic + fi fi fi @@ -890,6 +893,8 @@ fi if [[ ("$SUN_COMPILER" -ne "0") ]]; then echo $("$CXX" -V 2>&1 | "$SED" 's|CC:|Compiler:|g' | head -1) | tee -a "$TEST_RESULTS" +elif [[ ("$XLC_COMPILER" -ne "0") ]]; then + echo "Compiler:" $("$CXX" -qversion | head -1) | tee -a "$TEST_RESULTS" else echo "Compiler:" $("$CXX" --version | head -1) | tee -a "$TEST_RESULTS" fi diff --git a/cryptest.sh b/cryptest.sh index b620420e..694bed8d 100755 --- a/cryptest.sh +++ b/cryptest.sh @@ -466,6 +466,9 @@ if [[ (-z "$HAVE_PIC") ]]; then if [[ "$PIC_PROBLEMS" -eq "0" ]]; then HAVE_PIC=1 OPT_PIC=-fPIC + if [[ ("$XLC_COMPILER" -eq "1") ]]; then + OPT_PIC=-qpic + fi fi fi @@ -890,6 +893,8 @@ fi if [[ ("$SUN_COMPILER" -ne "0") ]]; then echo $("$CXX" -V 2>&1 | "$SED" 's|CC:|Compiler:|g' | head -1) | tee -a "$TEST_RESULTS" +elif [[ ("$XLC_COMPILER" -ne "0") ]]; then + echo "Compiler:" $("$CXX" -qversion | head -1) | tee -a "$TEST_RESULTS" else echo "Compiler:" $("$CXX" --version | head -1) | tee -a "$TEST_RESULTS" fi