get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 72461,
    "url": "https://patches.dpdk.org/api/patches/72461/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/20200630141433.818517-6-bruce.richardson@intel.com/",
    "project": {
        "id": 1,
        "url": "https://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",
        "list_archive_url": "https://inbox.dpdk.org/dev",
        "list_archive_url_format": "https://inbox.dpdk.org/dev/{}",
        "commit_url_format": ""
    },
    "msgid": "<20200630141433.818517-6-bruce.richardson@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20200630141433.818517-6-bruce.richardson@intel.com",
    "date": "2020-06-30T14:14:31",
    "name": "[v3,5/7] build/pkg-config: output driver libs first for static build",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "45294e06e7c9cfc9e6ca6bb503e860516d59b1fb",
    "submitter": {
        "id": 20,
        "url": "https://patches.dpdk.org/api/people/20/?format=api",
        "name": "Bruce Richardson",
        "email": "bruce.richardson@intel.com"
    },
    "delegate": {
        "id": 1,
        "url": "https://patches.dpdk.org/api/users/1/?format=api",
        "username": "tmonjalo",
        "first_name": "Thomas",
        "last_name": "Monjalon",
        "email": "thomas@monjalon.net"
    },
    "mbox": "https://patches.dpdk.org/project/dpdk/patch/20200630141433.818517-6-bruce.richardson@intel.com/mbox/",
    "series": [
        {
            "id": 10690,
            "url": "https://patches.dpdk.org/api/series/10690/?format=api",
            "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=10690",
            "date": "2020-06-30T14:14:26",
            "name": "improve DPDK static builds with meson",
            "version": 3,
            "mbox": "https://patches.dpdk.org/series/10690/mbox/"
        }
    ],
    "comments": "https://patches.dpdk.org/api/patches/72461/comments/",
    "check": "success",
    "checks": "https://patches.dpdk.org/api/patches/72461/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 97DA7A0350;\n\tTue, 30 Jun 2020 16:16:12 +0200 (CEST)",
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id E360D1C000;\n\tTue, 30 Jun 2020 16:15:23 +0200 (CEST)",
            "from mga09.intel.com (mga09.intel.com [134.134.136.24])\n by dpdk.org (Postfix) with ESMTP id AB49D1BFFE\n for <dev@dpdk.org>; Tue, 30 Jun 2020 16:15:22 +0200 (CEST)",
            "from fmsmga004.fm.intel.com ([10.253.24.48])\n by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 30 Jun 2020 07:15:22 -0700",
            "from silpixa00399126.ir.intel.com ([10.237.222.84])\n by fmsmga004.fm.intel.com with ESMTP; 30 Jun 2020 07:15:20 -0700"
        ],
        "IronPort-SDR": [
            "\n A5VqR/OvYFdHOMhDda/zg+OxHn3lxN/LQUHCBiBrceok+MMM4HD7gXFkP+r98SDQI2jhH9sU5Z\n +L2zTK43lQ/Q==",
            "\n poTPPBE64p38EQVnUwx/YKOKzB05aYtdCDglIkn1RSKC1tBiXna/7rvzkPsOK/Zuy+DrOLTaIX\n /61yDsoFIPvA=="
        ],
        "X-IronPort-AV": [
            "E=McAfee;i=\"6000,8403,9666\"; a=\"147784758\"",
            "E=Sophos;i=\"5.75,297,1589266800\"; d=\"scan'208\";a=\"147784758\"",
            "E=Sophos;i=\"5.75,297,1589266800\"; d=\"scan'208\";a=\"303471550\""
        ],
        "X-Amp-Result": "SKIPPED(no attachment in message)",
        "X-Amp-File-Uploaded": "False",
        "X-ExtLoop1": "1",
        "From": "Bruce Richardson <bruce.richardson@intel.com>",
        "To": "dev@dpdk.org",
        "Cc": "thomas@monjalon.net, david.marchand@redhat.com, ktraynor@redhat.com,\n bluca@debian.org, sunil.pai.g@intel.com,\n Bruce Richardson <bruce.richardson@intel.com>",
        "Date": "Tue, 30 Jun 2020 15:14:31 +0100",
        "Message-Id": "<20200630141433.818517-6-bruce.richardson@intel.com>",
        "X-Mailer": "git-send-email 2.25.1",
        "In-Reply-To": "<20200630141433.818517-1-bruce.richardson@intel.com>",
        "References": "<20200429100831.398-1-bruce.richardson@intel.com>\n <20200630141433.818517-1-bruce.richardson@intel.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[dpdk-dev] [PATCH v3 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>\nAcked-by: Luca Boccassi <bluca@debian.org>\nAcked-by: Sunil Pai G <sunil.pai.g@intel.com>\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": [
        "v3",
        "5/7"
    ]
}