net-p2p/rtorrent: backport fix for riscv

Closes: https://bugs.gentoo.org/979046
Signed-off-by: Nicolas PARLANT <nicolas.parlant@parhuet.fr>
Part-of: https://codeberg.org/gentoo/gentoo/pulls/1390
Merges: https://codeberg.org/gentoo/gentoo/pulls/1390
Signed-off-by: Sam James <sam@gentoo.org>
This commit is contained in:
Nicolas PARLANT
2026-07-11 21:28:37 +01:00
committed by Sam James
parent 4b3cbacfac
commit f8c5ea5330
2 changed files with 17 additions and 0 deletions
@@ -0,0 +1,16 @@
PR merged https://github.com/rakshasa/libtorrent/pull/778.patch
see also https://bugs.gentoo.org/979046
Subject: [PATCH] Add support for RISC-V
--- a/scripts/common.m4
+++ b/scripts/common.m4
@@ -118,6 +118,10 @@ AC_DEFUN([TORRENT_CHECK_CACHELINE], [
AC_MSG_RESULT([linux fallback enterprise 128 bytes])
AC_DEFINE([LT_SMP_CACHE_BYTES], 128, [Fallback 128-byte alignment for Linux enterprise hardware.])
;;
+ riscv32*|riscv64*)
+ AC_MSG_RESULT([linux fallback RISC-V 64 bytes])
+ AC_DEFINE([LT_SMP_CACHE_BYTES], 64, [Fallback 64-byte alignment for Linux RISC-V hardware.])
+ ;;
*)
AC_MSG_RESULT([unrecognized CPU arch on Linux header fallback])
AC_MSG_FAILURE([Unrecognized CPU architecture ($host_cpu) on Linux fallback path. Aborting build.])
+1
View File
@@ -46,6 +46,7 @@ BDEPEND="virtual/pkgconfig"
PATCHES=(
"${FILESDIR}"/${PN}-0.16.13-cross_checks.patch
"${FILESDIR}"/${P}-fix_riscv.patch #979046
)
DOCS=( doc/rtorrent.rc )