From e0ca095144adf49e3cc7b65d885b220279f32eca Mon Sep 17 00:00:00 2001 From: Jeffrey Walton Date: Wed, 20 Jul 2016 11:15:03 -0400 Subject: [PATCH] =?UTF-8?q?Fix=20"unrecognized=20command=20line=20option?= =?UTF-8?q?=20=E2=80=98-mfpu=3Dneon-fp-armv8"=20under=20GCC=204.8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cryptest.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cryptest.sh b/cryptest.sh index 4eeee9bf..4fca4dd6 100755 --- a/cryptest.sh +++ b/cryptest.sh @@ -177,6 +177,7 @@ fi GCC_60_OR_ABOVE=$("$CXX" -v 2>&1 | "$EGREP" -i -c 'gcc version (6\.[0-9]|[7-9])') GCC_51_OR_ABOVE=$("$CXX" -v 2>&1 | "$EGREP" -i -c 'gcc version (5\.[1-9]|[6-9])') GCC_48_COMPILER=$("$CXX" -v 2>&1 | "$EGREP" -i -c 'gcc version 4\.8') +GCC_49_OR_ABOVE=$("$CXX" -v 2>&1 | "$EGREP" -i -c 'gcc version (4\.9|[5-9]\.[0-9])') SUNCC_121_OR_ABOVE=$("$CXX" -V 2>&1 | "$EGREP" -c "CC: (Sun|Studio) .* (5\.1[0-9]|5\.[2-9]|[6-9]\.)") # Fixup @@ -880,7 +881,7 @@ if [[ ("$IS_ARM32" -ne "0" || "$IS_ARM64" -ne "0") ]]; then PLATFORM_CXXFLAGS+=("-march=armv8-a+crypto ") fi - if [[ ("$HAVE_ARM_ASIMD" -ne "0") ]]; then + if [[ ("$GCC_49_OR_ABOVE" -ne "0" && "$HAVE_ARM_ASIMD" -ne "0") ]]; then PLATFORM_CXXFLAGS+=("-mfpu=neon-fp-armv8 ") fi fi