diff options
Diffstat (limited to 'meta/recipes-core/musl/musl/0001-riscv-Define-sigcontext-again.patch')
-rw-r--r-- | meta/recipes-core/musl/musl/0001-riscv-Define-sigcontext-again.patch | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/meta/recipes-core/musl/musl/0001-riscv-Define-sigcontext-again.patch b/meta/recipes-core/musl/musl/0001-riscv-Define-sigcontext-again.patch new file mode 100644 index 0000000000..fcb324e15f --- /dev/null +++ b/meta/recipes-core/musl/musl/0001-riscv-Define-sigcontext-again.patch | |||
@@ -0,0 +1,48 @@ | |||
1 | commit a0993f8f0f161423ecdcb754f282ffd2fe47a7b5 | ||
2 | Author: Rich Felker <dalias@aerifal.cx> | ||
3 | Date: Wed Oct 2 09:28:03 2019 -0400 | ||
4 | |||
5 | reintroduce riscv64 struct sigcontext | ||
6 | |||
7 | commit ab3eb89a8b83353cdaab12ed017a67a7730f90e9 removed it as part of | ||
8 | correcting the mcontext_t definition, but there is still code using | ||
9 | struct sigcontext and expecting the member names present in it, most | ||
10 | notably libgcc_eh. almost all such usage is incorrect, but bring back | ||
11 | struct sigcontext at least for now so as not to introduce regressions. | ||
12 | |||
13 | Upstream-Status: Pending | ||
14 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
15 | diff --git a/arch/riscv64/bits/signal.h b/arch/riscv64/bits/signal.h | ||
16 | index 03fe48c1..2ff4be30 100644 | ||
17 | --- a/arch/riscv64/bits/signal.h | ||
18 | +++ b/arch/riscv64/bits/signal.h | ||
19 | @@ -6,12 +6,6 @@ | ||
20 | # define SIGSTKSZ 8192 | ||
21 | #endif | ||
22 | |||
23 | -#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE) | ||
24 | -typedef unsigned long greg_t; | ||
25 | -typedef unsigned long gregset_t[32]; | ||
26 | -typedef union __riscv_mc_fp_state fpregset_t; | ||
27 | -#endif | ||
28 | - | ||
29 | typedef unsigned long __riscv_mc_gp_state[32]; | ||
30 | |||
31 | struct __riscv_mc_f_ext_state { | ||
32 | @@ -41,6 +35,16 @@ typedef struct mcontext_t { | ||
33 | union __riscv_mc_fp_state __fpregs; | ||
34 | } mcontext_t; | ||
35 | |||
36 | +#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE) | ||
37 | +typedef unsigned long greg_t; | ||
38 | +typedef unsigned long gregset_t[32]; | ||
39 | +typedef union __riscv_mc_fp_state fpregset_t; | ||
40 | +struct sigcontext { | ||
41 | + gregset_t gregs; | ||
42 | + fpregset_t fpregs; | ||
43 | +}; | ||
44 | +#endif | ||
45 | + | ||
46 | struct sigaltstack { | ||
47 | void *ss_sp; | ||
48 | int ss_flags; | ||