[{"id":23838,"web_url":"https://patchwork.libcamera.org/comment/23838/","msgid":"<20220712142452.rcxxeeq6hrsygkzt@uno.localdomain>","date":"2022-07-12T14:24:52","subject":"Re: [libcamera-devel] [PATCH] libcamera: base: Remove ARM clang-11\n\tcompile error","submitter":{"id":3,"url":"https://patchwork.libcamera.org/api/people/3/","name":"Jacopo Mondi","email":"jacopo@jmondi.org"},"content":"Hi Naush,\n\nOn Tue, Jul 12, 2022 at 02:01:38PM +0100, Naushir Patuck via libcamera-devel wrote:\n> Compiling backtrace.cpp produces the follwing error with the ARM clang-11 (and\n> later) compiler:\n\nLet's add \"on arm32 systems\"\n\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>\n> Suppress this compilation error with a clang specific pragma around the\n> offending statements.\n>\n> Further information about this error can be found here:\n> https://github.com/dotnet/runtime/issues/5\n>\n> Signed-off-by: Naushir Patuck <naush@raspberrypi.com>\n\nGreat, it fixes the build indeed!\n\nTested-by: Jacopo Mondi <jacopo@jmondi.org>\n\nThanks\n   j\n\n> ---\n>  src/libcamera/base/backtrace.cpp | 10 ++++++++++\n>  1 file changed, 10 insertions(+)\n>\n> diff --git a/src/libcamera/base/backtrace.cpp b/src/libcamera/base/backtrace.cpp\n> index 483492c390c3..b8ae2f6dc331 100644\n> --- a/src/libcamera/base/backtrace.cpp\n> +++ b/src/libcamera/base/backtrace.cpp\n> @@ -191,11 +191,21 @@ __attribute__((__noinline__))\n>  bool Backtrace::unwindTrace()\n>  {\n>  #if HAVE_UNWIND\n> +\n> +#if __clang__\n> +#pragma clang diagnostic push\n> +#pragma clang diagnostic ignored \"-Winline-asm\"\n> +#endif\n> +\n>  \tunw_context_t uc;\n>  \tint ret = unw_getcontext(&uc);\n>  \tif (ret)\n>  \t\treturn false;\n>\n> +#if __clang__\n> +#pragma clang diagnostic pop\n> +#endif\n> +\n>  \tunw_cursor_t cursor;\n>  \tret = unw_init_local(&cursor, &uc);\n>  \tif (ret)\n> --\n> 2.25.1\n>","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 D0A70BE173\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 12 Jul 2022 14:24:56 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 11D2C6330F;\n\tTue, 12 Jul 2022 16:24:56 +0200 (CEST)","from relay2-d.mail.gandi.net (relay2-d.mail.gandi.net\n\t[217.70.183.194])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id AC63060402\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 12 Jul 2022 16:24:54 +0200 (CEST)","(Authenticated sender: jacopo@jmondi.org)\n\tby mail.gandi.net (Postfix) with ESMTPSA id 0AC244000D;\n\tTue, 12 Jul 2022 14:24:53 +0000 (UTC)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1657635896;\n\tbh=mXEiNXp239lJmY6Yur0Z4g/YT+8eeojjR2WncQjO9A8=;\n\th=Date:To:References:In-Reply-To:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc:\n\tFrom;\n\tb=uGJe/0hrLiQPG7wx1uRjcIJkc3kF+cxfhrs2JV+udmKaQBVQMiB5VW8724urBlenb\n\tdMj1oEKD7bsE9HaK9R4MOxMAdfiF4nDVKMZJQxOYDb8YkR/FgvX41Bu7Ci9AFPO+kW\n\t1JmEWmM2nO0rViEpBbrna8WSxZK1jqe7l6dbqyS34HVqAEhBimYK2tRdMquzlolOqO\n\tSJUKLRMBkGZeohPrLMFwczvIhs7EqMFkbSG6L2HCPAqxHv84tfasEf+BS1S8VCLZik\n\tXkipCXQIVhTpyQrysXbTB3s/7cC9W726JUy5HqKDoCUyEzXSR2yyEVGQYOHfb4zJow\n\tP5Skahg2YWatQ==","Date":"Tue, 12 Jul 2022 16:24:52 +0200","To":"Naushir Patuck <naush@raspberrypi.com>","Message-ID":"<20220712142452.rcxxeeq6hrsygkzt@uno.localdomain>","References":"<20220712130138.25084-1-naush@raspberrypi.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<20220712130138.25084-1-naush@raspberrypi.com>","Subject":"Re: [libcamera-devel] [PATCH] libcamera: base: Remove ARM clang-11\n\tcompile error","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":"Jacopo Mondi via libcamera-devel <libcamera-devel@lists.libcamera.org>","Reply-To":"Jacopo Mondi <jacopo@jmondi.org>","Cc":"libcamera-devel@lists.libcamera.org","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":23839,"web_url":"https://patchwork.libcamera.org/comment/23839/","msgid":"<CAEmqJPrni5CB1wQmtMwOr5jC6CEZSDJAX44B9by5NDbivmz6KA@mail.gmail.com>","date":"2022-07-12T14:38:53","subject":"Re: [libcamera-devel] [PATCH] libcamera: base: Remove ARM clang-11\n\tcompile error","submitter":{"id":34,"url":"https://patchwork.libcamera.org/api/people/34/","name":"Naushir Patuck","email":"naush@raspberrypi.com"},"content":"Hi Jacopo,\n\nThank you for your feedback.\n\nOn Tue, 12 Jul 2022 at 15:24, Jacopo Mondi <jacopo@jmondi.org> wrote:\n\n> Hi Naush,\n>\n> On Tue, Jul 12, 2022 at 02:01:38PM +0100, Naushir Patuck via\n> libcamera-devel wrote:\n> > Compiling backtrace.cpp produces the follwing error with the ARM\n> clang-11 (and\n> > later) compiler:\n>\n> Let's add \"on arm32 systems\"\n>\n\nSure, no problem.  Presumably this can be done while applying?\n\nNaush\n\n\n\n>\n> >\n> > --------------------\n> > ../src/libcamera/base/backtrace.cpp:195:12: error: use of SP or PC in\n> 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:\n> expanded from macro 'unw_getcontext'\n> >                                         ^\n> > /usr/include/arm-linux-gnueabihf/libunwind-arm.h:270:5: note: expanded\n> 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> >\n> > Suppress this compilation error with a clang specific pragma around the\n> > offending statements.\n> >\n> > Further information about this error can be found here:\n> > https://github.com/dotnet/runtime/issues/5\n> >\n> > Signed-off-by: Naushir Patuck <naush@raspberrypi.com>\n>\n> Great, it fixes the build indeed!\n>\n> Tested-by: Jacopo Mondi <jacopo@jmondi.org>\n>\n> Thanks\n>    j\n>\n> > ---\n> >  src/libcamera/base/backtrace.cpp | 10 ++++++++++\n> >  1 file changed, 10 insertions(+)\n> >\n> > diff --git a/src/libcamera/base/backtrace.cpp\n> b/src/libcamera/base/backtrace.cpp\n> > index 483492c390c3..b8ae2f6dc331 100644\n> > --- a/src/libcamera/base/backtrace.cpp\n> > +++ b/src/libcamera/base/backtrace.cpp\n> > @@ -191,11 +191,21 @@ __attribute__((__noinline__))\n> >  bool Backtrace::unwindTrace()\n> >  {\n> >  #if HAVE_UNWIND\n> > +\n> > +#if __clang__\n> > +#pragma clang diagnostic push\n> > +#pragma clang diagnostic ignored \"-Winline-asm\"\n> > +#endif\n> > +\n> >       unw_context_t uc;\n> >       int ret = unw_getcontext(&uc);\n> >       if (ret)\n> >               return false;\n> >\n> > +#if __clang__\n> > +#pragma clang diagnostic pop\n> > +#endif\n> > +\n> >       unw_cursor_t cursor;\n> >       ret = unw_init_local(&cursor, &uc);\n> >       if (ret)\n> > --\n> > 2.25.1\n> >\n>","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 65286BD1F1\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 12 Jul 2022 14:39:11 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id C5AB160402;\n\tTue, 12 Jul 2022 16:39:10 +0200 (CEST)","from mail-lf1-x132.google.com (mail-lf1-x132.google.com\n\t[IPv6:2a00:1450:4864:20::132])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id C4C4360402\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 12 Jul 2022 16:39:08 +0200 (CEST)","by mail-lf1-x132.google.com with SMTP id o7so14270249lfq.9\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 12 Jul 2022 07:39:08 -0700 (PDT)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1657636750;\n\tbh=/SAjbRgB2l9xOQAvzdBcRi9QYQKpE39S0HuVxH6J91c=;\n\th=References:In-Reply-To:Date:To:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc:\n\tFrom;\n\tb=raOO+VSBbiNULdPvAQrnSbQYKPd2zSHL7QLoL9SCia77H2SSLsfJU3DHB35gg4q9r\n\tQdZL6OIjjUPXgyRwy2AeoYmz+YsHtdEIza1PZI7eviKYBjzhUvwwDz7FAzU8iK5TRD\n\tULdhVBm/ohf4hpaYtalnD7tCwvhn1iw1AXToGlBx4DT0q20eH7cq2Yv8UGcAmr6qDR\n\tlS2gdO3DG1kq/0r0a8AkkV2J1M6lGi5PogYEZ55G3+2Td3ydp8pO5bnp7VPM6/nBzK\n\tGGkffbuTmgXlDF2OKyyt0YJscKMHHPGtKxL+Ooq4K3w2fXASKuqrNl84RVF2GkZ6jH\n\t3SjLBDaUhYI/g==","v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=raspberrypi.com; s=google;\n\th=mime-version:references:in-reply-to:from:date:message-id:subject:to\n\t:cc; bh=xoc+Iyngn8XlP+DQIFVa4h+Njj3l9hCyE+JXmNzcO1Q=;\n\tb=ORlWQ3RccyzFtAmeyvtimjLc2BZ3n2yfFH/hosm3qVuKcOVlKXA4bfES0A37zamJ07\n\tjehW7TFShkJodWYvjTLydFRoo8VC7plzOXG3NHN9VMU9NBWHA2uT6EbkPyjg6folgCLn\n\tL3krMox9BhKlFYqmnIJ3twTkUn1ERxfsBiUvTrLtzQ4KMeHYhwrv9Qh4AOeZFAn5/rkp\n\tgyEjbXIrS0gcTJ7/u3HCEsLuCfj0M2iFyfUEypG5NtGXoeGRTIdNIvFzVNITsogmJ6Qv\n\tudD5jbLEkdSMAAKq5hsH41XGRawPC777dk36bQv8bBVc08wA0VM1qM4Kb2VL2BOZdOow\n\tORQw=="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (2048-bit key; \n\tunprotected) header.d=raspberrypi.com\n\theader.i=@raspberrypi.com\n\theader.b=\"ORlWQ3Rc\"; dkim-atps=neutral","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20210112;\n\th=x-gm-message-state:mime-version:references:in-reply-to:from:date\n\t:message-id:subject:to:cc;\n\tbh=xoc+Iyngn8XlP+DQIFVa4h+Njj3l9hCyE+JXmNzcO1Q=;\n\tb=jkX2vLLbBeyztwN2HElFMqykvKXsvzyxrvJRPM/2lPQK6BI1GSu9xlWF4olrRvJg3C\n\tDh26gCHa520G6ekklJgdUjPMap0Or3gjCSZyFRfAlGkiSW15BBYGk9qK037MaIWWNi8l\n\tM0WdXeOhLJalP3nMYnYZO4oLS8vtxDHR2KfiGYFA0qajg2z1tn6zizqXeUhDS8Br/MJq\n\tYLY6qWSa1YCQ+XDa1x93botoMY90lwgyYCaRyaOvaJd/6pKOiiOhL+FNdmiXcl3ogGQd\n\tmBdhBbEhvoiKQnRImd4ecwE+lCAOgzeTGiLZHC7fSSbX6m73CAdoOfPX6RIK0flQ6aEJ\n\tmNTg==","X-Gm-Message-State":"AJIora+cJaHq2vHt2S79b6hbRN9IgL3/WHbgjmbR5SL43urTgUroDdIh\n\tQtmQGmDbjoadi9wYP+xEW0eYumyC+D7BlU1qGJASuQ==","X-Google-Smtp-Source":"AGRyM1vlTrLkxeBhoS1+Yht8197GIwfMMTyw8hSqEkYmvcOa5yKnM3AWJn6moScbK6f5UQcyjhu+Guz2MGLOvUKdaXs=","X-Received":"by 2002:a05:6512:2316:b0:488:4e59:e1e8 with SMTP id\n\to22-20020a056512231600b004884e59e1e8mr15756359lfu.510.1657636747922;\n\tTue, 12 Jul 2022 07:39:07 -0700 (PDT)","MIME-Version":"1.0","References":"<20220712130138.25084-1-naush@raspberrypi.com>\n\t<20220712142452.rcxxeeq6hrsygkzt@uno.localdomain>","In-Reply-To":"<20220712142452.rcxxeeq6hrsygkzt@uno.localdomain>","Date":"Tue, 12 Jul 2022 15:38:53 +0100","Message-ID":"<CAEmqJPrni5CB1wQmtMwOr5jC6CEZSDJAX44B9by5NDbivmz6KA@mail.gmail.com>","To":"Jacopo Mondi <jacopo@jmondi.org>","Content-Type":"multipart/alternative; boundary=\"00000000000086dfa005e39ca155\"","Subject":"Re: [libcamera-devel] [PATCH] libcamera: base: Remove ARM clang-11\n\tcompile error","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":"Naushir Patuck via libcamera-devel\n\t<libcamera-devel@lists.libcamera.org>","Reply-To":"Naushir Patuck <naush@raspberrypi.com>","Cc":"libcamera devel <libcamera-devel@lists.libcamera.org>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":23840,"web_url":"https://patchwork.libcamera.org/comment/23840/","msgid":"<20220712161331.lujkfibcgwl5skoh@uno.localdomain>","date":"2022-07-12T16:13:31","subject":"Re: [libcamera-devel] [PATCH] libcamera: base: Remove ARM clang-11\n\tcompile error","submitter":{"id":3,"url":"https://patchwork.libcamera.org/api/people/3/","name":"Jacopo Mondi","email":"jacopo@jmondi.org"},"content":"Hi Naush,\n\nOn Tue, Jul 12, 2022 at 03:38:53PM +0100, Naushir Patuck wrote:\n> Hi Jacopo,\n>\n> Thank you for your feedback.\n>\n> On Tue, 12 Jul 2022 at 15:24, Jacopo Mondi <jacopo@jmondi.org> wrote:\n>\n> > Hi Naush,\n> >\n> > On Tue, Jul 12, 2022 at 02:01:38PM +0100, Naushir Patuck via\n> > libcamera-devel wrote:\n> > > Compiling backtrace.cpp produces the follwing error with the ARM\n> > clang-11 (and\n> > > later) compiler:\n> >\n> > Let's add \"on arm32 systems\"\n> >\n>\n> Sure, no problem.  Presumably this can be done while applying?\n>\n\nSure it does!\n\nLet's wait for one more review and merge this fast as it fixes a\ncompilation error.\n\nThanks\n   j\n\n> Naush\n>\n>\n>\n> >\n> > >\n> > > --------------------\n> > > ../src/libcamera/base/backtrace.cpp:195:12: error: use of SP or PC in\n> > 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:\n> > expanded from macro 'unw_getcontext'\n> > >                                         ^\n> > > /usr/include/arm-linux-gnueabihf/libunwind-arm.h:270:5: note: expanded\n> > 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> > >\n> > > Suppress this compilation error with a clang specific pragma around the\n> > > offending statements.\n> > >\n> > > Further information about this error can be found here:\n> > > https://github.com/dotnet/runtime/issues/5\n> > >\n> > > Signed-off-by: Naushir Patuck <naush@raspberrypi.com>\n> >\n> > Great, it fixes the build indeed!\n> >\n> > Tested-by: Jacopo Mondi <jacopo@jmondi.org>\n> >\n> > Thanks\n> >    j\n> >\n> > > ---\n> > >  src/libcamera/base/backtrace.cpp | 10 ++++++++++\n> > >  1 file changed, 10 insertions(+)\n> > >\n> > > diff --git a/src/libcamera/base/backtrace.cpp\n> > b/src/libcamera/base/backtrace.cpp\n> > > index 483492c390c3..b8ae2f6dc331 100644\n> > > --- a/src/libcamera/base/backtrace.cpp\n> > > +++ b/src/libcamera/base/backtrace.cpp\n> > > @@ -191,11 +191,21 @@ __attribute__((__noinline__))\n> > >  bool Backtrace::unwindTrace()\n> > >  {\n> > >  #if HAVE_UNWIND\n> > > +\n> > > +#if __clang__\n> > > +#pragma clang diagnostic push\n> > > +#pragma clang diagnostic ignored \"-Winline-asm\"\n> > > +#endif\n> > > +\n> > >       unw_context_t uc;\n> > >       int ret = unw_getcontext(&uc);\n> > >       if (ret)\n> > >               return false;\n> > >\n> > > +#if __clang__\n> > > +#pragma clang diagnostic pop\n> > > +#endif\n> > > +\n> > >       unw_cursor_t cursor;\n> > >       ret = unw_init_local(&cursor, &uc);\n> > >       if (ret)\n> > > --\n> > > 2.25.1\n> > >\n> >","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 C4595BE173\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 12 Jul 2022 16:13:35 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 0F8916330F;\n\tTue, 12 Jul 2022 18:13:35 +0200 (CEST)","from relay5-d.mail.gandi.net (relay5-d.mail.gandi.net\n\t[217.70.183.197])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 905EC60402\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 12 Jul 2022 18:13:33 +0200 (CEST)","(Authenticated sender: jacopo@jmondi.org)\n\tby mail.gandi.net (Postfix) with ESMTPSA id EA28D1C0003;\n\tTue, 12 Jul 2022 16:13:32 +0000 (UTC)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1657642415;\n\tbh=6ZepqE2uSOYwIwW37TSX88nWtu42DlvXEaIz1UmqkuA=;\n\th=Date:To:References:In-Reply-To:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc:\n\tFrom;\n\tb=kCMZOlk8WVTXr/YKzQx6VdKPgqpQdSMO7lXvtsi9yoaCpegjMm9IVQgJYWxygNt+7\n\tFkvw095ETguOuS1nLzNka9rficJ0G7JBrZ5TXgh5WUbKA2OWZolouMELdjGfxszPph\n\t5UoK8RFjjL2qETeACc76HXLwZwksvo29LvsEfgdI7d6Csfv31SOd+CAXJpTH5acAe/\n\tVAg0nFCup7W6E0wPLyPByzrnLV5BnVvoQx2979dMS/4VxZNUnZn7L2AdV+598tLqNc\n\ttez/MxBH5781HWFaQR7v7swgD1D4/11MkZPsRL6MqJQEOlOyX8vFmIL+d3EZcONyjX\n\tsQrEh3PjUpV5w==","Date":"Tue, 12 Jul 2022 18:13:31 +0200","To":"Naushir Patuck <naush@raspberrypi.com>","Message-ID":"<20220712161331.lujkfibcgwl5skoh@uno.localdomain>","References":"<20220712130138.25084-1-naush@raspberrypi.com>\n\t<20220712142452.rcxxeeq6hrsygkzt@uno.localdomain>\n\t<CAEmqJPrni5CB1wQmtMwOr5jC6CEZSDJAX44B9by5NDbivmz6KA@mail.gmail.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<CAEmqJPrni5CB1wQmtMwOr5jC6CEZSDJAX44B9by5NDbivmz6KA@mail.gmail.com>","Subject":"Re: [libcamera-devel] [PATCH] libcamera: base: Remove ARM clang-11\n\tcompile error","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":"Jacopo Mondi via libcamera-devel <libcamera-devel@lists.libcamera.org>","Reply-To":"Jacopo Mondi <jacopo@jmondi.org>","Cc":"libcamera devel <libcamera-devel@lists.libcamera.org>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":23844,"web_url":"https://patchwork.libcamera.org/comment/23844/","msgid":"<165766254766.1813977.17450325838006027082@Monstersaurus>","date":"2022-07-12T21:49:07","subject":"Re: [libcamera-devel] [PATCH] libcamera: base: Remove ARM clang-11\n\tcompile error","submitter":{"id":4,"url":"https://patchwork.libcamera.org/api/people/4/","name":"Kieran Bingham","email":"kieran.bingham@ideasonboard.com"},"content":"Quoting Naushir Patuck via libcamera-devel (2022-07-12 14:01:38)\n> Compiling backtrace.cpp produces the follwing error with the ARM clang-11 (and\n> 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> \n> Suppress this compilation error with a clang specific pragma around the\n> offending statements.\n> \n> Further information about this error can be found here:\n> https://github.com/dotnet/runtime/issues/5\n> \n> Signed-off-by: Naushir Patuck <naush@raspberrypi.com>\n> ---\n>  src/libcamera/base/backtrace.cpp | 10 ++++++++++\n>  1 file changed, 10 insertions(+)\n> \n> diff --git a/src/libcamera/base/backtrace.cpp b/src/libcamera/base/backtrace.cpp\n> index 483492c390c3..b8ae2f6dc331 100644\n> --- a/src/libcamera/base/backtrace.cpp\n> +++ b/src/libcamera/base/backtrace.cpp\n> @@ -191,11 +191,21 @@ __attribute__((__noinline__))\n>  bool Backtrace::unwindTrace()\n>  {\n>  #if HAVE_UNWIND\n> +\n> +#if __clang__\n\nHas this been tested on !__clang__ ? Shouldn't it be #ifdef __clang__?\n\nOtherwise when __clang__ isn't defined ... I expect this will fail?\n\nOk - so testing this - it seems like at least with GCC it's fine. I\nguess it treats undefined as '0'. So that's ok.\n\n\nI'd probably also put a single line comment above saying /why/ we're\ndisabling this here.\n\n\nEven something simple like:\n\n /* clang-11 fails here on arm32 builds. */\n\n\nBut as Jacopo said - this fixes a compile breakage so lets get it resolved.\nI'll see if I can add a 32 bit compile to my matrix.\n\nReviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n\n\n> +#pragma clang diagnostic push\n> +#pragma clang diagnostic ignored \"-Winline-asm\"\n> +#endif\n> +\n>         unw_context_t uc;\n>         int ret = unw_getcontext(&uc);\n>         if (ret)\n>                 return false;\n>  \n> +#if __clang__\n> +#pragma clang diagnostic pop\n> +#endif\n> +\n>         unw_cursor_t cursor;\n>         ret = unw_init_local(&cursor, &uc);\n>         if (ret)\n> -- \n> 2.25.1\n>","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 47EA4BE173\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 12 Jul 2022 21:49:11 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id AE6056330F;\n\tTue, 12 Jul 2022 23:49:10 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 2132060402\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 12 Jul 2022 23:49:10 +0200 (CEST)","from pendragon.ideasonboard.com\n\t(cpc89244-aztw30-2-0-cust3082.18-1.cable.virginm.net [86.31.172.11])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id A238A25B;\n\tTue, 12 Jul 2022 23:49:09 +0200 (CEST)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1657662550;\n\tbh=602MY4J87OOxe4e4AFSyU0yDdnIzqfn2zSv5pEmYuEA=;\n\th=In-Reply-To:References:To:Date:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:\n\tFrom;\n\tb=A1tnAP5B0daTP92tXqKoFyjAGyjq0dJAyGXMvcwzLFcFjw5Rcet5FvmhNS7yKVGO/\n\tj9wAOiN06ATV3xnNA6BbHLceBFwWKnG9kPwbbv+waFBzu9l+I9pZ3W1RWEVcWV6KhX\n\tAp4rpGIUNIGMrnQBtX7zNUTCH/aAzYHx3j/5gdvWYIsS0yebVM3HDQeMAea0GF99xl\n\tVkV9z/Fjn/XgPR2jTSCwsvbPH+6p3AyKdi4zPibJfb64H+y5oGRx/iPtfFZ7CfAB3o\n\tPG6JPT+oODMVqsC6bia69cQJRo8pa1P1mabHKqjdXq4haSZsMgchKts8gMpn2AuR3Y\n\tSbA0Nfp0QGW9A==","v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1657662549;\n\tbh=602MY4J87OOxe4e4AFSyU0yDdnIzqfn2zSv5pEmYuEA=;\n\th=In-Reply-To:References:Subject:From:To:Date:From;\n\tb=QOiIpSsX89Q7hDLCBU/X6nq/lGeFXRh0M07Yu7VxnF75Q9Idu5Nsf4sxhEfetkLFS\n\tExi57mE0LQ8+cLRz4h+AIqp+oOAg2eJgTrxDOZ5ZPdHB+dJr+2IX9EDynEgCt3LxY7\n\tyrVrUhQQXVm4ATO4p+ZyYKa9HxQEBnNjcR6t4rpg="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"QOiIpSsX\"; dkim-atps=neutral","Content-Type":"text/plain; charset=\"utf-8\"","MIME-Version":"1.0","Content-Transfer-Encoding":"quoted-printable","In-Reply-To":"<20220712130138.25084-1-naush@raspberrypi.com>","References":"<20220712130138.25084-1-naush@raspberrypi.com>","To":"Naushir Patuck <naush@raspberrypi.com>,\n\tlibcamera-devel@lists.libcamera.org","Date":"Tue, 12 Jul 2022 22:49:07 +0100","Message-ID":"<165766254766.1813977.17450325838006027082@Monstersaurus>","User-Agent":"alot/0.10","Subject":"Re: [libcamera-devel] [PATCH] libcamera: base: Remove ARM clang-11\n\tcompile error","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":"Kieran Bingham via libcamera-devel\n\t<libcamera-devel@lists.libcamera.org>","Reply-To":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":23853,"web_url":"https://patchwork.libcamera.org/comment/23853/","msgid":"<Ys4jbYX9js+8Oy5T@pendragon.ideasonboard.com>","date":"2022-07-13T01:44:13","subject":"Re: [libcamera-devel] [PATCH] libcamera: base: Remove ARM clang-11\n\tcompile error","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"Hi Naush,\n\nOn Tue, Jul 12, 2022 at 03:38:53PM +0100, Naushir Patuck via libcamera-devel wrote:\n> On Tue, 12 Jul 2022 at 15:24, Jacopo Mondi wrote:\n> > On Tue, Jul 12, 2022 at 02:01:38PM +0100, Naushir Patuck via libcamera-devel wrote:\n> > > Compiling backtrace.cpp produces the follwing error with the ARM clang-11 (and\n> > > later) compiler:\n> >\n> > Let's add \"on arm32 systems\"\n> \n> Sure, no problem.  Presumably this can be done while applying?\n\nAbsolutely. I'll s/ARM/ARM32/ here and in the subject line, and will\nalso fix the \"follwing\" typo.\n\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\n> > 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> > >\n> > > Suppress this compilation error with a clang specific pragma around the\n> > > offending statements.\n> > >\n> > > Further information about this error can be found here:\n> > > https://github.com/dotnet/runtime/issues/5\n> > >\n\nAnd I'll add\n\nBug: https://bugs.libcamera.org/show_bug.cgi?id=136\n\n> > > Signed-off-by: Naushir Patuck <naush@raspberrypi.com>\n> >\n> > Great, it fixes the build indeed!\n> >\n> > Tested-by: Jacopo Mondi <jacopo@jmondi.org>\n> >\n> > > ---\n> > >  src/libcamera/base/backtrace.cpp | 10 ++++++++++\n> > >  1 file changed, 10 insertions(+)\n> > >\n> > > diff --git a/src/libcamera/base/backtrace.cpp b/src/libcamera/base/backtrace.cpp\n> > > index 483492c390c3..b8ae2f6dc331 100644\n> > > --- a/src/libcamera/base/backtrace.cpp\n> > > +++ b/src/libcamera/base/backtrace.cpp\n> > > @@ -191,11 +191,21 @@ __attribute__((__noinline__))\n> > >  bool Backtrace::unwindTrace()\n> > >  {\n> > >  #if HAVE_UNWIND\n> > > +\n> > > +#if __clang__\n> > > +#pragma clang diagnostic push\n> > > +#pragma clang diagnostic ignored \"-Winline-asm\"\n> > > +#endif\n> > > +\n> > >       unw_context_t uc;\n> > >       int ret = unw_getcontext(&uc);\n> > >       if (ret)\n> > >               return false;\n> > >\n> > > +#if __clang__\n> > > +#pragma clang diagnostic pop\n> > > +#endif\n> > > +\n> > >       unw_cursor_t cursor;\n> > >       ret = unw_init_local(&cursor, &uc);\n> > >       if (ret)","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 CFE76BE173\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed, 13 Jul 2022 01:44:44 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 501676330D;\n\tWed, 13 Jul 2022 03:44:44 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id D1FA36330B\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 13 Jul 2022 03:44:42 +0200 (CEST)","from pendragon.ideasonboard.com (62-78-145-57.bb.dnainternet.fi\n\t[62.78.145.57])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 4062A305;\n\tWed, 13 Jul 2022 03:44:42 +0200 (CEST)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1657676684;\n\tbh=mQBwYmeDyj6SKvPLgSQ3ekEWy5CbBRMRSs54W9BAqpw=;\n\th=Date:To:References:In-Reply-To:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc:\n\tFrom;\n\tb=ZwIIAOnTfw+VTdeQKSTywL1Lujh/tSk7VVNE4kFb7kGneHZklHMWkkNJOH2g1Wgos\n\t+qTCfWeOyPPL1rZUTWEgQp4yLM9MOUJFlULm2OhwY9r0nA4BsX98lLJrKnR0JeRgJe\n\tec6bms+24eQxHxiH9ZA3glO2EGQZta2EVTcTngdgdv84NTvFenKLzFafqMNWkvmZHf\n\tLiwn85p2PiyMP2yS4iKa4fGKVlAJkHlpJuoFkkLjQL0hpGOugl2wpwAzlis+yCCGfE\n\tguKCU7sDjHHXLtJzXvm3BvWLzaxs12/P1LInFMKx1vc/QbI9/vD4BxgKz37/XOHslg\n\tzbOyQkQJmVH8A==","v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1657676682;\n\tbh=mQBwYmeDyj6SKvPLgSQ3ekEWy5CbBRMRSs54W9BAqpw=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=DdK5E2B3jwfCC9I7zFj6YCExHdhi18rvMpsRhGNLII/RUEJUxgu4os6MaFEHpNhpD\n\tMzv/SVEdtsdGnhyxTnQD0Ig9RSgfUDMTMiTw1pYVlfwdLT//92fqk5o1LDCH8ZjmKp\n\t9oBHblPEklR2cd+AyZBFIp/tQLiqzc2BJ1PpiE44="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"DdK5E2B3\"; dkim-atps=neutral","Date":"Wed, 13 Jul 2022 04:44:13 +0300","To":"Naushir Patuck <naush@raspberrypi.com>","Message-ID":"<Ys4jbYX9js+8Oy5T@pendragon.ideasonboard.com>","References":"<20220712130138.25084-1-naush@raspberrypi.com>\n\t<20220712142452.rcxxeeq6hrsygkzt@uno.localdomain>\n\t<CAEmqJPrni5CB1wQmtMwOr5jC6CEZSDJAX44B9by5NDbivmz6KA@mail.gmail.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<CAEmqJPrni5CB1wQmtMwOr5jC6CEZSDJAX44B9by5NDbivmz6KA@mail.gmail.com>","Subject":"Re: [libcamera-devel] [PATCH] libcamera: base: Remove ARM clang-11\n\tcompile error","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>","Cc":"libcamera devel <libcamera-devel@lists.libcamera.org>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":23854,"web_url":"https://patchwork.libcamera.org/comment/23854/","msgid":"<Ys4nXg+8n4siRdGL@pendragon.ideasonboard.com>","date":"2022-07-13T02:01:02","subject":"Re: [libcamera-devel] [PATCH] libcamera: base: Remove ARM clang-11\n\tcompile error","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"On Tue, Jul 12, 2022 at 10:49:07PM +0100, Kieran Bingham via libcamera-devel wrote:\n> Quoting Naushir Patuck via libcamera-devel (2022-07-12 14:01:38)\n> > Compiling backtrace.cpp produces the follwing error with the ARM clang-11 (and\n> > 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> > \n> > Suppress this compilation error with a clang specific pragma around the\n> > offending statements.\n> > \n> > Further information about this error can be found here:\n> > https://github.com/dotnet/runtime/issues/5\n\nNaush, did you mean\n\nhttps://github.com/dotnet/runtime/issues/38652\n\nor maybe\n\nhttps://github.com/dotnet/runtime/pull/38971\n\n?\n\n> > Signed-off-by: Naushir Patuck <naush@raspberrypi.com>\n> > ---\n> >  src/libcamera/base/backtrace.cpp | 10 ++++++++++\n> >  1 file changed, 10 insertions(+)\n> > \n> > diff --git a/src/libcamera/base/backtrace.cpp b/src/libcamera/base/backtrace.cpp\n> > index 483492c390c3..b8ae2f6dc331 100644\n> > --- a/src/libcamera/base/backtrace.cpp\n> > +++ b/src/libcamera/base/backtrace.cpp\n> > @@ -191,11 +191,21 @@ __attribute__((__noinline__))\n> >  bool Backtrace::unwindTrace()\n> >  {\n> >  #if HAVE_UNWIND\n> > +\n> > +#if __clang__\n> \n> Has this been tested on !__clang__ ? Shouldn't it be #ifdef __clang__?\n> \n> Otherwise when __clang__ isn't defined ... I expect this will fail?\n> \n> Ok - so testing this - it seems like at least with GCC it's fine. I\n> guess it treats undefined as '0'. So that's ok.\n\n#ifdef would still be better I think, so let's do that.\n\n> I'd probably also put a single line comment above saying /why/ we're\n> disabling this here.\n> \n> \n> Even something simple like:\n> \n>  /* clang-11 fails here on arm32 builds. */\n\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\n> But as Jacopo said - this fixes a compile breakage so lets get it resolved.\n> I'll see if I can add a 32 bit compile to my matrix.\n\nI have one, but it's using gcc. If you manage to write a meson\ncross-file for cross-compilation with clang, I'm interested :-)\n\n> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n\nReviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n\nI'll post a v2 with all the minor changes that have been discussed\nduring review, just to make sure I didn't make any stupid mistake.\n\n> > +#pragma clang diagnostic push\n> > +#pragma clang diagnostic ignored \"-Winline-asm\"\n> > +#endif\n> > +\n> >         unw_context_t uc;\n> >         int ret = unw_getcontext(&uc);\n> >         if (ret)\n> >                 return false;\n> >  \n> > +#if __clang__\n> > +#pragma clang diagnostic pop\n> > +#endif\n> > +\n> >         unw_cursor_t cursor;\n> >         ret = unw_init_local(&cursor, &uc);\n> >         if (ret)","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 919B3BD1F1\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed, 13 Jul 2022 02:01:34 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id EED7E6330B;\n\tWed, 13 Jul 2022 04:01:33 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 89F806048B\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 13 Jul 2022 04:01:32 +0200 (CEST)","from pendragon.ideasonboard.com (62-78-145-57.bb.dnainternet.fi\n\t[62.78.145.57])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 0074B305;\n\tWed, 13 Jul 2022 04:01:31 +0200 (CEST)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1657677694;\n\tbh=QQ4ZUC4XiUn4s6B3C0V/OTNt3Oy+HahWXawCW4YG6XI=;\n\th=Date:To:References:In-Reply-To:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc:\n\tFrom;\n\tb=eU4EZozuZZyEe/S5b6X9xR07m6X+s9yXT9jgM9Ojc0F44bk4tHA8PuPZpzoinsHsn\n\t8xQLClQyS+IvUbqQZP1lENxBqb2p+lu1Fx7QWCes0Clr/UL/9hu3+4bvCVbvrdIYGk\n\tN0jeOzgWLRHVYw61Oujsva41vBQlMsjCwpQm9XRJOcHNz+a4eF9Q2KJPpL1Z7rMeZW\n\teqF0lGmndrHUwu8iAjp3fgAcifF5nXc0AWKjLYj+N6rDLJU+rYVvXUGqsN42zN+sOs\n\tkNMc4l/nd736bHJF7VtzS4KSNVGSz4rJP3kLiU1JNqtUK53LtXnWl6EkJzQDr//XUw\n\t2oXv0eiNTE5Mg==","v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1657677692;\n\tbh=QQ4ZUC4XiUn4s6B3C0V/OTNt3Oy+HahWXawCW4YG6XI=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=nLlwQS/Zpq803Q3mnHYwLKM9LM4PRr96HIt6hfNHCHTT3b93iwkZFG355gkfliELl\n\tCe/aT5ju1CCXvEvt55TWXZzQRwJCaqPJpgyn6agMGXf5ikI8ZjV4+yQ+hw0+VOMlmY\n\tuGQdwesq6hnRx2tWE7Slbqa7yiOPBptAc3PCsmQE="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"nLlwQS/Z\"; dkim-atps=neutral","Date":"Wed, 13 Jul 2022 05:01:02 +0300","To":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Message-ID":"<Ys4nXg+8n4siRdGL@pendragon.ideasonboard.com>","References":"<20220712130138.25084-1-naush@raspberrypi.com>\n\t<165766254766.1813977.17450325838006027082@Monstersaurus>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<165766254766.1813977.17450325838006027082@Monstersaurus>","Subject":"Re: [libcamera-devel] [PATCH] libcamera: base: Remove ARM clang-11\n\tcompile error","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>","Cc":"libcamera-devel@lists.libcamera.org","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":23855,"web_url":"https://patchwork.libcamera.org/comment/23855/","msgid":"<CAEmqJPqBWVnoBXO6fh-bFQ0LtWnW2B23ujSKU_tc=T8h-=kayg@mail.gmail.com>","date":"2022-07-13T07:31:19","subject":"Re: [libcamera-devel] [PATCH] libcamera: base: Remove ARM clang-11\n\tcompile error","submitter":{"id":34,"url":"https://patchwork.libcamera.org/api/people/34/","name":"Naushir Patuck","email":"naush@raspberrypi.com"},"content":"Hi Laurent,\n\nOn Wed, 13 Jul 2022 at 03:01, Laurent Pinchart <\nlaurent.pinchart@ideasonboard.com> wrote:\n\n> On Tue, Jul 12, 2022 at 10:49:07PM +0100, Kieran Bingham via\n> libcamera-devel wrote:\n> > Quoting Naushir Patuck via libcamera-devel (2022-07-12 14:01:38)\n> > > Compiling backtrace.cpp produces the follwing error with the ARM\n> clang-11 (and\n> > > later) compiler:\n> > >\n> > > --------------------\n> > > ../src/libcamera/base/backtrace.cpp:195:12: error: use of SP or PC in\n> 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:\n> expanded from macro 'unw_getcontext'\n> > >                                         ^\n> > > /usr/include/arm-linux-gnueabihf/libunwind-arm.h:270:5: note: expanded\n> from macro 'unw_tdep_getcontext'\n> > >     \"stmia %[base], {r0-r15}\"\n>  \\\n> > >     ^\n> > > <inline asm>:1:2: note: instantiated into assembly here\n> > >         stmia r0, {r0-r15}\n> > > --------------------\n> > >\n> > > Suppress this compilation error with a clang specific pragma around the\n> > > offending statements.\n> > >\n> > > Further information about this error can be found here:\n> > > https://github.com/dotnet/runtime/issues/5\n>\n> Naush, did you mean\n>\n> https://github.com/dotnet/runtime/issues/38652\n>\n> or maybe\n>\n> https://github.com/dotnet/runtime/pull/38971\n\n\nI actually meant https://github.com/dotnet/runtime/issues/5595\n\nNot sure what went on with my clipboard there :)\n\n\n>\n>\n> ?\n>\n> > > Signed-off-by: Naushir Patuck <naush@raspberrypi.com>\n> > > ---\n> > >  src/libcamera/base/backtrace.cpp | 10 ++++++++++\n> > >  1 file changed, 10 insertions(+)\n> > >\n> > > diff --git a/src/libcamera/base/backtrace.cpp\n> b/src/libcamera/base/backtrace.cpp\n> > > index 483492c390c3..b8ae2f6dc331 100644\n> > > --- a/src/libcamera/base/backtrace.cpp\n> > > +++ b/src/libcamera/base/backtrace.cpp\n> > > @@ -191,11 +191,21 @@ __attribute__((__noinline__))\n> > >  bool Backtrace::unwindTrace()\n> > >  {\n> > >  #if HAVE_UNWIND\n> > > +\n> > > +#if __clang__\n> >\n> > Has this been tested on !__clang__ ? Shouldn't it be #ifdef __clang__?\n> >\n> > Otherwise when __clang__ isn't defined ... I expect this will fail?\n> >\n> > Ok - so testing this - it seems like at least with GCC it's fine. I\n> > guess it treats undefined as '0'. So that's ok.\n>\n\nYes, it works since undefined is treated as 0.  It's annoying to add\nthe #if as I would have hoped gcc would ignore \"pragma clang\"\nstatements, but it does not.\n\n\n> #ifdef would still be better I think, so let's do that.\n>\n> > I'd probably also put a single line comment above saying /why/ we're\n> > disabling this here.\n> >\n> >\n> > Even something simple like:\n> >\n> >  /* clang-11 fails here on arm32 builds. */\n>\n> /*\n>  * unw_getcontext() for ARM32 is an inline assembly function using the\n> stmia\n>  * instruction to store SP and PC. This is considered by clang-11 as\n> deprecated,\n>  * and generates a warning.\n>  */\n>\n> > But as Jacopo said - this fixes a compile breakage so lets get it\n> resolved.\n> > I'll see if I can add a 32 bit compile to my matrix.\n>\n> I have one, but it's using gcc. If you manage to write a meson\n> cross-file for cross-compilation with clang, I'm interested :-)\n>\n> > Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n>\n> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n>\n> I'll post a v2 with all the minor changes that have been discussed\n> during review, just to make sure I didn't make any stupid mistake.\n>\n\nSounds good!\n\n\n\n>\n> > > +#pragma clang diagnostic push\n> > > +#pragma clang diagnostic ignored \"-Winline-asm\"\n> > > +#endif\n> > > +\n> > >         unw_context_t uc;\n> > >         int ret = unw_getcontext(&uc);\n> > >         if (ret)\n> > >                 return false;\n> > >\n> > > +#if __clang__\n> > > +#pragma clang diagnostic pop\n> > > +#endif\n> > > +\n> > >         unw_cursor_t cursor;\n> > >         ret = unw_init_local(&cursor, &uc);\n> > >         if (ret)\n>\n> --\n> Regards,\n>\n> Laurent Pinchart\n>","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 A6BF3BD1F1\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed, 13 Jul 2022 07:31:29 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id D56D163311;\n\tWed, 13 Jul 2022 09:31:28 +0200 (CEST)","from mail-lf1-x134.google.com (mail-lf1-x134.google.com\n\t[IPv6:2a00:1450:4864:20::134])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 56BEE6330A\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 13 Jul 2022 09:31:27 +0200 (CEST)","by mail-lf1-x134.google.com with SMTP id e28so14093464lfj.4\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 13 Jul 2022 00:31:27 -0700 (PDT)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1657697488;\n\tbh=HMpVxqwI3zLHdoXDnMGKtQBXz9mPUyRtmYtXHI0bfxE=;\n\th=References:In-Reply-To:Date:To:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc:\n\tFrom;\n\tb=KLleegbHV1JBokVTgSVlqXruegc7th2kKkN0kd3TD/qb2XCwr+JNQQmR0KTRGLPrh\n\tcQdVzzz4a79oEtPK4+YSJhTWSwZnTMTH+grdbg0g7W5m8mAR1LnwgQnTJGb5RzqTem\n\tI+RhdkLG6Xbg+/z+88fNH9PD39bIJV7IEo3+GXdU2+rqLS396qjVweiIc2lWT+LX6Z\n\tS5bhD/umHBFmdx03Ey6MeCBuc1rp3KS5mmWLvXq5zUOYRdcOhDpjbTGZUt5eduNBJ9\n\tPKvg/LWIm/0vfBCbRE8a8PUgWYZLGiZiLz4gR3xQZ0WNLYLS+ME3YXFnj6Fs7nz/qO\n\tk/H9f5FzNBI7Q==","v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=raspberrypi.com; s=google;\n\th=mime-version:references:in-reply-to:from:date:message-id:subject:to\n\t:cc; bh=E367z+CShLNHt2qFt+my5a96XTKgRII79hvPSGctGuQ=;\n\tb=DWsDNd5GUowxI2y/JxZtqktodf389oFq1SVmSn47Q8ctTrmqbmC8G3pA6z34THQH+E\n\tpM49MjE9qrDSAipCBBAPQeROKn6JGOVLByKSjckglqzod8A5ebHec5wquadZWSg5gpyE\n\tAuGN/+W6C6n1ng/NDJM7sORy22k2uBj5SNNOLaEdnwjd6jjnXGFUzNg58laxLEm+mhS0\n\tCe/d3008FeZ91G0gRQT5VpC+n7xhV0636RPC9En8h4WCWz1CzFngH2PG2f+WF9Wp/1Ua\n\tziHE/DBHqSjLxH69v+UXLMthyee/1SPassSoW1Lyb2F1mM0DHy2BQ72UnRf0PnsJf6Iq\n\trrBw=="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (2048-bit key; \n\tunprotected) header.d=raspberrypi.com\n\theader.i=@raspberrypi.com\n\theader.b=\"DWsDNd5G\"; dkim-atps=neutral","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20210112;\n\th=x-gm-message-state:mime-version:references:in-reply-to:from:date\n\t:message-id:subject:to:cc;\n\tbh=E367z+CShLNHt2qFt+my5a96XTKgRII79hvPSGctGuQ=;\n\tb=Scv9FyEjZHaZBlHwfxhIIt9vqccxt/Mc3A6hKwAEf8XgyBgCLC9W9EChQR93fA1lGV\n\tzaIy7+QGG/Lek15dxXz1IIFaO51Kve8pT2tGGOaoTVOhrz1rn/iXjm5BXeCK6PvRo9IG\n\tXWWj4SnlykgAKvEzogCLPPu9W4mYenOWKhQI04DbPdyNeug2qeVc0Gj7uGaG79qOyIuJ\n\twJQAJzUYs8QWH9mOMGelx4gStqQ4iTLj15eqex8pOVGXy54H5pzHOGZWdNFxESlxTt9c\n\tZ/9RkaOGS+yq0WpCKnp5micxBS6wz777vG7ASV12VLZtIT589p5c4sFlRM1amUlrxa67\n\tNwqA==","X-Gm-Message-State":"AJIora8Ctb8kN++Zjk26L1XjkjCucTF5o96Kbl4W8N/HgO+RHFDPBsac\n\thg7dJOVlpG3jJI1Rs6YGnqnZSxgJak0gi9OiP5JqRkx1yNRZwGNs","X-Google-Smtp-Source":"AGRyM1tC0y+Ye1jUbLw79hGf7z41KQB7W1C/Hlmew9W0IPMA0VIrHqrBjNhI/LY3CMCClaNlLpAJ5ldjlBC8avaYr8w=","X-Received":"by 2002:a05:6512:4019:b0:489:3345:c450 with SMTP id\n\tbr25-20020a056512401900b004893345c450mr1123434lfb.363.1657697486441;\n\tWed, 13 Jul 2022 00:31:26 -0700 (PDT)","MIME-Version":"1.0","References":"<20220712130138.25084-1-naush@raspberrypi.com>\n\t<165766254766.1813977.17450325838006027082@Monstersaurus>\n\t<Ys4nXg+8n4siRdGL@pendragon.ideasonboard.com>","In-Reply-To":"<Ys4nXg+8n4siRdGL@pendragon.ideasonboard.com>","Date":"Wed, 13 Jul 2022 08:31:19 +0100","Message-ID":"<CAEmqJPqBWVnoBXO6fh-bFQ0LtWnW2B23ujSKU_tc=T8h-=kayg@mail.gmail.com>","To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","Content-Type":"multipart/alternative; boundary=\"000000000000d3249505e3aac59f\"","Subject":"Re: [libcamera-devel] [PATCH] libcamera: base: Remove ARM clang-11\n\tcompile error","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":"Naushir Patuck via libcamera-devel\n\t<libcamera-devel@lists.libcamera.org>","Reply-To":"Naushir Patuck <naush@raspberrypi.com>","Cc":"libcamera devel <libcamera-devel@lists.libcamera.org>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}}]