summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
Diffstat (limited to 'meta')
-rw-r--r--meta/recipes-support/libgcrypt/files/0006-Fix-building-AArch32-CE-implementations-when-target-.patch96
-rw-r--r--meta/recipes-support/libgcrypt/libgcrypt_1.8.0.bb1
2 files changed, 97 insertions, 0 deletions
diff --git a/meta/recipes-support/libgcrypt/files/0006-Fix-building-AArch32-CE-implementations-when-target-.patch b/meta/recipes-support/libgcrypt/files/0006-Fix-building-AArch32-CE-implementations-when-target-.patch
new file mode 100644
index 0000000000..65b9fd41e0
--- /dev/null
+++ b/meta/recipes-support/libgcrypt/files/0006-Fix-building-AArch32-CE-implementations-when-target-.patch
@@ -0,0 +1,96 @@
1From 4a7aa30ae9f3ce798dd886c2f2d4164c43027748 Mon Sep 17 00:00:00 2001
2From: Jussi Kivilinna <jussi.kivilinna@iki.fi>
3Date: Sat, 29 Jul 2017 14:34:23 +0300
4Subject: [PATCH] Fix building AArch32 CE implementations when target is ARMv6
5 arch
6
7* cipher/cipher-gcm-armv8-aarch32-ce.S: Select ARMv8 architecure.
8* cipher/rijndael-armv8-aarch32-ce.S: Ditto.
9* cipher/sha1-armv8-aarch32-ce.S: Ditto.
10* cipher/sha256-armv8-aarch32-ce.S: Ditto.
11* configure.ac (gcry_cv_gcc_inline_asm_aarch32_crypto): Ditto.
12--
13
14Raspbian distribution defaults to ARMv6 architecture thus 'rbit'
15instruction is not available with default compiler flags. Patch
16adds explicit architecture selection for ARMv8 to enable 'rbit'
17usage with ARMv8/AArch32-CE assembly implementations of SHA,
18GHASH and AES.
19
20Reported-by: Chris Horry <zerbey@gmail.com>
21Signed-off-by: Jussi Kivilinna <jussi.kivilinna@iki.fi>
22
23Signed-off-by: Paul Barker <pbarker@toganlabs.com>
24Upstream-Status: Backport
25
26---
27 cipher/cipher-gcm-armv8-aarch32-ce.S | 1 +
28 cipher/rijndael-armv8-aarch32-ce.S | 1 +
29 cipher/sha1-armv8-aarch32-ce.S | 1 +
30 cipher/sha256-armv8-aarch32-ce.S | 1 +
31 configure.ac | 1 +
32 5 files changed, 5 insertions(+)
33
34diff --git a/cipher/cipher-gcm-armv8-aarch32-ce.S b/cipher/cipher-gcm-armv8-aarch32-ce.S
35index b61a7871..1de66a16 100644
36--- a/cipher/cipher-gcm-armv8-aarch32-ce.S
37+++ b/cipher/cipher-gcm-armv8-aarch32-ce.S
38@@ -24,6 +24,7 @@
39 defined(HAVE_GCC_INLINE_ASM_AARCH32_CRYPTO)
40
41 .syntax unified
42+.arch armv8-a
43 .fpu crypto-neon-fp-armv8
44 .arm
45
46diff --git a/cipher/rijndael-armv8-aarch32-ce.S b/cipher/rijndael-armv8-aarch32-ce.S
47index f375f673..5c8fa3c0 100644
48--- a/cipher/rijndael-armv8-aarch32-ce.S
49+++ b/cipher/rijndael-armv8-aarch32-ce.S
50@@ -24,6 +24,7 @@
51 defined(HAVE_GCC_INLINE_ASM_AARCH32_CRYPTO)
52
53 .syntax unified
54+.arch armv8-a
55 .fpu crypto-neon-fp-armv8
56 .arm
57
58diff --git a/cipher/sha1-armv8-aarch32-ce.S b/cipher/sha1-armv8-aarch32-ce.S
59index b0bc5ffe..bf2b233b 100644
60--- a/cipher/sha1-armv8-aarch32-ce.S
61+++ b/cipher/sha1-armv8-aarch32-ce.S
62@@ -24,6 +24,7 @@
63 defined(HAVE_GCC_INLINE_ASM_AARCH32_CRYPTO) && defined(USE_SHA1)
64
65 .syntax unified
66+.arch armv8-a
67 .fpu crypto-neon-fp-armv8
68 .arm
69
70diff --git a/cipher/sha256-armv8-aarch32-ce.S b/cipher/sha256-armv8-aarch32-ce.S
71index 2041a237..2b17ab1b 100644
72--- a/cipher/sha256-armv8-aarch32-ce.S
73+++ b/cipher/sha256-armv8-aarch32-ce.S
74@@ -24,6 +24,7 @@
75 defined(HAVE_GCC_INLINE_ASM_AARCH32_CRYPTO) && defined(USE_SHA256)
76
77 .syntax unified
78+.arch armv8-a
79 .fpu crypto-neon-fp-armv8
80 .arm
81
82diff --git a/configure.ac b/configure.ac
83index 27faa7f4..66e7cd67 100644
84--- a/configure.ac
85+++ b/configure.ac
86@@ -1619,6 +1619,7 @@ AC_CACHE_CHECK([whether GCC inline assembler supports AArch32 Crypto Extension i
87 AC_COMPILE_IFELSE([AC_LANG_SOURCE(
88 [[__asm__(
89 ".syntax unified\n\t"
90+ ".arch armv8-a\n\t"
91 ".arm\n\t"
92 ".fpu crypto-neon-fp-armv8\n\t"
93
94--
952.11.0
96
diff --git a/meta/recipes-support/libgcrypt/libgcrypt_1.8.0.bb b/meta/recipes-support/libgcrypt/libgcrypt_1.8.0.bb
index fb004d9ceb..02982f03c6 100644
--- a/meta/recipes-support/libgcrypt/libgcrypt_1.8.0.bb
+++ b/meta/recipes-support/libgcrypt/libgcrypt_1.8.0.bb
@@ -21,6 +21,7 @@ SRC_URI = "${GNUPG_MIRROR}/libgcrypt/libgcrypt-${PV}.tar.gz \
21 file://0002-libgcrypt-fix-building-error-with-O2-in-sysroot-path.patch \ 21 file://0002-libgcrypt-fix-building-error-with-O2-in-sysroot-path.patch \
22 file://0004-tests-Makefile.am-fix-undefined-reference-to-pthread.patch \ 22 file://0004-tests-Makefile.am-fix-undefined-reference-to-pthread.patch \
23 file://0005-ecc-Add-input-validation-for-X25519.patch \ 23 file://0005-ecc-Add-input-validation-for-X25519.patch \
24 file://0006-Fix-building-AArch32-CE-implementations-when-target-.patch \
24" 25"
25SRC_URI[md5sum] = "110ce4352f9ea6f560bdc6c5644ae93c" 26SRC_URI[md5sum] = "110ce4352f9ea6f560bdc6c5644ae93c"
26SRC_URI[sha256sum] = "f6e470b7f2d3a703e8747f05a8c19d9e10e26ebf2d5f3d71ff75a40f504e12ee" 27SRC_URI[sha256sum] = "f6e470b7f2d3a703e8747f05a8c19d9e10e26ebf2d5f3d71ff75a40f504e12ee"