[{"id":1769728,"web_url":"http://patchwork.ozlabs.org/comment/1769728/","msgid":"<20170917160847.GD2930@scaer>","list_archive_url":null,"date":"2017-09-17T16:08:47","subject":"Re: [Buildroot] [PATCH v2 01/11] package/gcc: fix build issue with\n\tglibc 2.26","submitter":{"id":13903,"url":"http://patchwork.ozlabs.org/api/people/13903/","name":"Yann E. MORIN","email":"yann.morin.1998@free.fr"},"content":"Romain, All,\n\nOn 2017-09-02 22:54 +0200, Romain Naour spake thusly:\n> In file included from ../../../libgcc/unwind-dw2.c:403:0:\n> ./md-unwind-support.h: In function « aarch64_fallback_frame_state »:\n> ./md-unwind-support.h:58:21: error: field « uc »  has incomplete type\n>      struct ucontext uc;\n>                      ^~\n> \n> The fix is already included in gcc 7.2 release [1]. We have to backport it to\n> all older gcc release since it's not included in any stable release yet.\n> \n> [1] https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=14c2f22a1877f6b60a2f7c2f83ffb032759456a6\n\nAnd for gcc-5, you can now grab:\n    https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff;h=9b9287cde20ea57578cf07efb2a96ed4cc0da36f\n\nwhile for gcc-6, this is:\n    https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff;h=5927885f7673cfa50854687c34f50da13435fb93\n\nOtherwise:\n\n    Reviewed-by: \"Yann E. MORIN\" <yann.morin.1998@free.fr>\n\nRegards,\nYann E. MORIN.\n\n> Signed-off-by: Romain Naour <romain.naour@gmail.com>\n> Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>\n> ---\n>  ...t_t-not-struct-ucontext-in-linux-unwind.h.patch | 190 ++++++++++++++++++++\n>  ...t_t-not-struct-ucontext-in-linux-unwind.h.patch | 192 +++++++++++++++++++++\n>  ...t_t-not-struct-ucontext-in-linux-unwind.h.patch | 191 ++++++++++++++++++++\n>  3 files changed, 573 insertions(+)\n>  create mode 100644 package/gcc/4.9.4/943-Use-ucontext_t-not-struct-ucontext-in-linux-unwind.h.patch\n>  create mode 100644 package/gcc/5.4.0/943-Use-ucontext_t-not-struct-ucontext-in-linux-unwind.h.patch\n>  create mode 100644 package/gcc/6.4.0/942-Use-ucontext_t-not-struct-ucontext-in-linux-unwind.h.patch\n> \n> diff --git a/package/gcc/4.9.4/943-Use-ucontext_t-not-struct-ucontext-in-linux-unwind.h.patch b/package/gcc/4.9.4/943-Use-ucontext_t-not-struct-ucontext-in-linux-unwind.h.patch\n> new file mode 100644\n> index 0000000..526346c\n> --- /dev/null\n> +++ b/package/gcc/4.9.4/943-Use-ucontext_t-not-struct-ucontext-in-linux-unwind.h.patch\n> @@ -0,0 +1,190 @@\n> +From b7e85069238c40eae54d0ca03ab6d5470d1815f9 Mon Sep 17 00:00:00 2001\n> +From: jsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4>\n> +Date: Tue, 4 Jul 2017 10:25:10 +0000\n> +Subject: [PATCH] Use ucontext_t not struct ucontext in linux-unwind.h files.\n> +\n> +Current glibc no longer gives the ucontext_t type the tag struct\n> +ucontext, to conform with POSIX namespace rules.  This requires\n> +various linux-unwind.h files in libgcc, that were previously using\n> +struct ucontext, to be fixed to use ucontext_t instead.  This is\n> +similar to the removal of the struct siginfo tag from siginfo_t some\n> +years ago.\n> +\n> +This patch changes those files to use ucontext_t instead.  As the\n> +standard name that should be unconditionally safe, so this is not\n> +restricted to architectures supported by glibc, or conditioned on the\n> +glibc version.\n> +\n> +Tested compilation together with current glibc with glibc's\n> +build-many-glibcs.py.\n> +\n> +\t* config/aarch64/linux-unwind.h (aarch64_fallback_frame_state),\n> +\tconfig/alpha/linux-unwind.h (alpha_fallback_frame_state),\n> +\tconfig/bfin/linux-unwind.h (bfin_fallback_frame_state),\n> +\tconfig/i386/linux-unwind.h (x86_64_fallback_frame_state,\n> +\tx86_fallback_frame_state), config/m68k/linux-unwind.h (struct\n> +\tuw_ucontext), config/nios2/linux-unwind.h (struct nios2_ucontext),\n> +\tconfig/pa/linux-unwind.h (pa32_fallback_frame_state),\n> +\tconfig/sh/linux-unwind.h (sh_fallback_frame_state),\n> +\tconfig/tilepro/linux-unwind.h (tile_fallback_frame_state),\n> +\tconfig/xtensa/linux-unwind.h (xtensa_fallback_frame_state): Use\n> +\tucontext_t instead of struct ucontext.\n> +\n> +git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-5-branch@249958 138bc75d-0d04-0410-961f-82ee72b054a4\n> +[Romain backport from gcc-5-branch]\n> +Signed-off-by: Romain Naour <romain.naour@gmail.com>\n> +---\n> + libgcc/config/aarch64/linux-unwind.h | 2 +-\n> + libgcc/config/alpha/linux-unwind.h   | 2 +-\n> + libgcc/config/bfin/linux-unwind.h    | 2 +-\n> + libgcc/config/i386/linux-unwind.h    | 4 ++--\n> + libgcc/config/m68k/linux-unwind.h    | 2 +-\n> + libgcc/config/nios2/linux-unwind.h   | 2 +-\n> + libgcc/config/pa/linux-unwind.h      | 2 +-\n> + libgcc/config/sh/linux-unwind.h      | 2 +-\n> + libgcc/config/tilepro/linux-unwind.h | 2 +-\n> + libgcc/config/xtensa/linux-unwind.h  | 2 +-\n> + 10 files changed, 11 insertions(+), 11 deletions(-)\n> +\n> +diff --git a/libgcc/config/aarch64/linux-unwind.h b/libgcc/config/aarch64/linux-unwind.h\n> +index 6b5b3cd..d13dc34 100644\n> +--- a/libgcc/config/aarch64/linux-unwind.h\n> ++++ b/libgcc/config/aarch64/linux-unwind.h\n> +@@ -52,7 +52,7 @@ aarch64_fallback_frame_state (struct _Unwind_Context *context,\n> +   struct rt_sigframe\n> +   {\n> +     siginfo_t info;\n> +-    struct ucontext uc;\n> ++    ucontext_t uc;\n> +   };\n> + \n> +   struct rt_sigframe *rt_;\n> +diff --git a/libgcc/config/alpha/linux-unwind.h b/libgcc/config/alpha/linux-unwind.h\n> +index b5bfd1c..166d3d2 100644\n> +--- a/libgcc/config/alpha/linux-unwind.h\n> ++++ b/libgcc/config/alpha/linux-unwind.h\n> +@@ -51,7 +51,7 @@ alpha_fallback_frame_state (struct _Unwind_Context *context,\n> +     {\n> +       struct rt_sigframe {\n> + \tsiginfo_t info;\n> +-\tstruct ucontext uc;\n> ++\tucontext_t uc;\n> +       } *rt_ = context->cfa;\n> +       sc = &rt_->uc.uc_mcontext;\n> +     }\n> +diff --git a/libgcc/config/bfin/linux-unwind.h b/libgcc/config/bfin/linux-unwind.h\n> +index dc58f0a..8b94568 100644\n> +--- a/libgcc/config/bfin/linux-unwind.h\n> ++++ b/libgcc/config/bfin/linux-unwind.h\n> +@@ -52,7 +52,7 @@ bfin_fallback_frame_state (struct _Unwind_Context *context,\n> + \tvoid *puc;\n> + \tchar retcode[8];\n> + \tsiginfo_t info;\n> +-\tstruct ucontext uc;\n> ++\tucontext_t uc;\n> +       } *rt_ = context->cfa;\n> + \n> +       /* The void * cast is necessary to avoid an aliasing warning.\n> +diff --git a/libgcc/config/i386/linux-unwind.h b/libgcc/config/i386/linux-unwind.h\n> +index 7986928..a9d621c 100644\n> +--- a/libgcc/config/i386/linux-unwind.h\n> ++++ b/libgcc/config/i386/linux-unwind.h\n> +@@ -58,7 +58,7 @@ x86_64_fallback_frame_state (struct _Unwind_Context *context,\n> +   if (*(unsigned char *)(pc+0) == 0x48\n> +       && *(unsigned long long *)(pc+1) == RT_SIGRETURN_SYSCALL)\n> +     {\n> +-      struct ucontext *uc_ = context->cfa;\n> ++      ucontext_t *uc_ = context->cfa;\n> +       /* The void * cast is necessary to avoid an aliasing warning.\n> +          The aliasing warning is correct, but should not be a problem\n> +          because it does not alias anything.  */\n> +@@ -138,7 +138,7 @@ x86_fallback_frame_state (struct _Unwind_Context *context,\n> + \tsiginfo_t *pinfo;\n> + \tvoid *puc;\n> + \tsiginfo_t info;\n> +-\tstruct ucontext uc;\n> ++\tucontext_t uc;\n> +       } *rt_ = context->cfa;\n> +       /* The void * cast is necessary to avoid an aliasing warning.\n> +          The aliasing warning is correct, but should not be a problem\n> +diff --git a/libgcc/config/m68k/linux-unwind.h b/libgcc/config/m68k/linux-unwind.h\n> +index 1ba2a0c4..d67767e 100644\n> +--- a/libgcc/config/m68k/linux-unwind.h\n> ++++ b/libgcc/config/m68k/linux-unwind.h\n> +@@ -33,7 +33,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see\n> + /* <sys/ucontext.h> is unfortunately broken right now.  */\n> + struct uw_ucontext {\n> + \tunsigned long\t  uc_flags;\n> +-\tstruct ucontext  *uc_link;\n> ++\tucontext_t\t *uc_link;\n> + \tstack_t\t\t  uc_stack;\n> + \tmcontext_t\t  uc_mcontext;\n> + \tunsigned long\t  uc_filler[80];\n> +diff --git a/libgcc/config/nios2/linux-unwind.h b/libgcc/config/nios2/linux-unwind.h\n> +index ba4bd80..8978868 100644\n> +--- a/libgcc/config/nios2/linux-unwind.h\n> ++++ b/libgcc/config/nios2/linux-unwind.h\n> +@@ -38,7 +38,7 @@ struct nios2_mcontext {\n> + \n> + struct nios2_ucontext {\n> +   unsigned long uc_flags;\n> +-  struct ucontext *uc_link;\n> ++  ucontext_t *uc_link;\n> +   stack_t uc_stack;\n> +   struct nios2_mcontext uc_mcontext;\n> +   sigset_t uc_sigmask;\t/* mask last for extensibility */\n> +diff --git a/libgcc/config/pa/linux-unwind.h b/libgcc/config/pa/linux-unwind.h\n> +index 4a3cfff..d2ac437 100644\n> +--- a/libgcc/config/pa/linux-unwind.h\n> ++++ b/libgcc/config/pa/linux-unwind.h\n> +@@ -80,7 +80,7 @@ pa32_fallback_frame_state (struct _Unwind_Context *context,\n> +   struct sigcontext *sc;\n> +   struct rt_sigframe {\n> +     siginfo_t info;\n> +-    struct ucontext uc;\n> ++    ucontext_t uc;\n> +   } *frame;\n> + \n> +   /* rt_sigreturn trampoline:\n> +diff --git a/libgcc/config/sh/linux-unwind.h b/libgcc/config/sh/linux-unwind.h\n> +index 4875706..671bde7 100644\n> +--- a/libgcc/config/sh/linux-unwind.h\n> ++++ b/libgcc/config/sh/linux-unwind.h\n> +@@ -180,7 +180,7 @@ sh_fallback_frame_state (struct _Unwind_Context *context,\n> +     {\n> +       struct rt_sigframe {\n> + \tsiginfo_t info;\n> +-\tstruct ucontext uc;\n> ++\tucontext_t uc;\n> +       } *rt_ = context->cfa;\n> +       /* The void * cast is necessary to avoid an aliasing warning.\n> +          The aliasing warning is correct, but should not be a problem\n> +diff --git a/libgcc/config/tilepro/linux-unwind.h b/libgcc/config/tilepro/linux-unwind.h\n> +index 27481cf..c24d58c 100644\n> +--- a/libgcc/config/tilepro/linux-unwind.h\n> ++++ b/libgcc/config/tilepro/linux-unwind.h\n> +@@ -61,7 +61,7 @@ tile_fallback_frame_state (struct _Unwind_Context *context,\n> +   struct rt_sigframe {\n> +     unsigned char save_area[C_ABI_SAVE_AREA_SIZE];\n> +     siginfo_t info;\n> +-    struct ucontext uc;\n> ++    ucontext_t uc;\n> +   } *rt_;\n> + \n> +   /* Return if this is not a signal handler.  */\n> +diff --git a/libgcc/config/xtensa/linux-unwind.h b/libgcc/config/xtensa/linux-unwind.h\n> +index 6832d0b..cb15b4c 100644\n> +--- a/libgcc/config/xtensa/linux-unwind.h\n> ++++ b/libgcc/config/xtensa/linux-unwind.h\n> +@@ -63,7 +63,7 @@ xtensa_fallback_frame_state (struct _Unwind_Context *context,\n> + \n> +   struct rt_sigframe {\n> +     siginfo_t info;\n> +-    struct ucontext uc;\n> ++    ucontext_t uc;\n> +   } *rt_;\n> + \n> +   /* movi a2, __NR_rt_sigreturn; syscall */\n> +-- \n> +2.9.5\n> +\n> diff --git a/package/gcc/5.4.0/943-Use-ucontext_t-not-struct-ucontext-in-linux-unwind.h.patch b/package/gcc/5.4.0/943-Use-ucontext_t-not-struct-ucontext-in-linux-unwind.h.patch\n> new file mode 100644\n> index 0000000..f207f91\n> --- /dev/null\n> +++ b/package/gcc/5.4.0/943-Use-ucontext_t-not-struct-ucontext-in-linux-unwind.h.patch\n> @@ -0,0 +1,192 @@\n> +From ecf0d1a107133c715763940c2b197aa814710e1b Mon Sep 17 00:00:00 2001\n> +From: jsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4>\n> +Date: Tue, 4 Jul 2017 10:25:10 +0000\n> +Subject: [PATCH] Use ucontext_t not struct ucontext in linux-unwind.h files.\n> +\n> +Current glibc no longer gives the ucontext_t type the tag struct\n> +ucontext, to conform with POSIX namespace rules.  This requires\n> +various linux-unwind.h files in libgcc, that were previously using\n> +struct ucontext, to be fixed to use ucontext_t instead.  This is\n> +similar to the removal of the struct siginfo tag from siginfo_t some\n> +years ago.\n> +\n> +This patch changes those files to use ucontext_t instead.  As the\n> +standard name that should be unconditionally safe, so this is not\n> +restricted to architectures supported by glibc, or conditioned on the\n> +glibc version.\n> +\n> +Tested compilation together with current glibc with glibc's\n> +build-many-glibcs.py.\n> +\n> +\t* config/aarch64/linux-unwind.h (aarch64_fallback_frame_state),\n> +\tconfig/alpha/linux-unwind.h (alpha_fallback_frame_state),\n> +\tconfig/bfin/linux-unwind.h (bfin_fallback_frame_state),\n> +\tconfig/i386/linux-unwind.h (x86_64_fallback_frame_state,\n> +\tx86_fallback_frame_state), config/m68k/linux-unwind.h (struct\n> +\tuw_ucontext), config/nios2/linux-unwind.h (struct nios2_ucontext),\n> +\tconfig/pa/linux-unwind.h (pa32_fallback_frame_state),\n> +\tconfig/sh/linux-unwind.h (sh_fallback_frame_state),\n> +\tconfig/tilepro/linux-unwind.h (tile_fallback_frame_state),\n> +\tconfig/xtensa/linux-unwind.h (xtensa_fallback_frame_state): Use\n> +\tucontext_t instead of struct ucontext.\n> +\n> +\n> +git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-5-branch@249958 138bc75d-0d04-0410-961f-82ee72b054a4\n> +\n> +[Romain cherry-pick from gcc-5-branch]\n> +Signed-off-by: Romain Naour <romain.naour@gmail.com>\n> +---\n> + libgcc/config/aarch64/linux-unwind.h |  2 +-\n> + libgcc/config/alpha/linux-unwind.h   |  2 +-\n> + libgcc/config/bfin/linux-unwind.h    |  2 +-\n> + libgcc/config/i386/linux-unwind.h    |  4 ++--\n> + libgcc/config/m68k/linux-unwind.h    |  2 +-\n> + libgcc/config/nios2/linux-unwind.h   |  2 +-\n> + libgcc/config/pa/linux-unwind.h      |  2 +-\n> + libgcc/config/sh/linux-unwind.h      |  2 +-\n> + libgcc/config/tilepro/linux-unwind.h |  2 +-\n> + libgcc/config/xtensa/linux-unwind.h  |  2 +-\n> + 11 files changed, 25 insertions(+), 11 deletions(-)\n> +\n> +diff --git a/libgcc/config/aarch64/linux-unwind.h b/libgcc/config/aarch64/linux-unwind.h\n> +index 86d17b1..909f68f 100644\n> +--- a/libgcc/config/aarch64/linux-unwind.h\n> ++++ b/libgcc/config/aarch64/linux-unwind.h\n> +@@ -52,7 +52,7 @@ aarch64_fallback_frame_state (struct _Unwind_Context *context,\n> +   struct rt_sigframe\n> +   {\n> +     siginfo_t info;\n> +-    struct ucontext uc;\n> ++    ucontext_t uc;\n> +   };\n> + \n> +   struct rt_sigframe *rt_;\n> +diff --git a/libgcc/config/alpha/linux-unwind.h b/libgcc/config/alpha/linux-unwind.h\n> +index d65474f..9a226b1 100644\n> +--- a/libgcc/config/alpha/linux-unwind.h\n> ++++ b/libgcc/config/alpha/linux-unwind.h\n> +@@ -51,7 +51,7 @@ alpha_fallback_frame_state (struct _Unwind_Context *context,\n> +     {\n> +       struct rt_sigframe {\n> + \tsiginfo_t info;\n> +-\tstruct ucontext uc;\n> ++\tucontext_t uc;\n> +       } *rt_ = context->cfa;\n> +       sc = &rt_->uc.uc_mcontext;\n> +     }\n> +diff --git a/libgcc/config/bfin/linux-unwind.h b/libgcc/config/bfin/linux-unwind.h\n> +index 0c270e4..7fa95d2 100644\n> +--- a/libgcc/config/bfin/linux-unwind.h\n> ++++ b/libgcc/config/bfin/linux-unwind.h\n> +@@ -52,7 +52,7 @@ bfin_fallback_frame_state (struct _Unwind_Context *context,\n> + \tvoid *puc;\n> + \tchar retcode[8];\n> + \tsiginfo_t info;\n> +-\tstruct ucontext uc;\n> ++\tucontext_t uc;\n> +       } *rt_ = context->cfa;\n> + \n> +       /* The void * cast is necessary to avoid an aliasing warning.\n> +diff --git a/libgcc/config/i386/linux-unwind.h b/libgcc/config/i386/linux-unwind.h\n> +index e54bf73..d35fc45 100644\n> +--- a/libgcc/config/i386/linux-unwind.h\n> ++++ b/libgcc/config/i386/linux-unwind.h\n> +@@ -58,7 +58,7 @@ x86_64_fallback_frame_state (struct _Unwind_Context *context,\n> +   if (*(unsigned char *)(pc+0) == 0x48\n> +       && *(unsigned long long *)(pc+1) == RT_SIGRETURN_SYSCALL)\n> +     {\n> +-      struct ucontext *uc_ = context->cfa;\n> ++      ucontext_t *uc_ = context->cfa;\n> +       /* The void * cast is necessary to avoid an aliasing warning.\n> +          The aliasing warning is correct, but should not be a problem\n> +          because it does not alias anything.  */\n> +@@ -138,7 +138,7 @@ x86_fallback_frame_state (struct _Unwind_Context *context,\n> + \tsiginfo_t *pinfo;\n> + \tvoid *puc;\n> + \tsiginfo_t info;\n> +-\tstruct ucontext uc;\n> ++\tucontext_t uc;\n> +       } *rt_ = context->cfa;\n> +       /* The void * cast is necessary to avoid an aliasing warning.\n> +          The aliasing warning is correct, but should not be a problem\n> +diff --git a/libgcc/config/m68k/linux-unwind.h b/libgcc/config/m68k/linux-unwind.h\n> +index fb79a4d..b2f5ea4 100644\n> +--- a/libgcc/config/m68k/linux-unwind.h\n> ++++ b/libgcc/config/m68k/linux-unwind.h\n> +@@ -33,7 +33,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see\n> + /* <sys/ucontext.h> is unfortunately broken right now.  */\n> + struct uw_ucontext {\n> + \tunsigned long\t  uc_flags;\n> +-\tstruct ucontext  *uc_link;\n> ++\tucontext_t\t *uc_link;\n> + \tstack_t\t\t  uc_stack;\n> + \tmcontext_t\t  uc_mcontext;\n> + \tunsigned long\t  uc_filler[80];\n> +diff --git a/libgcc/config/nios2/linux-unwind.h b/libgcc/config/nios2/linux-unwind.h\n> +index dff1c20..1d88afe 100644\n> +--- a/libgcc/config/nios2/linux-unwind.h\n> ++++ b/libgcc/config/nios2/linux-unwind.h\n> +@@ -38,7 +38,7 @@ struct nios2_mcontext {\n> + \n> + struct nios2_ucontext {\n> +   unsigned long uc_flags;\n> +-  struct ucontext *uc_link;\n> ++  ucontext_t *uc_link;\n> +   stack_t uc_stack;\n> +   struct nios2_mcontext uc_mcontext;\n> +   sigset_t uc_sigmask;\t/* mask last for extensibility */\n> +diff --git a/libgcc/config/pa/linux-unwind.h b/libgcc/config/pa/linux-unwind.h\n> +index 0149468..9157535 100644\n> +--- a/libgcc/config/pa/linux-unwind.h\n> ++++ b/libgcc/config/pa/linux-unwind.h\n> +@@ -80,7 +80,7 @@ pa32_fallback_frame_state (struct _Unwind_Context *context,\n> +   struct sigcontext *sc;\n> +   struct rt_sigframe {\n> +     siginfo_t info;\n> +-    struct ucontext uc;\n> ++    ucontext_t uc;\n> +   } *frame;\n> + \n> +   /* rt_sigreturn trampoline:\n> +diff --git a/libgcc/config/sh/linux-unwind.h b/libgcc/config/sh/linux-unwind.h\n> +index e63091f..67033f0 100644\n> +--- a/libgcc/config/sh/linux-unwind.h\n> ++++ b/libgcc/config/sh/linux-unwind.h\n> +@@ -180,7 +180,7 @@ sh_fallback_frame_state (struct _Unwind_Context *context,\n> +     {\n> +       struct rt_sigframe {\n> + \tsiginfo_t info;\n> +-\tstruct ucontext uc;\n> ++\tucontext_t uc;\n> +       } *rt_ = context->cfa;\n> +       /* The void * cast is necessary to avoid an aliasing warning.\n> +          The aliasing warning is correct, but should not be a problem\n> +diff --git a/libgcc/config/tilepro/linux-unwind.h b/libgcc/config/tilepro/linux-unwind.h\n> +index fd83ba7..e3c9ef0 100644\n> +--- a/libgcc/config/tilepro/linux-unwind.h\n> ++++ b/libgcc/config/tilepro/linux-unwind.h\n> +@@ -61,7 +61,7 @@ tile_fallback_frame_state (struct _Unwind_Context *context,\n> +   struct rt_sigframe {\n> +     unsigned char save_area[C_ABI_SAVE_AREA_SIZE];\n> +     siginfo_t info;\n> +-    struct ucontext uc;\n> ++    ucontext_t uc;\n> +   } *rt_;\n> + \n> +   /* Return if this is not a signal handler.  */\n> +diff --git a/libgcc/config/xtensa/linux-unwind.h b/libgcc/config/xtensa/linux-unwind.h\n> +index 9a67b5d..98b7ea6 100644\n> +--- a/libgcc/config/xtensa/linux-unwind.h\n> ++++ b/libgcc/config/xtensa/linux-unwind.h\n> +@@ -67,7 +67,7 @@ xtensa_fallback_frame_state (struct _Unwind_Context *context,\n> + \n> +   struct rt_sigframe {\n> +     siginfo_t info;\n> +-    struct ucontext uc;\n> ++    ucontext_t uc;\n> +   } *rt_;\n> + \n> +   /* movi a2, __NR_rt_sigreturn; syscall */\n> +-- \n> +2.9.4\n> +\n> diff --git a/package/gcc/6.4.0/942-Use-ucontext_t-not-struct-ucontext-in-linux-unwind.h.patch b/package/gcc/6.4.0/942-Use-ucontext_t-not-struct-ucontext-in-linux-unwind.h.patch\n> new file mode 100644\n> index 0000000..6d44045\n> --- /dev/null\n> +++ b/package/gcc/6.4.0/942-Use-ucontext_t-not-struct-ucontext-in-linux-unwind.h.patch\n> @@ -0,0 +1,191 @@\n> +From b685411208e0aaa79190d54faf945763514706b8 Mon Sep 17 00:00:00 2001\n> +From: jsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4>\n> +Date: Tue, 4 Jul 2017 10:23:57 +0000\n> +Subject: [PATCH] Use ucontext_t not struct ucontext in linux-unwind.h files.\n> +\n> +Current glibc no longer gives the ucontext_t type the tag struct\n> +ucontext, to conform with POSIX namespace rules.  This requires\n> +various linux-unwind.h files in libgcc, that were previously using\n> +struct ucontext, to be fixed to use ucontext_t instead.  This is\n> +similar to the removal of the struct siginfo tag from siginfo_t some\n> +years ago.\n> +\n> +This patch changes those files to use ucontext_t instead.  As the\n> +standard name that should be unconditionally safe, so this is not\n> +restricted to architectures supported by glibc, or conditioned on the\n> +glibc version.\n> +\n> +Tested compilation together with current glibc with glibc's\n> +build-many-glibcs.py.\n> +\n> +\t* config/aarch64/linux-unwind.h (aarch64_fallback_frame_state),\n> +\tconfig/alpha/linux-unwind.h (alpha_fallback_frame_state),\n> +\tconfig/bfin/linux-unwind.h (bfin_fallback_frame_state),\n> +\tconfig/i386/linux-unwind.h (x86_64_fallback_frame_state,\n> +\tx86_fallback_frame_state), config/m68k/linux-unwind.h (struct\n> +\tuw_ucontext), config/nios2/linux-unwind.h (struct nios2_ucontext),\n> +\tconfig/pa/linux-unwind.h (pa32_fallback_frame_state),\n> +\tconfig/sh/linux-unwind.h (sh_fallback_frame_state),\n> +\tconfig/tilepro/linux-unwind.h (tile_fallback_frame_state),\n> +\tconfig/xtensa/linux-unwind.h (xtensa_fallback_frame_state): Use\n> +\tucontext_t instead of struct ucontext.\n> +\n> +\n> +git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-6-branch@249957 138bc75d-0d04-0410-961f-82ee72b054a4\n> +[Romain cherry-pick from gcc-6-branch]\n> +Signed-off-by: Romain Naour <romain.naour@gmail.com>\n> +---\n> + libgcc/config/aarch64/linux-unwind.h |  2 +-\n> + libgcc/config/alpha/linux-unwind.h   |  2 +-\n> + libgcc/config/bfin/linux-unwind.h    |  2 +-\n> + libgcc/config/i386/linux-unwind.h    |  4 ++--\n> + libgcc/config/m68k/linux-unwind.h    |  2 +-\n> + libgcc/config/nios2/linux-unwind.h   |  2 +-\n> + libgcc/config/pa/linux-unwind.h      |  2 +-\n> + libgcc/config/sh/linux-unwind.h      |  2 +-\n> + libgcc/config/tilepro/linux-unwind.h |  2 +-\n> + libgcc/config/xtensa/linux-unwind.h  |  2 +-\n> + 11 files changed, 25 insertions(+), 11 deletions(-)\n> +\n> +diff --git a/libgcc/config/aarch64/linux-unwind.h b/libgcc/config/aarch64/linux-unwind.h\n> +index 4512efb..06de45a 100644\n> +--- a/libgcc/config/aarch64/linux-unwind.h\n> ++++ b/libgcc/config/aarch64/linux-unwind.h\n> +@@ -52,7 +52,7 @@ aarch64_fallback_frame_state (struct _Unwind_Context *context,\n> +   struct rt_sigframe\n> +   {\n> +     siginfo_t info;\n> +-    struct ucontext uc;\n> ++    ucontext_t uc;\n> +   };\n> + \n> +   struct rt_sigframe *rt_;\n> +diff --git a/libgcc/config/alpha/linux-unwind.h b/libgcc/config/alpha/linux-unwind.h\n> +index bdbba4a..e84812e 100644\n> +--- a/libgcc/config/alpha/linux-unwind.h\n> ++++ b/libgcc/config/alpha/linux-unwind.h\n> +@@ -51,7 +51,7 @@ alpha_fallback_frame_state (struct _Unwind_Context *context,\n> +     {\n> +       struct rt_sigframe {\n> + \tsiginfo_t info;\n> +-\tstruct ucontext uc;\n> ++\tucontext_t uc;\n> +       } *rt_ = context->cfa;\n> +       sc = &rt_->uc.uc_mcontext;\n> +     }\n> +diff --git a/libgcc/config/bfin/linux-unwind.h b/libgcc/config/bfin/linux-unwind.h\n> +index 77b7c23..8bf5e82 100644\n> +--- a/libgcc/config/bfin/linux-unwind.h\n> ++++ b/libgcc/config/bfin/linux-unwind.h\n> +@@ -52,7 +52,7 @@ bfin_fallback_frame_state (struct _Unwind_Context *context,\n> + \tvoid *puc;\n> + \tchar retcode[8];\n> + \tsiginfo_t info;\n> +-\tstruct ucontext uc;\n> ++\tucontext_t uc;\n> +       } *rt_ = context->cfa;\n> + \n> +       /* The void * cast is necessary to avoid an aliasing warning.\n> +diff --git a/libgcc/config/i386/linux-unwind.h b/libgcc/config/i386/linux-unwind.h\n> +index 540a0a2..29efbe3 100644\n> +--- a/libgcc/config/i386/linux-unwind.h\n> ++++ b/libgcc/config/i386/linux-unwind.h\n> +@@ -58,7 +58,7 @@ x86_64_fallback_frame_state (struct _Unwind_Context *context,\n> +   if (*(unsigned char *)(pc+0) == 0x48\n> +       && *(unsigned long long *)(pc+1) == RT_SIGRETURN_SYSCALL)\n> +     {\n> +-      struct ucontext *uc_ = context->cfa;\n> ++      ucontext_t *uc_ = context->cfa;\n> +       /* The void * cast is necessary to avoid an aliasing warning.\n> +          The aliasing warning is correct, but should not be a problem\n> +          because it does not alias anything.  */\n> +@@ -138,7 +138,7 @@ x86_fallback_frame_state (struct _Unwind_Context *context,\n> + \tsiginfo_t *pinfo;\n> + \tvoid *puc;\n> + \tsiginfo_t info;\n> +-\tstruct ucontext uc;\n> ++\tucontext_t uc;\n> +       } *rt_ = context->cfa;\n> +       /* The void * cast is necessary to avoid an aliasing warning.\n> +          The aliasing warning is correct, but should not be a problem\n> +diff --git a/libgcc/config/m68k/linux-unwind.h b/libgcc/config/m68k/linux-unwind.h\n> +index 75b7cf7..f964e24 100644\n> +--- a/libgcc/config/m68k/linux-unwind.h\n> ++++ b/libgcc/config/m68k/linux-unwind.h\n> +@@ -33,7 +33,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see\n> + /* <sys/ucontext.h> is unfortunately broken right now.  */\n> + struct uw_ucontext {\n> + \tunsigned long\t  uc_flags;\n> +-\tstruct ucontext  *uc_link;\n> ++\tucontext_t\t *uc_link;\n> + \tstack_t\t\t  uc_stack;\n> + \tmcontext_t\t  uc_mcontext;\n> + \tunsigned long\t  uc_filler[80];\n> +diff --git a/libgcc/config/nios2/linux-unwind.h b/libgcc/config/nios2/linux-unwind.h\n> +index 2304142..30f25ea 100644\n> +--- a/libgcc/config/nios2/linux-unwind.h\n> ++++ b/libgcc/config/nios2/linux-unwind.h\n> +@@ -38,7 +38,7 @@ struct nios2_mcontext {\n> + \n> + struct nios2_ucontext {\n> +   unsigned long uc_flags;\n> +-  struct ucontext *uc_link;\n> ++  ucontext_t *uc_link;\n> +   stack_t uc_stack;\n> +   struct nios2_mcontext uc_mcontext;\n> +   sigset_t uc_sigmask;\t/* mask last for extensibility */\n> +diff --git a/libgcc/config/pa/linux-unwind.h b/libgcc/config/pa/linux-unwind.h\n> +index 9a2657f..e47493d 100644\n> +--- a/libgcc/config/pa/linux-unwind.h\n> ++++ b/libgcc/config/pa/linux-unwind.h\n> +@@ -80,7 +80,7 @@ pa32_fallback_frame_state (struct _Unwind_Context *context,\n> +   struct sigcontext *sc;\n> +   struct rt_sigframe {\n> +     siginfo_t info;\n> +-    struct ucontext uc;\n> ++    ucontext_t uc;\n> +   } *frame;\n> + \n> +   /* rt_sigreturn trampoline:\n> +diff --git a/libgcc/config/sh/linux-unwind.h b/libgcc/config/sh/linux-unwind.h\n> +index e389cac..0bf43ba 100644\n> +--- a/libgcc/config/sh/linux-unwind.h\n> ++++ b/libgcc/config/sh/linux-unwind.h\n> +@@ -180,7 +180,7 @@ sh_fallback_frame_state (struct _Unwind_Context *context,\n> +     {\n> +       struct rt_sigframe {\n> + \tsiginfo_t info;\n> +-\tstruct ucontext uc;\n> ++\tucontext_t uc;\n> +       } *rt_ = context->cfa;\n> +       /* The void * cast is necessary to avoid an aliasing warning.\n> +          The aliasing warning is correct, but should not be a problem\n> +diff --git a/libgcc/config/tilepro/linux-unwind.h b/libgcc/config/tilepro/linux-unwind.h\n> +index 796e976..75f8890 100644\n> +--- a/libgcc/config/tilepro/linux-unwind.h\n> ++++ b/libgcc/config/tilepro/linux-unwind.h\n> +@@ -61,7 +61,7 @@ tile_fallback_frame_state (struct _Unwind_Context *context,\n> +   struct rt_sigframe {\n> +     unsigned char save_area[C_ABI_SAVE_AREA_SIZE];\n> +     siginfo_t info;\n> +-    struct ucontext uc;\n> ++    ucontext_t uc;\n> +   } *rt_;\n> + \n> +   /* Return if this is not a signal handler.  */\n> +diff --git a/libgcc/config/xtensa/linux-unwind.h b/libgcc/config/xtensa/linux-unwind.h\n> +index 9872492..586a9d4 100644\n> +--- a/libgcc/config/xtensa/linux-unwind.h\n> ++++ b/libgcc/config/xtensa/linux-unwind.h\n> +@@ -67,7 +67,7 @@ xtensa_fallback_frame_state (struct _Unwind_Context *context,\n> + \n> +   struct rt_sigframe {\n> +     siginfo_t info;\n> +-    struct ucontext uc;\n> ++    ucontext_t uc;\n> +   } *rt_;\n> + \n> +   /* movi a2, __NR_rt_sigreturn; syscall */\n> +-- \n> +2.9.4\n> +\n> -- \n> 2.9.5\n> \n> _______________________________________________\n> buildroot mailing list\n> buildroot@busybox.net\n> http://lists.busybox.net/mailman/listinfo/buildroot","headers":{"Return-Path":"<buildroot-bounces@busybox.net>","X-Original-To":["incoming@patchwork.ozlabs.org","buildroot@lists.busybox.net"],"Delivered-To":["patchwork-incoming@bilbo.ozlabs.org","buildroot@osuosl.org"],"Authentication-Results":["ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=busybox.net\n\t(client-ip=140.211.166.136; helo=silver.osuosl.org;\n\tenvelope-from=buildroot-bounces@busybox.net;\n\treceiver=<UNKNOWN>)","ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=gmail.com header.i=@gmail.com\n\theader.b=\"pBiXIa/7\"; dkim-atps=neutral"],"Received":["from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136])\n\t(using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xwDbR6QrMz9s7h\n\tfor <incoming@patchwork.ozlabs.org>;\n\tMon, 18 Sep 2017 02:09:06 +1000 (AEST)","from localhost (localhost [127.0.0.1])\n\tby silver.osuosl.org (Postfix) with ESMTP id 457FD2D2A3;\n\tSun, 17 Sep 2017 16:09:04 +0000 (UTC)","from silver.osuosl.org ([127.0.0.1])\n\tby localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)\n\twith ESMTP id cg+jtsRVEa+N; Sun, 17 Sep 2017 16:08:59 +0000 (UTC)","from ash.osuosl.org (ash.osuosl.org [140.211.166.34])\n\tby silver.osuosl.org (Postfix) with ESMTP id 1D71E2F535;\n\tSun, 17 Sep 2017 16:08:59 +0000 (UTC)","from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133])\n\tby ash.osuosl.org (Postfix) with ESMTP id 26EA01C11F6\n\tfor <buildroot@lists.busybox.net>;\n\tSun, 17 Sep 2017 16:08:58 +0000 (UTC)","from localhost (localhost [127.0.0.1])\n\tby hemlock.osuosl.org (Postfix) with ESMTP id 1DCF78A577\n\tfor <buildroot@lists.busybox.net>;\n\tSun, 17 Sep 2017 16:08:58 +0000 (UTC)","from hemlock.osuosl.org ([127.0.0.1])\n\tby localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)\n\twith ESMTP id UOsd4R3TNUeZ for <buildroot@lists.busybox.net>;\n\tSun, 17 Sep 2017 16:08:53 +0000 (UTC)","from mail-wr0-f195.google.com (mail-wr0-f195.google.com\n\t[209.85.128.195])\n\tby hemlock.osuosl.org (Postfix) with ESMTPS id 90A698A574\n\tfor <buildroot@buildroot.org>; Sun, 17 Sep 2017 16:08:52 +0000 (UTC)","by mail-wr0-f195.google.com with SMTP id n64so3798127wrb.2\n\tfor <buildroot@buildroot.org>; Sun, 17 Sep 2017 09:08:52 -0700 (PDT)","from ymorin.is-a-geek.org\n\t(2a01cb08861073001401c8bdf5f9616a.ipv6.abo.wanadoo.fr.\n\t[2a01:cb08:8610:7300:1401:c8bd:f5f9:616a])\n\tby smtp.gmail.com with ESMTPSA id\n\td17sm5304968wrc.13.2017.09.17.09.08.47\n\t(version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256);\n\tSun, 17 Sep 2017 09:08:49 -0700 (PDT)","by ymorin.is-a-geek.org (sSMTP sendmail emulation);\n\tSun, 17 Sep 2017 18:08:47 +0200"],"X-Virus-Scanned":["amavisd-new at osuosl.org","amavisd-new at osuosl.org"],"X-Greylist":"domain auto-whitelisted by SQLgrey-1.7.6","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;\n\th=sender:date:from:to:cc:subject:message-id:references:mime-version\n\t:content-disposition:content-transfer-encoding:in-reply-to\n\t:user-agent; bh=hQCXu/AG1TtE1jMuH0bjMJOs5GDZ9l185TIu2eHRuY0=;\n\tb=pBiXIa/7a92KV0AgxW3xcokaRcX5UeWMjWDLymWytek2kkm34n0tlUOMsm+oQX1eM9\n\t2EGB8O0WdUaNAsl8Rs9C3qXCl7OWvwaI29gSQlGkYSzupKLn6sakihQRSr1lcRu5N9Yq\n\tL+FIONnTh8uZ8LYEXlIpITwDQpoYsc7GjwbAH3Jitj3S5hwwyWyUlGMRJaJjepsQOuZU\n\twPR7qYZSLB3HRGc++WZ+Tyw5SJLGzLedwUFmXrOmxenErFEuVFFwr4qQWu1SSTRsmiE1\n\tx7kVrO7S243Q8Xnt6zBJa7z+iD/aZmA8ve69ktcSDzBjYmtIG2Z2/GWSDEUt5K/wADQR\n\t24Nw==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:sender:date:from:to:cc:subject:message-id\n\t:references:mime-version:content-disposition\n\t:content-transfer-encoding:in-reply-to:user-agent;\n\tbh=hQCXu/AG1TtE1jMuH0bjMJOs5GDZ9l185TIu2eHRuY0=;\n\tb=jyo90N9RnnzJ6If0YZEePwBLIEuWgvHF8n/yVLdUufbUTHRwb+QezDlwUuYHz/bjaz\n\tirpZoVQa1Gzjrvo1Ww9mFROl63aEKClvz2UhjxaUOeC2U0ukomS3A1o/7DbLCuPtG7QU\n\t/nWMt8AqWPUqg+loJoxdTu6zezkpVKv6w34LBuEw8KrcNICQ622RbjRjuuDMT1+xIjcl\n\twXSrUKrBI/BkwoZikomEZ+0vARxd+8hB3x4p8NvlY33twXirLpf3yMyBSL+vn4GSTzrF\n\tihavkiMvoGa9DaisMX7E9ROc87YeYHgMV6kWklX0BEcPv+pmOpnpXfX9x6QWMiQk1k+D\n\txNSg==","X-Gm-Message-State":"AHPjjUgnpsbPEJzokqbJhHzK4llAwenuSDEVlssU0ByDP5uQvlPjoHXA\n\t3UQ//kU/Fd9G+w==","X-Google-Smtp-Source":"ADKCNb5xW8dY3g8ReDpe3rbiaCEbQrvMC7lNsGyNTl0uhU6QZJqS7NVTxCyi9TmMW+4sDquKx845aQ==","X-Received":"by 10.223.136.204 with SMTP id g12mr28063576wrg.74.1505664530455;\n\tSun, 17 Sep 2017 09:08:50 -0700 (PDT)","Date":"Sun, 17 Sep 2017 18:08:47 +0200","From":"\"Yann E. MORIN\" <yann.morin.1998@free.fr>","To":"Romain Naour <romain.naour@gmail.com>","Message-ID":"<20170917160847.GD2930@scaer>","References":"<20170902205423.21288-1-romain.naour@gmail.com>\n\t<20170902205423.21288-2-romain.naour@gmail.com>","MIME-Version":"1.0","Content-Disposition":"inline","In-Reply-To":"<20170902205423.21288-2-romain.naour@gmail.com>","User-Agent":"Mutt/1.5.22 (2013-10-16)","Cc":"Thomas Petazzoni <thomas.petazzoni@free-electrons.com>,\n\tbuildroot@buildroot.org","Subject":"Re: [Buildroot] [PATCH v2 01/11] package/gcc: fix build issue with\n\tglibc 2.26","X-BeenThere":"buildroot@busybox.net","X-Mailman-Version":"2.1.18-1","Precedence":"list","List-Id":"Discussion and development of buildroot <buildroot.busybox.net>","List-Unsubscribe":"<http://lists.busybox.net/mailman/options/buildroot>,\n\t<mailto:buildroot-request@busybox.net?subject=unsubscribe>","List-Archive":"<http://lists.busybox.net/pipermail/buildroot/>","List-Post":"<mailto:buildroot@busybox.net>","List-Help":"<mailto:buildroot-request@busybox.net?subject=help>","List-Subscribe":"<http://lists.busybox.net/mailman/listinfo/buildroot>,\n\t<mailto:buildroot-request@busybox.net?subject=subscribe>","Content-Type":"text/plain; charset=\"utf-8\"","Content-Transfer-Encoding":"base64","Errors-To":"buildroot-bounces@busybox.net","Sender":"\"buildroot\" <buildroot-bounces@busybox.net>"}},{"id":1769729,"web_url":"http://patchwork.ozlabs.org/comment/1769729/","msgid":"<20170917161318.GE2930@scaer>","list_archive_url":null,"date":"2017-09-17T16:13:18","subject":"Re: [Buildroot] [PATCH v2 01/11] package/gcc: fix build issue with\n\tglibc 2.26","submitter":{"id":13903,"url":"http://patchwork.ozlabs.org/api/people/13903/","name":"Yann E. MORIN","email":"yann.morin.1998@free.fr"},"content":"On 2017-09-17 18:08 +0200, Yann E. MORIN spake thusly:\n> Romain, All,\n> \n> On 2017-09-02 22:54 +0200, Romain Naour spake thusly:\n> > In file included from ../../../libgcc/unwind-dw2.c:403:0:\n> > ./md-unwind-support.h: In function « aarch64_fallback_frame_state »:\n> > ./md-unwind-support.h:58:21: error: field « uc »  has incomplete type\n> >      struct ucontext uc;\n> >                      ^~\n> > \n> > The fix is already included in gcc 7.2 release [1]. We have to backport it to\n> > all older gcc release since it's not included in any stable release yet.\n> > \n> > [1] https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=14c2f22a1877f6b60a2f7c2f83ffb032759456a6\n> \n> And for gcc-5, you can now grab:\n>     https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff;h=9b9287cde20ea57578cf07efb2a96ed4cc0da36f\n\nAnd:\n    https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff;h=ecf0d1a107133c715763940c2b197aa814710e1b\n\n> while for gcc-6, this is:\n>     https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff;h=5927885f7673cfa50854687c34f50da13435fb93\n\nAnd:\n    https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff;h=b685411208e0aaa79190d54faf945763514706b8\n\nRegards,\nYann E. MORIN.\n\n> Otherwise:\n> \n>     Reviewed-by: \"Yann E. MORIN\" <yann.morin.1998@free.fr>\n> \n> Regards,\n> Yann E. MORIN.\n> \n> > Signed-off-by: Romain Naour <romain.naour@gmail.com>\n> > Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>\n> > ---\n> >  ...t_t-not-struct-ucontext-in-linux-unwind.h.patch | 190 ++++++++++++++++++++\n> >  ...t_t-not-struct-ucontext-in-linux-unwind.h.patch | 192 +++++++++++++++++++++\n> >  ...t_t-not-struct-ucontext-in-linux-unwind.h.patch | 191 ++++++++++++++++++++\n> >  3 files changed, 573 insertions(+)\n> >  create mode 100644 package/gcc/4.9.4/943-Use-ucontext_t-not-struct-ucontext-in-linux-unwind.h.patch\n> >  create mode 100644 package/gcc/5.4.0/943-Use-ucontext_t-not-struct-ucontext-in-linux-unwind.h.patch\n> >  create mode 100644 package/gcc/6.4.0/942-Use-ucontext_t-not-struct-ucontext-in-linux-unwind.h.patch\n> > \n> > diff --git a/package/gcc/4.9.4/943-Use-ucontext_t-not-struct-ucontext-in-linux-unwind.h.patch b/package/gcc/4.9.4/943-Use-ucontext_t-not-struct-ucontext-in-linux-unwind.h.patch\n> > new file mode 100644\n> > index 0000000..526346c\n> > --- /dev/null\n> > +++ b/package/gcc/4.9.4/943-Use-ucontext_t-not-struct-ucontext-in-linux-unwind.h.patch\n> > @@ -0,0 +1,190 @@\n> > +From b7e85069238c40eae54d0ca03ab6d5470d1815f9 Mon Sep 17 00:00:00 2001\n> > +From: jsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4>\n> > +Date: Tue, 4 Jul 2017 10:25:10 +0000\n> > +Subject: [PATCH] Use ucontext_t not struct ucontext in linux-unwind.h files.\n> > +\n> > +Current glibc no longer gives the ucontext_t type the tag struct\n> > +ucontext, to conform with POSIX namespace rules.  This requires\n> > +various linux-unwind.h files in libgcc, that were previously using\n> > +struct ucontext, to be fixed to use ucontext_t instead.  This is\n> > +similar to the removal of the struct siginfo tag from siginfo_t some\n> > +years ago.\n> > +\n> > +This patch changes those files to use ucontext_t instead.  As the\n> > +standard name that should be unconditionally safe, so this is not\n> > +restricted to architectures supported by glibc, or conditioned on the\n> > +glibc version.\n> > +\n> > +Tested compilation together with current glibc with glibc's\n> > +build-many-glibcs.py.\n> > +\n> > +\t* config/aarch64/linux-unwind.h (aarch64_fallback_frame_state),\n> > +\tconfig/alpha/linux-unwind.h (alpha_fallback_frame_state),\n> > +\tconfig/bfin/linux-unwind.h (bfin_fallback_frame_state),\n> > +\tconfig/i386/linux-unwind.h (x86_64_fallback_frame_state,\n> > +\tx86_fallback_frame_state), config/m68k/linux-unwind.h (struct\n> > +\tuw_ucontext), config/nios2/linux-unwind.h (struct nios2_ucontext),\n> > +\tconfig/pa/linux-unwind.h (pa32_fallback_frame_state),\n> > +\tconfig/sh/linux-unwind.h (sh_fallback_frame_state),\n> > +\tconfig/tilepro/linux-unwind.h (tile_fallback_frame_state),\n> > +\tconfig/xtensa/linux-unwind.h (xtensa_fallback_frame_state): Use\n> > +\tucontext_t instead of struct ucontext.\n> > +\n> > +git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-5-branch@249958 138bc75d-0d04-0410-961f-82ee72b054a4\n> > +[Romain backport from gcc-5-branch]\n> > +Signed-off-by: Romain Naour <romain.naour@gmail.com>\n> > +---\n> > + libgcc/config/aarch64/linux-unwind.h | 2 +-\n> > + libgcc/config/alpha/linux-unwind.h   | 2 +-\n> > + libgcc/config/bfin/linux-unwind.h    | 2 +-\n> > + libgcc/config/i386/linux-unwind.h    | 4 ++--\n> > + libgcc/config/m68k/linux-unwind.h    | 2 +-\n> > + libgcc/config/nios2/linux-unwind.h   | 2 +-\n> > + libgcc/config/pa/linux-unwind.h      | 2 +-\n> > + libgcc/config/sh/linux-unwind.h      | 2 +-\n> > + libgcc/config/tilepro/linux-unwind.h | 2 +-\n> > + libgcc/config/xtensa/linux-unwind.h  | 2 +-\n> > + 10 files changed, 11 insertions(+), 11 deletions(-)\n> > +\n> > +diff --git a/libgcc/config/aarch64/linux-unwind.h b/libgcc/config/aarch64/linux-unwind.h\n> > +index 6b5b3cd..d13dc34 100644\n> > +--- a/libgcc/config/aarch64/linux-unwind.h\n> > ++++ b/libgcc/config/aarch64/linux-unwind.h\n> > +@@ -52,7 +52,7 @@ aarch64_fallback_frame_state (struct _Unwind_Context *context,\n> > +   struct rt_sigframe\n> > +   {\n> > +     siginfo_t info;\n> > +-    struct ucontext uc;\n> > ++    ucontext_t uc;\n> > +   };\n> > + \n> > +   struct rt_sigframe *rt_;\n> > +diff --git a/libgcc/config/alpha/linux-unwind.h b/libgcc/config/alpha/linux-unwind.h\n> > +index b5bfd1c..166d3d2 100644\n> > +--- a/libgcc/config/alpha/linux-unwind.h\n> > ++++ b/libgcc/config/alpha/linux-unwind.h\n> > +@@ -51,7 +51,7 @@ alpha_fallback_frame_state (struct _Unwind_Context *context,\n> > +     {\n> > +       struct rt_sigframe {\n> > + \tsiginfo_t info;\n> > +-\tstruct ucontext uc;\n> > ++\tucontext_t uc;\n> > +       } *rt_ = context->cfa;\n> > +       sc = &rt_->uc.uc_mcontext;\n> > +     }\n> > +diff --git a/libgcc/config/bfin/linux-unwind.h b/libgcc/config/bfin/linux-unwind.h\n> > +index dc58f0a..8b94568 100644\n> > +--- a/libgcc/config/bfin/linux-unwind.h\n> > ++++ b/libgcc/config/bfin/linux-unwind.h\n> > +@@ -52,7 +52,7 @@ bfin_fallback_frame_state (struct _Unwind_Context *context,\n> > + \tvoid *puc;\n> > + \tchar retcode[8];\n> > + \tsiginfo_t info;\n> > +-\tstruct ucontext uc;\n> > ++\tucontext_t uc;\n> > +       } *rt_ = context->cfa;\n> > + \n> > +       /* The void * cast is necessary to avoid an aliasing warning.\n> > +diff --git a/libgcc/config/i386/linux-unwind.h b/libgcc/config/i386/linux-unwind.h\n> > +index 7986928..a9d621c 100644\n> > +--- a/libgcc/config/i386/linux-unwind.h\n> > ++++ b/libgcc/config/i386/linux-unwind.h\n> > +@@ -58,7 +58,7 @@ x86_64_fallback_frame_state (struct _Unwind_Context *context,\n> > +   if (*(unsigned char *)(pc+0) == 0x48\n> > +       && *(unsigned long long *)(pc+1) == RT_SIGRETURN_SYSCALL)\n> > +     {\n> > +-      struct ucontext *uc_ = context->cfa;\n> > ++      ucontext_t *uc_ = context->cfa;\n> > +       /* The void * cast is necessary to avoid an aliasing warning.\n> > +          The aliasing warning is correct, but should not be a problem\n> > +          because it does not alias anything.  */\n> > +@@ -138,7 +138,7 @@ x86_fallback_frame_state (struct _Unwind_Context *context,\n> > + \tsiginfo_t *pinfo;\n> > + \tvoid *puc;\n> > + \tsiginfo_t info;\n> > +-\tstruct ucontext uc;\n> > ++\tucontext_t uc;\n> > +       } *rt_ = context->cfa;\n> > +       /* The void * cast is necessary to avoid an aliasing warning.\n> > +          The aliasing warning is correct, but should not be a problem\n> > +diff --git a/libgcc/config/m68k/linux-unwind.h b/libgcc/config/m68k/linux-unwind.h\n> > +index 1ba2a0c4..d67767e 100644\n> > +--- a/libgcc/config/m68k/linux-unwind.h\n> > ++++ b/libgcc/config/m68k/linux-unwind.h\n> > +@@ -33,7 +33,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see\n> > + /* <sys/ucontext.h> is unfortunately broken right now.  */\n> > + struct uw_ucontext {\n> > + \tunsigned long\t  uc_flags;\n> > +-\tstruct ucontext  *uc_link;\n> > ++\tucontext_t\t *uc_link;\n> > + \tstack_t\t\t  uc_stack;\n> > + \tmcontext_t\t  uc_mcontext;\n> > + \tunsigned long\t  uc_filler[80];\n> > +diff --git a/libgcc/config/nios2/linux-unwind.h b/libgcc/config/nios2/linux-unwind.h\n> > +index ba4bd80..8978868 100644\n> > +--- a/libgcc/config/nios2/linux-unwind.h\n> > ++++ b/libgcc/config/nios2/linux-unwind.h\n> > +@@ -38,7 +38,7 @@ struct nios2_mcontext {\n> > + \n> > + struct nios2_ucontext {\n> > +   unsigned long uc_flags;\n> > +-  struct ucontext *uc_link;\n> > ++  ucontext_t *uc_link;\n> > +   stack_t uc_stack;\n> > +   struct nios2_mcontext uc_mcontext;\n> > +   sigset_t uc_sigmask;\t/* mask last for extensibility */\n> > +diff --git a/libgcc/config/pa/linux-unwind.h b/libgcc/config/pa/linux-unwind.h\n> > +index 4a3cfff..d2ac437 100644\n> > +--- a/libgcc/config/pa/linux-unwind.h\n> > ++++ b/libgcc/config/pa/linux-unwind.h\n> > +@@ -80,7 +80,7 @@ pa32_fallback_frame_state (struct _Unwind_Context *context,\n> > +   struct sigcontext *sc;\n> > +   struct rt_sigframe {\n> > +     siginfo_t info;\n> > +-    struct ucontext uc;\n> > ++    ucontext_t uc;\n> > +   } *frame;\n> > + \n> > +   /* rt_sigreturn trampoline:\n> > +diff --git a/libgcc/config/sh/linux-unwind.h b/libgcc/config/sh/linux-unwind.h\n> > +index 4875706..671bde7 100644\n> > +--- a/libgcc/config/sh/linux-unwind.h\n> > ++++ b/libgcc/config/sh/linux-unwind.h\n> > +@@ -180,7 +180,7 @@ sh_fallback_frame_state (struct _Unwind_Context *context,\n> > +     {\n> > +       struct rt_sigframe {\n> > + \tsiginfo_t info;\n> > +-\tstruct ucontext uc;\n> > ++\tucontext_t uc;\n> > +       } *rt_ = context->cfa;\n> > +       /* The void * cast is necessary to avoid an aliasing warning.\n> > +          The aliasing warning is correct, but should not be a problem\n> > +diff --git a/libgcc/config/tilepro/linux-unwind.h b/libgcc/config/tilepro/linux-unwind.h\n> > +index 27481cf..c24d58c 100644\n> > +--- a/libgcc/config/tilepro/linux-unwind.h\n> > ++++ b/libgcc/config/tilepro/linux-unwind.h\n> > +@@ -61,7 +61,7 @@ tile_fallback_frame_state (struct _Unwind_Context *context,\n> > +   struct rt_sigframe {\n> > +     unsigned char save_area[C_ABI_SAVE_AREA_SIZE];\n> > +     siginfo_t info;\n> > +-    struct ucontext uc;\n> > ++    ucontext_t uc;\n> > +   } *rt_;\n> > + \n> > +   /* Return if this is not a signal handler.  */\n> > +diff --git a/libgcc/config/xtensa/linux-unwind.h b/libgcc/config/xtensa/linux-unwind.h\n> > +index 6832d0b..cb15b4c 100644\n> > +--- a/libgcc/config/xtensa/linux-unwind.h\n> > ++++ b/libgcc/config/xtensa/linux-unwind.h\n> > +@@ -63,7 +63,7 @@ xtensa_fallback_frame_state (struct _Unwind_Context *context,\n> > + \n> > +   struct rt_sigframe {\n> > +     siginfo_t info;\n> > +-    struct ucontext uc;\n> > ++    ucontext_t uc;\n> > +   } *rt_;\n> > + \n> > +   /* movi a2, __NR_rt_sigreturn; syscall */\n> > +-- \n> > +2.9.5\n> > +\n> > diff --git a/package/gcc/5.4.0/943-Use-ucontext_t-not-struct-ucontext-in-linux-unwind.h.patch b/package/gcc/5.4.0/943-Use-ucontext_t-not-struct-ucontext-in-linux-unwind.h.patch\n> > new file mode 100644\n> > index 0000000..f207f91\n> > --- /dev/null\n> > +++ b/package/gcc/5.4.0/943-Use-ucontext_t-not-struct-ucontext-in-linux-unwind.h.patch\n> > @@ -0,0 +1,192 @@\n> > +From ecf0d1a107133c715763940c2b197aa814710e1b Mon Sep 17 00:00:00 2001\n> > +From: jsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4>\n> > +Date: Tue, 4 Jul 2017 10:25:10 +0000\n> > +Subject: [PATCH] Use ucontext_t not struct ucontext in linux-unwind.h files.\n> > +\n> > +Current glibc no longer gives the ucontext_t type the tag struct\n> > +ucontext, to conform with POSIX namespace rules.  This requires\n> > +various linux-unwind.h files in libgcc, that were previously using\n> > +struct ucontext, to be fixed to use ucontext_t instead.  This is\n> > +similar to the removal of the struct siginfo tag from siginfo_t some\n> > +years ago.\n> > +\n> > +This patch changes those files to use ucontext_t instead.  As the\n> > +standard name that should be unconditionally safe, so this is not\n> > +restricted to architectures supported by glibc, or conditioned on the\n> > +glibc version.\n> > +\n> > +Tested compilation together with current glibc with glibc's\n> > +build-many-glibcs.py.\n> > +\n> > +\t* config/aarch64/linux-unwind.h (aarch64_fallback_frame_state),\n> > +\tconfig/alpha/linux-unwind.h (alpha_fallback_frame_state),\n> > +\tconfig/bfin/linux-unwind.h (bfin_fallback_frame_state),\n> > +\tconfig/i386/linux-unwind.h (x86_64_fallback_frame_state,\n> > +\tx86_fallback_frame_state), config/m68k/linux-unwind.h (struct\n> > +\tuw_ucontext), config/nios2/linux-unwind.h (struct nios2_ucontext),\n> > +\tconfig/pa/linux-unwind.h (pa32_fallback_frame_state),\n> > +\tconfig/sh/linux-unwind.h (sh_fallback_frame_state),\n> > +\tconfig/tilepro/linux-unwind.h (tile_fallback_frame_state),\n> > +\tconfig/xtensa/linux-unwind.h (xtensa_fallback_frame_state): Use\n> > +\tucontext_t instead of struct ucontext.\n> > +\n> > +\n> > +git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-5-branch@249958 138bc75d-0d04-0410-961f-82ee72b054a4\n> > +\n> > +[Romain cherry-pick from gcc-5-branch]\n> > +Signed-off-by: Romain Naour <romain.naour@gmail.com>\n> > +---\n> > + libgcc/config/aarch64/linux-unwind.h |  2 +-\n> > + libgcc/config/alpha/linux-unwind.h   |  2 +-\n> > + libgcc/config/bfin/linux-unwind.h    |  2 +-\n> > + libgcc/config/i386/linux-unwind.h    |  4 ++--\n> > + libgcc/config/m68k/linux-unwind.h    |  2 +-\n> > + libgcc/config/nios2/linux-unwind.h   |  2 +-\n> > + libgcc/config/pa/linux-unwind.h      |  2 +-\n> > + libgcc/config/sh/linux-unwind.h      |  2 +-\n> > + libgcc/config/tilepro/linux-unwind.h |  2 +-\n> > + libgcc/config/xtensa/linux-unwind.h  |  2 +-\n> > + 11 files changed, 25 insertions(+), 11 deletions(-)\n> > +\n> > +diff --git a/libgcc/config/aarch64/linux-unwind.h b/libgcc/config/aarch64/linux-unwind.h\n> > +index 86d17b1..909f68f 100644\n> > +--- a/libgcc/config/aarch64/linux-unwind.h\n> > ++++ b/libgcc/config/aarch64/linux-unwind.h\n> > +@@ -52,7 +52,7 @@ aarch64_fallback_frame_state (struct _Unwind_Context *context,\n> > +   struct rt_sigframe\n> > +   {\n> > +     siginfo_t info;\n> > +-    struct ucontext uc;\n> > ++    ucontext_t uc;\n> > +   };\n> > + \n> > +   struct rt_sigframe *rt_;\n> > +diff --git a/libgcc/config/alpha/linux-unwind.h b/libgcc/config/alpha/linux-unwind.h\n> > +index d65474f..9a226b1 100644\n> > +--- a/libgcc/config/alpha/linux-unwind.h\n> > ++++ b/libgcc/config/alpha/linux-unwind.h\n> > +@@ -51,7 +51,7 @@ alpha_fallback_frame_state (struct _Unwind_Context *context,\n> > +     {\n> > +       struct rt_sigframe {\n> > + \tsiginfo_t info;\n> > +-\tstruct ucontext uc;\n> > ++\tucontext_t uc;\n> > +       } *rt_ = context->cfa;\n> > +       sc = &rt_->uc.uc_mcontext;\n> > +     }\n> > +diff --git a/libgcc/config/bfin/linux-unwind.h b/libgcc/config/bfin/linux-unwind.h\n> > +index 0c270e4..7fa95d2 100644\n> > +--- a/libgcc/config/bfin/linux-unwind.h\n> > ++++ b/libgcc/config/bfin/linux-unwind.h\n> > +@@ -52,7 +52,7 @@ bfin_fallback_frame_state (struct _Unwind_Context *context,\n> > + \tvoid *puc;\n> > + \tchar retcode[8];\n> > + \tsiginfo_t info;\n> > +-\tstruct ucontext uc;\n> > ++\tucontext_t uc;\n> > +       } *rt_ = context->cfa;\n> > + \n> > +       /* The void * cast is necessary to avoid an aliasing warning.\n> > +diff --git a/libgcc/config/i386/linux-unwind.h b/libgcc/config/i386/linux-unwind.h\n> > +index e54bf73..d35fc45 100644\n> > +--- a/libgcc/config/i386/linux-unwind.h\n> > ++++ b/libgcc/config/i386/linux-unwind.h\n> > +@@ -58,7 +58,7 @@ x86_64_fallback_frame_state (struct _Unwind_Context *context,\n> > +   if (*(unsigned char *)(pc+0) == 0x48\n> > +       && *(unsigned long long *)(pc+1) == RT_SIGRETURN_SYSCALL)\n> > +     {\n> > +-      struct ucontext *uc_ = context->cfa;\n> > ++      ucontext_t *uc_ = context->cfa;\n> > +       /* The void * cast is necessary to avoid an aliasing warning.\n> > +          The aliasing warning is correct, but should not be a problem\n> > +          because it does not alias anything.  */\n> > +@@ -138,7 +138,7 @@ x86_fallback_frame_state (struct _Unwind_Context *context,\n> > + \tsiginfo_t *pinfo;\n> > + \tvoid *puc;\n> > + \tsiginfo_t info;\n> > +-\tstruct ucontext uc;\n> > ++\tucontext_t uc;\n> > +       } *rt_ = context->cfa;\n> > +       /* The void * cast is necessary to avoid an aliasing warning.\n> > +          The aliasing warning is correct, but should not be a problem\n> > +diff --git a/libgcc/config/m68k/linux-unwind.h b/libgcc/config/m68k/linux-unwind.h\n> > +index fb79a4d..b2f5ea4 100644\n> > +--- a/libgcc/config/m68k/linux-unwind.h\n> > ++++ b/libgcc/config/m68k/linux-unwind.h\n> > +@@ -33,7 +33,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see\n> > + /* <sys/ucontext.h> is unfortunately broken right now.  */\n> > + struct uw_ucontext {\n> > + \tunsigned long\t  uc_flags;\n> > +-\tstruct ucontext  *uc_link;\n> > ++\tucontext_t\t *uc_link;\n> > + \tstack_t\t\t  uc_stack;\n> > + \tmcontext_t\t  uc_mcontext;\n> > + \tunsigned long\t  uc_filler[80];\n> > +diff --git a/libgcc/config/nios2/linux-unwind.h b/libgcc/config/nios2/linux-unwind.h\n> > +index dff1c20..1d88afe 100644\n> > +--- a/libgcc/config/nios2/linux-unwind.h\n> > ++++ b/libgcc/config/nios2/linux-unwind.h\n> > +@@ -38,7 +38,7 @@ struct nios2_mcontext {\n> > + \n> > + struct nios2_ucontext {\n> > +   unsigned long uc_flags;\n> > +-  struct ucontext *uc_link;\n> > ++  ucontext_t *uc_link;\n> > +   stack_t uc_stack;\n> > +   struct nios2_mcontext uc_mcontext;\n> > +   sigset_t uc_sigmask;\t/* mask last for extensibility */\n> > +diff --git a/libgcc/config/pa/linux-unwind.h b/libgcc/config/pa/linux-unwind.h\n> > +index 0149468..9157535 100644\n> > +--- a/libgcc/config/pa/linux-unwind.h\n> > ++++ b/libgcc/config/pa/linux-unwind.h\n> > +@@ -80,7 +80,7 @@ pa32_fallback_frame_state (struct _Unwind_Context *context,\n> > +   struct sigcontext *sc;\n> > +   struct rt_sigframe {\n> > +     siginfo_t info;\n> > +-    struct ucontext uc;\n> > ++    ucontext_t uc;\n> > +   } *frame;\n> > + \n> > +   /* rt_sigreturn trampoline:\n> > +diff --git a/libgcc/config/sh/linux-unwind.h b/libgcc/config/sh/linux-unwind.h\n> > +index e63091f..67033f0 100644\n> > +--- a/libgcc/config/sh/linux-unwind.h\n> > ++++ b/libgcc/config/sh/linux-unwind.h\n> > +@@ -180,7 +180,7 @@ sh_fallback_frame_state (struct _Unwind_Context *context,\n> > +     {\n> > +       struct rt_sigframe {\n> > + \tsiginfo_t info;\n> > +-\tstruct ucontext uc;\n> > ++\tucontext_t uc;\n> > +       } *rt_ = context->cfa;\n> > +       /* The void * cast is necessary to avoid an aliasing warning.\n> > +          The aliasing warning is correct, but should not be a problem\n> > +diff --git a/libgcc/config/tilepro/linux-unwind.h b/libgcc/config/tilepro/linux-unwind.h\n> > +index fd83ba7..e3c9ef0 100644\n> > +--- a/libgcc/config/tilepro/linux-unwind.h\n> > ++++ b/libgcc/config/tilepro/linux-unwind.h\n> > +@@ -61,7 +61,7 @@ tile_fallback_frame_state (struct _Unwind_Context *context,\n> > +   struct rt_sigframe {\n> > +     unsigned char save_area[C_ABI_SAVE_AREA_SIZE];\n> > +     siginfo_t info;\n> > +-    struct ucontext uc;\n> > ++    ucontext_t uc;\n> > +   } *rt_;\n> > + \n> > +   /* Return if this is not a signal handler.  */\n> > +diff --git a/libgcc/config/xtensa/linux-unwind.h b/libgcc/config/xtensa/linux-unwind.h\n> > +index 9a67b5d..98b7ea6 100644\n> > +--- a/libgcc/config/xtensa/linux-unwind.h\n> > ++++ b/libgcc/config/xtensa/linux-unwind.h\n> > +@@ -67,7 +67,7 @@ xtensa_fallback_frame_state (struct _Unwind_Context *context,\n> > + \n> > +   struct rt_sigframe {\n> > +     siginfo_t info;\n> > +-    struct ucontext uc;\n> > ++    ucontext_t uc;\n> > +   } *rt_;\n> > + \n> > +   /* movi a2, __NR_rt_sigreturn; syscall */\n> > +-- \n> > +2.9.4\n> > +\n> > diff --git a/package/gcc/6.4.0/942-Use-ucontext_t-not-struct-ucontext-in-linux-unwind.h.patch b/package/gcc/6.4.0/942-Use-ucontext_t-not-struct-ucontext-in-linux-unwind.h.patch\n> > new file mode 100644\n> > index 0000000..6d44045\n> > --- /dev/null\n> > +++ b/package/gcc/6.4.0/942-Use-ucontext_t-not-struct-ucontext-in-linux-unwind.h.patch\n> > @@ -0,0 +1,191 @@\n> > +From b685411208e0aaa79190d54faf945763514706b8 Mon Sep 17 00:00:00 2001\n> > +From: jsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4>\n> > +Date: Tue, 4 Jul 2017 10:23:57 +0000\n> > +Subject: [PATCH] Use ucontext_t not struct ucontext in linux-unwind.h files.\n> > +\n> > +Current glibc no longer gives the ucontext_t type the tag struct\n> > +ucontext, to conform with POSIX namespace rules.  This requires\n> > +various linux-unwind.h files in libgcc, that were previously using\n> > +struct ucontext, to be fixed to use ucontext_t instead.  This is\n> > +similar to the removal of the struct siginfo tag from siginfo_t some\n> > +years ago.\n> > +\n> > +This patch changes those files to use ucontext_t instead.  As the\n> > +standard name that should be unconditionally safe, so this is not\n> > +restricted to architectures supported by glibc, or conditioned on the\n> > +glibc version.\n> > +\n> > +Tested compilation together with current glibc with glibc's\n> > +build-many-glibcs.py.\n> > +\n> > +\t* config/aarch64/linux-unwind.h (aarch64_fallback_frame_state),\n> > +\tconfig/alpha/linux-unwind.h (alpha_fallback_frame_state),\n> > +\tconfig/bfin/linux-unwind.h (bfin_fallback_frame_state),\n> > +\tconfig/i386/linux-unwind.h (x86_64_fallback_frame_state,\n> > +\tx86_fallback_frame_state), config/m68k/linux-unwind.h (struct\n> > +\tuw_ucontext), config/nios2/linux-unwind.h (struct nios2_ucontext),\n> > +\tconfig/pa/linux-unwind.h (pa32_fallback_frame_state),\n> > +\tconfig/sh/linux-unwind.h (sh_fallback_frame_state),\n> > +\tconfig/tilepro/linux-unwind.h (tile_fallback_frame_state),\n> > +\tconfig/xtensa/linux-unwind.h (xtensa_fallback_frame_state): Use\n> > +\tucontext_t instead of struct ucontext.\n> > +\n> > +\n> > +git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-6-branch@249957 138bc75d-0d04-0410-961f-82ee72b054a4\n> > +[Romain cherry-pick from gcc-6-branch]\n> > +Signed-off-by: Romain Naour <romain.naour@gmail.com>\n> > +---\n> > + libgcc/config/aarch64/linux-unwind.h |  2 +-\n> > + libgcc/config/alpha/linux-unwind.h   |  2 +-\n> > + libgcc/config/bfin/linux-unwind.h    |  2 +-\n> > + libgcc/config/i386/linux-unwind.h    |  4 ++--\n> > + libgcc/config/m68k/linux-unwind.h    |  2 +-\n> > + libgcc/config/nios2/linux-unwind.h   |  2 +-\n> > + libgcc/config/pa/linux-unwind.h      |  2 +-\n> > + libgcc/config/sh/linux-unwind.h      |  2 +-\n> > + libgcc/config/tilepro/linux-unwind.h |  2 +-\n> > + libgcc/config/xtensa/linux-unwind.h  |  2 +-\n> > + 11 files changed, 25 insertions(+), 11 deletions(-)\n> > +\n> > +diff --git a/libgcc/config/aarch64/linux-unwind.h b/libgcc/config/aarch64/linux-unwind.h\n> > +index 4512efb..06de45a 100644\n> > +--- a/libgcc/config/aarch64/linux-unwind.h\n> > ++++ b/libgcc/config/aarch64/linux-unwind.h\n> > +@@ -52,7 +52,7 @@ aarch64_fallback_frame_state (struct _Unwind_Context *context,\n> > +   struct rt_sigframe\n> > +   {\n> > +     siginfo_t info;\n> > +-    struct ucontext uc;\n> > ++    ucontext_t uc;\n> > +   };\n> > + \n> > +   struct rt_sigframe *rt_;\n> > +diff --git a/libgcc/config/alpha/linux-unwind.h b/libgcc/config/alpha/linux-unwind.h\n> > +index bdbba4a..e84812e 100644\n> > +--- a/libgcc/config/alpha/linux-unwind.h\n> > ++++ b/libgcc/config/alpha/linux-unwind.h\n> > +@@ -51,7 +51,7 @@ alpha_fallback_frame_state (struct _Unwind_Context *context,\n> > +     {\n> > +       struct rt_sigframe {\n> > + \tsiginfo_t info;\n> > +-\tstruct ucontext uc;\n> > ++\tucontext_t uc;\n> > +       } *rt_ = context->cfa;\n> > +       sc = &rt_->uc.uc_mcontext;\n> > +     }\n> > +diff --git a/libgcc/config/bfin/linux-unwind.h b/libgcc/config/bfin/linux-unwind.h\n> > +index 77b7c23..8bf5e82 100644\n> > +--- a/libgcc/config/bfin/linux-unwind.h\n> > ++++ b/libgcc/config/bfin/linux-unwind.h\n> > +@@ -52,7 +52,7 @@ bfin_fallback_frame_state (struct _Unwind_Context *context,\n> > + \tvoid *puc;\n> > + \tchar retcode[8];\n> > + \tsiginfo_t info;\n> > +-\tstruct ucontext uc;\n> > ++\tucontext_t uc;\n> > +       } *rt_ = context->cfa;\n> > + \n> > +       /* The void * cast is necessary to avoid an aliasing warning.\n> > +diff --git a/libgcc/config/i386/linux-unwind.h b/libgcc/config/i386/linux-unwind.h\n> > +index 540a0a2..29efbe3 100644\n> > +--- a/libgcc/config/i386/linux-unwind.h\n> > ++++ b/libgcc/config/i386/linux-unwind.h\n> > +@@ -58,7 +58,7 @@ x86_64_fallback_frame_state (struct _Unwind_Context *context,\n> > +   if (*(unsigned char *)(pc+0) == 0x48\n> > +       && *(unsigned long long *)(pc+1) == RT_SIGRETURN_SYSCALL)\n> > +     {\n> > +-      struct ucontext *uc_ = context->cfa;\n> > ++      ucontext_t *uc_ = context->cfa;\n> > +       /* The void * cast is necessary to avoid an aliasing warning.\n> > +          The aliasing warning is correct, but should not be a problem\n> > +          because it does not alias anything.  */\n> > +@@ -138,7 +138,7 @@ x86_fallback_frame_state (struct _Unwind_Context *context,\n> > + \tsiginfo_t *pinfo;\n> > + \tvoid *puc;\n> > + \tsiginfo_t info;\n> > +-\tstruct ucontext uc;\n> > ++\tucontext_t uc;\n> > +       } *rt_ = context->cfa;\n> > +       /* The void * cast is necessary to avoid an aliasing warning.\n> > +          The aliasing warning is correct, but should not be a problem\n> > +diff --git a/libgcc/config/m68k/linux-unwind.h b/libgcc/config/m68k/linux-unwind.h\n> > +index 75b7cf7..f964e24 100644\n> > +--- a/libgcc/config/m68k/linux-unwind.h\n> > ++++ b/libgcc/config/m68k/linux-unwind.h\n> > +@@ -33,7 +33,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see\n> > + /* <sys/ucontext.h> is unfortunately broken right now.  */\n> > + struct uw_ucontext {\n> > + \tunsigned long\t  uc_flags;\n> > +-\tstruct ucontext  *uc_link;\n> > ++\tucontext_t\t *uc_link;\n> > + \tstack_t\t\t  uc_stack;\n> > + \tmcontext_t\t  uc_mcontext;\n> > + \tunsigned long\t  uc_filler[80];\n> > +diff --git a/libgcc/config/nios2/linux-unwind.h b/libgcc/config/nios2/linux-unwind.h\n> > +index 2304142..30f25ea 100644\n> > +--- a/libgcc/config/nios2/linux-unwind.h\n> > ++++ b/libgcc/config/nios2/linux-unwind.h\n> > +@@ -38,7 +38,7 @@ struct nios2_mcontext {\n> > + \n> > + struct nios2_ucontext {\n> > +   unsigned long uc_flags;\n> > +-  struct ucontext *uc_link;\n> > ++  ucontext_t *uc_link;\n> > +   stack_t uc_stack;\n> > +   struct nios2_mcontext uc_mcontext;\n> > +   sigset_t uc_sigmask;\t/* mask last for extensibility */\n> > +diff --git a/libgcc/config/pa/linux-unwind.h b/libgcc/config/pa/linux-unwind.h\n> > +index 9a2657f..e47493d 100644\n> > +--- a/libgcc/config/pa/linux-unwind.h\n> > ++++ b/libgcc/config/pa/linux-unwind.h\n> > +@@ -80,7 +80,7 @@ pa32_fallback_frame_state (struct _Unwind_Context *context,\n> > +   struct sigcontext *sc;\n> > +   struct rt_sigframe {\n> > +     siginfo_t info;\n> > +-    struct ucontext uc;\n> > ++    ucontext_t uc;\n> > +   } *frame;\n> > + \n> > +   /* rt_sigreturn trampoline:\n> > +diff --git a/libgcc/config/sh/linux-unwind.h b/libgcc/config/sh/linux-unwind.h\n> > +index e389cac..0bf43ba 100644\n> > +--- a/libgcc/config/sh/linux-unwind.h\n> > ++++ b/libgcc/config/sh/linux-unwind.h\n> > +@@ -180,7 +180,7 @@ sh_fallback_frame_state (struct _Unwind_Context *context,\n> > +     {\n> > +       struct rt_sigframe {\n> > + \tsiginfo_t info;\n> > +-\tstruct ucontext uc;\n> > ++\tucontext_t uc;\n> > +       } *rt_ = context->cfa;\n> > +       /* The void * cast is necessary to avoid an aliasing warning.\n> > +          The aliasing warning is correct, but should not be a problem\n> > +diff --git a/libgcc/config/tilepro/linux-unwind.h b/libgcc/config/tilepro/linux-unwind.h\n> > +index 796e976..75f8890 100644\n> > +--- a/libgcc/config/tilepro/linux-unwind.h\n> > ++++ b/libgcc/config/tilepro/linux-unwind.h\n> > +@@ -61,7 +61,7 @@ tile_fallback_frame_state (struct _Unwind_Context *context,\n> > +   struct rt_sigframe {\n> > +     unsigned char save_area[C_ABI_SAVE_AREA_SIZE];\n> > +     siginfo_t info;\n> > +-    struct ucontext uc;\n> > ++    ucontext_t uc;\n> > +   } *rt_;\n> > + \n> > +   /* Return if this is not a signal handler.  */\n> > +diff --git a/libgcc/config/xtensa/linux-unwind.h b/libgcc/config/xtensa/linux-unwind.h\n> > +index 9872492..586a9d4 100644\n> > +--- a/libgcc/config/xtensa/linux-unwind.h\n> > ++++ b/libgcc/config/xtensa/linux-unwind.h\n> > +@@ -67,7 +67,7 @@ xtensa_fallback_frame_state (struct _Unwind_Context *context,\n> > + \n> > +   struct rt_sigframe {\n> > +     siginfo_t info;\n> > +-    struct ucontext uc;\n> > ++    ucontext_t uc;\n> > +   } *rt_;\n> > + \n> > +   /* movi a2, __NR_rt_sigreturn; syscall */\n> > +-- \n> > +2.9.4\n> > +\n> > -- \n> > 2.9.5\n> > \n> > _______________________________________________\n> > buildroot mailing list\n> > buildroot@busybox.net\n> > http://lists.busybox.net/mailman/listinfo/buildroot\n> \n> -- \n> .-----------------.--------------------.------------------.--------------------.\n> |  Yann E. MORIN  | Real-Time Embedded | /\"\\ ASCII RIBBON | Erics' conspiracy: |\n> | +33 662 376 056 | Software  Designer | \\ / CAMPAIGN     |  ___               |\n> | +33 223 225 172 `------------.-------:  X  AGAINST      |  \\e/  There is no  |\n> | http://ymorin.is-a-geek.org/ | _/*\\_ | / \\ HTML MAIL    |   v   conspiracy.  |\n> '------------------------------^-------^------------------^--------------------'\n> _______________________________________________\n> buildroot mailing list\n> buildroot@busybox.net\n> http://lists.busybox.net/mailman/listinfo/buildroot","headers":{"Return-Path":"<buildroot-bounces@busybox.net>","X-Original-To":["incoming@patchwork.ozlabs.org","buildroot@lists.busybox.net"],"Delivered-To":["patchwork-incoming@bilbo.ozlabs.org","buildroot@osuosl.org"],"Authentication-Results":["ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=busybox.net\n\t(client-ip=140.211.166.138; helo=whitealder.osuosl.org;\n\tenvelope-from=buildroot-bounces@busybox.net;\n\treceiver=<UNKNOWN>)","ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=gmail.com header.i=@gmail.com\n\theader.b=\"TJI5zy+e\"; dkim-atps=neutral"],"Received":["from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138])\n\t(using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xwDhf5FyLz9s7h\n\tfor <incoming@patchwork.ozlabs.org>;\n\tMon, 18 Sep 2017 02:13:38 +1000 (AEST)","from localhost (localhost [127.0.0.1])\n\tby whitealder.osuosl.org (Postfix) with ESMTP id 7A6CA84664;\n\tSun, 17 Sep 2017 16:13:34 +0000 (UTC)","from whitealder.osuosl.org ([127.0.0.1])\n\tby localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)\n\twith ESMTP id xDlt4ymlXxZM; Sun, 17 Sep 2017 16:13:29 +0000 (UTC)","from ash.osuosl.org (ash.osuosl.org [140.211.166.34])\n\tby whitealder.osuosl.org (Postfix) with ESMTP id 0EEFC83B14;\n\tSun, 17 Sep 2017 16:13:29 +0000 (UTC)","from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136])\n\tby ash.osuosl.org (Postfix) with ESMTP id 727291C11F6\n\tfor <buildroot@lists.busybox.net>;\n\tSun, 17 Sep 2017 16:13:28 +0000 (UTC)","from localhost (localhost [127.0.0.1])\n\tby silver.osuosl.org (Postfix) with ESMTP id 690942D2A3\n\tfor <buildroot@lists.busybox.net>;\n\tSun, 17 Sep 2017 16:13:28 +0000 (UTC)","from silver.osuosl.org ([127.0.0.1])\n\tby localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)\n\twith ESMTP id PKWWFdjx1bhQ for <buildroot@lists.busybox.net>;\n\tSun, 17 Sep 2017 16:13:23 +0000 (UTC)","from mail-wr0-f194.google.com (mail-wr0-f194.google.com\n\t[209.85.128.194])\n\tby silver.osuosl.org (Postfix) with ESMTPS id DACEA2013C\n\tfor <buildroot@buildroot.org>; Sun, 17 Sep 2017 16:13:22 +0000 (UTC)","by mail-wr0-f194.google.com with SMTP id k20so3791785wre.1\n\tfor <buildroot@buildroot.org>; Sun, 17 Sep 2017 09:13:22 -0700 (PDT)","from ymorin.is-a-geek.org\n\t(2a01cb0886107300e88db0a5a578747e.ipv6.abo.wanadoo.fr.\n\t[2a01:cb08:8610:7300:e88d:b0a5:a578:747e])\n\tby smtp.gmail.com with ESMTPSA id\n\tj65sm3065959wmj.3.2017.09.17.09.13.18\n\t(version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256);\n\tSun, 17 Sep 2017 09:13:19 -0700 (PDT)","by ymorin.is-a-geek.org (sSMTP sendmail emulation);\n\tSun, 17 Sep 2017 18:13:18 +0200"],"X-Virus-Scanned":["amavisd-new at osuosl.org","amavisd-new at osuosl.org"],"X-Greylist":"domain auto-whitelisted by SQLgrey-1.7.6","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;\n\th=sender:date:from:to:cc:subject:message-id:references:mime-version\n\t:content-disposition:content-transfer-encoding:in-reply-to\n\t:user-agent; bh=xjcW2T/iBARZ0pJ2FC2DKvYKfwnxwuPe28TaoQASPLE=;\n\tb=TJI5zy+em7CzC9GiGY9ELlbom2mOj+wCtN4jl6zCo8FC4WMEAVqRgGl/hRG6E3JQnT\n\tSNmnK+tM4nMvc7LHwBggGGpaNxQnkt1WBvdlMJ7iM2YP3x/16SxMIcyOc9B3C4jwbt/b\n\tvmUcIDEl/8yOaK+cBJNE1eVxM4boA8bVd3OS5wDgUHqk4pKPGcsCyvcE/ZL4FVRP+sZj\n\tCVC+72HrYpjUUU4qJLkPEaNXGg2EMDpsj0Oam6Q9uU//4KbCENV8x00xKBOnGCCujTbj\n\t3GkCz9PUsactfw4YR1y/CLSjsfs3XXlsERKMVLV8oHtjoMNPqPKR+/7/H7R9tKtQ2d12\n\t/Dkg==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:sender:date:from:to:cc:subject:message-id\n\t:references:mime-version:content-disposition\n\t:content-transfer-encoding:in-reply-to:user-agent;\n\tbh=xjcW2T/iBARZ0pJ2FC2DKvYKfwnxwuPe28TaoQASPLE=;\n\tb=CMUivi03HDvB5dGq/XkyrZ3/U/rMlk4zm6xX+Oyv/CXjJT2T9y0yXLq115pBfFJosV\n\tnbyQeRgU70jsAmiYUL8Z2ALNAm68Q4nr1fq+H5Kmm5x+7/RKLMPDTOmvFKY9bsVKxHlb\n\tkIxw6MBje8h9n6x4QZgBWQtG/lGE6QBf5DEswJRhBLUnj5q4a/i3rDtRdQLlwRIPhEai\n\tg8ruQHCLO1wnOH0MbLGpUNi28aIlsFtHsXJJs7E+8wczJ/6TAfWONAapFe6aJNuF/Ltd\n\tyeeMP9uGJ4QT17j796bvE7szSH8fDfngIqkY2bgnBA1D1+wrxAzb/WDgPOX5kIbgS8v0\n\t42QA==","X-Gm-Message-State":"AHPjjUjbbsPOw5xSoWRW+k6dSiWLNbnmrZvmWTWcWZCqsEOY1ZDU/4A9\n\t7RqYhv5KU7r7eA==","X-Google-Smtp-Source":"ADKCNb4R7hW92FTPebicP+2SaF2DK78SlLVC8hhNNTlFg/IYP0b3pqe9BUjtw31yHrnclktTVT57TQ==","X-Received":"by 10.223.165.73 with SMTP id j9mr26671350wrb.62.1505664800951; \n\tSun, 17 Sep 2017 09:13:20 -0700 (PDT)","Date":"Sun, 17 Sep 2017 18:13:18 +0200","From":"\"Yann E. MORIN\" <yann.morin.1998@free.fr>","To":"Romain Naour <romain.naour@gmail.com>","Message-ID":"<20170917161318.GE2930@scaer>","References":"<20170902205423.21288-1-romain.naour@gmail.com>\n\t<20170902205423.21288-2-romain.naour@gmail.com>\n\t<20170917160847.GD2930@scaer>","MIME-Version":"1.0","Content-Disposition":"inline","In-Reply-To":"<20170917160847.GD2930@scaer>","User-Agent":"Mutt/1.5.22 (2013-10-16)","Cc":"Thomas Petazzoni <thomas.petazzoni@free-electrons.com>,\n\tbuildroot@buildroot.org","Subject":"Re: [Buildroot] [PATCH v2 01/11] package/gcc: fix build issue with\n\tglibc 2.26","X-BeenThere":"buildroot@busybox.net","X-Mailman-Version":"2.1.18-1","Precedence":"list","List-Id":"Discussion and development of buildroot <buildroot.busybox.net>","List-Unsubscribe":"<http://lists.busybox.net/mailman/options/buildroot>,\n\t<mailto:buildroot-request@busybox.net?subject=unsubscribe>","List-Archive":"<http://lists.busybox.net/pipermail/buildroot/>","List-Post":"<mailto:buildroot@busybox.net>","List-Help":"<mailto:buildroot-request@busybox.net?subject=help>","List-Subscribe":"<http://lists.busybox.net/mailman/listinfo/buildroot>,\n\t<mailto:buildroot-request@busybox.net?subject=subscribe>","Content-Type":"text/plain; charset=\"utf-8\"","Content-Transfer-Encoding":"base64","Errors-To":"buildroot-bounces@busybox.net","Sender":"\"buildroot\" <buildroot-bounces@busybox.net>"}}]