[{"id":1776596,"web_url":"http://patchwork.ozlabs.org/comment/1776596/","msgid":"<20170927202914.GB2903@scaer>","list_archive_url":null,"date":"2017-09-27T20:29:14","subject":"Re: [Buildroot] [PATCH v3 1/7] 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-23 23:24 +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> Signed-off-by: Romain Naour <romain.naour@gmail.com>\n> Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>\n> Cc: \"Yann E. MORIN\" <yann.morin.1998@free.fr>\n\nReviewed-by: \"Yann E. MORIN\" <yann.morin.1998@free.fr>\n\nRegards,\nYann E. MORIN.\n\n> ---\n> v3: use upstream commit for gcc 5 and 6. (Yann)\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 | 192 +++++++++++++++++++++\n>  3 files changed, 574 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..4c3385d\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 c287e88cc3743bfa7e5719bc4dee327aa3950051 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> +\n> +(cherry picked from commit ecf0d1a107133c715763940c2b197aa814710e1b)\n> +[Romain rebase on 5.4]\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 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 9daf738..ff6b663 100644\n> +--- a/libgcc/config/xtensa/linux-unwind.h\n> ++++ b/libgcc/config/xtensa/linux-unwind.h\n> +@@ -64,7 +64,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/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..a2a2ea0\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,192 @@\n> +From 35d8ca22047f101a700abb29cffbf03b81278a2b 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> +git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-6-branch@249957 138bc75d-0d04-0410-961f-82ee72b054a4\n> +\n> +(cherry picked from commit b685411208e0aaa79190d54faf945763514706b8)\n> +[Romain rebase on gcc 6.4]\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 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.5\n> +\n> -- \n> 2.9.5\n>","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.133; helo=hemlock.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=\"DHIuteo2\"; dkim-atps=neutral"],"Received":["from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133])\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 3y2TvJ02fQz9t66\n\tfor <incoming@patchwork.ozlabs.org>;\n\tThu, 28 Sep 2017 06:29:31 +1000 (AEST)","from localhost (localhost [127.0.0.1])\n\tby hemlock.osuosl.org (Postfix) with ESMTP id BDDC789A85;\n\tWed, 27 Sep 2017 20:29:27 +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 OeP+6FtVxM82; Wed, 27 Sep 2017 20:29:25 +0000 (UTC)","from ash.osuosl.org (ash.osuosl.org [140.211.166.34])\n\tby hemlock.osuosl.org (Postfix) with ESMTP id 370D489655;\n\tWed, 27 Sep 2017 20:29:25 +0000 (UTC)","from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138])\n\tby ash.osuosl.org (Postfix) with ESMTP id 285F61C143E\n\tfor <buildroot@lists.busybox.net>;\n\tWed, 27 Sep 2017 20:29:24 +0000 (UTC)","from localhost (localhost [127.0.0.1])\n\tby whitealder.osuosl.org (Postfix) with ESMTP id 1F9B788D03\n\tfor <buildroot@lists.busybox.net>;\n\tWed, 27 Sep 2017 20:29:24 +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 3Ep8H7ApIuoc for <buildroot@lists.busybox.net>;\n\tWed, 27 Sep 2017 20:29:22 +0000 (UTC)","from mail-wm0-f68.google.com (mail-wm0-f68.google.com\n\t[74.125.82.68])\n\tby whitealder.osuosl.org (Postfix) with ESMTPS id 75F5B88CE9\n\tfor <buildroot@buildroot.org>; Wed, 27 Sep 2017 20:29:21 +0000 (UTC)","by mail-wm0-f68.google.com with SMTP id m127so46971wmm.1\n\tfor <buildroot@buildroot.org>; Wed, 27 Sep 2017 13:29:21 -0700 (PDT)","from ymorin.is-a-geek.org\n\t(2a01cb0886107300a192bf6dfa6c9aae.ipv6.abo.wanadoo.fr.\n\t[2a01:cb08:8610:7300:a192:bf6d:fa6c:9aae])\n\tby smtp.gmail.com with ESMTPSA id 4sm94890wmz.33.2017.09.27.13.29.16\n\t(version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256);\n\tWed, 27 Sep 2017 13:29:17 -0700 (PDT)","by ymorin.is-a-geek.org (sSMTP sendmail emulation);\n\tWed, 27 Sep 2017 22:29:14 +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=Hu0DJ+lH5W5MdoBaqY6rLPUowPvWFd+vM0BbEAhEO6I=;\n\tb=DHIuteo2oUd7tmNzI/+KU4jXhSpy0/LX3nSZDupvzPGn6s5vGFQblVscU2EdgBzDdJ\n\tI4V4L6BR1TOss7zaaUFFXA0OEuAsGKCfC2czvYXzAUov9IHyzVzAVD2dDMV1FVyfzhzA\n\tvHiCXh6GpuasVocOlNJ40u9PxK7/AuNd5HkyekxxlK85jOD/uzUL0BKjkDcwlD9LWzbt\n\t1Y9mPTPWK9IAW8UggeUvD+Q+oAFD2k6N1WR/WDHuEcDmfYWpGzRiFHGQnuxVExz+9jR+\n\tiuYXcjzJCFGBm/8Rj3wo72F9lurtkzDjX9/+TJao9aU++Y79vO/zbD/GrReySJ8Ox876\n\t5/9g==","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=Hu0DJ+lH5W5MdoBaqY6rLPUowPvWFd+vM0BbEAhEO6I=;\n\tb=AUtJ4/BIq1u29R4fWocCsImGn7YjqFMffUA39yzJ3EkuYE2n/tdZcJxwgLW7fVMA0b\n\t9YYBGlCWOa/0IyorOxykabwp3nrjPcBeuLe1FEeFKLe3zmo4O9+TFXalQisRYRLk8E4y\n\t6GWoLLFRgasimtZrULS2FlKDnHIjthZ8WierAY/YO0p+YaqTRV7RWy+EWDB0vPR0O0g3\n\t1SNffhZKhHvXYJlNMjlpxqjUE2uAE2bEIYTLNHsU5djlK3L5B8psRu6TpM7t+i/m62Ld\n\tWVgPkecAPeJB5oFZvI8ZqxdBpZdaPCdBZjghalCCfJvjA/z6QDvWtETwbLqmRJJq9AF+\n\t5uQg==","X-Gm-Message-State":"AHPjjUivOwlsDqkY7terlitxURiUpqvT9ta/Le9IzYmMhOGELUO/MmDn\n\tKMxt1sm9TUVfb4hG5xT5Amt0gA==","X-Google-Smtp-Source":"AOwi7QA3uXvCwTGjCUxQmTxqnOin226iTlQC1OAhcRW2UIaDzc7riPtmMiu9kXsbTsLoKknnl1RzBQ==","X-Received":"by 10.28.211.66 with SMTP id k63mr1194090wmg.33.1506544159532;\n\tWed, 27 Sep 2017 13:29:19 -0700 (PDT)","Date":"Wed, 27 Sep 2017 22:29:14 +0200","From":"\"Yann E. MORIN\" <yann.morin.1998@free.fr>","To":"Romain Naour <romain.naour@gmail.com>","Message-ID":"<20170927202914.GB2903@scaer>","References":"<20170923212414.16744-1-romain.naour@gmail.com>\n\t<20170923212414.16744-2-romain.naour@gmail.com>","MIME-Version":"1.0","Content-Disposition":"inline","In-Reply-To":"<20170923212414.16744-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 v3 1/7] 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>"}}]