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.2.4/gentoo/
Date: Sun, 16 Sep 2018 10:49:42
Message-Id: 1537094964.35af454956c486d6af11accbb76647067641f84b.slyfox@gentoo
1 commit: 35af454956c486d6af11accbb76647067641f84b
2 Author: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
3 AuthorDate: Sun Sep 16 10:49:24 2018 +0000
4 Commit: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
5 CommitDate: Sun Sep 16 10:49:24 2018 +0000
6 URL: https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=35af4549
7
8 4.2.4: backport 'struct ucontext' to 'ucontext_t' rename in glibc
9
10 Signed-off-by: Sergei Trofimovich <slyfox <AT> gentoo.org>
11
12 4.2.4/gentoo/93_all_ucontext-to-ucontext_t.patch | 113 +++++++++++++++++++++++
13 4.2.4/gentoo/README.history | 3 +
14 2 files changed, 116 insertions(+)
15
16 diff --git a/4.2.4/gentoo/93_all_ucontext-to-ucontext_t.patch b/4.2.4/gentoo/93_all_ucontext-to-ucontext_t.patch
17 new file mode 100644
18 index 0000000..986baca
19 --- /dev/null
20 +++ b/4.2.4/gentoo/93_all_ucontext-to-ucontext_t.patch
21 @@ -0,0 +1,113 @@
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/i386/linux-unwind.h b/libgcc/config/i386/linux-unwind.h
85 +index e54bf73b1fd..d35fc4566ce 100644
86 +--- a/gcc/config/i386/linux-unwind.h
87 ++++ b/gcc/config/i386/linux-unwind.h
88 +@@ -58,7 +58,7 @@ x86_64_fallback_frame_state (struct _Unwind_Context *context,
89 + if (*(unsigned char *)(pc+0) == 0x48
90 + && *(unsigned long long *)(pc+1) == RT_SIGRETURN_SYSCALL)
91 + {
92 +- struct ucontext *uc_ = context->cfa;
93 ++ ucontext_t *uc_ = context->cfa;
94 + /* The void * cast is necessary to avoid an aliasing warning.
95 + The aliasing warning is correct, but should not be a problem
96 + because it does not alias anything. */
97 +@@ -138,7 +138,7 @@ x86_fallback_frame_state (struct _Unwind_Context *context,
98 + siginfo_t *pinfo;
99 + void *puc;
100 + siginfo_t info;
101 +- struct ucontext uc;
102 ++ ucontext_t uc;
103 + } *rt_ = context->cfa;
104 + /* The void * cast is necessary to avoid an aliasing warning.
105 + The aliasing warning is correct, but should not be a problem
106 +diff --git a/libgcc/config/pa/linux-unwind.h b/libgcc/config/pa/linux-unwind.h
107 +index 01494685ea4..91575356803 100644
108 +--- a/gcc/config/pa/linux-unwind.h
109 ++++ b/gcc/config/pa/linux-unwind.h
110 +@@ -80,7 +80,7 @@ pa32_fallback_frame_state (struct _Unwind_Context *context,
111 + struct sigcontext *sc;
112 + struct rt_sigframe {
113 + siginfo_t info;
114 +- struct ucontext uc;
115 ++ ucontext_t uc;
116 + } *frame;
117 +
118 + /* rt_sigreturn trampoline:
119 +diff --git a/libgcc/config/sh/linux-unwind.h b/libgcc/config/sh/linux-unwind.h
120 +index e63091f287c..67033f06b4b 100644
121 +--- a/gcc/config/sh/linux-unwind.h
122 ++++ b/gcc/config/sh/linux-unwind.h
123 +@@ -180,7 +180,7 @@ sh_fallback_frame_state (struct _Unwind_Context *context,
124 + {
125 + struct rt_sigframe {
126 + siginfo_t info;
127 +- struct ucontext uc;
128 ++ ucontext_t uc;
129 + } *rt_ = context->cfa;
130 + /* The void * cast is necessary to avoid an aliasing warning.
131 + The aliasing warning is correct, but should not be a problem
132 +--
133 +2.14.1
134 +
135
136 diff --git a/4.2.4/gentoo/README.history b/4.2.4/gentoo/README.history
137 index 620a9d5..36798e1 100644
138 --- a/4.2.4/gentoo/README.history
139 +++ b/4.2.4/gentoo/README.history
140 @@ -1,3 +1,6 @@
141 +1.5 TODO
142 + + 93_all_ucontext-to-ucontext_t.patch
143 +
144 1.4 13 Jan 2016
145 - 00_all_gcc-trampolinewarn.patch
146 + 44_all_gcc-log2-static-inline.patch