Show a patch.

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

{
    "id": 41435,
    "url": "http://patches.dpdk.org/api/patches/41435/?format=api",
    "web_url": "http://patches.dpdk.org/patch/41435/",
    "project": {
        "id": 1,
        "url": "http://patches.dpdk.org/api/projects/1/?format=api",
        "name": "DPDK",
        "link_name": "dpdk",
        "list_id": "dev.dpdk.org",
        "list_email": "dev@dpdk.org",
        "web_url": "http://core.dpdk.org",
        "scm_url": "git://dpdk.org/dpdk",
        "webscm_url": "http://git.dpdk.org/dpdk"
    },
    "msgid": "<20180625024913.17219-2-gavin.hu@arm.com>",
    "date": "2018-06-25T02:49:08",
    "name": "[v13,1/6] mk: fix makefile based cross build errors",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "3d33ef5c29b77852dac2c62adf45ffd01fbee292",
    "submitter": {
        "id": 1018,
        "url": "http://patches.dpdk.org/api/people/1018/?format=api",
        "name": "Gavin Hu",
        "email": "gavin.hu@arm.com"
    },
    "delegate": {
        "id": 1,
        "url": "http://patches.dpdk.org/api/users/1/?format=api",
        "username": "tmonjalo",
        "first_name": "Thomas",
        "last_name": "Monjalon",
        "email": "thomas@monjalon.net"
    },
    "mbox": "http://patches.dpdk.org/patch/41435/mbox/",
    "series": [
        {
            "id": 217,
            "url": "http://patches.dpdk.org/api/series/217/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=217",
            "date": "2018-06-25T02:49:07",
            "name": "Fix the cross compiling errors",
            "version": 13,
            "mbox": "http://patches.dpdk.org/series/217/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/41435/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/41435/checks/",
    "tags": {},
    "headers": {
        "X-Mailer": "git-send-email 2.11.0",
        "List-Id": "DPDK patches and discussions <dev.dpdk.org>",
        "From": "Gavin Hu <gavin.hu@arm.com>",
        "List-Help": "<mailto:dev-request@dpdk.org?subject=help>",
        "Date": "Mon, 25 Jun 2018 10:49:08 +0800",
        "X-Mailman-Version": "2.1.15",
        "Delivered-To": "patchwork@dpdk.org",
        "List-Archive": "<http://mails.dpdk.org/archives/dev/>",
        "List-Subscribe": "<https://mails.dpdk.org/listinfo/dev>,\n\t<mailto:dev-request@dpdk.org?subject=subscribe>",
        "Cc": "nd@arm.com,\n\tgavin.hu@arm.com,\n\tstable@dpdk.org",
        "To": "dev@dpdk.org",
        "Errors-To": "dev-bounces@dpdk.org",
        "References": "<20180619103657.19186-1-gavin.hu@arm.com>\n\t<20180625024913.17219-1-gavin.hu@arm.com>",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>",
        "Return-Path": "<dev-bounces@dpdk.org>",
        "X-BeenThere": "dev@dpdk.org",
        "List-Post": "<mailto:dev@dpdk.org>",
        "Received": [
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 8604A5F27;\n\tMon, 25 Jun 2018 04:49:29 +0200 (CEST)",
            "from foss.arm.com (usa-sjc-mx-foss1.foss.arm.com [217.140.101.70])\n\tby dpdk.org (Postfix) with ESMTP id 0D7DC56A3;\n\tMon, 25 Jun 2018 04:49:25 +0200 (CEST)",
            "from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249])\n\tby usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 2C7361529;\n\tSun, 24 Jun 2018 19:49:25 -0700 (PDT)",
            "from net-debian.shanghai.arm.com (net-debian.shanghai.arm.com\n\t[10.169.36.53])\n\tby usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id\n\t6F7EF3F59C; Sun, 24 Jun 2018 19:49:24 -0700 (PDT)"
        ],
        "Content-Type": "text/plain; charset=UTF-8",
        "Subject": "[dpdk-dev] [PATCH v13 1/6] mk: fix makefile based cross build errors",
        "In-Reply-To": "<20180625024913.17219-1-gavin.hu@arm.com>",
        "MIME-Version": "1.0",
        "Message-Id": "<20180625024913.17219-2-gavin.hu@arm.com>",
        "Precedence": "list",
        "Content-Transfer-Encoding": "8bit",
        "List-Unsubscribe": "<https://mails.dpdk.org/options/dev>,\n\t<mailto:dev-request@dpdk.org?subject=unsubscribe>",
        "X-Original-To": "patchwork@dpdk.org"
    },
    "content": "From: gavin hu <gavin.hu@arm.com>\n\nThe \"-Wimplicit-fallthrough=2\" option was introduced into gcc 7.0, it was\nenabled when the cross compiler gcc is greater than 7.0, but for the host\nside buildtools/pmdinfogen, if the native gcc is older than 7.0, or the\nhost cc compiler is clang, it should not be enabled.\n\nThe fix is to differentiate the host gcc Werror options from the cross gcc.\n\ngcc -Wp,-MD,./.pmdinfogen.o.d.tmp  -W -Wall -Wstrict-prototypes\n-Wmissing-prototypes -Wmissing-declarations -Wold-style-definition\n-Wpointer-arith -Wcast-align -Wnested-externs -Wcast-qual\n-Wformat-nonliteral -Wformat-security -Wundef -Wwrite-strings -Wdeprecated\n-Werror -Wimplicit-fallthrough=2 -Dbbb -Wno-format-truncation -g\n-I/home/gavin/arm_repo/dpdk/build/include    -o pmdinfogen.o -c\n~/dpdk/buildtools/pmdinfogen/pmdinfogen.c gcc: error:\nunrecognized command line option ‘-Wimplicit-fallthrough=2’\n~/dpdk/mk/internal/rte.compile-pre.mk:114: recipe for target 'pmdinfogen.o'\nfailed make[3]: *** [pmdinfogen.o] Error 1\n\nFixes: ced3e6f8 (\"mk: adjust gcc flags for new gcc 7 warnings\")\nCc: stable@dpdk.org\n\nSigned-off-by: Gavin Hu <gavin.hu@arm.com>\nReviewed-by: Honnappa Nagarahalli <Honnappa.Nagarahalli@arm.com>\nReviewed-by: Steve Capper <Steve.Capper@arm.com>\n---\n buildtools/pmdinfogen/Makefile           | 2 +-\n mk/toolchain/gcc/rte.toolchain-compat.mk | 5 +++++\n mk/toolchain/gcc/rte.vars.mk             | 9 +++++++++\n 3 files changed, 15 insertions(+), 1 deletion(-)",
    "diff": "diff --git a/buildtools/pmdinfogen/Makefile b/buildtools/pmdinfogen/Makefile\nindex bf07b6f2e..ff7a5fae6 100644\n--- a/buildtools/pmdinfogen/Makefile\n+++ b/buildtools/pmdinfogen/Makefile\n@@ -41,7 +41,7 @@ HOSTAPP = dpdk-pmdinfogen\n #\n SRCS-y += pmdinfogen.c\n \n-HOST_CFLAGS += $(WERROR_FLAGS) -g\n+HOST_CFLAGS += $(HOST_WERROR_FLAGS) -g\n HOST_CFLAGS += -I$(RTE_OUTPUT)/include\n \n include $(RTE_SDK)/mk/rte.hostapp.mk\ndiff --git a/mk/toolchain/gcc/rte.toolchain-compat.mk b/mk/toolchain/gcc/rte.toolchain-compat.mk\nindex 255c89677..1e4434fa9 100644\n--- a/mk/toolchain/gcc/rte.toolchain-compat.mk\n+++ b/mk/toolchain/gcc/rte.toolchain-compat.mk\n@@ -15,6 +15,11 @@ GCC_MINOR = $(shell echo __GNUC_MINOR__ | $(CC) -E -x c - | tail -n 1)\n GCC_PATCHLEVEL = $(shell echo __GNUC_PATCHLEVEL__ | $(CC) -E -x c - | tail -n 1)\n GCC_VERSION = $(GCC_MAJOR)$(GCC_MINOR)\n \n+HOST_GCC_MAJOR = $(shell echo __GNUC__ | $(HOSTCC) -E -x c - | tail -n 1)\n+HOST_GCC_MINOR = $(shell echo __GNUC_MINOR__ | $(HOSTCC) -E -x c - | tail -n 1)\n+HOST_GCC_PATCHLEVEL = $(shell echo __GNUC_PATCHLEVEL__ | $(HOSTCC) -E -x c - | tail -n 1)\n+HOST_GCC_VERSION = $(HOST_GCC_MAJOR)$(HOST_GCC_MINOR)\n+\n # if GCC is older than 4.x\n ifeq ($(shell test $(GCC_VERSION) -lt 40 && echo 1), 1)\n \tMACHINE_CFLAGS =\ndiff --git a/mk/toolchain/gcc/rte.vars.mk b/mk/toolchain/gcc/rte.vars.mk\nindex 7e4531bab..d8b99faf6 100644\n--- a/mk/toolchain/gcc/rte.vars.mk\n+++ b/mk/toolchain/gcc/rte.vars.mk\n@@ -71,6 +71,15 @@ ifeq ($(shell test $(GCC_VERSION) -lt 47 && echo 1), 1)\n WERROR_FLAGS += -Wno-uninitialized\n endif\n \n+HOST_WERROR_FLAGS := $(WERROR_FLAGS)\n+\n+ifeq ($(shell test $(HOST_GCC_VERSION) -gt 70 && echo 1), 1)\n+# Tell GCC only to error for switch fallthroughs without a suitable comment\n+HOST_WERROR_FLAGS += -Wimplicit-fallthrough=2\n+# Ignore errors for snprintf truncation\n+HOST_WERROR_FLAGS += -Wno-format-truncation\n+endif\n+\n ifeq ($(shell test $(GCC_VERSION) -gt 70 && echo 1), 1)\n # Tell GCC only to error for switch fallthroughs without a suitable comment\n WERROR_FLAGS += -Wimplicit-fallthrough=2\n",
    "prefixes": [
        "v13",
        "1/6"
    ]
}