Show a patch.

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

{
    "id": 18983,
    "url": "https://patchwork.libcamera.org/api/1.1/patches/18983/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/18983/",
    "project": {
        "id": 1,
        "url": "https://patchwork.libcamera.org/api/1.1/projects/1/?format=api",
        "name": "libcamera",
        "link_name": "libcamera",
        "list_id": "libcamera_core",
        "list_email": "libcamera-devel@lists.libcamera.org",
        "web_url": "",
        "scm_url": "",
        "webscm_url": ""
    },
    "msgid": "<20230911230909.1263308-1-gbiv@google.com>",
    "date": "2023-09-11T23:09:07",
    "name": "[libcamera-devel,v2] meson: Don't set _FORTIFY_SOURCE for ChromeOS",
    "commit_ref": "9c5eb9237cf6ae170086f0d4d87a025aa052cc9f",
    "pull_url": null,
    "state": "accepted",
    "archived": false,
    "hash": "840047a05eed00058694daf140f69f5f03e009a9",
    "submitter": {
        "id": 172,
        "url": "https://patchwork.libcamera.org/api/1.1/people/172/?format=api",
        "name": "George Burgess",
        "email": "gbiv@google.com"
    },
    "delegate": null,
    "mbox": "https://patchwork.libcamera.org/patch/18983/mbox/",
    "series": [
        {
            "id": 4015,
            "url": "https://patchwork.libcamera.org/api/1.1/series/4015/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=4015",
            "date": "2023-09-11T23:09:07",
            "name": "[libcamera-devel,v2] meson: Don't set _FORTIFY_SOURCE for ChromeOS",
            "version": 2,
            "mbox": "https://patchwork.libcamera.org/series/4015/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/18983/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/18983/checks/",
    "tags": {},
    "headers": {
        "Return-Path": "<libcamera-devel-bounces@lists.libcamera.org>",
        "X-Original-To": "parsemail@patchwork.libcamera.org",
        "Delivered-To": "parsemail@patchwork.libcamera.org",
        "Received": [
            "from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id D9A5FBE080\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 11 Sep 2023 23:09:19 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 2881D628F2;\n\tTue, 12 Sep 2023 01:09:19 +0200 (CEST)",
            "from mail-yb1-xb49.google.com (mail-yb1-xb49.google.com\n\t[IPv6:2607:f8b0:4864:20::b49])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 4C1DF61DF4\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 12 Sep 2023 01:09:17 +0200 (CEST)",
            "by mail-yb1-xb49.google.com with SMTP id\n\t3f1490d57ef6-d807e997f91so2111197276.3\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 11 Sep 2023 16:09:17 -0700 (PDT)"
        ],
        "DKIM-Signature": [
            "v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1694473759;\n\tbh=j7r1fndHzVuZlj6VooC4IZqwEwAQ+wkoddemPJtR7VI=;\n\th=Date:To:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post:\n\tList-Help:List-Subscribe:From:Reply-To:Cc:From;\n\tb=BE7F1O5IKQDDkyzxeSX22i6uJ0BDWklKSKaddAbua9/hWOYqO+6bsadB6ej5nX+SW\n\tggBJf0wV+VbJWvOStVimzjF3naVMq7kyJULoIBiVt5HEWtItLoDGOitQDVKYKii8hS\n\tDw3OC5JZDWkbYJd2gjpNELAvHPSw1iaYWunfyG7X0TyOmXWGz2PGScj+ntm5Pozehe\n\tXQrEEmybWVf4jm4t2OpR9U6werGhheGSZrrnkuyAmC8LF7Y321XHTRsvjxfpU3SLwA\n\tatQ84TXxteb1a1yoqG9Iwq/wZq9lR326ZqXgf63dYeH+ww5aXiJybigoELWf5c9/Bo\n\t9h7wGHLY62FiA==",
            "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=google.com; s=20230601; t=1694473756; x=1695078556;\n\tdarn=lists.libcamera.org; \n\th=cc:to:from:subject:message-id:mime-version:date:from:to:cc:subject\n\t:date:message-id:reply-to;\n\tbh=LXSGmB1dX+lIWWKMojbf1lcaEpbumeMMG/bLOSHdU34=;\n\tb=ZzPYhVZJCAWxkbd1n15/IhgO4oAGuGOwfZNt1Ccrb9ffSIWWYRe3waL579OWMdE7d0\n\t7JiG5TH/Er1Ah8XDssFQnPpdiW0uj4NJF6AOIgm6Ckio+3h+C4MBw0I4SglEm/JM3GFv\n\tdo5vWEb/+72DpjbqBbT8PGmmX1pDaf/Spov4oV2+fwonDFKyv6t/AmS9z7vpEkqD2pNb\n\tXukhtM/SBa5Vbk0igrey78029+irys+mMnqAifOL8qBh+yU+M3cGdkecM8pnN7F3lfC9\n\toOl+DL0sm31UOHJ/D4KBmpplwOIHg7ISPna+nGC9EyERqhev8x+OVwmuqEr3MOgOc7AX\n\tkVKw=="
        ],
        "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (2048-bit key; \n\tunprotected) header.d=google.com\n\theader.i=@google.com header.b=\"ZzPYhVZJ\"; \n\tdkim-atps=neutral",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20230601; t=1694473756; x=1695078556;\n\th=cc:to:from:subject:message-id:mime-version:date:x-gm-message-state\n\t:from:to:cc:subject:date:message-id:reply-to;\n\tbh=LXSGmB1dX+lIWWKMojbf1lcaEpbumeMMG/bLOSHdU34=;\n\tb=NtcI98NUnZpnIxaZY78ElTUm52X2uMGbvXYQRnBkS/Wyh4nveUn40U7ICGCIUpXJ9x\n\tBBF+RFZp3QNmQHPsSXFJUm3F7Ql0M5RGMyUdCSkh+pBA/QTTi9g2goaY//PYUjGiFrC7\n\tDnYCXprreIHccLRYOMxTW5vW/VK46h67HlGl0ye20lCZjgpOCy3k95lOSgkHwS0XmNca\n\tX7ObwnD6YHF0gNQojyO7WEsx4TTCELDvro2KqeWEu34j4BIiwi6xoXK70iU+fMIzK36W\n\tRgNmThpiewEhupKUi/oCJvBQ9ALoSkda5tVePlwD/uldxwe2MJBT3DiHb3aGtKsgJMXR\n\tLK6g==",
        "X-Gm-Message-State": "AOJu0YwQFkhYKinuArfpXEXrap2JidK3wc9MsX6P9MAG5sfBC8hMICp0\n\tRJka4+Hb/FX/MISxpFyZFEZdnBbddxJRjmOdV8qbQ/atfG9a4sMLSI5BY8X6isso2+g2TtGhymB\n\tVoQRB3AYFSK78LQmm2jbULJwk/gpelFsn6EtK59JW9PMKEg4e7jp1ma8Lsjpra4356bFqlnr3+A\n\t==",
        "X-Google-Smtp-Source": "AGHT+IGHa7JD2qRYp68CEhsZ/i9QDpWU5VYXdxT0RuPyPFnoZ2lPDpW4prmSv494F3MaEgOq4XGzzkmM",
        "X-Received": "from gbivco.c.googlers.com\n\t([fda3:e722:ac3:cc00:2b:ff92:c0a8:22d5])\n\t(user=gbiv job=sendgmr) by 2002:a25:a1ca:0:b0:d78:2c3:e633 with SMTP\n\tid\n\ta68-20020a25a1ca000000b00d7802c3e633mr232327ybi.2.1694473755901;\n\tMon, 11 Sep 2023 16:09:15 -0700 (PDT)",
        "Date": "Mon, 11 Sep 2023 17:09:07 -0600",
        "Mime-Version": "1.0",
        "X-Mailer": "git-send-email 2.42.0.283.g2d96d420d3-goog",
        "Message-ID": "<20230911230909.1263308-1-gbiv@google.com>",
        "To": "libcamera-devel@lists.libcamera.org",
        "Content-Type": "text/plain; charset=\"UTF-8\"",
        "Subject": "[libcamera-devel] [PATCH v2] meson: Don't set _FORTIFY_SOURCE for\n\tChromeOS",
        "X-BeenThere": "libcamera-devel@lists.libcamera.org",
        "X-Mailman-Version": "2.1.29",
        "Precedence": "list",
        "List-Id": "<libcamera-devel.lists.libcamera.org>",
        "List-Unsubscribe": "<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>",
        "List-Archive": "<https://lists.libcamera.org/pipermail/libcamera-devel/>",
        "List-Post": "<mailto:libcamera-devel@lists.libcamera.org>",
        "List-Help": "<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>",
        "List-Subscribe": "<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>",
        "From": "George Burgess IV via libcamera-devel\n\t<libcamera-devel@lists.libcamera.org>",
        "Reply-To": "George Burgess IV <gbiv@google.com>",
        "Cc": "George Burgess IV <gbiv@google.com>",
        "Errors-To": "libcamera-devel-bounces@lists.libcamera.org",
        "Sender": "\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"
    },
    "content": "ChromeOS is moving to a platform default of `_FORTIFY_SOURCE=3`, and\nthis definition conflicts with that:\n\n<command line>:4:9: error: '_FORTIFY_SOURCE' macro redefined\n[-Werror,-Wmacro-redefined]\n\nRather than adding logic to keep up with their local configuration, it\nseems best to leave setting _FORTIFY_SOURCE on ChromeOS up to ChromeOS.\n\nSigned-off-by: George Burgess IV <gbiv@google.com>\n---\n meson.build | 24 +++++++++++++++++++-----\n 1 file changed, 19 insertions(+), 5 deletions(-)",
    "diff": "diff --git a/meson.build b/meson.build\nindex 7959b538..2e834263 100644\n--- a/meson.build\n+++ b/meson.build\n@@ -99,12 +99,26 @@ if cc.get_id() == 'clang'\n         error('clang version is too old, libcamera requires 9.0 or newer')\n     endif\n \n-    # Turn _FORTIFY_SOURCE by default on optimised builds (as it requires -O1\n-    # or higher). This is needed on clang only as gcc enables it by default.\n+    # Turn _FORTIFY_SOURCE by default on. This is needed on clang only as gcc\n+    # enables it by default. FORTIFY will not work properly with `-O0`, and may\n+    # result in macro redefinition errors if the user already has a setting for\n+    # `-D_FORTIFY_SOURCE`. Do not enable FORTIFY in either of those cases.\n     if get_option('optimization') != '0'\n-        common_arguments += [\n-            '-D_FORTIFY_SOURCE=2',\n-        ]\n+        has_fortify_define = false\n+        # Assume that if the user requests a FORTIFY level in cpp_args, they\n+        # do the same for c_args.\n+        foreach flag : get_option('cpp_args')\n+            if flag == '-U_FORTIFY_SOURCE'\n+                has_fortify_define = false\n+            elif flag.startswith('-D_FORTIFY_SOURCE=')\n+                has_fortify_define = true\n+            endif\n+        endforeach\n+        if not has_fortify_define\n+            common_arguments += [\n+                '-D_FORTIFY_SOURCE=2',\n+            ]\n+        endif\n     endif\n \n     # Use libc++ by default if available instead of libstdc++ when compiling\n",
    "prefixes": [
        "libcamera-devel",
        "v2"
    ]
}