summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2019-09-28 23:16:17 (GMT)
committerRichard Purdie <richard.purdie@linuxfoundation.org>2019-10-02 09:09:47 (GMT)
commit24bf7524597c2582637569d9b776b4fb722fd188 (patch)
tree7e1ac5f1042ddcfd4699abea422117dde62308e9 /meta/recipes-core
parent4d9157099bc5b03847f26dccad857ebaaf099a19 (diff)
downloadpoky-24bf7524597c2582637569d9b776b4fb722fd188.tar.gz
musl: Fix __riscv_mc* containers to match glibc
Fixes packages like gdb compile (From OE-Core rev: 6792307a41c71786841f8fa6224af81be201688e) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-core')
-rw-r--r--meta/recipes-core/musl/musl/0001-Change-container-for-riscv-floating-point-state-to-_.patch67
-rw-r--r--meta/recipes-core/musl/musl_git.bb1
2 files changed, 68 insertions, 0 deletions
diff --git a/meta/recipes-core/musl/musl/0001-Change-container-for-riscv-floating-point-state-to-_.patch b/meta/recipes-core/musl/musl/0001-Change-container-for-riscv-floating-point-state-to-_.patch
new file mode 100644
index 0000000..a9abb18
--- /dev/null
+++ b/meta/recipes-core/musl/musl/0001-Change-container-for-riscv-floating-point-state-to-_.patch
@@ -0,0 +1,67 @@
1From 52a37610650e7366a398dd07393d3902d2f3faa3 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Sat, 28 Sep 2019 12:19:57 -0700
4Subject: [PATCH] Change container for riscv floating-point state to __riscv_mc_fp_state
5
6Match the struct elements with glibc
7glibc also uses __riscv_mc prefix, some packages like gdb uses that
8
9Upstream-Status: Submitted [https://www.openwall.com/lists/musl/2019/09/28/1]
10Signed-off-by: Khem Raj <raj.khem@gmail.com>
11---
12 arch/riscv64/bits/signal.h | 18 +++++++++---------
13 arch/riscv64/bits/user.h | 2 +-
14 2 files changed, 10 insertions(+), 10 deletions(-)
15
16diff --git a/arch/riscv64/bits/signal.h b/arch/riscv64/bits/signal.h
17index 76d7ad80..aba7ab00 100644
18--- a/arch/riscv64/bits/signal.h
19+++ b/arch/riscv64/bits/signal.h
20@@ -13,25 +13,25 @@ typedef unsigned long greg_t;
21 typedef unsigned long gregset_t[32];
22
23 struct __riscv_mc_f_ext_state {
24- unsigned int f[32];
25- unsigned int fcsr;
26+ unsigned int __f[32];
27+ unsigned int __fcsr;
28 };
29
30 struct __riscv_mc_d_ext_state {
31- unsigned long long f[32];
32- unsigned int fcsr;
33+ unsigned long long __f[32];
34+ unsigned int __fcsr;
35 };
36
37 struct __riscv_mc_q_ext_state {
38- unsigned long long f[64] __attribute__((aligned(16)));
39- unsigned int fcsr;
40+ unsigned long long __f[64] __attribute__((aligned(16)));
41+ unsigned int __fcsr;
42 unsigned int reserved[3];
43 };
44
45 union __riscv_mc_fp_state {
46- struct __riscv_mc_f_ext_state f;
47- struct __riscv_mc_d_ext_state d;
48- struct __riscv_mc_q_ext_state q;
49+ struct __riscv_mc_f_ext_state __f;
50+ struct __riscv_mc_d_ext_state __d;
51+ struct __riscv_mc_q_ext_state __q;
52 };
53
54 typedef union __riscv_mc_fp_state fpregset_t;
55diff --git a/arch/riscv64/bits/user.h b/arch/riscv64/bits/user.h
56index d2e383b2..9918a2fe 100644
57--- a/arch/riscv64/bits/user.h
58+++ b/arch/riscv64/bits/user.h
59@@ -5,4 +5,4 @@ struct user_fpregs_struct {
60
61 #define ELF_NGREG 32
62 typedef unsigned long elf_greg_t, elf_gregset_t[ELF_NGREG];
63-typedef struct user_fpregs_struct elf_fpregset_t;
64+typedef union __riscv_mc_fp_state elf_fpregset_t;
65--
662.23.0
67
diff --git a/meta/recipes-core/musl/musl_git.bb b/meta/recipes-core/musl/musl_git.bb
index 335d53d..13fd173 100644
--- a/meta/recipes-core/musl/musl_git.bb
+++ b/meta/recipes-core/musl/musl_git.bb
@@ -16,6 +16,7 @@ SRC_URI = "git://git.musl-libc.org/musl \
16 file://0001-Make-dynamic-linker-a-relative-symlink-to-libc.patch \ 16 file://0001-Make-dynamic-linker-a-relative-symlink-to-libc.patch \
17 file://0002-ldso-Use-syslibdir-and-libdir-as-default-pathes-to-l.patch \ 17 file://0002-ldso-Use-syslibdir-and-libdir-as-default-pathes-to-l.patch \
18 file://0001-correct-the-operand-specifiers-in-the-riscv64-CAS-ro.patch \ 18 file://0001-correct-the-operand-specifiers-in-the-riscv64-CAS-ro.patch \
19 file://0001-Change-container-for-riscv-floating-point-state-to-_.patch \
19 " 20 "
20 21
21S = "${WORKDIR}/git" 22S = "${WORKDIR}/git"