|
| 1 | +From 014480dbf1d1a961e6e11d8e312aae617cc29151 Mon Sep 17 00:00:00 2001 |
| 2 | +From: Ludovic Henry <git@ludovic.dev> |
| 3 | +Date: Thu, 27 Aug 2026 21:36:16 +0200 |
| 4 | +Subject: [PATCH] Teach the vendored Conan boost recipe about riscv64 |
| 5 | + |
| 6 | +The recipe drives b2 from two arch tables and neither has a riscv64 entry. |
| 7 | +_b2_address_model falls through to "32", so boost is configured as a 32-bit |
| 8 | +build, and _b2_architecture returns None, so no `architecture=` reaches b2. |
| 9 | +Boost.Context selects its stack-switching assembly on |
| 10 | +<architecture>riscv/<address-model>64 (asm/jump_riscv64_sysv_elf_gas.S and |
| 11 | +friends, present since 1.71), so with both unset no asm_sources alternative |
| 12 | +matches and the build has no context implementation to compile. |
| 13 | + |
| 14 | +b2 5.2 already defines the riscv architecture feature and adds no -m32/-m64 |
| 15 | +for it, and <abi> defaults to sysv on Linux, so naming the architecture and |
| 16 | +the address model is the whole fix. |
| 17 | + |
| 18 | +conan_boost_mod is a copy of conan-center-index's boost recipe, which has the |
| 19 | +same two gaps. |
| 20 | + |
| 21 | +Upstream-Status: To upstream [the file is a vendored copy of conan-io/conan-center-index's boost recipe; the fix belongs there first and has not been submitted] |
| 22 | +--- |
| 23 | + conan_boost_mod/all/conanfile.py | 4 +++- |
| 24 | + 1 file changed, 3 insertions(+), 1 deletion(-) |
| 25 | + |
| 26 | +diff --git a/conan_boost_mod/all/conanfile.py b/conan_boost_mod/all/conanfile.py |
| 27 | +index 3cf348b..e89e71e 100644 |
| 28 | +--- a/conan_boost_mod/all/conanfile.py |
| 29 | ++++ b/conan_boost_mod/all/conanfile.py |
| 30 | +@@ -1149,7 +1149,7 @@ class BoostConan(ConanFile): |
| 31 | + |
| 32 | + @property |
| 33 | + def _b2_address_model(self): |
| 34 | +- if self.settings.arch in ("x86_64", "ppc64", "ppc64le", "mips64", "armv8", "armv8.3", "sparcv9"): |
| 35 | ++ if self.settings.arch in ("x86_64", "ppc64", "ppc64le", "mips64", "armv8", "armv8.3", "sparcv9", "riscv64"): |
| 36 | + return "64" |
| 37 | + |
| 38 | + return "32" |
| 39 | +@@ -1185,6 +1185,8 @@ class BoostConan(ConanFile): |
| 40 | + return "mips1" |
| 41 | + if str(self.settings.arch).startswith("s390"): |
| 42 | + return "s390x" |
| 43 | ++ if str(self.settings.arch).startswith("riscv"): |
| 44 | ++ return "riscv" |
| 45 | + |
| 46 | + return None |
| 47 | + |
0 commit comments