From 52ebb82d531220fc3c8790f87fb585797c5810f1 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Wed, 17 Feb 2021 19:52:20 -0800 Subject: ruby: Do not use ucontext implementation for coroutines on musl/riscv 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 (From OE-Core rev: 3b2b401dbbb8d3aa14a5fd864178f702af3c8115) Signed-off-by: Khem Raj Signed-off-by: Richard Purdie --- meta/recipes-devtools/ruby/ruby_3.0.0.bb | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'meta/recipes-devtools') diff --git a/meta/recipes-devtools/ruby/ruby_3.0.0.bb b/meta/recipes-devtools/ruby/ruby_3.0.0.bb index 5e143ee87f..28e12c3cd7 100644 --- a/meta/recipes-devtools/ruby/ruby_3.0.0.bb +++ b/meta/recipes-devtools/ruby/ruby_3.0.0.bb @@ -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 } -- cgit v1.2.3-54-g00ecf