at 18.03-beta 6.9 kB view raw
1From b685411208e0aaa79190d54faf945763514706b8 Mon Sep 17 00:00:00 2001 2From: jsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4> 3Date: Tue, 4 Jul 2017 10:23:57 +0000 4Subject: [PATCH] Use ucontext_t not struct ucontext in linux-unwind.h files. 5 6Current glibc no longer gives the ucontext_t type the tag struct 7ucontext, to conform with POSIX namespace rules. This requires 8various linux-unwind.h files in libgcc, that were previously using 9struct ucontext, to be fixed to use ucontext_t instead. This is 10similar to the removal of the struct siginfo tag from siginfo_t some 11years ago. 12 13This patch changes those files to use ucontext_t instead. As the 14standard name that should be unconditionally safe, so this is not 15restricted to architectures supported by glibc, or conditioned on the 16glibc version. 17 18Tested compilation together with current glibc with glibc's 19build-many-glibcs.py. 20 21 * config/aarch64/linux-unwind.h (aarch64_fallback_frame_state), 22 config/alpha/linux-unwind.h (alpha_fallback_frame_state), 23 config/bfin/linux-unwind.h (bfin_fallback_frame_state), 24 config/i386/linux-unwind.h (x86_64_fallback_frame_state, 25 x86_fallback_frame_state), config/m68k/linux-unwind.h (struct 26 uw_ucontext), config/nios2/linux-unwind.h (struct nios2_ucontext), 27 config/pa/linux-unwind.h (pa32_fallback_frame_state), 28 config/sh/linux-unwind.h (sh_fallback_frame_state), 29 config/tilepro/linux-unwind.h (tile_fallback_frame_state), 30 config/xtensa/linux-unwind.h (xtensa_fallback_frame_state): Use 31 ucontext_t instead of struct ucontext. 32 33 34git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-6-branch@249957 138bc75d-0d04-0410-961f-82ee72b054a4 35--- 36 libgcc/ChangeLog (REMOVED) | 14 ++++++++++++++ 37 libgcc/config/aarch64/linux-unwind.h | 2 +- 38 libgcc/config/alpha/linux-unwind.h | 2 +- 39 libgcc/config/bfin/linux-unwind.h | 2 +- 40 libgcc/config/i386/linux-unwind.h | 4 ++-- 41 libgcc/config/m68k/linux-unwind.h | 2 +- 42 libgcc/config/nios2/linux-unwind.h | 2 +- 43 libgcc/config/pa/linux-unwind.h | 2 +- 44 libgcc/config/sh/linux-unwind.h | 2 +- 45 libgcc/config/tilepro/linux-unwind.h | 2 +- 46 libgcc/config/xtensa/linux-unwind.h | 2 +- 47 11 files changed, 25 insertions(+), 11 deletions(-) 48 49diff --git a/libgcc/config/aarch64/linux-unwind.h b/libgcc/config/aarch64/linux-unwind.h 50index 4512efb..06de45a 100644 51--- a/libgcc/config/aarch64/linux-unwind.h 52+++ b/libgcc/config/aarch64/linux-unwind.h 53@@ -52,7 +52,7 @@ aarch64_fallback_frame_state (struct _Unwind_Context *context, 54 struct rt_sigframe 55 { 56 siginfo_t info; 57- struct ucontext uc; 58+ ucontext_t uc; 59 }; 60 61 struct rt_sigframe *rt_; 62diff --git a/libgcc/config/alpha/linux-unwind.h b/libgcc/config/alpha/linux-unwind.h 63index bdbba4a..e84812e 100644 64--- a/libgcc/config/alpha/linux-unwind.h 65+++ b/libgcc/config/alpha/linux-unwind.h 66@@ -51,7 +51,7 @@ alpha_fallback_frame_state (struct _Unwind_Context *context, 67 { 68 struct rt_sigframe { 69 siginfo_t info; 70- struct ucontext uc; 71+ ucontext_t uc; 72 } *rt_ = context->cfa; 73 sc = &rt_->uc.uc_mcontext; 74 } 75diff --git a/libgcc/config/bfin/linux-unwind.h b/libgcc/config/bfin/linux-unwind.h 76index 77b7c23..8bf5e82 100644 77--- a/libgcc/config/bfin/linux-unwind.h 78+++ b/libgcc/config/bfin/linux-unwind.h 79@@ -52,7 +52,7 @@ bfin_fallback_frame_state (struct _Unwind_Context *context, 80 void *puc; 81 char retcode[8]; 82 siginfo_t info; 83- struct ucontext uc; 84+ ucontext_t uc; 85 } *rt_ = context->cfa; 86 87 /* The void * cast is necessary to avoid an aliasing warning. 88diff --git a/libgcc/config/i386/linux-unwind.h b/libgcc/config/i386/linux-unwind.h 89index 540a0a2..29efbe3 100644 90--- a/libgcc/config/i386/linux-unwind.h 91+++ b/libgcc/config/i386/linux-unwind.h 92@@ -58,7 +58,7 @@ x86_64_fallback_frame_state (struct _Unwind_Context *context, 93 if (*(unsigned char *)(pc+0) == 0x48 94 && *(unsigned long long *)(pc+1) == RT_SIGRETURN_SYSCALL) 95 { 96- struct ucontext *uc_ = context->cfa; 97+ ucontext_t *uc_ = 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 because it does not alias anything. */ 101@@ -138,7 +138,7 @@ x86_fallback_frame_state (struct _Unwind_Context *context, 102 siginfo_t *pinfo; 103 void *puc; 104 siginfo_t info; 105- struct ucontext uc; 106+ ucontext_t uc; 107 } *rt_ = context->cfa; 108 /* The void * cast is necessary to avoid an aliasing warning. 109 The aliasing warning is correct, but should not be a problem 110diff --git a/libgcc/config/m68k/linux-unwind.h b/libgcc/config/m68k/linux-unwind.h 111index 75b7cf7..f964e24 100644 112--- a/libgcc/config/m68k/linux-unwind.h 113+++ b/libgcc/config/m68k/linux-unwind.h 114@@ -33,7 +33,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see 115 /* <sys/ucontext.h> is unfortunately broken right now. */ 116 struct uw_ucontext { 117 unsigned long uc_flags; 118- struct ucontext *uc_link; 119+ ucontext_t *uc_link; 120 stack_t uc_stack; 121 mcontext_t uc_mcontext; 122 unsigned long uc_filler[80]; 123diff --git a/libgcc/config/pa/linux-unwind.h b/libgcc/config/pa/linux-unwind.h 124index 9a2657f..e47493d 100644 125--- a/libgcc/config/pa/linux-unwind.h 126+++ b/libgcc/config/pa/linux-unwind.h 127@@ -80,7 +80,7 @@ pa32_fallback_frame_state (struct _Unwind_Context *context, 128 struct sigcontext *sc; 129 struct rt_sigframe { 130 siginfo_t info; 131- struct ucontext uc; 132+ ucontext_t uc; 133 } *frame; 134 135 /* rt_sigreturn trampoline: 136diff --git a/libgcc/config/sh/linux-unwind.h b/libgcc/config/sh/linux-unwind.h 137index e389cac..0bf43ba 100644 138--- a/libgcc/config/sh/linux-unwind.h 139+++ b/libgcc/config/sh/linux-unwind.h 140@@ -180,7 +180,7 @@ sh_fallback_frame_state (struct _Unwind_Context *context, 141 { 142 struct rt_sigframe { 143 siginfo_t info; 144- struct ucontext uc; 145+ ucontext_t uc; 146 } *rt_ = context->cfa; 147 /* The void * cast is necessary to avoid an aliasing warning. 148 The aliasing warning is correct, but should not be a problem 149diff --git a/libgcc/config/tilepro/linux-unwind.h b/libgcc/config/tilepro/linux-unwind.h 150index 796e976..75f8890 100644 151--- a/libgcc/config/tilepro/linux-unwind.h 152+++ b/libgcc/config/tilepro/linux-unwind.h 153@@ -61,7 +61,7 @@ tile_fallback_frame_state (struct _Unwind_Context *context, 154 struct rt_sigframe { 155 unsigned char save_area[C_ABI_SAVE_AREA_SIZE]; 156 siginfo_t info; 157- struct ucontext uc; 158+ ucontext_t uc; 159 } *rt_; 160 161 /* Return if this is not a signal handler. */ 162diff --git a/libgcc/config/xtensa/linux-unwind.h b/libgcc/config/xtensa/linux-unwind.h 163index 9872492..586a9d4 100644 164--- a/libgcc/config/xtensa/linux-unwind.h 165+++ b/libgcc/config/xtensa/linux-unwind.h 166@@ -67,7 +67,7 @@ xtensa_fallback_frame_state (struct _Unwind_Context *context, 167 168 struct rt_sigframe { 169 siginfo_t info; 170- struct ucontext uc; 171+ ucontext_t uc; 172 } *rt_; 173 174 /* movi a2, __NR_rt_sigreturn; syscall */ 175-- 1762.9.3 177