diff options
| author | Khem Raj <raj.khem@gmail.com> | 2024-12-04 12:01:52 -0800 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2024-12-09 15:23:28 +0000 |
| commit | 8689c066e8a71368115bfca6558a7cc91e606aae (patch) | |
| tree | 7e8a7d57d4a34b8f3363e0728fb0448992699416 | |
| parent | c742295dffdd98d94e1a4d0553e27e291efe0d63 (diff) | |
| download | poky-8689c066e8a71368115bfca6558a7cc91e606aae.tar.gz | |
openssl: Fix build on risc64/musl
__NR_riscv_hwprobe is not exported in musl's hwprobe.h
this fails to build with newer kernels
Fixes
| :85:20: error: use of undeclared identifier '__NR_riscv_hwprobe'; did you mean 'riscv_hwprobe'?
| 85 | return syscall(__NR_riscv_hwprobe, pairs, pair_count, cpu_count, cpus, flags);
| | ^~~~~~~~~~~~~~~~~~
(From OE-Core rev: 5271f24643c303d0e6d3d9c12c722f5d818252fe)
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-Fix-builds-on-riscv64-using-musl.patch | 36 | ||||
| -rw-r--r-- | meta/recipes-connectivity/openssl/openssl_3.4.0.bb | 1 |
2 files changed, 37 insertions, 0 deletions
diff --git a/meta/recipes-connectivity/openssl/openssl/0001-Fix-builds-on-riscv64-using-musl.patch b/meta/recipes-connectivity/openssl/openssl/0001-Fix-builds-on-riscv64-using-musl.patch new file mode 100644 index 0000000000..0ec8c93748 --- /dev/null +++ b/meta/recipes-connectivity/openssl/openssl/0001-Fix-builds-on-riscv64-using-musl.patch | |||
| @@ -0,0 +1,36 @@ | |||
| 1 | From 9131291716073c4ea65a29575880a9d796c22ed6 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Matt Caswell <matt@openssl.org> | ||
| 3 | Date: Wed, 23 Oct 2024 14:57:20 +0100 | ||
| 4 | Subject: [PATCH] Fix builds on riscv64 using musl | ||
| 5 | |||
| 6 | Some environments using musl are reported to have the hwprobe.h include | ||
| 7 | file but not have the __NR_riscv_hwprobe define. | ||
| 8 | |||
| 9 | Fixes #25772 | ||
| 10 | |||
| 11 | Upstream-Status: Backport [https://github.com/openssl/openssl/pull/25787] | ||
| 12 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
| 13 | --- | ||
| 14 | include/crypto/riscv_arch.h | 9 ++++++++- | ||
| 15 | 1 file changed, 8 insertions(+), 1 deletion(-) | ||
| 16 | |||
| 17 | diff --git a/include/crypto/riscv_arch.h b/include/crypto/riscv_arch.h | ||
| 18 | index 4b3573f..8858427 100644 | ||
| 19 | --- a/include/crypto/riscv_arch.h | ||
| 20 | +++ b/include/crypto/riscv_arch.h | ||
| 21 | @@ -15,7 +15,14 @@ | ||
| 22 | |||
| 23 | # if defined(OPENSSL_SYS_LINUX) && !defined(FIPS_MODULE) | ||
| 24 | # if __has_include(<asm/hwprobe.h>) | ||
| 25 | -# define OSSL_RISCV_HWPROBE | ||
| 26 | +# include <sys/syscall.h> | ||
| 27 | +# /* | ||
| 28 | + * Some environments using musl are reported to have the hwprobe.h include | ||
| 29 | + * file but not have the __NR_riscv_hwprobe define. | ||
| 30 | + */ | ||
| 31 | +# ifdef __NR_riscv_hwprobe | ||
| 32 | +# define OSSL_RISCV_HWPROBE | ||
| 33 | +# endif | ||
| 34 | # endif | ||
| 35 | # endif | ||
| 36 | |||
diff --git a/meta/recipes-connectivity/openssl/openssl_3.4.0.bb b/meta/recipes-connectivity/openssl/openssl_3.4.0.bb index 734e3c54ef..b7f96db394 100644 --- a/meta/recipes-connectivity/openssl/openssl_3.4.0.bb +++ b/meta/recipes-connectivity/openssl/openssl_3.4.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-Fix-builds-on-riscv64-using-musl.patch \ | ||
| 15 | " | 16 | " |
| 16 | 17 | ||
| 17 | SRC_URI:append:class-nativesdk = " \ | 18 | SRC_URI:append:class-nativesdk = " \ |
