get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

GET /api/patches/817833/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 817833,
    "url": "http://patchwork.ozlabs.org/api/patches/817833/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/buildroot/patch/20170923212414.16744-2-romain.naour@gmail.com/",
    "project": {
        "id": 27,
        "url": "http://patchwork.ozlabs.org/api/projects/27/?format=api",
        "name": "Buildroot development",
        "link_name": "buildroot",
        "list_id": "buildroot.buildroot.org",
        "list_email": "buildroot@buildroot.org",
        "web_url": "",
        "scm_url": "",
        "webscm_url": "",
        "list_archive_url": "",
        "list_archive_url_format": "",
        "commit_url_format": ""
    },
    "msgid": "<20170923212414.16744-2-romain.naour@gmail.com>",
    "list_archive_url": null,
    "date": "2017-09-23T21:24:00",
    "name": "[v3,1/7] package/gcc: fix build issue with glibc 2.26",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": false,
    "hash": "29cf353d81f47b1b59e826f2f306eba963d9d13e",
    "submitter": {
        "id": 67942,
        "url": "http://patchwork.ozlabs.org/api/people/67942/?format=api",
        "name": "Romain Naour",
        "email": "romain.naour@gmail.com"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/buildroot/patch/20170923212414.16744-2-romain.naour@gmail.com/mbox/",
    "series": [
        {
            "id": 4786,
            "url": "http://patchwork.ozlabs.org/api/series/4786/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/buildroot/list/?series=4786",
            "date": "2017-09-23T21:23:59",
            "name": "glibc: bump to 2.26",
            "version": 3,
            "mbox": "http://patchwork.ozlabs.org/series/4786/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/817833/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/817833/checks/",
    "tags": {},
    "related": [],
    "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=\"RV9G2eif\"; 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 3y03Jd5brqz9t2M\n\tfor <incoming@patchwork.ozlabs.org>;\n\tSun, 24 Sep 2017 07:24:33 +1000 (AEST)",
            "from localhost (localhost [127.0.0.1])\n\tby silver.osuosl.org (Postfix) with ESMTP id 602702CDB4;\n\tSat, 23 Sep 2017 21:24:30 +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 WZekpYt7UphZ; Sat, 23 Sep 2017 21:24:26 +0000 (UTC)",
            "from ash.osuosl.org (ash.osuosl.org [140.211.166.34])\n\tby silver.osuosl.org (Postfix) with ESMTP id 4F11E25605;\n\tSat, 23 Sep 2017 21:24:26 +0000 (UTC)",
            "from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133])\n\tby ash.osuosl.org (Postfix) with ESMTP id 5DF5D1C0060\n\tfor <buildroot@lists.busybox.net>;\n\tSat, 23 Sep 2017 21:24:24 +0000 (UTC)",
            "from localhost (localhost [127.0.0.1])\n\tby hemlock.osuosl.org (Postfix) with ESMTP id 55B1788B00\n\tfor <buildroot@lists.busybox.net>;\n\tSat, 23 Sep 2017 21:24:24 +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 8gPf+qdrntnb for <buildroot@lists.busybox.net>;\n\tSat, 23 Sep 2017 21:24:22 +0000 (UTC)",
            "from mail-wr0-f194.google.com (mail-wr0-f194.google.com\n\t[209.85.128.194])\n\tby hemlock.osuosl.org (Postfix) with ESMTPS id 753B488ABB\n\tfor <buildroot@buildroot.org>; Sat, 23 Sep 2017 21:24:22 +0000 (UTC)",
            "by mail-wr0-f194.google.com with SMTP id g50so2261998wra.3\n\tfor <buildroot@buildroot.org>; Sat, 23 Sep 2017 14:24:22 -0700 (PDT)",
            "from localhost.localdomain\n\t([2a01:e35:1391:67d0:e6f9:2d2f:1a1e:79bf])\n\tby smtp.gmail.com with ESMTPSA id\n\tf89sm1253848wmh.18.2017.09.23.14.24.18\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\n\tSat, 23 Sep 2017 14:24:19 -0700 (PDT)"
        ],
        "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=from:to:cc:subject:date:message-id:in-reply-to:references\n\t:mime-version:content-transfer-encoding;\n\tbh=eJfqQO/Cttl9uTtCGKYuirtFXMY6KksELWstsvWTOaA=;\n\tb=RV9G2eifFKCItgZGz9fcH+8DyocPoMnh4loNJv0vHUx2+F1tEgaQZdw417w93YbHdb\n\tHKrJPW24/L/jY0Shp9DQVDYWRB0exqFawtP3qr5LsX8dXQMQIEoeZIuAbOpA0bh/dL6q\n\tKSzna7RRCul2B9oU5fGrWRYXr6Mx/8gmyX4582bqk8lOJaXfJ7ApSY22L0cBPgWuzvU/\n\tai6Agf9eAxBfW6lrI8M4xK2dQb7ZMzuDr+hmpZtq48Vemb2yNV43u9YGBplbwDR3VrEi\n\t6YFK2cRB5axSf4vo0ScMWCTjupKf+jbABCT+Z85p13qxMhmjK8Zhlmgmf9QAV37zMpiw\n\tdwTQ==",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to\n\t:references:mime-version:content-transfer-encoding;\n\tbh=eJfqQO/Cttl9uTtCGKYuirtFXMY6KksELWstsvWTOaA=;\n\tb=lMPKmLk6V9RaFgpvqm+8cWseHO9LvORCjFFMyM5chcqu3IjvTPfippJLqHXQHT9m9x\n\tj/tTlPAFLZGLr7uWhnH6JBtG6tzdp52f7++sd1s1DyzNnFr0BB9vhpI5E1RhNaTSEc7F\n\tXDSBMRMU2D8cq/8PKU1uEnhScjYWXQa/MGqrWe6D0Kah5zdfClSOb91ljXGJt+zHuFdu\n\tbwvieal+QRKXyCxjgf/POAPoYTDbrT9cPWBpPy0DCkjdirofpxKkOdiM+Xsy9X/AhaqG\n\tQwvz05G1KV2frPlBf6umCYo5X3YolmODvi1xrhODOQdXcBcy2k35Z35Jb1Brigt6XZ0S\n\tDd9g==",
        "X-Gm-Message-State": "AHPjjUjulAmivrwO0QYjBT+h2a/EOpsYsQICwkNPBIXy7uMZtnPOwDT+\n\ty514SH1hK907v5EHLM5AObgx4+hq",
        "X-Google-Smtp-Source": "AOwi7QARgINgj+6OYWDCKnu1hW3Js+NSEInHAuJ2sn+NcM/zHhvijRJrFvPXs9rQHRjxG5KMij/0BA==",
        "X-Received": "by 10.223.165.73 with SMTP id j9mr2557048wrb.62.1506201860368;\n\tSat, 23 Sep 2017 14:24:20 -0700 (PDT)",
        "From": "Romain Naour <romain.naour@gmail.com>",
        "To": "buildroot@buildroot.org",
        "Date": "Sat, 23 Sep 2017 23:24:00 +0200",
        "Message-Id": "<20170923212414.16744-2-romain.naour@gmail.com>",
        "X-Mailer": "git-send-email 2.9.5",
        "In-Reply-To": "<20170923212414.16744-1-romain.naour@gmail.com>",
        "References": "<20170923212414.16744-1-romain.naour@gmail.com>",
        "MIME-Version": "1.0",
        "Cc": "Thomas Petazzoni <thomas.petazzoni@free-electrons.com>,\n\tRomain Naour <romain.naour@gmail.com>,\n\t\"Yann E. MORIN\" <yann.morin.1998@free.fr>",
        "Subject": "[Buildroot] [PATCH v3 1/7] package/gcc: fix build issue with glibc\n\t2.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>"
    },
    "content": "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\nThe fix is already included in gcc 7.2 release [1]. We have to backport it to\nall 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\nSigned-off-by: Romain Naour <romain.naour@gmail.com>\nCc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>\nCc: \"Yann E. MORIN\" <yann.morin.1998@free.fr>\n---\nv3: 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",
    "diff": "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\nnew file mode 100644\nindex 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+\ndiff --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\nnew file mode 100644\nindex 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+\ndiff --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\nnew file mode 100644\nindex 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",
    "prefixes": [
        "v3",
        "1/7"
    ]
}