From: Niels Möller Date: Tue, 8 Dec 2020 16:51:46 +0000 (+0100) Subject: Recognize arm64 in configure X-Git-Tag: nettle_3.8_release_20220602~141^2~10 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ebf9ae834d73b9374f6ea45f1e939921682747fe;p=thirdparty%2Fnettle.git Recognize arm64 in configure --- diff --git a/Makefile.in b/Makefile.in index cfbc45bb..a87e0a9e 100644 --- a/Makefile.in +++ b/Makefile.in @@ -615,7 +615,7 @@ distdir: $(DISTFILES) done set -e; for d in sparc32 sparc64 x86 \ x86_64 x86_64/aesni x86_64/sha_ni x86_64/fat \ - arm arm/neon arm/v6 arm/fat \ + arm arm/neon arm/v6 arm/fat arm64 \ powerpc64 powerpc64/p7 powerpc64/p8 powerpc64/fat ; do \ mkdir "$(distdir)/$$d" ; \ find "$(srcdir)/$$d" -maxdepth 1 '(' -name '*.asm' -o -name '*.m4' -o -name README ')' \ diff --git a/configure.ac b/configure.ac index 763df3b5..e76f9375 100644 --- a/configure.ac +++ b/configure.ac @@ -344,6 +344,18 @@ case "$host_cpu" in ABI=64 ]) ;; + aarch64) + AC_TRY_COMPILE([ +#if defined(__aarch64__) +#error 64-bit powerpc +#endif + ], [], [ + ABI=32 + ], [ + ABI=64 + ]) + ;; + esac if test "x$ABI" != xstandard ; then @@ -459,6 +471,17 @@ if test "x$enable_assembler" = xyes ; then fi fi ;; + aarch64*) + if test "$ABI" = 64 ; then + asm_path=arm64 + else + # As far as I understand, Neon instructions are unlikely to be + # missing. It may be omitted "only for implementations + # targeting specialized markets", to quote the Armv8 reference + # manual. + asm_path="arm/neon arm/v6 arm" + fi + ;; *powerpc64*) if test "$ABI" = 64 ; then GMP_ASM_POWERPC_R_REGISTERS