Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8B5B7C433E0 for ; Tue, 9 Mar 2021 09:57:44 +0000 (UTC) Received: by mail.kernel.org (Postfix) id 524D16518F; Tue, 9 Mar 2021 09:57:44 +0000 (UTC) Received: from muru.com (muru.com [72.249.23.125]) by mail.kernel.org (Postfix) with ESMTP id B08B565257; Tue, 9 Mar 2021 09:57:43 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B08B565257 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=atomide.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=tony@atomide.com Received: from atomide.com (localhost [127.0.0.1]) by muru.com (Postfix) with ESMTPS id 17CE9802C; Tue, 9 Mar 2021 09:58:22 +0000 (UTC) Date: Tue, 9 Mar 2021 11:57:37 +0200 From: Tony Lindgren To: Arnd Bergmann List-Id: Cc: Aaro Koskinen , soc@kernel.org, Arnd Bergmann , Nathan Chancellor , Nick Desaulniers , linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, clang-built-linux@googlegroups.com Subject: Re: [PATCH] ARM: omap1: fix building with clang IAS Message-ID: References: <20210308153430.2530616-1-arnd@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210308153430.2530616-1-arnd@kernel.org> * Arnd Bergmann [210308 15:35]: > From: Arnd Bergmann > > The clang integrated assembler fails to build one file with > a complex asm instruction: > > arch/arm/mach-omap1/ams-delta-fiq-handler.S:249:2: error: invalid instruction, any one of the following would fix this: > mov r10, #(1 << (((NR_IRQS_LEGACY + 12) - NR_IRQS_LEGACY) % 32)) @ set deferred_fiq bit > ^ > arch/arm/mach-omap1/ams-delta-fiq-handler.S:249:2: note: instruction requires: armv6t2 > mov r10, #(1 << (((NR_IRQS_LEGACY + 12) - NR_IRQS_LEGACY) % 32)) @ set deferred_fiq bit > ^ > arch/arm/mach-omap1/ams-delta-fiq-handler.S:249:2: note: instruction requires: thumb2 > mov r10, #(1 << (((NR_IRQS_LEGACY + 12) - NR_IRQS_LEGACY) % 32)) @ set deferred_fiq bit > ^ > > The problem is that 'NR_IRQS_LEGACY' is not defined here. Apparently > gas does not care because we first add and then subtract this number, > leading to the immediate value to be the same regardless of the > specific definition of NR_IRQS_LEGACY. > > Neither the way that 'gas' just silently builds this file, nor the > way that clang IAS makes nonsensical suggestions for how to fix it > is great. Fortunately there is an easy fix, which is to #include > the header that contains the definition. Acked-by: Tony Lindgren