Fix ARM builds
Need to include options.h in assembly now. bufPt declared in block but not outside. poly1305_block and poly1305_blocks need prototype - declaration in wolfcrypt/src/port/arm/armv8-poly1305.c (__arch64__ only).
This commit is contained in:
parent
920c97963c
commit
72d1352bd6
@ -1029,6 +1029,8 @@ then
|
|||||||
*aarch64*)
|
*aarch64*)
|
||||||
# +crypto needed for hardware acceleration
|
# +crypto needed for hardware acceleration
|
||||||
AM_CPPFLAGS="$AM_CPPFLAGS -mcpu=generic+crypto"
|
AM_CPPFLAGS="$AM_CPPFLAGS -mcpu=generic+crypto"
|
||||||
|
# Include options.h
|
||||||
|
AM_CCASFLAGS="$AM_CCASFLAGS -DEXTERNAL_OPTS_OPENVPN"
|
||||||
|
|
||||||
# Check for and set -mstrict-align compiler flag
|
# Check for and set -mstrict-align compiler flag
|
||||||
# Used to set assumption that Aarch64 systems will not handle
|
# Used to set assumption that Aarch64 systems will not handle
|
||||||
@ -1048,6 +1050,8 @@ then
|
|||||||
AC_MSG_NOTICE([64bit ARMv8 found, setting mcpu to generic+crypto]);;
|
AC_MSG_NOTICE([64bit ARMv8 found, setting mcpu to generic+crypto]);;
|
||||||
*)
|
*)
|
||||||
AM_CPPFLAGS="$AM_CPPFLAGS -mfpu=crypto-neon-fp-armv8"
|
AM_CPPFLAGS="$AM_CPPFLAGS -mfpu=crypto-neon-fp-armv8"
|
||||||
|
# Include options.h
|
||||||
|
AM_CCASFLAGS="$AM_CCASFLAGS -DEXTERNAL_OPTS_OPENVPN"
|
||||||
AC_MSG_NOTICE([32bit ARMv8 found, setting mfpu to crypto-neon-fp-armv8]);;
|
AC_MSG_NOTICE([32bit ARMv8 found, setting mfpu to crypto-neon-fp-armv8]);;
|
||||||
esac
|
esac
|
||||||
esac
|
esac
|
||||||
|
@ -1106,7 +1106,7 @@ static WC_INLINE int Sha256Final(wc_Sha256* sha256, byte* hash)
|
|||||||
XMEMCPY(&local[WC_SHA256_PAD_SIZE + sizeof(word32)], &sha256->loLen,
|
XMEMCPY(&local[WC_SHA256_PAD_SIZE + sizeof(word32)], &sha256->loLen,
|
||||||
sizeof(word32));
|
sizeof(word32));
|
||||||
|
|
||||||
bufPt = sha256->buffer;
|
word32* bufPt = sha256->buffer;
|
||||||
word32* digPt = sha256->digest;
|
word32* digPt = sha256->digest;
|
||||||
__asm__ volatile (
|
__asm__ volatile (
|
||||||
"#load leftover data\n"
|
"#load leftover data\n"
|
||||||
|
@ -119,6 +119,12 @@ WOLFSSL_API int wc_Poly1305_EncodeSizes(Poly1305* ctx, word32 aadSz, word32 data
|
|||||||
WOLFSSL_API int wc_Poly1305_MAC(Poly1305* ctx, byte* additional, word32 addSz,
|
WOLFSSL_API int wc_Poly1305_MAC(Poly1305* ctx, byte* additional, word32 addSz,
|
||||||
byte* input, word32 sz, byte* tag, word32 tagSz);
|
byte* input, word32 sz, byte* tag, word32 tagSz);
|
||||||
|
|
||||||
|
#if defined(__aarch64__ ) && defined(WOLFSSL_ARMASM)
|
||||||
|
void poly1305_blocks(Poly1305* ctx, const unsigned char *m,
|
||||||
|
size_t bytes);
|
||||||
|
void poly1305_block(Poly1305* ctx, const unsigned char *m);
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
} /* extern "C" */
|
} /* extern "C" */
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user