summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
authorAdam J. Stewart <ajstewart426@gmail.com>2024-07-25 15:57:18 +0200
committerGitHub <noreply@github.com>2024-07-25 15:57:18 +0200
commitea42d18506e94ec9a71459ed4f0ae53fb4128f95 (patch)
tree0b17f778462d12d06d0a67b3682a5d68bf163ec7 /var
parent2b763ff2dba30221d9d7d18b2d3e3a401b760f1c (diff)
downloadspack-ea42d18506e94ec9a71459ed4f0ae53fb4128f95.tar.gz
spack-ea42d18506e94ec9a71459ed4f0ae53fb4128f95.tar.bz2
spack-ea42d18506e94ec9a71459ed4f0ae53fb4128f95.tar.xz
spack-ea42d18506e94ec9a71459ed4f0ae53fb4128f95.zip
libgcrypt: add patch for avx512 support (#45432)
Diffstat (limited to 'var')
-rw-r--r--var/spack/repos/builtin/packages/libgcrypt/conditional_avx512.patch33
-rw-r--r--var/spack/repos/builtin/packages/libgcrypt/package.py3
2 files changed, 36 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/libgcrypt/conditional_avx512.patch b/var/spack/repos/builtin/packages/libgcrypt/conditional_avx512.patch
new file mode 100644
index 0000000000..9bd196ff60
--- /dev/null
+++ b/var/spack/repos/builtin/packages/libgcrypt/conditional_avx512.patch
@@ -0,0 +1,33 @@
+From b42116d6067a5233f72e5598032d4b396bb8eaac Mon Sep 17 00:00:00 2001
+From: NIIBE Yutaka <gniibe@fsij.org>
+Date: Thu, 4 Jul 2024 11:17:03 +0900
+Subject: [PATCH] cipher:blake2: Fix for use_avx512.
+
+* cipher/blake2.c (blake2s_init_ctx): Conditional with USE_AVX512.
+
+--
+
+GnuPG-bug-id: 7184
+Reported-by: Aaron Howland
+Fixing-commit: 909daa700e4b45d75469df298ee564b8fc2f4b72
+Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
+---
+ cipher/blake2.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/cipher/blake2.c b/cipher/blake2.c
+index 451e71f6..1a04fbd8 100644
+--- a/cipher/blake2.c
++++ b/cipher/blake2.c
+@@ -830,7 +830,7 @@ static gcry_err_code_t blake2s_init_ctx(void *ctx, unsigned int flags,
+ #ifdef USE_AVX
+ c->use_avx = !!(features & HWF_INTEL_AVX);
+ #endif
+-#ifdef USE_AVX
++#ifdef USE_AVX512
+ c->use_avx512 = !!(features & HWF_INTEL_AVX512);
+ #endif
+
+--
+2.30.2
+
diff --git a/var/spack/repos/builtin/packages/libgcrypt/package.py b/var/spack/repos/builtin/packages/libgcrypt/package.py
index 3c5bcfdd5d..44080a58b7 100644
--- a/var/spack/repos/builtin/packages/libgcrypt/package.py
+++ b/var/spack/repos/builtin/packages/libgcrypt/package.py
@@ -56,6 +56,9 @@ class Libgcrypt(AutotoolsPackage):
# https://dev.gnupg.org/T6442
patch("rndgetentropy_no_getrandom.patch", when="@=1.10.2 platform=darwin")
+ # https://git.gnupg.org/cgi-bin/gitweb.cgi?p=libgcrypt.git;a=commit;h=b42116d6067a5233f72e5598032d4b396bb8eaac
+ patch("conditional_avx512.patch", when="@1.11.0")
+
def check(self):
# Without this hack, `make check` fails on macOS when SIP is enabled
# https://bugs.gnupg.org/gnupg/issue2056