diff options
-rw-r--r-- | meta/recipes-devtools/ruby/ruby/0001-vm_dump.c-Define-REG_S1-and-REG_S2-for-musl-riscv.patch | 34 | ||||
-rw-r--r-- | meta/recipes-devtools/ruby/ruby_3.1.0.bb | 9 |
2 files changed, 35 insertions, 8 deletions
diff --git a/meta/recipes-devtools/ruby/ruby/0001-vm_dump.c-Define-REG_S1-and-REG_S2-for-musl-riscv.patch b/meta/recipes-devtools/ruby/ruby/0001-vm_dump.c-Define-REG_S1-and-REG_S2-for-musl-riscv.patch new file mode 100644 index 0000000000..f7b7adb3fd --- /dev/null +++ b/meta/recipes-devtools/ruby/ruby/0001-vm_dump.c-Define-REG_S1-and-REG_S2-for-musl-riscv.patch | |||
@@ -0,0 +1,34 @@ | |||
1 | From dfb22e4d6662bf72879eda806eaa78c7b52b519e Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Tue, 25 Jan 2022 20:29:14 -0800 | ||
4 | Subject: [PATCH] vm_dump.c: Define REG_S1 and REG_S2 for musl/riscv | ||
5 | |||
6 | These defines are missing in musl, there is a possible | ||
7 | patch to add them to musl, but we need a full list of | ||
8 | these names for mcontext that can be added once for all | ||
9 | |||
10 | Upstream-Status: Inappropriate [musl bug] | ||
11 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
12 | --- | ||
13 | vm_dump.c | 5 +++++ | ||
14 | 1 file changed, 5 insertions(+) | ||
15 | |||
16 | diff --git a/vm_dump.c b/vm_dump.c | ||
17 | index a98f5aa..957b785 100644 | ||
18 | --- a/vm_dump.c | ||
19 | +++ b/vm_dump.c | ||
20 | @@ -39,6 +39,11 @@ | ||
21 | |||
22 | #define MAX_POSBUF 128 | ||
23 | |||
24 | +#if defined(__riscv) && !defined(__GLIBC__) | ||
25 | +# define REG_S1 9 | ||
26 | +# define REG_S2 18 | ||
27 | +#endif | ||
28 | + | ||
29 | #define VM_CFP_CNT(ec, cfp) \ | ||
30 | ((rb_control_frame_t *)((ec)->vm_stack + (ec)->vm_stack_size) - \ | ||
31 | (rb_control_frame_t *)(cfp)) | ||
32 | -- | ||
33 | 2.35.0 | ||
34 | |||
diff --git a/meta/recipes-devtools/ruby/ruby_3.1.0.bb b/meta/recipes-devtools/ruby/ruby_3.1.0.bb index e250164d2c..7a04a36432 100644 --- a/meta/recipes-devtools/ruby/ruby_3.1.0.bb +++ b/meta/recipes-devtools/ruby/ruby_3.1.0.bb | |||
@@ -11,6 +11,7 @@ SRC_URI += " \ | |||
11 | file://0004-lib-mkmf.rb-sort-list-of-object-files-in-generated-M.patch \ | 11 | file://0004-lib-mkmf.rb-sort-list-of-object-files-in-generated-M.patch \ |
12 | file://0005-Mark-Gemspec-reproducible-change-fixing-784225-too.patch \ | 12 | file://0005-Mark-Gemspec-reproducible-change-fixing-784225-too.patch \ |
13 | file://0006-Make-gemspecs-reproducible.patch \ | 13 | file://0006-Make-gemspecs-reproducible.patch \ |
14 | file://0001-vm_dump.c-Define-REG_S1-and-REG_S2-for-musl-riscv.patch \ | ||
14 | " | 15 | " |
15 | 16 | ||
16 | SRC_URI[sha256sum] = "50a0504c6edcb4d61ce6b8cfdbddaa95707195fab0ecd7b5e92654b2a9412854" | 17 | SRC_URI[sha256sum] = "50a0504c6edcb4d61ce6b8cfdbddaa95707195fab0ecd7b5e92654b2a9412854" |
@@ -36,18 +37,10 @@ EXTRA_OECONF = "\ | |||
36 | " | 37 | " |
37 | 38 | ||
38 | EXTRA_OECONF:append:libc-musl = "\ | 39 | EXTRA_OECONF:append:libc-musl = "\ |
39 | LIBS='-lucontext' \ | ||
40 | ac_cv_func_isnan=yes \ | 40 | ac_cv_func_isnan=yes \ |
41 | ac_cv_func_isinf=yes \ | 41 | ac_cv_func_isinf=yes \ |
42 | " | 42 | " |
43 | 43 | ||
44 | EXTRA_OECONF:append:libc-musl:riscv64 = "\ | ||
45 | --with-coroutine=copy \ | ||
46 | " | ||
47 | EXTRA_OECONF:append:libc-musl:riscv32 = "\ | ||
48 | --with-coroutine=copy \ | ||
49 | " | ||
50 | |||
51 | PARALLEL_MAKEINST = "" | 44 | PARALLEL_MAKEINST = "" |
52 | 45 | ||
53 | do_install:append:class-target () { | 46 | do_install:append:class-target () { |