AESNI: fix configure to use minimal compiler flags

pull/5330/head
Sean Parkinson 2022-07-07 09:30:48 +10:00
parent b2d1bf96ed
commit 9ba77300f9
1 changed files with 12 additions and 14 deletions

View File

@ -2142,21 +2142,19 @@ then
if test "$ENABLED_AESNI" = "yes" || test "$ENABLED_INTELASM" = "yes" if test "$ENABLED_AESNI" = "yes" || test "$ENABLED_INTELASM" = "yes"
then then
AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_AESNI" AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_AESNI"
if test "$GCC" = "yes" if test "$CC" != "icc"
then then
# clang needs these flags case $host_os in
if test "$CC" = "clang" mingw*)
then # Windows uses intrinsics for GCM which uses SSE4 instructions.
AM_CFLAGS="$AM_CFLAGS -maes -mpclmul" # MSVC has own build files.
else AM_CFLAGS="$AM_CFLAGS -maes -msse4 -mpclmul"
# GCC needs these flags, icc doesn't ;;
# opt levels greater than 2 may cause problems on systems w/o *)
# aesni # Intrinsics used in AES_set_decrypt_key (TODO: rework)
if test "$CC" != "icc" AM_CFLAGS="$AM_CFLAGS -maes"
then ;;
AM_CFLAGS="$AM_CFLAGS -maes -msse4 -mpclmul" esac
fi
fi
fi fi
AS_IF([test "x$ENABLED_AESGCM" != "xno"],[AM_CCASFLAGS="$AM_CCASFLAGS -DHAVE_AESGCM"]) AS_IF([test "x$ENABLED_AESGCM" != "xno"],[AM_CCASFLAGS="$AM_CCASFLAGS -DHAVE_AESGCM"])
fi fi