From e20d83622478d8ca509596afc0c1899975738ea6 Mon Sep 17 00:00:00 2001 From: laokz Date: Tue, 29 Jul 2025 14:54:33 +0800 Subject: [PATCH] backport b2 patch to fix broken boost-context library on riscv Subpackage boost-context generated broken .so which has incompleted symbols. This patch is from upstream b2 5.0.0. https://github.com/bfgroup/b2/issues/340 https://github.com/bfgroup/b2/pull/341 (cherry picked from commit 64655eb81d1d93d8e5aafddda5595df22a746d57) --- ...e-OSPLAT-for-riscv64-and-riscv32-341.patch | 38 +++++++++++++++++++ boost.spec | 7 +++- 2 files changed, 44 insertions(+), 1 deletion(-) create mode 100644 b2-5.0.0-Define-OSPLAT-for-riscv64-and-riscv32-341.patch diff --git a/b2-5.0.0-Define-OSPLAT-for-riscv64-and-riscv32-341.patch b/b2-5.0.0-Define-OSPLAT-for-riscv64-and-riscv32-341.patch new file mode 100644 index 0000000..10adf00 --- /dev/null +++ b/b2-5.0.0-Define-OSPLAT-for-riscv64-and-riscv32-341.patch @@ -0,0 +1,38 @@ +From b4c09d1b0fea7f0e31e54317523c26c0490996c3 Mon Sep 17 00:00:00 2001 +From: Levi Zim +Date: Sat, 2 Dec 2023 03:23:14 +0800 +Subject: [PATCH] Define OSPLAT for riscv64 and riscv32 (#341) +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +* src/engine/jam.h + define OSPLAT for riscv64 and riscv32 + +Co-authored-by: René Ferdinand Rivera Morell +--- + src/engine/jam.h | 8 ++++++++ + 1 file changed, 8 insertions(+) + +diff --git a/tools/build/src/engine/jam.h b/tools/build/src/engine/jam.h +index e1b76cb04ad3..4e8ffa6420ca 100644 +--- a/tools/build/src/engine/jam.h ++++ b/tools/build/src/engine/jam.h +@@ -442,6 +442,14 @@ + #define OSPLAT "OSPLAT=PARISC" + #endif + ++#if defined( __riscv ) || defined( __riscv__ ) ++ #if __riscv_xlen == 64 ++ #define OSPLAT "OSPLAT=RISCV64" ++ #elif __riscv_xlen == 32 ++ #define OSPLAT "OSPLAT=RISCV32" ++ #endif ++#endif ++ + #ifndef OSPLAT + #define OSPLAT "" + #endif +-- +2.43.0 + diff --git a/boost.spec b/boost.spec index f63a708..8c59e93 100644 --- a/boost.spec +++ b/boost.spec @@ -2,7 +2,7 @@ Name: boost Version: 1.83.0 -Release: 8 +Release: 9 Summary: The free peer-reviewed portable C++ source libraries License: BSL-1.0 URL: https://www.boost.org @@ -27,6 +27,8 @@ Patch7: boost-Support-numpy-2.0.0b1.patch Patch8: boost-Compare-pointers-directly-instead-of-using-PyArray_EquivTypes.patch # https://github.com/boostorg/thread/pull/408 Patch9: boost-1.83-fix-no-member-named_that_error.patch +# https://github.com/bfgroup/b2/pull/341 +Patch10: b2-5.0.0-Define-OSPLAT-for-riscv64-and-riscv32-341.patch Requires: %{name}-atomic%{?_isa} = %{version}-%{release} Requires: %{name}-chrono%{?_isa} = %{version}-%{release} @@ -460,6 +462,9 @@ find libs -name example -exec cp {} boost-example --parents -r \; %{_libdir}/cmake/* %changelog +* Tue Jul 29 2025 laokz - 1.83.0-9 +- backport b2 patch to fix broken boost-context library on riscv + * Thu Jun 19 2025 Funda Wang - 1.83.0-8 - add more patch for numpy 2 - fix build with clang 19 -- Gitee