Skip to content

Commit b7d32d0

Browse files
committed
Force inline ASM for armv7 with FIPS
1 parent 29df901 commit b7d32d0

1 file changed

Lines changed: 18 additions & 2 deletions

File tree

configure.ac

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2797,14 +2797,22 @@ then
27972797
esac
27982798
AC_MSG_NOTICE([64bit ARMv8 found, setting mcpu to generic+crypto])
27992799
;;
2800-
armv7a*)
2800+
armv7a* | armv7l*)
28012801
AM_CPPFLAGS="$AM_CPPFLAGS -march=armv7-a -mfpu=neon -DWOLFSSL_ARM_ARCH=7 -marm"
28022802
# Include options.h
28032803
AM_CCASFLAGS="$AM_CCASFLAGS -DEXTERNAL_OPTS_OPENVPN"
28042804
ENABLED_ARMASM_CRYPTO=no
28052805
ENABLED_AESGCM_STREAM=no # not yet implemented
28062806
ENABLED_ARMASM_NEON=yes
28072807
AC_MSG_NOTICE([32bit ARMv7-a found, setting mfpu to neon])
2808+
if test "$ENABLED_FIPS" != "no" ||
2809+
test "$HAVE_FIPS_VERSION_MAJOR" -ge 5;
2810+
then
2811+
# Use inline ASM with FIPS because of known "issue" with the
2812+
# assembly code
2813+
ENABLED_ARMASM_INLINE=yes
2814+
AC_MSG_NOTICE([32bit ARMv7-a found, setting inline for FIPS])
2815+
fi
28082816
;;
28092817
armv7m*)
28102818
# QEMU doesn't work with armv7-m
@@ -2815,6 +2823,14 @@ then
28152823
ENABLED_AESGCM_STREAM=no # not yet implemented
28162824
ENABLED_ARMASM_NEON=no
28172825
AC_MSG_NOTICE([32bit ARMv7-m found])
2826+
if test "$ENABLED_FIPS" != "no" ||
2827+
test "$HAVE_FIPS_VERSION_MAJOR" -ge 5;
2828+
then
2829+
# Use inline ASM with FIPS because of known "issue" with the
2830+
# assembly code
2831+
ENABLED_ARMASM_INLINE=yes
2832+
AC_MSG_NOTICE([32bit ARMv7-m found, setting inline for FIPS])
2833+
fi
28182834
;;
28192835
armv6*)
28202836
AM_CPPFLAGS="$AM_CPPFLAGS -march=armv6 -fomit-frame-pointer -DWOLFSSL_ARMASM_NO_HW_CRYPTO -DWOLFSSL_ARM_ARCH=6"
@@ -8069,7 +8085,7 @@ if test "$ENABLED_SP_ASM" = "yes" && test "$ENABLED_SP" = "yes"; then
80698085
AM_CCASFLAGS="$AM_CCASFLAGS -DWOLFSSL_SP_ARM64_ASM"
80708086
ENABLED_SP_ARM64_ASM=yes
80718087
;;
8072-
*armv7a*)
8088+
*armv7a* | *armv7l*)
80738089
if test "$ENABLED_ARMASM" = "no"; then
80748090
AM_CPPFLAGS="$AM_CPPFLAGS -march=armv7-a -mfpu=neon -DWOLFSSL_ARM_ARCH=7 -marm"
80758091
fi

0 commit comments

Comments
 (0)