summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Andree <mandree@FreeBSD.org>2022-10-12 00:12:57 +0200
committerMatthias Andree <mandree@FreeBSD.org>2022-10-12 00:17:18 +0200
commit8fc6b69f47e7ee7da005f8b59fc10522d287740b (patch)
treedabbc8d551ebc1c34998629a812f9866d39f3b2f
parentdns/bind918: unbreak build with docs excluded (diff)
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));
-rw-r--r--security/putty/Makefile1
-rw-r--r--security/putty/files/patch-crypto_CMakeLists.txt15
2 files changed, 15 insertions, 1 deletions
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