1 |
commit: 092edcd917732ae0d21ef78f0484cc73d386225a |
2 |
Author: Sam James <sam <AT> gentoo <DOT> org> |
3 |
AuthorDate: Tue Jan 18 13:12:38 2022 +0000 |
4 |
Commit: Sam James <sam <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Jan 18 13:12:46 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=092edcd9 |
7 |
|
8 |
dev-libs/libgcrypt: fix build on ARM |
9 |
|
10 |
Closes: https://bugs.gentoo.org/831397 |
11 |
Signed-off-by: Sam James <sam <AT> gentoo.org> |
12 |
|
13 |
.../libgcrypt-1.9.4-arm-neon-compile-fix.patch | 42 ++++++++++++++++++++++ |
14 |
dev-libs/libgcrypt/libgcrypt-1.9.4.ebuild | 1 + |
15 |
2 files changed, 43 insertions(+) |
16 |
|
17 |
diff --git a/dev-libs/libgcrypt/files/libgcrypt-1.9.4-arm-neon-compile-fix.patch b/dev-libs/libgcrypt/files/libgcrypt-1.9.4-arm-neon-compile-fix.patch |
18 |
new file mode 100644 |
19 |
index 000000000000..b8126185817b |
20 |
--- /dev/null |
21 |
+++ b/dev-libs/libgcrypt/files/libgcrypt-1.9.4-arm-neon-compile-fix.patch |
22 |
@@ -0,0 +1,42 @@ |
23 |
+From bc0b82ad8201a4d7bffa3cf0f5504b72c1011cb1 Mon Sep 17 00:00:00 2001 |
24 |
+From: Sam James <sam@g.o> |
25 |
+Date: Tue, 18 Jan 2022 12:44:22 +0000 |
26 |
+Subject: [PATCH] cipher/cipher-gcm: fix build failure on ARM NEON |
27 |
+ |
28 |
+'features' is only defined when relevant CPU features are found, but |
29 |
+one of the uses below its definition checked for GCM_USE_ARM_NEON which |
30 |
+wasn't in the guard above it. |
31 |
+ |
32 |
+i.e. We used to only define 'features' when: |
33 |
+- GCM_USE_INTEL_PCLMUL |
34 |
+- GCM_USE_ARM_PMULL |
35 |
+- GCM_USE_S390X_CRYPTO |
36 |
+- GCM_USE_PPC_VPMSUM |
37 |
+- GCM_USE_S390X_CRYPTO |
38 |
+- GCM_USE_PPC_VPMSUM |
39 |
+is set. |
40 |
+ |
41 |
+We were missing GCM_USE_ARM_NEON so when we check for GCM_USE_ARM_NEON |
42 |
+below, it'd fail as features wasn't defined. |
43 |
+ |
44 |
+Bug: https://bugs.gentoo.org/831397 |
45 |
+--- |
46 |
+ cipher/cipher-gcm.c | 3 ++- |
47 |
+ 1 file changed, 2 insertions(+), 1 deletion(-) |
48 |
+ |
49 |
+diff --git a/cipher/cipher-gcm.c b/cipher/cipher-gcm.c |
50 |
+index a039c5e9..22834f35 100644 |
51 |
+--- a/cipher/cipher-gcm.c |
52 |
++++ b/cipher/cipher-gcm.c |
53 |
+@@ -583,7 +583,8 @@ static void |
54 |
+ setupM (gcry_cipher_hd_t c) |
55 |
+ { |
56 |
+ #if defined(GCM_USE_INTEL_PCLMUL) || defined(GCM_USE_ARM_PMULL) || \ |
57 |
+- defined(GCM_USE_S390X_CRYPTO) || defined(GCM_USE_PPC_VPMSUM) |
58 |
++ defined(GCM_USE_ARM_NEON) || defined(GCM_USE_S390X_CRYPTO) || \ |
59 |
++ defined(GCM_USE_PPC_VPMSUM) |
60 |
+ unsigned int features = _gcry_get_hw_features (); |
61 |
+ #endif |
62 |
+ |
63 |
+-- |
64 |
+2.34.1 |
65 |
|
66 |
diff --git a/dev-libs/libgcrypt/libgcrypt-1.9.4.ebuild b/dev-libs/libgcrypt/libgcrypt-1.9.4.ebuild |
67 |
index b60616307fb9..a5b6b9652284 100644 |
68 |
--- a/dev-libs/libgcrypt/libgcrypt-1.9.4.ebuild |
69 |
+++ b/dev-libs/libgcrypt/libgcrypt-1.9.4.ebuild |
70 |
@@ -35,6 +35,7 @@ BDEPEND="doc? ( virtual/texi2dvi )" |
71 |
PATCHES=( |
72 |
"${FILESDIR}"/${PN}-multilib-syspath.patch |
73 |
"${FILESDIR}"/${PN}-powerpc-darwin.patch |
74 |
+ "${FILESDIR}"/${PN}-1.9.4-arm-neon-compile-fix.patch |
75 |
) |
76 |
|
77 |
MULTILIB_CHOST_TOOLS=( |