Gentoo Archives: gentoo-commits

From: Sergei Trofimovich <slyfox@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/gcc-patches:master commit in: 4.6.4/gentoo/
Date: Sat, 15 Sep 2018 23:26:37
Message-Id: 1537053817.f103dc3d200d6c68d334eb95704f8f687ede63e0.slyfox@gentoo
1 commit: f103dc3d200d6c68d334eb95704f8f687ede63e0
2 Author: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
3 AuthorDate: Sat Sep 15 23:23:37 2018 +0000
4 Commit: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
5 CommitDate: Sat Sep 15 23:23:37 2018 +0000
6 URL: https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=f103dc3d
7
8 4.6.4: backport 'struct ucontext' to 'ucontext_t' rename in glibc
9
10 Signed-off-by: Sergei Trofimovich <slyfox <AT> gentoo.org>
11
12 4.6.4/gentoo/94_all_ucontext-to-ucontext_t.patch | 152 +++++++++++++++++++++++
13 4.6.4/gentoo/README.history | 1 +
14 2 files changed, 153 insertions(+)
15
16 diff --git a/4.6.4/gentoo/94_all_ucontext-to-ucontext_t.patch b/4.6.4/gentoo/94_all_ucontext-to-ucontext_t.patch
17 new file mode 100644
18 index 0000000..8b0a008
19 --- /dev/null
20 +++ b/4.6.4/gentoo/94_all_ucontext-to-ucontext_t.patch
21 @@ -0,0 +1,152 @@
22 +https://bugs.gentoo.org/629502
23 +
24 +From ecf0d1a107133c715763940c2b197aa814710e1b Mon Sep 17 00:00:00 2001
25 +From: jsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4>
26 +Date: Tue, 4 Jul 2017 10:25:10 +0000
27 +Subject: [PATCH] Use ucontext_t not struct ucontext in linux-unwind.h files.
28 +
29 +Current glibc no longer gives the ucontext_t type the tag struct
30 +ucontext, to conform with POSIX namespace rules. This requires
31 +various linux-unwind.h files in libgcc, that were previously using
32 +struct ucontext, to be fixed to use ucontext_t instead. This is
33 +similar to the removal of the struct siginfo tag from siginfo_t some
34 +years ago.
35 +
36 +This patch changes those files to use ucontext_t instead. As the
37 +standard name that should be unconditionally safe, so this is not
38 +restricted to architectures supported by glibc, or conditioned on the
39 +glibc version.
40 +
41 +Tested compilation together with current glibc with glibc's
42 +build-many-glibcs.py.
43 +
44 + * config/aarch64/linux-unwind.h (aarch64_fallback_frame_state),
45 + config/alpha/linux-unwind.h (alpha_fallback_frame_state),
46 + config/bfin/linux-unwind.h (bfin_fallback_frame_state),
47 + config/i386/linux-unwind.h (x86_64_fallback_frame_state,
48 + x86_fallback_frame_state), config/m68k/linux-unwind.h (struct
49 + uw_ucontext), config/nios2/linux-unwind.h (struct nios2_ucontext),
50 + config/pa/linux-unwind.h (pa32_fallback_frame_state),
51 + config/sh/linux-unwind.h (sh_fallback_frame_state),
52 + config/tilepro/linux-unwind.h (tile_fallback_frame_state),
53 + config/xtensa/linux-unwind.h (xtensa_fallback_frame_state): Use
54 + ucontext_t instead of struct ucontext.
55 +
56 +
57 +git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-5-branch@249958 138bc75d-0d04-0410-961f-82ee72b054a4
58 +---
59 + libgcc/config/aarch64/linux-unwind.h | 2 +-
60 + libgcc/config/alpha/linux-unwind.h | 2 +-
61 + libgcc/config/bfin/linux-unwind.h | 2 +-
62 + libgcc/config/i386/linux-unwind.h | 4 ++--
63 + libgcc/config/m68k/linux-unwind.h | 2 +-
64 + libgcc/config/nios2/linux-unwind.h | 2 +-
65 + libgcc/config/pa/linux-unwind.h | 2 +-
66 + libgcc/config/sh/linux-unwind.h | 2 +-
67 + libgcc/config/tilepro/linux-unwind.h | 2 +-
68 + libgcc/config/xtensa/linux-unwind.h | 2 +-
69 + 11 files changed, 25 insertions(+), 11 deletions(-)
70 +
71 +diff --git a/libgcc/config/alpha/linux-unwind.h b/libgcc/config/alpha/linux-unwind.h
72 +index d65474fec12..9a226b195b5 100644
73 +--- a/gcc/config/alpha/linux-unwind.h
74 ++++ b/gcc/config/alpha/linux-unwind.h
75 +@@ -51,7 +51,7 @@ alpha_fallback_frame_state (struct _Unwind_Context *context,
76 + {
77 + struct rt_sigframe {
78 + siginfo_t info;
79 +- struct ucontext uc;
80 ++ ucontext_t uc;
81 + } *rt_ = context->cfa;
82 + sc = &rt_->uc.uc_mcontext;
83 + }
84 +diff --git a/libgcc/config/bfin/linux-unwind.h b/libgcc/config/bfin/linux-unwind.h
85 +index 0c270e435c7..7fa95d2dc96 100644
86 +--- a/gcc/config/bfin/linux-unwind.h
87 ++++ b/gcc/config/bfin/linux-unwind.h
88 +@@ -52,7 +52,7 @@ bfin_fallback_frame_state (struct _Unwind_Context *context,
89 + void *puc;
90 + char retcode[8];
91 + siginfo_t info;
92 +- struct ucontext uc;
93 ++ ucontext_t uc;
94 + } *rt_ = context->cfa;
95 +
96 + /* The void * cast is necessary to avoid an aliasing warning.
97 +diff --git a/libgcc/config/i386/linux-unwind.h b/libgcc/config/i386/linux-unwind.h
98 +index e54bf73b1fd..d35fc4566ce 100644
99 +--- a/gcc/config/i386/linux-unwind.h
100 ++++ b/gcc/config/i386/linux-unwind.h
101 +@@ -58,7 +58,7 @@ x86_64_fallback_frame_state (struct _Unwind_Context *context,
102 + if (*(unsigned char *)(pc+0) == 0x48
103 + && *(unsigned long long *)(pc+1) == RT_SIGRETURN_SYSCALL)
104 + {
105 +- struct ucontext *uc_ = context->cfa;
106 ++ ucontext_t *uc_ = context->cfa;
107 + /* The void * cast is necessary to avoid an aliasing warning.
108 + The aliasing warning is correct, but should not be a problem
109 + because it does not alias anything. */
110 +@@ -138,7 +138,7 @@ x86_fallback_frame_state (struct _Unwind_Context *context,
111 + siginfo_t *pinfo;
112 + void *puc;
113 + siginfo_t info;
114 +- struct ucontext uc;
115 ++ ucontext_t uc;
116 + } *rt_ = context->cfa;
117 + /* The void * cast is necessary to avoid an aliasing warning.
118 + The aliasing warning is correct, but should not be a problem
119 +diff --git a/libgcc/config/m68k/linux-unwind.h b/libgcc/config/m68k/linux-unwind.h
120 +index fb79a4d63cd..b2f5ea4cd7c 100644
121 +--- a/gcc/config/m68k/linux-unwind.h
122 ++++ b/gcc/config/m68k/linux-unwind.h
123 +@@ -33,7 +33,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
124 + /* <sys/ucontext.h> is unfortunately broken right now. */
125 + struct uw_ucontext {
126 + unsigned long uc_flags;
127 +- struct ucontext *uc_link;
128 ++ ucontext_t *uc_link;
129 + stack_t uc_stack;
130 + mcontext_t uc_mcontext;
131 + unsigned long uc_filler[80];
132 +diff --git a/libgcc/config/pa/linux-unwind.h b/libgcc/config/pa/linux-unwind.h
133 +index 01494685ea4..91575356803 100644
134 +--- a/gcc/config/pa/linux-unwind.h
135 ++++ b/gcc/config/pa/linux-unwind.h
136 +@@ -80,7 +80,7 @@ pa32_fallback_frame_state (struct _Unwind_Context *context,
137 + struct sigcontext *sc;
138 + struct rt_sigframe {
139 + siginfo_t info;
140 +- struct ucontext uc;
141 ++ ucontext_t uc;
142 + } *frame;
143 +
144 + /* rt_sigreturn trampoline:
145 +diff --git a/libgcc/config/sh/linux-unwind.h b/libgcc/config/sh/linux-unwind.h
146 +index e63091f287c..67033f06b4b 100644
147 +--- a/gcc/config/sh/linux-unwind.h
148 ++++ b/gcc/config/sh/linux-unwind.h
149 +@@ -180,7 +180,7 @@ sh_fallback_frame_state (struct _Unwind_Context *context,
150 + {
151 + struct rt_sigframe {
152 + siginfo_t info;
153 +- struct ucontext uc;
154 ++ ucontext_t uc;
155 + } *rt_ = context->cfa;
156 + /* The void * cast is necessary to avoid an aliasing warning.
157 + The aliasing warning is correct, but should not be a problem
158 +diff --git a/libgcc/config/xtensa/linux-unwind.h b/libgcc/config/xtensa/linux-unwind.h
159 +index 9a67b5d2b46..98b7ea60e81 100644
160 +--- a/gcc/config/xtensa/linux-unwind.h
161 ++++ b/gcc/config/xtensa/linux-unwind.h
162 +@@ -67,7 +67,7 @@ xtensa_fallback_frame_state (struct _Unwind_Context *context,
163 +
164 + struct rt_sigframe {
165 + siginfo_t info;
166 +- struct ucontext uc;
167 ++ ucontext_t uc;
168 + } *rt_;
169 +
170 + /* movi a2, __NR_rt_sigreturn; syscall */
171 +--
172 +2.14.1
173 +
174
175 diff --git a/4.6.4/gentoo/README.history b/4.6.4/gentoo/README.history
176 index 8ff72d0..b3ff314 100644
177 --- a/4.6.4/gentoo/README.history
178 +++ b/4.6.4/gentoo/README.history
179 @@ -4,6 +4,7 @@
180 - 12_all_default-warn-trampolines.patch
181 + 34_all_libjava-classpath-locale-sort.patch
182 - 99_all_testsuite-01-Wformat.patch
183 + + 94_all_ucontext-to-ucontext_t.patch
184
185 1.3 27 May 2015
186 + 45_all_linux-pthread-reentrant.patch