From 7ce3922b97720853a5b143389678de256cb9ed72 Mon Sep 17 00:00:00 2001 From: Jeffrey Walton Date: Fri, 14 Oct 2016 05:04:04 -0400 Subject: [PATCH] Add PIC_FLAG for minimum platform tests --- cryptest.sh | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/cryptest.sh b/cryptest.sh index f2406cff..7ae554f7 100755 --- a/cryptest.sh +++ b/cryptest.sh @@ -1678,6 +1678,10 @@ fi # Minimum platform if [[ ("$GCC_COMPILER" -ne "0" || "$CLANG_COMPILER" -ne "0" || "$INTEL_COMPILER" -ne "0") ]]; then + if [[ "$HAVE_PIC" -ne "0" ]]; then + PIC_FLAG=-fPIC + fi + # i686 if [[ "$IS_X86" -ne "0" ]]; then ############################################ @@ -1690,7 +1694,7 @@ if [[ ("$GCC_COMPILER" -ne "0" || "$CLANG_COMPILER" -ne "0" || "$INTEL_COMPILER" "$MAKE" clean > /dev/null 2>&1 rm -f adhoc.cpp > /dev/null 2>&1 - CXXFLAGS="$DEBUG_CXXFLAGS -march=i686 -fPIC -pipe ${DEPRECATED_CXXFLAGS[@]}" + CXXFLAGS="$DEBUG_CXXFLAGS -march=i686 $PIC_FLAG -pipe ${DEPRECATED_CXXFLAGS[@]}" CXX="$CXX" "$MAKE" "${MAKEARGS[@]}" CXXFLAGS="$CXXFLAGS" static dynamic cryptest.exe 2>&1 | tee -a "$TEST_RESULTS" if [[ ("${PIPESTATUS[0]}" -ne "0") ]]; then @@ -1716,7 +1720,7 @@ if [[ ("$GCC_COMPILER" -ne "0" || "$CLANG_COMPILER" -ne "0" || "$INTEL_COMPILER" "$MAKE" clean > /dev/null 2>&1 rm -f adhoc.cpp > /dev/null 2>&1 - CXXFLAGS="$RELEASE_CXXFLAGS -march=i686 -fPIC -pipe ${DEPRECATED_CXXFLAGS[@]}" + CXXFLAGS="$RELEASE_CXXFLAGS -march=i686 $PIC_FLAG -pipe ${DEPRECATED_CXXFLAGS[@]}" CXX="$CXX" "$MAKE" "${MAKEARGS[@]}" CXXFLAGS="$CXXFLAGS" static dynamic cryptest.exe 2>&1 | tee -a "$TEST_RESULTS" if [[ ("${PIPESTATUS[0]}" -ne "0") ]]; then @@ -1745,7 +1749,7 @@ if [[ ("$GCC_COMPILER" -ne "0" || "$CLANG_COMPILER" -ne "0" || "$INTEL_COMPILER" "$MAKE" clean > /dev/null 2>&1 rm -f adhoc.cpp > /dev/null 2>&1 - CXXFLAGS="$DEBUG_CXXFLAGS -march=x86-64 -fPIC -pipe ${DEPRECATED_CXXFLAGS[@]}" + CXXFLAGS="$DEBUG_CXXFLAGS -march=x86-64 $PIC_FLAG -pipe ${DEPRECATED_CXXFLAGS[@]}" CXX="$CXX" "$MAKE" "${MAKEARGS[@]}" CXXFLAGS="$CXXFLAGS" static dynamic cryptest.exe 2>&1 | tee -a "$TEST_RESULTS" if [[ ("${PIPESTATUS[0]}" -ne "0") ]]; then @@ -1771,7 +1775,7 @@ if [[ ("$GCC_COMPILER" -ne "0" || "$CLANG_COMPILER" -ne "0" || "$INTEL_COMPILER" "$MAKE" clean > /dev/null 2>&1 rm -f adhoc.cpp > /dev/null 2>&1 - CXXFLAGS="$RELEASE_CXXFLAGS -march=x86-64 -fPIC -pipe ${DEPRECATED_CXXFLAGS[@]}" + CXXFLAGS="$RELEASE_CXXFLAGS -march=x86-64 $PIC_FLAG -pipe ${DEPRECATED_CXXFLAGS[@]}" CXX="$CXX" "$MAKE" "${MAKEARGS[@]}" CXXFLAGS="$CXXFLAGS" static dynamic cryptest.exe 2>&1 | tee -a "$TEST_RESULTS" if [[ ("${PIPESTATUS[0]}" -ne "0") ]]; then