Show a patch.

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

{
    "id": 41439,
    "url": "http://patches.dpdk.org/api/patches/41439/?format=api",
    "web_url": "http://patches.dpdk.org/patch/41439/",
    "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-6-gavin.hu@arm.com>",
    "date": "2018-06-25T02:49:12",
    "name": "[v13,5/6] build: fix the meson cross compile error",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "81add22c9717afad96a44aca3d02bc551190476d",
    "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/41439/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/41439/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/41439/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:12 +0800",
        "X-Mailman-Version": "2.1.15",
        "Delivered-To": "patchwork@dpdk.org",
        "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 838D97ED7;\n\tMon, 25 Jun 2018 04:49:38 +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 7FD425F22;\n\tMon, 25 Jun 2018 04:49:29 +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 ED2907A9;\n\tSun, 24 Jun 2018 19:49:28 -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\t36CC03F59C; Sun, 24 Jun 2018 19:49:28 -0700 (PDT)"
        ],
        "List-Archive": "<http://mails.dpdk.org/archives/dev/>",
        "Subject": "[dpdk-dev] [PATCH v13 5/6] build: fix the meson cross compile error",
        "In-Reply-To": "<20180625024913.17219-1-gavin.hu@arm.com>",
        "Message-Id": "<20180625024913.17219-6-gavin.hu@arm.com>",
        "Precedence": "list",
        "List-Unsubscribe": "<https://mails.dpdk.org/options/dev>,\n\t<mailto:dev-request@dpdk.org?subject=unsubscribe>",
        "X-Original-To": "patchwork@dpdk.org"
    },
    "content": "The following error hits if host cc compiler is clang(default one in most\nlinux distributions) and the cross compiler is gcc.\n\nThe root cause is: the hybride compilers add the warning options to the\nmeson project as project arguments, which apply for both host compiling and\ncross compiling. But some options such as '-Wno-format-truncation' are not\nsupported nor recognized by clang, so they have to be removed from the\nproject arguments for the host compiler to run smoothily and added back as\ncflags for the cross compiler to compile for cross source files.\n\nThe fix is remove unrecognized warning options from the meson project\narguments shared by gcc and clang, as add them specifically for gcc or\nclang as cflags.\n\n[265/893] Compiling C object\n'buildtools/pmdinfogen/pmdinfogen@exe/pmdinfogen.c.o'.  warning: unknown\nwarning option '-Wno-format-truncation' [-Wunknown-warning-option]\n\nFixes: a55277a788 (\"devtools: add test script for meson builds\")\nCc: stable@dpdk.org\n\nSigned-off-by: Gavin Hu <gavin.hu@arm.com>\nReviewed-by: Phil Yang <phil.yang@arm.com>\nReviewed-by: Song Zhu <song.zhu@arm.com>\nReviewed-by: Steve Capper <Steve.Capper@arm.com>\nAcked-by: Bruce Richardson <bruce.richardson@intel.com>\n---\n config/meson.build    | 3 +--\n drivers/meson.build   | 3 +++\n examples/meson.build  | 4 ++++\n lib/meson.build       | 4 ++++\n test/test/meson.build | 7 ++++++-\n 5 files changed, 18 insertions(+), 3 deletions(-)",
    "diff": "diff --git a/config/meson.build b/config/meson.build\nindex 50081b572..272d4a838 100644\n--- a/config/meson.build\n+++ b/config/meson.build\n@@ -57,8 +57,7 @@ add_project_arguments('-include', 'rte_config.h', language: 'c')\n warning_flags = [\n \t'-Wsign-compare',\n \t'-Wcast-qual',\n-\t'-Wno-address-of-packed-member',\n-\t'-Wno-format-truncation'\n+\t'-Wno-address-of-packed-member'\n ]\n foreach arg: warning_flags\n \tif cc.has_argument(arg)\ndiff --git a/drivers/meson.build b/drivers/meson.build\nindex ac6c97297..1737d86b8 100644\n--- a/drivers/meson.build\n+++ b/drivers/meson.build\n@@ -32,6 +32,9 @@ foreach class:driver_classes\n \t\tsources = []\n \t\tobjs = []\n \t\tcflags = machine_args\n+\t\tif cc.has_argument('-Wno-format-truncation')\n+\t\t\tcflags += '-Wno-format-truncation'\n+\t\tendif\n \t\tincludes = [include_directories(drv_path)]\n \t\t# set up internal deps. Drivers can append/override as necessary\n \t\tdeps = std_deps\ndiff --git a/examples/meson.build b/examples/meson.build\nindex 3d1568497..e6558875a 100644\n--- a/examples/meson.build\n+++ b/examples/meson.build\n@@ -24,6 +24,10 @@ foreach example: examples\n \tsources = []\n \tallow_experimental_apis = false\n \tcflags = machine_args\n+\tif cc.has_argument('-Wno-format-truncation')\n+\t\tcflags += '-Wno-format-truncation'\n+\tendif\n+\n \text_deps = [execinfo]\n \tincludes = [include_directories(example)]\n \tdeps = ['eal', 'mempool', 'net', 'mbuf', 'ethdev', 'cmdline']\ndiff --git a/lib/meson.build b/lib/meson.build\nindex 9d11571f9..fefb3605d 100644\n--- a/lib/meson.build\n+++ b/lib/meson.build\n@@ -34,6 +34,10 @@ foreach l:libraries\n \theaders = []\n \tincludes = []\n \tcflags = machine_args\n+\tif cc.has_argument('-Wno-format-truncation')\n+\t    cflags += '-Wno-format-truncation'\n+\tendif\n+\n \tobjs = [] # other object files to link against, used e.g. for\n \t          # instruction-set optimized versions of code\n \ndiff --git a/test/test/meson.build b/test/test/meson.build\nindex a907fd256..dc4ba5514 100644\n--- a/test/test/meson.build\n+++ b/test/test/meson.build\n@@ -235,6 +235,11 @@ if dpdk_conf.has('RTE_LIBRTE_KNI')\n \ttest_deps += 'kni'\n endif\n \n+cflags = machine_args\n+if cc.has_argument('-Wno-format-truncation')\n+    cflags += '-Wno-format-truncation'\n+endif\n+\n test_dep_objs = []\n compress_test_dep = dependency('zlib', required: false)\n if compress_test_dep.found()\n@@ -260,7 +265,7 @@ if get_option('tests')\n \t\ttest_sources,\n \t\tlink_whole: link_libs,\n \t\tdependencies: test_dep_objs,\n-\t\tc_args: [machine_args, '-DALLOW_EXPERIMENTAL_API'],\n+\t\tc_args: [cflags, '-DALLOW_EXPERIMENTAL_API'],\n \t\tinstall_rpath: driver_install_path,\n \t\tinstall: false)\n \n",
    "prefixes": [
        "v13",
        "5/6"
    ]
}