Patch Detail
Show a patch.
GET /api/patches/16597/?format=api
{ "id": 16597, "url": "https://patchwork.libcamera.org/api/patches/16597/?format=api", "web_url": "https://patchwork.libcamera.org/patch/16597/", "project": { "id": 1, "url": "https://patchwork.libcamera.org/api/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": "<20220713020320.19636-1-laurent.pinchart@ideasonboard.com>", "date": "2022-07-13T02:03:20", "name": "[libcamera-devel] libcamera: base: Suppress clang-11 compile error on ARM32", "commit_ref": "1fa2d579de9af84b4e419a568de193c0e1e57ac7", "pull_url": null, "state": "accepted", "archived": false, "hash": "1e8fabdfa7b145687e9eb57d3c77049eaf4e811e", "submitter": { "id": 2, "url": "https://patchwork.libcamera.org/api/people/2/?format=api", "name": "Laurent Pinchart", "email": "laurent.pinchart@ideasonboard.com" }, "delegate": null, "mbox": "https://patchwork.libcamera.org/patch/16597/mbox/", "series": [ { "id": 3275, "url": "https://patchwork.libcamera.org/api/series/3275/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=3275", "date": "2022-07-13T02:03:20", "name": "[libcamera-devel] libcamera: base: Suppress clang-11 compile error on ARM32", "version": 1, "mbox": "https://patchwork.libcamera.org/series/3275/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/16597/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/16597/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 3655EBE173\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed, 13 Jul 2022 02:03:58 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 979A06330F;\n\tWed, 13 Jul 2022 04:03:57 +0200 (CEST)", "from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 78DD76048B\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 13 Jul 2022 04:03:56 +0200 (CEST)", "from pendragon.lan (62-78-145-57.bb.dnainternet.fi [62.78.145.57])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id B4189305;\n\tWed, 13 Jul 2022 04:03:55 +0200 (CEST)" ], "DKIM-Signature": [ "v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1657677837;\n\tbh=G4q/KTyhoEC034/ymuEHsZDqlTDQU45oNfLGvGsepbo=;\n\th=To:Date:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post:\n\tList-Help:List-Subscribe:From:Reply-To:From;\n\tb=4YqcneRNt0/kZ75SiDwZQGGN46oTFXd/q+bL8AdiPKEfhEMbQGwaaELdTPhmgz6Da\n\teIfOUMM4JJq08J8z3ZlXxvunER8N7xS1jcJDvobM2k4Rvp20dYQJzi/LTmQs4SxRRA\n\tNrJWbBlZAs9Q6Fd6KppvZS4JBD9IadAjBRs3v4brAkm7zB3iFNd4aGfF/mI3k0In1w\n\t7bbyAQDiqNMym5donpfFmV95v6LNgxn7u4VZod0cC24IWn6xNSK0q1otnumEOU+yPU\n\tTQJbtCNE8K3qibYI9dIduF4RBv2H4EYL6i+sDURTeTgcbuswaZ9tTl5LVt+Avg6UKt\n\tYc1lkRtWHq6rQ==", "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1657677836;\n\tbh=G4q/KTyhoEC034/ymuEHsZDqlTDQU45oNfLGvGsepbo=;\n\th=From:To:Cc:Subject:Date:From;\n\tb=S0uJ0ul+4dnScTJIBBWFBjBnS4b80zxBEohSdbj6I2HFtSm0E6GM5hp+fVmykPP0S\n\tJwpPT6rB5kbK2Ga7KP6TLdzVoF0EKLlsFLP11nkPjgd9KCd3yW+b7tH06FKf1GDdKL\n\tgA3AmULgRsYhqQKRshGV6yXdTs667L7BWHq3vKWA=" ], "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"S0uJ0ul+\"; dkim-atps=neutral", "To": "libcamera-devel@lists.libcamera.org", "Date": "Wed, 13 Jul 2022 05:03:20 +0300", "Message-Id": "<20220713020320.19636-1-laurent.pinchart@ideasonboard.com>", "X-Mailer": "git-send-email 2.35.1", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Subject": "[libcamera-devel] [PATCH] libcamera: base: Suppress clang-11\n\tcompile error on ARM32", "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": "Laurent Pinchart via libcamera-devel\n\t<libcamera-devel@lists.libcamera.org>", "Reply-To": "Laurent Pinchart <laurent.pinchart@ideasonboard.com>", "Errors-To": "libcamera-devel-bounces@lists.libcamera.org", "Sender": "\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>" }, "content": "From: Naushir Patuck <naush@raspberrypi.com>\n\nCompiling backtrace.cpp for ARM32 produces the following error with the\nclang-11 (and later) compiler:\n\n--------------------\n../src/libcamera/base/backtrace.cpp:195:12: error: use of SP or PC in the list is deprecated [-Werror,-Winline-asm]\n int ret = unw_getcontext(&uc);\n ^\n/usr/include/arm-linux-gnueabihf/libunwind-common.h:114:29: note: expanded from macro 'unw_getcontext'\n ^\n/usr/include/arm-linux-gnueabihf/libunwind-arm.h:270:5: note: expanded from macro 'unw_tdep_getcontext'\n \"stmia %[base], {r0-r15}\" \\\n ^\n<inline asm>:1:2: note: instantiated into assembly here\n stmia r0, {r0-r15}\n--------------------\n\nSuppress this compilation error with a clang-specific pragma around the\noffending statements.\n\nFurther information about this error can be found at\nhttps://github.com/dotnet/runtime/issues/38652\n\nBug: https://bugs.libcamera.org/show_bug.cgi?id=136\nSigned-off-by: Naushir Patuck <naush@raspberrypi.com>\nTested-by: Jacopo Mondi <jacopo@jmondi.org>\nReviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\nReviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n---\n src/libcamera/base/backtrace.cpp | 12 ++++++++++++\n 1 file changed, 12 insertions(+)\n\n\nbase-commit: ba6435930f08e802cffc688d90f156a8959a0f86", "diff": "diff --git a/src/libcamera/base/backtrace.cpp b/src/libcamera/base/backtrace.cpp\nindex 483492c390c3..be30589d255e 100644\n--- a/src/libcamera/base/backtrace.cpp\n+++ b/src/libcamera/base/backtrace.cpp\n@@ -191,10 +191,22 @@ __attribute__((__noinline__))\n bool Backtrace::unwindTrace()\n {\n #if HAVE_UNWIND\n+/*\n+ * unw_getcontext() for ARM32 is an inline assembly function using the stmia\n+ * instruction to store SP and PC. This is considered by clang-11 as deprecated,\n+ * and generates a warning.\n+ */\n+#ifdef __clang__\n+#pragma clang diagnostic push\n+#pragma clang diagnostic ignored \"-Winline-asm\"\n+#endif\n \tunw_context_t uc;\n \tint ret = unw_getcontext(&uc);\n \tif (ret)\n \t\treturn false;\n+#ifdef __clang__\n+#pragma clang diagnostic pop\n+#endif\n \n \tunw_cursor_t cursor;\n \tret = unw_init_local(&cursor, &uc);\n", "prefixes": [ "libcamera-devel" ] }