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.0.4/gentoo/
Date: Sun, 23 Sep 2018 22:30:42
Message-Id: 1537741504.baed506dc5ad1e29366506dcc80d166212724256.slyfox@gentoo
1 commit: baed506dc5ad1e29366506dcc80d166212724256
2 Author: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
3 AuthorDate: Sun Sep 23 22:25:04 2018 +0000
4 Commit: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
5 CommitDate: Sun Sep 23 22:25:04 2018 +0000
6 URL: https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=baed506d
7
8 4.0.4: backport 'struct ucontext' to 'ucontext_t' rename in glibc
9
10 Signed-off-by: Sergei Trofimovich <slyfox <AT> gentoo.org>
11
12 4.0.4/gentoo/86_all_ucontext-to-ucontext_t.patch | 107 +++++++++++++++++++++++
13 4.0.4/gentoo/README.history | 3 +
14 2 files changed, 110 insertions(+)
15
16 diff --git a/4.0.4/gentoo/86_all_ucontext-to-ucontext_t.patch b/4.0.4/gentoo/86_all_ucontext-to-ucontext_t.patch
17 new file mode 100644
18 index 0000000..11213f3
19 --- /dev/null
20 +++ b/4.0.4/gentoo/86_all_ucontext-to-ucontext_t.patch
21 @@ -0,0 +1,107 @@
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,1 +58,1 @@ x86_64_fallback_frame_state (struct _Unwind_Context *context,
89 +- struct ucontext *uc_ = context->cfa;
90 ++ ucontext_t *uc_ = context->cfa;
91 +@@ -138,7 +138,7 @@ x86_fallback_frame_state (struct _Unwind_Context *context,
92 + siginfo_t *pinfo;
93 + void *puc;
94 + siginfo_t info;
95 +- struct ucontext uc;
96 ++ ucontext_t uc;
97 + } *rt_ = context->cfa;
98 + /* The void * cast is necessary to avoid an aliasing warning.
99 + The aliasing warning is correct, but should not be a problem
100 +diff --git a/libgcc/config/pa/linux-unwind.h b/libgcc/config/pa/linux-unwind.h
101 +index 01494685ea4..91575356803 100644
102 +--- a/gcc/config/pa/linux-unwind.h
103 ++++ b/gcc/config/pa/linux-unwind.h
104 +@@ -80,7 +80,7 @@ pa32_fallback_frame_state (struct _Unwind_Context *context,
105 + struct sigcontext *sc;
106 + struct rt_sigframe {
107 + siginfo_t info;
108 +- struct ucontext uc;
109 ++ ucontext_t uc;
110 + } *frame;
111 +
112 + /* rt_sigreturn trampoline:
113 +diff --git a/libgcc/config/sh/linux-unwind.h b/libgcc/config/sh/linux-unwind.h
114 +index e63091f287c..67033f06b4b 100644
115 +--- a/gcc/config/sh/linux-unwind.h
116 ++++ b/gcc/config/sh/linux-unwind.h
117 +@@ -180,7 +180,7 @@ sh_fallback_frame_state (struct _Unwind_Context *context,
118 + {
119 + struct rt_sigframe {
120 + siginfo_t info;
121 +- struct ucontext uc;
122 ++ ucontext_t uc;
123 + } *rt_ = context->cfa;
124 + /* The void * cast is necessary to avoid an aliasing warning.
125 + The aliasing warning is correct, but should not be a problem
126 +--
127 +2.14.1
128 +
129
130 diff --git a/4.0.4/gentoo/README.history b/4.0.4/gentoo/README.history
131 index ade3587..45534df 100644
132 --- a/4.0.4/gentoo/README.history
133 +++ b/4.0.4/gentoo/README.history
134 @@ -1,3 +1,6 @@
135 +1.4 TODO
136 + + 86_all_ucontext-to-ucontext_t.patch
137 +
138 1.3 13 Jan 2016
139 - 00_all_gcc-trampolinewarn.patch
140 + 44_all_gcc-4.1-log2-static-inline.patch