Skip to content

Commit 9f9a82e

Browse files
authored
Merge pull request #7637 from lealem47/armasm_fips
Force inline ASM for armv7 with FIPS
2 parents d49308e + b7d32d0 commit 9f9a82e

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
@@ -2808,14 +2808,22 @@ then
28082808
esac
28092809
AC_MSG_NOTICE([64bit ARMv8 found, setting mcpu to generic+crypto])
28102810
;;
2811-
armv7a*)
2811+
armv7a* | armv7l*)
28122812
AM_CPPFLAGS="$AM_CPPFLAGS -march=armv7-a -mfpu=neon -DWOLFSSL_ARM_ARCH=7 -marm"
28132813
# Include options.h
28142814
AM_CCASFLAGS="$AM_CCASFLAGS -DEXTERNAL_OPTS_OPENVPN"
28152815
ENABLED_ARMASM_CRYPTO=no
28162816
ENABLED_AESGCM_STREAM=no # not yet implemented
28172817
ENABLED_ARMASM_NEON=yes
28182818
AC_MSG_NOTICE([32bit ARMv7-a found, setting mfpu to neon])
2819+
if test "$ENABLED_FIPS" != "no" ||
2820+
test "$HAVE_FIPS_VERSION_MAJOR" -ge 5;
2821+
then
2822+
# Use inline ASM with FIPS because of known "issue" with the
2823+
# assembly code
2824+
ENABLED_ARMASM_INLINE=yes
2825+
AC_MSG_NOTICE([32bit ARMv7-a found, setting inline for FIPS])
2826+
fi
28192827
;;
28202828
armv7m*)
28212829
# QEMU doesn't work with armv7-m
@@ -2826,6 +2834,14 @@ then
28262834
ENABLED_AESGCM_STREAM=no # not yet implemented
28272835
ENABLED_ARMASM_NEON=no
28282836
AC_MSG_NOTICE([32bit ARMv7-m found])
2837+
if test "$ENABLED_FIPS" != "no" ||
2838+
test "$HAVE_FIPS_VERSION_MAJOR" -ge 5;
2839+
then
2840+
# Use inline ASM with FIPS because of known "issue" with the
2841+
# assembly code
2842+
ENABLED_ARMASM_INLINE=yes
2843+
AC_MSG_NOTICE([32bit ARMv7-m found, setting inline for FIPS])
2844+
fi
28292845
;;
28302846
armv6*)
28312847
AM_CPPFLAGS="$AM_CPPFLAGS -march=armv6 -fomit-frame-pointer -DWOLFSSL_ARMASM_NO_HW_CRYPTO -DWOLFSSL_ARM_ARCH=6"
@@ -8080,7 +8096,7 @@ if test "$ENABLED_SP_ASM" = "yes" && test "$ENABLED_SP" = "yes"; then
80808096
AM_CCASFLAGS="$AM_CCASFLAGS -DWOLFSSL_SP_ARM64_ASM"
80818097
ENABLED_SP_ARM64_ASM=yes
80828098
;;
8083-
*armv7a*)
8099+
*armv7a* | *armv7l*)
80848100
if test "$ENABLED_ARMASM" = "no"; then
80858101
AM_CPPFLAGS="$AM_CPPFLAGS -march=armv7-a -mfpu=neon -DWOLFSSL_ARM_ARCH=7 -marm"
80868102
fi

0 commit comments

Comments
 (0)