<div dir="ltr"><div dir="ltr">Hi Jacopo,<div><br></div><div>Thank you for your feedback.</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, 12 Jul 2022 at 15:24, Jacopo Mondi <<a href="mailto:jacopo@jmondi.org">jacopo@jmondi.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi Naush,<br>
<br>
On Tue, Jul 12, 2022 at 02:01:38PM +0100, Naushir Patuck via libcamera-devel wrote:<br>
> Compiling backtrace.cpp produces the follwing error with the ARM clang-11 (and<br>
> later) compiler:<br>
<br>
Let's add "on arm32 systems"<br></blockquote><div><br></div><div>Sure, no problem.  Presumably this can be done while applying?</div><div><br></div><div>Naush</div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
><br>
> --------------------<br>
> ../src/libcamera/base/backtrace.cpp:195:12: error: use of SP or PC in the list is deprecated [-Werror,-Winline-asm]<br>
>         int ret = unw_getcontext(&uc);<br>
>                   ^<br>
> /usr/include/arm-linux-gnueabihf/libunwind-common.h:114:29: note: expanded from macro 'unw_getcontext'<br>
>                                         ^<br>
> /usr/include/arm-linux-gnueabihf/libunwind-arm.h:270:5: note: expanded from macro 'unw_tdep_getcontext'<br>
>     "stmia %[base], {r0-r15}"                                           \<br>
>     ^<br>
> <inline asm>:1:2: note: instantiated into assembly here<br>
>         stmia r0, {r0-r15}<br>
> --------------------<br>
><br>
> Suppress this compilation error with a clang specific pragma around the<br>
> offending statements.<br>
><br>
> Further information about this error can be found here:<br>
> <a href="https://github.com/dotnet/runtime/issues/5" rel="noreferrer" target="_blank">https://github.com/dotnet/runtime/issues/5</a><br>
><br>
> Signed-off-by: Naushir Patuck <<a href="mailto:naush@raspberrypi.com" target="_blank">naush@raspberrypi.com</a>><br>
<br>
Great, it fixes the build indeed!<br>
<br>
Tested-by: Jacopo Mondi <<a href="mailto:jacopo@jmondi.org" target="_blank">jacopo@jmondi.org</a>><br>
<br>
Thanks<br>
   j<br>
<br>
> ---<br>
>  src/libcamera/base/backtrace.cpp | 10 ++++++++++<br>
>  1 file changed, 10 insertions(+)<br>
><br>
> diff --git a/src/libcamera/base/backtrace.cpp b/src/libcamera/base/backtrace.cpp<br>
> index 483492c390c3..b8ae2f6dc331 100644<br>
> --- a/src/libcamera/base/backtrace.cpp<br>
> +++ b/src/libcamera/base/backtrace.cpp<br>
> @@ -191,11 +191,21 @@ __attribute__((__noinline__))<br>
>  bool Backtrace::unwindTrace()<br>
>  {<br>
>  #if HAVE_UNWIND<br>
> +<br>
> +#if __clang__<br>
> +#pragma clang diagnostic push<br>
> +#pragma clang diagnostic ignored "-Winline-asm"<br>
> +#endif<br>
> +<br>
>       unw_context_t uc;<br>
>       int ret = unw_getcontext(&uc);<br>
>       if (ret)<br>
>               return false;<br>
><br>
> +#if __clang__<br>
> +#pragma clang diagnostic pop<br>
> +#endif<br>
> +<br>
>       unw_cursor_t cursor;<br>
>       ret = unw_init_local(&cursor, &uc);<br>
>       if (ret)<br>
> --<br>
> 2.25.1<br>
><br>
</blockquote></div></div>