diff options
| author | Khem Raj <raj.khem@gmail.com> | 2024-05-13 16:05:28 -0700 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2024-05-23 11:26:39 +0100 |
| commit | a1d4f0b1055d6b5fdff24f89d5f959b5102da305 (patch) | |
| tree | 69821325b21430e96735c010bdfad2da3124e997 | |
| parent | c7e81b8067473ff3bb144f933a24e3a33140e43c (diff) | |
| download | poky-a1d4f0b1055d6b5fdff24f89d5f959b5102da305.tar.gz | |
openssl: Fix build on riscv
GCC-14 unearths this bug which is already fixed upstream so backport it
(From OE-Core rev: 0d5c61a1f5099639acf58b33288f466ce47847b5)
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
| -rw-r--r-- | meta/recipes-connectivity/openssl/openssl/0001-Implement-riscv_vlen_asm-for-riscv32.patch | 43 | ||||
| -rw-r--r-- | meta/recipes-connectivity/openssl/openssl_3.3.0.bb | 1 |
2 files changed, 44 insertions, 0 deletions
diff --git a/meta/recipes-connectivity/openssl/openssl/0001-Implement-riscv_vlen_asm-for-riscv32.patch b/meta/recipes-connectivity/openssl/openssl/0001-Implement-riscv_vlen_asm-for-riscv32.patch new file mode 100644 index 0000000000..e398d1074a --- /dev/null +++ b/meta/recipes-connectivity/openssl/openssl/0001-Implement-riscv_vlen_asm-for-riscv32.patch | |||
| @@ -0,0 +1,43 @@ | |||
| 1 | From 725b1530456545e8511adc9cbdd265309dffad53 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Hongren Zheng <i@zenithal.me> | ||
| 3 | Date: Fri, 26 Apr 2024 06:03:43 +0000 | ||
| 4 | Subject: [PATCH] Implement riscv_vlen_asm for riscv32 | ||
| 5 | |||
| 6 | riscvcap.c: undefined reference to 'riscv_vlen_asm' | ||
| 7 | |||
| 8 | Upstream-Status: Backport [https://github.com/openssl/openssl/pull/24270] | ||
| 9 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
| 10 | --- | ||
| 11 | crypto/riscv32cpuid.pl | 17 +++++++++++++++++ | ||
| 12 | 1 file changed, 17 insertions(+) | ||
| 13 | |||
| 14 | diff --git a/crypto/riscv32cpuid.pl b/crypto/riscv32cpuid.pl | ||
| 15 | index 20694e7..ac1c043 100644 | ||
| 16 | --- a/crypto/riscv32cpuid.pl | ||
| 17 | +++ b/crypto/riscv32cpuid.pl | ||
| 18 | @@ -84,5 +84,22 @@ OPENSSL_cleanse: | ||
| 19 | ___ | ||
| 20 | } | ||
| 21 | |||
| 22 | +{ | ||
| 23 | +my ($ret) = ('a0'); | ||
| 24 | +$code .= <<___; | ||
| 25 | +################################################################################ | ||
| 26 | +# size_t riscv_vlen_asm(void) | ||
| 27 | +# Return VLEN (i.e. the length of a vector register in bits). | ||
| 28 | +.p2align 3 | ||
| 29 | +.globl riscv_vlen_asm | ||
| 30 | +.type riscv_vlen_asm,\@function | ||
| 31 | +riscv_vlen_asm: | ||
| 32 | + csrr $ret, vlenb | ||
| 33 | + slli $ret, $ret, 3 | ||
| 34 | + ret | ||
| 35 | +.size riscv_vlen_asm,.-riscv_vlen_asm | ||
| 36 | +___ | ||
| 37 | +} | ||
| 38 | + | ||
| 39 | print $code; | ||
| 40 | close STDOUT or die "error closing STDOUT: $!"; | ||
| 41 | -- | ||
| 42 | 2.45.0 | ||
| 43 | |||
diff --git a/meta/recipes-connectivity/openssl/openssl_3.3.0.bb b/meta/recipes-connectivity/openssl/openssl_3.3.0.bb index fccf6988b1..a361185b65 100644 --- a/meta/recipes-connectivity/openssl/openssl_3.3.0.bb +++ b/meta/recipes-connectivity/openssl/openssl_3.3.0.bb | |||
| @@ -12,6 +12,7 @@ SRC_URI = "http://www.openssl.org/source/openssl-${PV}.tar.gz \ | |||
| 12 | file://0001-buildinfo-strip-sysroot-and-debug-prefix-map-from-co.patch \ | 12 | file://0001-buildinfo-strip-sysroot-and-debug-prefix-map-from-co.patch \ |
| 13 | file://0001-Configure-do-not-tweak-mips-cflags.patch \ | 13 | file://0001-Configure-do-not-tweak-mips-cflags.patch \ |
| 14 | file://0001-Added-handshake-history-reporting-when-test-fails.patch \ | 14 | file://0001-Added-handshake-history-reporting-when-test-fails.patch \ |
| 15 | file://0001-Implement-riscv_vlen_asm-for-riscv32.patch \ | ||
| 15 | file://bti.patch \ | 16 | file://bti.patch \ |
| 16 | file://CVE-2024-4603.patch \ | 17 | file://CVE-2024-4603.patch \ |
| 17 | " | 18 | " |
