diff options
author | Juro Bystricky <juro.bystricky@intel.com> | 2017-09-14 16:18:08 -0700 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2018-03-14 07:55:54 -0700 |
commit | 4cb2af5af804393c80ed4d76b2ff34187d5a4d5b (patch) | |
tree | cd80ed4a3d571b51e59558eb6e52da21a92f5864 | |
parent | 2bee048a3b36bb3dc8dc429815ab2d078e5e66ce (diff) | |
download | poky-4cb2af5af804393c80ed4d76b2ff34187d5a4d5b.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: 063f5558ef2040b6d2c34caa553ed09733fc6470)
Signed-off-by: Juro Bystricky <juro.bystricky@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
(cherry picked from commit ec1c18d866c137b1fa523d0fcc29f65a28f59f44)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r-- | meta/recipes-devtools/gcc/gcc-6.3.inc | 1 | ||||
-rw-r--r-- | meta/recipes-devtools/gcc/gcc-6.3/0055-unwind_h-glibc26.patch | 139 |
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 71d0affb89..d74f12c466 100644 --- a/meta/recipes-devtools/gcc/gcc-6.3.inc +++ b/meta/recipes-devtools/gcc/gcc-6.3.inc | |||
@@ -80,6 +80,7 @@ SRC_URI = "\ | |||
80 | file://0047-libgcc_s-Use-alias-for-__cpu_indicator_init-instead-.patch \ | 80 | file://0047-libgcc_s-Use-alias-for-__cpu_indicator_init-instead-.patch \ |
81 | file://0048-sync-gcc-stddef.h-with-musl.patch \ | 81 | file://0048-sync-gcc-stddef.h-with-musl.patch \ |
82 | file://0054_all_nopie-all-flags.patch \ | 82 | file://0054_all_nopie-all-flags.patch \ |
83 | file://0055-unwind_h-glibc26.patch \ | ||
83 | ${BACKPORTS} \ | 84 | ${BACKPORTS} \ |
84 | " | 85 | " |
85 | BACKPORTS = "\ | 86 | BACKPORTS = "\ |
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 @@ | |||
1 | Backport and edit of patches from: | ||
2 | https://gcc.gnu.org/viewcvs/gcc?limit_changes=0&view=revision&revision=249957 | ||
3 | by jsm28 (Joseph Myers) | ||
4 | |||
5 | Current glibc no longer gives the ucontext_t type the tag struct | ||
6 | ucontext, to conform with POSIX namespace rules. This requires | ||
7 | various linux-unwind.h files in libgcc, that were previously using | ||
8 | struct ucontext, to be fixed to use ucontext_t instead. This is | ||
9 | similar to the removal of the struct siginfo tag from siginfo_t some | ||
10 | years ago. | ||
11 | |||
12 | This patch changes those files to use ucontext_t instead. As the | ||
13 | standard name that should be unconditionally safe, so this is not | ||
14 | restricted to architectures supported by glibc, or conditioned on the | ||
15 | glibc version. | ||
16 | |||
17 | Upstream-Status: Backport | ||
18 | |||
19 | Signed-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 */ | ||