From patchwork Tue Jul 12 13:01:38 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Naushir Patuck X-Patchwork-Id: 16596 Return-Path: X-Original-To: parsemail@patchwork.libcamera.org Delivered-To: parsemail@patchwork.libcamera.org Received: from lancelot.ideasonboard.com (lancelot.ideasonboard.com [92.243.16.209]) by patchwork.libcamera.org (Postfix) with ESMTPS id 480C3BE173 for ; Tue, 12 Jul 2022 13:01:46 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id AF5AD6330B; Tue, 12 Jul 2022 15:01:45 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org; s=mail; t=1657630905; bh=JStbRSRwvZS2io6oP4MAIWekhcAbet7xYKl+oXsenZo=; h=To:Date:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=QVUvfzeieOcA6W+//8hXPs4JBQs+ckXpLPbPFLxdEY5RZhdy0HSq224GyWepOHPoI 9i3mSAQU+G0LNJ38ck5rSkjhv4VUeBbE4CXTlOXAueDvW4MU6y8xXTAYw0ImyIEN0+ ryZyh6vGT2ro64NjFdPGOZsCqLZJcTaYFpMnXMFnVeRC4+fSJA5RWB6k3qG9GcUINw sO04faJJU34N2tJmGC1mdtTyxi91GBBWxbo4+HJPb6GiKxcY0IVQB+vc4G20xd3hvC 8REwJdxDKMv9mLaN5wVy2zMbREtiNpNj3jPsilT1I8w3QLudsCE58tIA4rqfhNiVKL zlAQGN3zeIU2A== Received: from mail-wr1-x433.google.com (mail-wr1-x433.google.com [IPv6:2a00:1450:4864:20::433]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 9E68E60402 for ; Tue, 12 Jul 2022 15:01:43 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (2048-bit key; unprotected) header.d=raspberrypi.com header.i=@raspberrypi.com header.b="V9JfGLKc"; dkim-atps=neutral Received: by mail-wr1-x433.google.com with SMTP id q9so11073206wrd.8 for ; Tue, 12 Jul 2022 06:01:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=raspberrypi.com; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=/CCW559pr/f+vbcPF1kkmI+KJX6ehgR1gePaGHapvUE=; b=V9JfGLKcDyo9vPvfZjFIb/Bu4kEoxbmZJ31rKHJ1wHycuBMliky3Qs2gulcg65jxJ1 tcWM02pHobWCBPSvDNKnY/fKre8BxHLneaNo1xGo9Y948dWQr9rYn7uVT4VKVj7ejCwB 2og5gHUjUJR0afAcxDPy74Zak4vlllWGVR2DMKZFgOOJxONyvyYs0hyqhlRhqFebzKd7 MoqbPoYjVocoSdHTrnFsLS1s/JDK3XKZ8NGKukdZHKpEP12fzPl92sX8NkntwTX7DsqS podwFre9QLOqLPmgWYBK3JNVO38UuyPjLPyw1+hBkCoL8G1de3KXdU6Jx5jMRbJwbS1Q TwdA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=/CCW559pr/f+vbcPF1kkmI+KJX6ehgR1gePaGHapvUE=; b=Qg3gWTr0AJP3Kj54ef4Nt9qg/fM//Hp4hQ1ToAQNM+x6jI7/YV7QYtiKat7jRT7+ar mn6vXvZK6M8E8eUbg/WuSTopPsE0TwV62doSRKEBT+x6seh3BXq5KTJLhu7SJ0gOgJRW +KS0jjOJ6NfQWJAziNgo/2iacjjNoxi12EdqzjFJSXHssP+8Pgth9SWWjX28rWM5Q5nG yOelYGQKm7uLJ9cG8kFZ/CtsldWyVcoPAb5yKT5gOTm5leotMj7nTuqIjhovkpJYteG1 /MKmHvaiTBUloZ0os8spD9T40PxS1MKik1apB4P/T80eMQRponXl1qZO3fnrwDnpaW26 rbKg== X-Gm-Message-State: AJIora9HdX/IGK1BZvdfnlHcW+XyZQvRG//dfn6Z2tmzvh8/TJlqTNEX zGMXaHgpZ58I9Lu2uqcSgPnlGTjriTLgTg== X-Google-Smtp-Source: AGRyM1vAVP9R5iWJHswDrFCADfWp6WG0EoHLmCKf+jcxnTnPLW1+a1S0UhANDZpZUQV9lYETIkia7g== X-Received: by 2002:a5d:4f02:0:b0:21d:63f6:380c with SMTP id c2-20020a5d4f02000000b0021d63f6380cmr21993203wru.635.1657630903011; Tue, 12 Jul 2022 06:01:43 -0700 (PDT) Received: from naush-laptop.localdomain ([93.93.133.154]) by smtp.gmail.com with ESMTPSA id k1-20020adfd841000000b0021d73772c87sm8003330wrl.91.2022.07.12.06.01.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Jul 2022 06:01:42 -0700 (PDT) To: libcamera-devel@lists.libcamera.org Date: Tue, 12 Jul 2022 14:01:38 +0100 Message-Id: <20220712130138.25084-1-naush@raspberrypi.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH] libcamera: base: Remove ARM clang-11 compile error X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Naushir Patuck via libcamera-devel From: Naushir Patuck Reply-To: Naushir Patuck Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" Compiling backtrace.cpp produces the follwing error with the ARM clang-11 (and later) compiler: -------------------- ../src/libcamera/base/backtrace.cpp:195:12: error: use of SP or PC in the list is deprecated [-Werror,-Winline-asm] int ret = unw_getcontext(&uc); ^ /usr/include/arm-linux-gnueabihf/libunwind-common.h:114:29: note: expanded from macro 'unw_getcontext' ^ /usr/include/arm-linux-gnueabihf/libunwind-arm.h:270:5: note: expanded from macro 'unw_tdep_getcontext' "stmia %[base], {r0-r15}" \ ^ :1:2: note: instantiated into assembly here stmia r0, {r0-r15} -------------------- Suppress this compilation error with a clang specific pragma around the offending statements. Further information about this error can be found here: https://github.com/dotnet/runtime/issues/5 Signed-off-by: Naushir Patuck Tested-by: Jacopo Mondi Reviewed-by: Kieran Bingham Reviewed-by: Laurent Pinchart --- src/libcamera/base/backtrace.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/libcamera/base/backtrace.cpp b/src/libcamera/base/backtrace.cpp index 483492c390c3..b8ae2f6dc331 100644 --- a/src/libcamera/base/backtrace.cpp +++ b/src/libcamera/base/backtrace.cpp @@ -191,11 +191,21 @@ __attribute__((__noinline__)) bool Backtrace::unwindTrace() { #if HAVE_UNWIND + +#if __clang__ +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Winline-asm" +#endif + unw_context_t uc; int ret = unw_getcontext(&uc); if (ret) return false; +#if __clang__ +#pragma clang diagnostic pop +#endif + unw_cursor_t cursor; ret = unw_init_local(&cursor, &uc); if (ret)