]> code.ossystems Code Review - openembedded-core.git/commitdiff
openssl: fix builds on ARMv8 targets without Aarch64
authorRoss Burton <ross@burtonini.com>
Tue, 2 Nov 2021 16:57:06 +0000 (16:57 +0000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 3 Nov 2021 10:12:01 +0000 (10:12 +0000)
ARMv8 doesn't imply Aarch64, so correct a check that was making that
assumption.  This fixes the build on 32-bit ARMv8 targets such as
Cortex-A32.

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/recipes-connectivity/openssl/openssl/armv8-32bit.patch [new file with mode: 0644]
meta/recipes-connectivity/openssl/openssl_3.0.0.bb

diff --git a/meta/recipes-connectivity/openssl/openssl/armv8-32bit.patch b/meta/recipes-connectivity/openssl/openssl/armv8-32bit.patch
new file mode 100644 (file)
index 0000000..1935651
--- /dev/null
@@ -0,0 +1,29 @@
+Upstream-Status: Submitted [https://github.com/openssl/openssl/pull/16951]
+Signed-off-by: Ross Burton <ross.burton@arm.com>
+
+From 5118e96a3dbedde2523e7726fa34af30923a9add Mon Sep 17 00:00:00 2001
+From: Tom Cosgrove <tom.cosgrove@arm.com>
+Date: Tue, 2 Nov 2021 15:26:21 +0000
+Subject: [PATCH] Fix builds on Armv8 systems without AArch64
+
+This fixes "undefined reference to `aes_gcm_dec_128_kernel' in function
+`armv8_aes_gcm_decrypt'" and similar
+
+Fixes #16949
+---
+ include/crypto/aes_platform.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/include/crypto/aes_platform.h b/include/crypto/aes_platform.h
+index 015c3bd4ab91..e95ad5aa5de6 100644
+--- a/include/crypto/aes_platform.h
++++ b/include/crypto/aes_platform.h
+@@ -100,7 +100,7 @@ void AES_xts_decrypt(const unsigned char *inp, unsigned char *out, size_t len,
+ #    define AES_PMULL_CAPABLE ((OPENSSL_armcap_P & ARMV8_PMULL) && (OPENSSL_armcap_P & ARMV8_AES))
+ #    define AES_GCM_ENC_BYTES 512
+ #    define AES_GCM_DEC_BYTES 512
+-#    if __ARM_MAX_ARCH__>=8
++#    if __ARM_MAX_ARCH__>=8 && defined(__aarch64__)
+ #     define AES_gcm_encrypt armv8_aes_gcm_encrypt
+ #     define AES_gcm_decrypt armv8_aes_gcm_decrypt
+ #     define AES_GCM_ASM(gctx) ((gctx)->ctr==aes_v8_ctr32_encrypt_blocks && \
index 67343bedcc663f7024e9c3612ed602789a42c837..8852a51ca8073993c6e537c374e13b8cb41910d7 100644 (file)
@@ -12,6 +12,7 @@ SRC_URI = "http://www.openssl.org/source/openssl-${PV}.tar.gz \
            file://0001-buildinfo-strip-sysroot-and-debug-prefix-map-from-co.patch \
            file://afalg.patch \
            file://0001-Configure-do-not-tweak-mips-cflags.patch \
+           file://armv8-32bit.patch \
            "
 
 SRC_URI:append:class-nativesdk = " \