get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 69646,
    "url": "http://patchwork.dpdk.org/api/patches/69646/?format=api",
    "web_url": "http://patchwork.dpdk.org/project/dpdk/patch/20200501135401.28124-6-bruce.richardson@intel.com/",
    "project": {
        "id": 1,
        "url": "http://patchwork.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",
        "list_archive_url": "https://inbox.dpdk.org/dev",
        "list_archive_url_format": "https://inbox.dpdk.org/dev/{}",
        "commit_url_format": ""
    },
    "msgid": "<20200501135401.28124-6-bruce.richardson@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20200501135401.28124-6-bruce.richardson@intel.com",
    "date": "2020-05-01T13:53:59",
    "name": "[v2,5/7] build/pkg-config: output driver libs first for static build",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "45294e06e7c9cfc9e6ca6bb503e860516d59b1fb",
    "submitter": {
        "id": 20,
        "url": "http://patchwork.dpdk.org/api/people/20/?format=api",
        "name": "Bruce Richardson",
        "email": "bruce.richardson@intel.com"
    },
    "delegate": {
        "id": 1,
        "url": "http://patchwork.dpdk.org/api/users/1/?format=api",
        "username": "tmonjalo",
        "first_name": "Thomas",
        "last_name": "Monjalon",
        "email": "thomas@monjalon.net"
    },
    "mbox": "http://patchwork.dpdk.org/project/dpdk/patch/20200501135401.28124-6-bruce.richardson@intel.com/mbox/",
    "series": [
        {
            "id": 9778,
            "url": "http://patchwork.dpdk.org/api/series/9778/?format=api",
            "web_url": "http://patchwork.dpdk.org/project/dpdk/list/?series=9778",
            "date": "2020-05-01T13:53:54",
            "name": "improve DPDK static builds with meson",
            "version": 2,
            "mbox": "http://patchwork.dpdk.org/series/9778/mbox/"
        }
    ],
    "comments": "http://patchwork.dpdk.org/api/patches/69646/comments/",
    "check": "success",
    "checks": "http://patchwork.dpdk.org/api/patches/69646/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<dev-bounces@dpdk.org>",
        "X-Original-To": "patchwork@inbox.dpdk.org",
        "Delivered-To": "patchwork@inbox.dpdk.org",
        "Received": [
            "from dpdk.org (dpdk.org [92.243.14.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id 256F6A04AD;\n\tFri,  1 May 2020 16:00:06 +0200 (CEST)",
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id C24CA1DA81;\n\tFri,  1 May 2020 15:59:39 +0200 (CEST)",
            "from mga09.intel.com (mga09.intel.com [134.134.136.24])\n by dpdk.org (Postfix) with ESMTP id 7E7851DA73\n for <dev@dpdk.org>; Fri,  1 May 2020 15:59:38 +0200 (CEST)",
            "from orsmga005.jf.intel.com ([10.7.209.41])\n by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 01 May 2020 06:59:38 -0700",
            "from silpixa00399126.ir.intel.com ([10.237.222.218])\n by orsmga005.jf.intel.com with ESMTP; 01 May 2020 06:59:36 -0700"
        ],
        "IronPort-SDR": [
            "\n jPoZdpxMfWgq8YydH81x7eV+lwCf+3s8m5ME+o3yl4nX5pCsbk2Dm8CrtJMkuanB7GIMhtcSRL\n JfRfIOc0C9fQ==",
            "\n VrF5GIyPnW1SIpFJmbLCPXhqloGj9ZE7DWn3801nvtoynwrZW+W3+A1Qf88sc7RaQRI+V6YVpm\n ni65iaXfEq8Q=="
        ],
        "X-Amp-Result": "SKIPPED(no attachment in message)",
        "X-Amp-File-Uploaded": "False",
        "X-ExtLoop1": "1",
        "X-IronPort-AV": "E=Sophos;i=\"5.73,339,1583222400\"; d=\"scan'208\";a=\"433318901\"",
        "From": "Bruce Richardson <bruce.richardson@intel.com>",
        "To": "dev@dpdk.org",
        "Cc": "thomas@monjalon.net, bluca@debian.org, david.marchand@redhat.com,\n ktraynor@redhat.com, Bruce Richardson <bruce.richardson@intel.com>",
        "Date": "Fri,  1 May 2020 14:53:59 +0100",
        "Message-Id": "<20200501135401.28124-6-bruce.richardson@intel.com>",
        "X-Mailer": "git-send-email 2.20.1",
        "In-Reply-To": "<20200501135401.28124-1-bruce.richardson@intel.com>",
        "References": "<20200429100831.398-1-bruce.richardson@intel.com>\n <20200501135401.28124-1-bruce.richardson@intel.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[dpdk-dev] [PATCH v2 5/7] build/pkg-config: output driver libs\n\tfirst for static build",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.15",
        "Precedence": "list",
        "List-Id": "DPDK patches and discussions <dev.dpdk.org>",
        "List-Unsubscribe": "<https://mails.dpdk.org/options/dev>,\n <mailto:dev-request@dpdk.org?subject=unsubscribe>",
        "List-Archive": "<http://mails.dpdk.org/archives/dev/>",
        "List-Post": "<mailto:dev@dpdk.org>",
        "List-Help": "<mailto:dev-request@dpdk.org?subject=help>",
        "List-Subscribe": "<https://mails.dpdk.org/listinfo/dev>,\n <mailto:dev-request@dpdk.org?subject=subscribe>",
        "Errors-To": "dev-bounces@dpdk.org",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>"
    },
    "content": "When calling pkg-config --static --libs, pkg-config will always output the\nregular libs first, and then the extra libs from libraries.private field,\nsince the assumption is that those are additional dependencies for building\nstatically that the .a files depend upon.\n\nHowever, for DPDK, we only link the driver files for static builds, and\nthose need to come *before* the regular libraries. To get this result, we\nneed two pkgconfig files for DPDK, one for the shared libs, and a second\nfor the static libs and drivers, which depends upon the first. Using a\ndependency means that the shared libs are printed only after the\nlibraries.private field rather than before.\n\nWithout this patch, the linking works in DPDK because in all cases we\nspecify the libraries after the drivers in the Libs.private line, ensuring\nthat the references to the libs from the drivers can be resolved. The\ncurrent output is therefore of the form, \"(shared)libs, drivers,\n(static)libs\", while after this patch the output is, \"drivers,\n(static)libs, (shared)libs\". The former case will not work if we use the\n--whole-archive flag on the static libs as it will lead to duplicate\ndefinitions due to some references having been previously resolved from the\nshared libraries. By ensuring the shared libraries come last in the link\nlink, this issue does not occur, as duplicate references when linking the\nshared libs will be ignored.\n\nSigned-off-by: Bruce Richardson <bruce.richardson@intel.com>\n---\nV2: expanded commit log message with extra info, and updated pkg-config\nfile description to make it clearer that one file is internal-only\n---\n buildtools/pkg-config/meson.build | 33 +++++++++++++++++++++++--------\n 1 file changed, 25 insertions(+), 8 deletions(-)",
    "diff": "diff --git a/buildtools/pkg-config/meson.build b/buildtools/pkg-config/meson.build\nindex 85d59972d..aabd00eed 100644\n--- a/buildtools/pkg-config/meson.build\n+++ b/buildtools/pkg-config/meson.build\n@@ -10,17 +10,34 @@ pkg_extra_cflags = ['-include', 'rte_config.h'] + machine_args\n if is_freebsd\n \tpkg_extra_cflags += ['-D__BSD_VISIBLE']\n endif\n-pkg.generate(name: meson.project_name(),\n-\tfilebase: 'lib' + meson.project_name().to_lower(),\n+\n+# When calling pkg-config --static --libs, pkg-config will always output the\n+# regular libs first, and then the extra libs from libraries.private field,\n+# since the assumption is that those are additional dependencies for building\n+# statically that the .a files depend upon. However, for DPDK, we only link\n+# the driver files for static builds, and those need to come *before* the\n+# regular libraries. To get this result, we need two pkgconfig files for DPDK,\n+# one for the shared libs, and a second for the static libs and drivers, which\n+# depends upon the first. Using a dependency means that the shared libs are\n+# printed only after the libraries.private field rather than before.\n+pkg.generate(name: 'dpdk-libs',\n+\tfilebase: 'libdpdk-libs',\n+\tdescription: '''Internal-only DPDK pkgconfig file. Not for direct use.\n+Use libdpdk.pc instead of this file to query DPDK compile/link arguments''',\n \tversion: meson.project_version(),\n+\tsubdirs: [get_option('include_subdir_arch'), '.'],\n+\textra_cflags: pkg_extra_cflags,\n \tlibraries: dpdk_libraries,\n-\tlibraries_private: dpdk_drivers + dpdk_static_libraries +\n-\t\t\t['-Wl,-Bdynamic'] + dpdk_extra_ldflags,\n-\trequires: libbsd, # apps using rte_string_fns.h may need this if enabled\n-\t                  # if libbsd is not enabled, then this is blank\n+\tlibraries_private: dpdk_extra_ldflags)\n+\n+pkg.generate(name: 'DPDK', # main DPDK pkgconfig file\n+\tfilebase: 'libdpdk',\n+\tversion: meson.project_version(),\n \tdescription: '''The Data Plane Development Kit (DPDK).\n Note that CFLAGS might contain an -march flag higher than typical baseline.\n This is required for a number of static inline functions in the public headers.''',\n-\tsubdirs: [get_option('include_subdir_arch'), '.'],\n-\textra_cflags: pkg_extra_cflags\n+\trequires: ['libdpdk-libs', libbsd], # may need libbsd for string funcs\n+\t                  # if libbsd is not enabled, then this is blank\n+\tlibraries_private: dpdk_drivers + dpdk_static_libraries +\n+\t\t\t['-Wl,-Bdynamic']\n )\n",
    "prefixes": [
        "v2",
        "5/7"
    ]
}