From patchwork Mon Oct 15 18:55:00 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Agner X-Patchwork-Id: 10642427 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 5748015E2 for ; Mon, 15 Oct 2018 18:55:33 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4690329E37 for ; Mon, 15 Oct 2018 18:55:33 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 39F8E29E38; Mon, 15 Oct 2018 18:55:33 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id A101929B9E for ; Mon, 15 Oct 2018 18:55:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:To :From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=NCsjSWz5acrjhLsX7LoSxcKsoSlWvlLpj+oMLfGQpHE=; b=mN7jXgbLJ2TyrQ yQi9cFSAnE5qpXCztSEwIjqZUOA96UC/ggAx4dqpKTb7ItfsNv6P0n7GBvWNITnSkNGuF7e6bMwzs mO4Eky/ayWranAEUHERbATCD75MMVUJGnenlNeessjN1X1+iOwvtFMt2HREsaz59HyUF3UGYD4wvv B0lgKWPw/UGPS4t4omVb6CwC0qnObIx+6JwT1WfS9EbHWxCFOGq1cyQ9S2rrUWiCLBq8NXMxbaOew O5E6U69EfNdmUD3vLOHyCrX1lb/RSs33jWrfdrluI+qA+adR2/OG6JiqkHSSsPbU48DAI3801p5AB XppGn1qVHAV4+j4j0f3g==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1gC81S-0004mB-KQ; Mon, 15 Oct 2018 18:55:22 +0000 Received: from mail.kmu-office.ch ([2a02:418:6a02::a2]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gC81P-0003eo-Bd for linux-arm-kernel@lists.infradead.org; Mon, 15 Oct 2018 18:55:21 +0000 Received: from trochilidae.toradex.int (unknown [IPv6:2a02:169:3460::525]) by mail.kmu-office.ch (Postfix) with ESMTPSA id 2B0EA5C00FA; Mon, 15 Oct 2018 20:55:03 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=agner.ch; s=dkim; t=1539629703; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type: content-transfer-encoding:content-transfer-encoding:in-reply-to: references; bh=v0fHTt3nx5QEcGs+tsS9EXt8FcC7/j/oNaBqs6q7BmE=; b=ZFnueuwBAjAysXnEpBCDjwrw84js9TFW/5RIN5cOyggmMKWb4C0Znh/YWJfaeJs9tAec/p NvEUOJvFJ27MtsRdnep7S6/2PpGJr+kkh5sQWrO7Hc9zVRb1SPIHjV67vW3To3Thy0cewY CRMTRe0MDkspB6CqQyBbkSe3lTfo2Ko= From: Stefan Agner To: linux@armlinux.org.uk, arnd@arndb.de Subject: [PATCH v2] ARM: error out if compiling ARMv6 using Clang before 8.0 Date: Mon, 15 Oct 2018 20:55:00 +0200 Message-Id: <20181015185500.679-1-stefan@agner.ch> X-Mailer: git-send-email 2.19.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181015_115519_544940_FC097A19 X-CRM114-Status: GOOD ( 10.24 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: joe@perches.com, Stefan Agner , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP The kernel passes the ArmV6K architecture to the compiler when using the multi platform selection and enabling ARMv6. Clang older than version 8.0 emit assembly with an non-existing CPU, which then makes the GNU assembler fail. Warn users when compiling ARMv6 using Clang before 8.0. Suggested-by: Russell King Signed-off-by: Stefan Agner Link: https://github.com/ClangBuiltLinux/linux/issues/55 --- include/linux/compiler-clang.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/include/linux/compiler-clang.h b/include/linux/compiler-clang.h index b1ce500fe8b3..9df8713bef38 100644 --- a/include/linux/compiler-clang.h +++ b/include/linux/compiler-clang.h @@ -3,6 +3,10 @@ #error "Please don't include directly, include instead." #endif +#if defined(CONFIG_ARCH_MULTI_V6) && CONFIG_CLANG_VERSION < 80000 +#error "Sorry, your compiler is too old - please upgrade it." +#endif + /* Some compiler specific definitions are overwritten here * for Clang compiler */