]> code.ossystems Code Review - openembedded-core.git/commitdiff
ruby: Do not use ucontext implementation for coroutines on musl/riscv
authorKhem Raj <raj.khem@gmail.com>
Thu, 18 Feb 2021 03:52:20 +0000 (19:52 -0800)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 18 Feb 2021 23:38:20 +0000 (23:38 +0000)
The coroutine implementation in ruby has either arch specific
implementations or it falls back to slower ucontext API based
implementation assuming libc will provide the needed APIs, however musl
does not implement ucontext APIs like glibc, therefore fallback is to
use libucontext library on musl. However, libucontext is not ported to
riscv yet. which means on musl/riscv ruby is unbuildable, however a
third option is to use copy implementation for coroutines, which will be
not as good performance-wise, but it will do the job, therefore for now
use copy implementation for rv32/rv64 when using musl

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/recipes-devtools/ruby/ruby_3.0.0.bb

index 5e143ee87f15475f075e1389f5c83c240a694c2d..28e12c3cd745355f251b96cf7237509b0554b8d8 100644 (file)
@@ -32,6 +32,13 @@ EXTRA_OECONF_append_libc-musl = "\
     ac_cv_func_isinf=yes \
 "
 
+EXTRA_OECONF_append_libc-musl_riscv64 = "\
+    --with-coroutine=copy \
+"
+EXTRA_OECONF_append_libc-musl_riscv32 = "\
+    --with-coroutine=copy \
+"
+
 do_install() {
     oe_runmake 'DESTDIR=${D}' install
 }