diff --git a/cryptest.sh b/cryptest.sh index 6c46f45a..8415607d 100755 --- a/cryptest.sh +++ b/cryptest.sh @@ -581,6 +581,16 @@ if [[ (-z "$HAVE_X32") ]]; then fi fi +# Hit or miss, mostly hit +if [[ (-z "$HAVE_NATIVE_ARCH") ]]; then + HAVE_NATIVE_ARCH=0 + rm -f "$TMP/adhoc.exe" > /dev/null 2>&1 + "$CXX" -DCRYPTOPP_ADHOC_MAIN -march=native adhoc.cpp -o "$TMP/adhoc.exe" > /dev/null 2>&1 + if [[ ("$?" -eq "0") ]]; then + HAVE_NATIVE_ARCH=1 + fi +fi + # ld-gold linker testing if [[ (-z "$HAVE_LDGOLD") ]]; then HAVE_LDGOLD=0 @@ -1829,7 +1839,7 @@ fi ############################################ # Mismatched arch capabilities -if [[ ("$GCC_COMPILER" -ne "0" || "$CLANG_COMPILER" -ne "0" || "$INTEL_COMPILER" -ne "0") ]]; then +if [[ ( ("$IS_X86" -ne "0" || "$IS_X32" -ne "0" || "$IS_X64" -ne "0") && "$HAVE_NATIVE_ARCH" -ne "0") ]]; then # i586 (lacks MMX, SSE and SSE2) if [[ "$IS_X86" -ne "0" ]]; then