mirror of
https://github.com/jedisct1/libsodium.git
synced 2024-12-19 10:05:05 -07:00
Add libarmcrypto.la
This commit is contained in:
parent
c8b6906c60
commit
728b7ef237
15
configure.ac
15
configure.ac
@ -366,6 +366,20 @@ dnl Checks for headers
|
||||
|
||||
AS_IF([test "x$EMSCRIPTEN" = "x"], [
|
||||
|
||||
AS_IF([test "$host_cpu" = "aarch64"], [
|
||||
oldcflags="$CFLAGS"
|
||||
AX_CHECK_COMPILE_FLAG([-march=armv8-a+crypto], [CFLAGS="$CFLAGS -march=armv8-a+crypto"])
|
||||
AC_MSG_CHECKING(for ARM crypto instructions set)
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
|
||||
#include <arm_neon.h>
|
||||
]], [[ vaeseq_u8(vmovq_n_u8(0), vmovq_n_u8(__ARM_FEATURE_CRYPTO)) ]])],
|
||||
[AC_MSG_RESULT(yes)
|
||||
AC_DEFINE([HAVE_ARMCRYPTO], [1], [ARM crypto extensions are available])
|
||||
AX_CHECK_COMPILE_FLAG([-march=armv8-a+crypto], [CFLAGS_ARMCRYPTO="-march=armv8-a+crypto"])],
|
||||
[AC_MSG_RESULT(no)])
|
||||
CFLAGS="$oldcflags"
|
||||
])
|
||||
|
||||
oldcflags="$CFLAGS"
|
||||
AX_CHECK_COMPILE_FLAG([-mmmx], [CFLAGS="$CFLAGS -mmmx"])
|
||||
AC_MSG_CHECKING(for MMX instructions set)
|
||||
@ -542,6 +556,7 @@ __m512i y = _mm512_permutexvar_epi64(_mm512_setr_epi64(0, 1, 4, 5, 2, 3, 6, 7),
|
||||
|
||||
])
|
||||
|
||||
AC_SUBST(CFLAGS_ARMCRYPTO)
|
||||
AC_SUBST(CFLAGS_MMX)
|
||||
AC_SUBST(CFLAGS_SSE2)
|
||||
AC_SUBST(CFLAGS_SSE3)
|
||||
|
@ -199,8 +199,8 @@ endif
|
||||
SUBDIRS = \
|
||||
include
|
||||
|
||||
libsodium_la_LIBADD = libaesni.la libsse2.la libssse3.la libsse41.la libavx2.la libavx512f.la
|
||||
noinst_LTLIBRARIES = libaesni.la libsse2.la libssse3.la libsse41.la libavx2.la libavx512f.la
|
||||
libsodium_la_LIBADD = libaesni.la libarmcrypto.la libsse2.la libssse3.la libsse41.la libavx2.la libavx512f.la
|
||||
noinst_LTLIBRARIES = libaesni.la libarmcrypto.la libsse2.la libssse3.la libsse41.la libavx2.la libavx512f.la
|
||||
|
||||
librdrand_la_LDFLAGS = $(libsodium_la_LDFLAGS)
|
||||
librdrand_la_CPPFLAGS = $(libsodium_la_CPPFLAGS) \
|
||||
@ -216,6 +216,12 @@ libsodium_la_SOURCES += \
|
||||
randombytes/sysrandom/randombytes_sysrandom.c
|
||||
endif
|
||||
|
||||
libarmcrypto_la_LDFLAGS = $(libsodium_la_LDFLAGS)
|
||||
libarmcrypto_la_CPPFLAGS = $(libsodium_la_CPPFLAGS) \
|
||||
@CFLAGS_ARMCRYPTO@
|
||||
libarmcrypto_la_SOURCES = \
|
||||
crypto_aead/aegis256/arm-crypto/aead_aegis256_armcrypto.c
|
||||
|
||||
libaesni_la_LDFLAGS = $(libsodium_la_LDFLAGS)
|
||||
libaesni_la_CPPFLAGS = $(libsodium_la_CPPFLAGS) \
|
||||
@CFLAGS_SSE2@ @CFLAGS_SSSE3@ @CFLAGS_AESNI@ @CFLAGS_PCLMUL@
|
||||
|
@ -12,7 +12,7 @@
|
||||
|
||||
#include "private/common.h"
|
||||
|
||||
#if (defined(__ARM_NEON) || defined(__aarch64__)) && defined(__ARM_FEATURE_CRYPTO)
|
||||
#ifdef HAVE_ARM_CRYPTO
|
||||
# include <arm_neon.h>
|
||||
|
||||
static inline void
|
||||
|
Loading…
Reference in New Issue
Block a user