summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/gcc
diff options
context:
space:
mode:
authorJuro Bystricky <juro.bystricky@intel.com>2017-09-14 16:18:08 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-09-18 11:07:30 +0100
commitc485df7dae7781ebf1f3b1525a6f6fc7fc99a18b (patch)
tree3fc60f1e4a7651dc1fad5f6a74b4fa16e43b9fc3 /meta/recipes-devtools/gcc
parent6470f39f1e32335de3207910b67a76a58f0ec570 (diff)
downloadpoky-c485df7dae7781ebf1f3b1525a6f6fc7fc99a18b.tar.gz
gcc-6.3.inc: Use ucontext_t not struct ucontext.
Use ucontext_t not struct ucontext in linux-unwind.h files. Current glibc no longer gives the ucontext_t type the tag struct ucontext, to conform with POSIX namespace rules. This requires various linux-unwind.h files in libgcc, that were previously using struct ucontext, to be fixed to use ucontext_t instead. This is similar to the removal of the struct siginfo tag from siginfo_t some years ago. Backport of patches by Joseph Myers, taken from https://gcc.gnu.org/viewcvs/gcc?limit_changes=0&view=revision&revision=249957 [YOCTO #12083] (From OE-Core rev: ec1c18d866c137b1fa523d0fcc29f65a28f59f44) Signed-off-by: Juro Bystricky <juro.bystricky@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/gcc')
-rw-r--r--meta/recipes-devtools/gcc/gcc-6.3.inc1
-rw-r--r--meta/recipes-devtools/gcc/gcc-6.3/0055-unwind_h-glibc26.patch139
2 files changed, 140 insertions, 0 deletions
diff --git a/meta/recipes-devtools/gcc/gcc-6.3.inc b/meta/recipes-devtools/gcc/gcc-6.3.inc
index 86b3e9ff19..ec6d8cdac1 100644
--- a/meta/recipes-devtools/gcc/gcc-6.3.inc
+++ b/meta/recipes-devtools/gcc/gcc-6.3.inc
@@ -74,6 +74,7 @@ SRC_URI = "\
74 file://0047-libgcc_s-Use-alias-for-__cpu_indicator_init-instead-.patch \ 74 file://0047-libgcc_s-Use-alias-for-__cpu_indicator_init-instead-.patch \
75 file://0048-sync-gcc-stddef.h-with-musl.patch \ 75 file://0048-sync-gcc-stddef.h-with-musl.patch \
76 file://0054_all_nopie-all-flags.patch \ 76 file://0054_all_nopie-all-flags.patch \
77 file://0055-unwind_h-glibc26.patch \
77 ${BACKPORTS} \ 78 ${BACKPORTS} \
78" 79"
79BACKPORTS = "\ 80BACKPORTS = "\
diff --git a/meta/recipes-devtools/gcc/gcc-6.3/0055-unwind_h-glibc26.patch b/meta/recipes-devtools/gcc/gcc-6.3/0055-unwind_h-glibc26.patch
new file mode 100644
index 0000000000..c266cfe21f
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-6.3/0055-unwind_h-glibc26.patch
@@ -0,0 +1,139 @@
1Backport and edit of patches from:
2https://gcc.gnu.org/viewcvs/gcc?limit_changes=0&view=revision&revision=249957
3by jsm28 (Joseph Myers)
4
5Current glibc no longer gives the ucontext_t type the tag struct
6ucontext, to conform with POSIX namespace rules. This requires
7various linux-unwind.h files in libgcc, that were previously using
8struct ucontext, to be fixed to use ucontext_t instead. This is
9similar to the removal of the struct siginfo tag from siginfo_t some
10years ago.
11
12This patch changes those files to use ucontext_t instead. As the
13standard name that should be unconditionally safe, so this is not
14restricted to architectures supported by glibc, or conditioned on the
15glibc version.
16
17Upstream-Status: Backport
18
19Signed-off-by: Juro Bystricky <juro.bystricky@intel.com>
20
21--- branches/gcc-6-branch/libgcc/config/aarch64/linux-unwind.h 2017/07/04 10:22:56 249956
22--- b/libgcc/config/aarch64/linux-unwind.h 2017/07/04 10:23:57 249957
23@@ -52,7 +52,7 @@
24 struct rt_sigframe
25 {
26 siginfo_t info;
27- struct ucontext uc;
28+ ucontext_t uc;
29 };
30
31 struct rt_sigframe *rt_;
32--- branches/gcc-6-branch/libgcc/config/alpha/linux-unwind.h 2017/07/04 10:22:56 249956
33--- b/libgcc/config/alpha/linux-unwind.h 2017/07/04 10:23:57 249957
34@@ -51,7 +51,7 @@
35 {
36 struct rt_sigframe {
37 siginfo_t info;
38- struct ucontext uc;
39+ ucontext_t uc;
40 } *rt_ = context->cfa;
41 sc = &rt_->uc.uc_mcontext;
42 }
43--- branches/gcc-6-branch/libgcc/config/bfin/linux-unwind.h 2017/07/04 10:22:56 249956
44--- b/libgcc/config/bfin/linux-unwind.h 2017/07/04 10:23:57 249957
45@@ -52,7 +52,7 @@
46 void *puc;
47 char retcode[8];
48 siginfo_t info;
49- struct ucontext uc;
50+ ucontext_t uc;
51 } *rt_ = context->cfa;
52
53 /* The void * cast is necessary to avoid an aliasing warning.
54--- branches/gcc-6-branch/libgcc/config/i386/linux-unwind.h 2017/07/04 10:22:56 249956
55--- b/libgcc/config/i386/linux-unwind.h 2017/07/04 10:23:57 249957
56@@ -58,7 +58,7 @@
57 if (*(unsigned char *)(pc+0) == 0x48
58 && *(unsigned long long *)(pc+1) == RT_SIGRETURN_SYSCALL)
59 {
60- struct ucontext *uc_ = context->cfa;
61+ ucontext_t *uc_ = context->cfa;
62 /* The void * cast is necessary to avoid an aliasing warning.
63 The aliasing warning is correct, but should not be a problem
64 because it does not alias anything. */
65@@ -138,7 +138,7 @@
66 siginfo_t *pinfo;
67 void *puc;
68 siginfo_t info;
69- struct ucontext uc;
70+ ucontext_t uc;
71 } *rt_ = context->cfa;
72 /* The void * cast is necessary to avoid an aliasing warning.
73 The aliasing warning is correct, but should not be a problem
74--- branches/gcc-6-branch/libgcc/config/m68k/linux-unwind.h 2017/07/04 10:22:56 249956
75--- b/libgcc/config/m68k/linux-unwind.h 2017/07/04 10:23:57 249957
76@@ -33,7 +33,7 @@
77 /* <sys/ucontext.h> is unfortunately broken right now. */
78 struct uw_ucontext {
79 unsigned long uc_flags;
80- struct ucontext *uc_link;
81+ ucontext_t *uc_link;
82 stack_t uc_stack;
83 mcontext_t uc_mcontext;
84 unsigned long uc_filler[80];
85--- branches/gcc-6-branch/libgcc/config/nios2/linux-unwind.h 2017/07/04 10:22:56 249956
86--- b/libgcc/config/nios2/linux-unwind.h 2017/07/04 10:23:57 249957
87@@ -38,7 +38,7 @@
88
89 struct nios2_ucontext {
90 unsigned long uc_flags;
91- struct ucontext *uc_link;
92+ ucontext_t *uc_link;
93 stack_t uc_stack;
94 struct nios2_mcontext uc_mcontext;
95 sigset_t uc_sigmask; /* mask last for extensibility */
96--- branches/gcc-6-branch/libgcc/config/pa/linux-unwind.h 2017/07/04 10:22:56 249956
97--- b/libgcc/config/pa/linux-unwind.h 2017/07/04 10:23:57 249957
98@@ -80,7 +80,7 @@
99 struct sigcontext *sc;
100 struct rt_sigframe {
101 siginfo_t info;
102- struct ucontext uc;
103+ ucontext_t uc;
104 } *frame;
105
106 /* rt_sigreturn trampoline:
107--- branches/gcc-6-branch/libgcc/config/sh/linux-unwind.h 2017/07/04 10:22:56 249956
108--- b/libgcc/config/sh/linux-unwind.h 2017/07/04 10:23:57 249957
109@@ -180,7 +180,7 @@
110 {
111 struct rt_sigframe {
112 siginfo_t info;
113- struct ucontext uc;
114+ ucontext_t uc;
115 } *rt_ = context->cfa;
116 /* The void * cast is necessary to avoid an aliasing warning.
117 The aliasing warning is correct, but should not be a problem
118--- branches/gcc-6-branch/libgcc/config/tilepro/linux-unwind.h 2017/07/04 10:22:56 249956
119--- b/libgcc/config/tilepro/linux-unwind.h 2017/07/04 10:23:57 249957
120@@ -61,7 +61,7 @@
121 struct rt_sigframe {
122 unsigned char save_area[C_ABI_SAVE_AREA_SIZE];
123 siginfo_t info;
124- struct ucontext uc;
125+ ucontext_t uc;
126 } *rt_;
127
128 /* Return if this is not a signal handler. */
129--- branches/gcc-6-branch/libgcc/config/xtensa/linux-unwind.h 2017/07/04 10:22:56 249956
130--- b/libgcc/config/xtensa/linux-unwind.h 2017/07/04 10:23:57 249957
131@@ -67,7 +67,7 @@
132
133 struct rt_sigframe {
134 siginfo_t info;
135- struct ucontext uc;
136+ ucontext_t uc;
137 } *rt_;
138
139 /* movi a2, __NR_rt_sigreturn; syscall */