git: 8fc6b69f47e7 - main - security/putty: fix aarch64 build on clang 10.

From: Matthias Andree <mandree_at_FreeBSD.org>
Date: Tue, 11 Oct 2022 22:17:20 UTC
The branch main has been updated by mandree:

URL: https://cgit.FreeBSD.org/ports/commit/?id=8fc6b69f47e7ee7da005f8b59fc10522d287740b

commit 8fc6b69f47e7ee7da005f8b59fc10522d287740b
Author:     Matthias Andree <mandree@FreeBSD.org>
AuthorDate: 2022-10-11 22:12:57 +0000
Commit:     Matthias Andree <mandree@FreeBSD.org>
CommitDate: 2022-10-11 22:17:18 +0000

    security/putty: fix aarch64 build on clang 10.
    
    clang 10 (FreeBSD 12.3) does not support vaddq_p128 and similar
    ARM NEON intrinsics, but clang 13 (FreeBSD 13.1) does.
    
    Abuse the HAVE_NEON_PMULL cmake test to disable aesgcm-neon.c
    unless vaddq_p128() is available.
    
    http://ampere1.nyi.freebsd.org/data/123arm64-quarterly/31229ca1324c/logs/putty-nogtk-0.78~pre20220922.log:
    /wrkdirs/usr/ports/security/putty-nogtk/work/putty-0.78~pre20220922.9fcfd67/crypto/aesgcm-neon.c:125:16:
    warning: implicit declaration of function 'vaddq_p128' is invalid in C99 [-Wimplicit-function-declaration]
            ctx->acc = vaddq_p128(ctx->acc, load_p128_be(coeff));
---
 security/putty/Makefile                          |  1 -
 security/putty/files/patch-crypto_CMakeLists.txt | 15 +++++++++++++++
 2 files changed, 15 insertions(+), 1 deletion(-)

diff --git a/security/putty/Makefile b/security/putty/Makefile
index 6f030da7f8d7..fe19c50a6f96 100644
--- a/security/putty/Makefile
+++ b/security/putty/Makefile
@@ -7,7 +7,6 @@ CATEGORIES=	security
 #		ftp://ftp.chiark.greenend.org.uk/users/sgtatham/putty-latest/
 MASTER_SITES=	https://tartarus.org/~simon/putty-prerel-snapshots/ \
 		LOCAL/mandree/
-PATCH_STRIP=	-p1
 
 MAINTAINER=	mandree@FreeBSD.org
 COMMENT=	Secure shell and telnet client including xterm emulator
diff --git a/security/putty/files/patch-crypto_CMakeLists.txt b/security/putty/files/patch-crypto_CMakeLists.txt
new file mode 100644
index 000000000000..82639b778fd0
--- /dev/null
+++ b/security/putty/files/patch-crypto_CMakeLists.txt
@@ -0,0 +1,15 @@
+This is a crude hack to avoid aesgcm-neon.c on FreeBSD 12.3,
+which does - by way of clang 10.0.1 - not offer vaddq_p128()
+through arm-neon.h. clang 13 as of FreeBSD 13.1 does.
+
+--- crypto/CMakeLists.txt.orig	2022-09-21 23:42:30 UTC
++++ crypto/CMakeLists.txt
+@@ -192,7 +192,7 @@ if(neon)
+       volatile poly128_t r;
+       volatile poly64_t a, b;
+       volatile poly64x2_t u, v;
+-      int main(void) { r = vmull_p64(a, b); r = vmull_high_p64(u, v); }"
++      int main(void) { r = vmull_p64(a, b); r = vmull_high_p64(u, v); r = vaddq_p128(r, r); }"
+     ADD_SOURCES_IF_SUCCESSFUL aesgcm-neon.c)
+ 
+   # The 'sha3' architecture extension, despite the name, includes