Add test for '-march=native'

This commit is contained in:
Jeffrey Walton 2017-04-22 23:37:13 -04:00
parent 4478e4cf39
commit 96cc3522ce
No known key found for this signature in database
GPG Key ID: B36AB348921B1838

View File

@ -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