Commit 5b032978 authored by Sören Tempel's avatar Sören Tempel
Browse files

testing/horizon: fix build on riscv64

parent aadc8d46
......@@ -20,6 +20,7 @@ subpackages="$pkgname-image $pkgname-dbg $pkgname-dev $pkgname-doc
$pkgname-tools"
source="https://code.foxkit.us/adelie/horizon/-/archive/$pkgver/horizon-$pkgver.tar.gz
json-cast-character-to-unsigned-for-comparrison.patch
riscv.patch
"
build() {
......@@ -126,5 +127,8 @@ PROFILE
"$subpkgdir"/usr/share/xsessions/horizon.desktop
}
sha512sums="3ff46980387454f85a326ac3ea123b55cf16fc339faec48fdc77f10334e0bd93e8cf51e6adeed516d2e4309cf4426b9d1ac6760cdd479b196a5f4aa33c1f3a28 horizon-0.9.6.tar.gz
5ab7a35d239210e031739c4149fd8e68570ea0efd278a2eac9330d6e30c601d1310b9c17523563a41424c2a8aa2452e5a9bcbce5d8087330d2697cd1b77b312f json-cast-character-to-unsigned-for-comparrison.patch"
sha512sums="
3ff46980387454f85a326ac3ea123b55cf16fc339faec48fdc77f10334e0bd93e8cf51e6adeed516d2e4309cf4426b9d1ac6760cdd479b196a5f4aa33c1f3a28 horizon-0.9.6.tar.gz
5ab7a35d239210e031739c4149fd8e68570ea0efd278a2eac9330d6e30c601d1310b9c17523563a41424c2a8aa2452e5a9bcbce5d8087330d2697cd1b77b312f json-cast-character-to-unsigned-for-comparrison.patch
2748d443bdec9bfcab3a50d6efd61e3febb195d25581b25a6cbf1a73ddeb209ea79ebee493cc55dc377ff69e1577385d31930ca63db35bbffe34caea1bd41c05 riscv.patch
"
Seems like horizon has basic RISC-V support, e.g. the valid_arches array
in meta.cc already contains riscv. However, it seems the my_arch
function was not adjusted for riscv yet since the software likekly
wasn't compiled on riscv before. By adding the neccessary
riscv-ifdef-dance to my_arch from meta.cc it compiles fine on riscv.
This patch assumes that riscv means RV32 and riscv64 means RV64.
See also https://github.com/riscv/riscv-c-api-doc/blob/master/riscv-c-api.md
diff -upr horizon-0.9.6.orig/hscript/meta.cc horizon-0.9.6/hscript/meta.cc
--- horizon-0.9.6.orig/hscript/meta.cc 2021-07-10 19:29:55.073675786 +0200
+++ horizon-0.9.6/hscript/meta.cc 2021-07-10 19:43:31.674242939 +0200
@@ -716,6 +716,10 @@ const std::string my_arch(const Horizon:
return "pmmx";
# elif defined(__x86_64__)
return "x86_64";
+# elif defined(__riscv) && __riscv_xlen == 32
+ return "riscv";
+# elif defined(__riscv) && __riscv_xlen == 64
+ return "riscv64";
# elif defined(__mips64)
# if defined(__BYTE_ORDER__) && __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
return "mips64el";
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment