Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp3288260imm; Sun, 30 Sep 2018 16:50:37 -0700 (PDT) X-Google-Smtp-Source: ACcGV61gzclhGXjXLWfcO6H4LWmqOe9O+7YRdFqAlG6rxLfW6auiz0QFT23kou0dq+xQ8pq9qobU X-Received: by 2002:a63:5816:: with SMTP id m22-v6mr7904878pgb.332.1538351437807; Sun, 30 Sep 2018 16:50:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538351437; cv=none; d=google.com; s=arc-20160816; b=todmzsqmcE4TeGnpWxZGu9WveAFCZ4BOSNGbT6EZ2+B5Srsj6/wK6LRCpXTHv8HvDC I6m9NI2F460i03qogkGuft/jhUL/o8P26+GPb452rsLUycs9IOHZpRzhbzaXc9arCVzq dQllnrXVnO746QqovQHjc9DTupluTOWj44WMf7d5dgZe6s4Xr9oK0TEVHCubr9RzkBPG uKWQQeNnklwm7Q2/pRNUtyk6fOtXeJH9fDC4oCWbbeaTi5/kEZq6YyK2jGRm+8aJtPpZ KcHJQS0SGyU4ALq3/uB6UjOc6afyDgvLGbRzbYCdKzeZisk5l9mJQ5I4hSI/Tjm2eOu8 D/qQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:date:cc:to:from:subject:message-id; bh=1Hueh3zSf2AYuNh4RqkAUz2xjGkoiHMw5YHeMPnzvic=; b=i3nzmKzyC7nUf4nzYmo3xEzXAYKe8WUiwOitNu51wqiNg+eCTCF+ZKJjCqr0pN7oKu ftaUEpqYrDO7yoSYe0eLhJHBek74SW4OHhRGvlip2ejTGYA3mHBLIDvyx2IuNCu8GjnS 79ul4dq+YZ0FB6L8eIKqFok4Kkj0t1gvVlSzg0bpLDV7B0bQEW5ih541t3yqit9jgBgz fYr39UoR4paNqDGUWjINbHGQx0NYcoyofVHnzbG17b1BapCj8Kl2VDMuX685dfxohW4M GQifcz4IsHrh2i3wNzTCojeAlRYglCabVkIVSXH2B3xcmoVEQ6FwsxaPuKHYu8sXTWoy jY1A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d41-v6si11068554pla.172.2018.09.30.16.50.23; Sun, 30 Sep 2018 16:50:37 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727689AbeJAGXW (ORCPT + 99 others); Mon, 1 Oct 2018 02:23:22 -0400 Received: from smtprelay0045.hostedemail.com ([216.40.44.45]:56629 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726745AbeJAGXW (ORCPT ); Mon, 1 Oct 2018 02:23:22 -0400 Received: from filter.hostedemail.com (clb03-v110.bra.tucows.net [216.40.38.60]) by smtprelay01.hostedemail.com (Postfix) with ESMTP id 9C4FC100E806B; Sun, 30 Sep 2018 23:48:22 +0000 (UTC) X-Session-Marker: 6A6F6540706572636865732E636F6D X-Spam-Summary: 2,0,0,,d41d8cd98f00b204,joe@perches.com,:::::::::,RULES_HIT:41:355:379:541:599:800:960:967:973:988:989:1260:1277:1311:1313:1314:1345:1359:1437:1515:1516:1518:1534:1541:1593:1594:1711:1730:1747:1777:1792:2393:2525:2559:2563:2682:2685:2828:2859:2902:2933:2937:2939:2942:2945:2947:2951:2954:3022:3138:3139:3140:3141:3142:3353:3622:3865:3867:3868:3870:3871:3872:3934:3936:3938:3941:3944:3947:3950:3953:3956:3959:4321:5007:6238:7875:8957:9025:10004:10400:10848:11026:11232:11473:11658:11914:12043:12438:12555:12660:12740:12760:12895:12986:13069:13311:13357:13439:14096:14097:14181:14659:14721:21080:21451:21627:21795:30051:30054:30091,0,RBL:error,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:fn,MSBL:0,DNSBL:neutral,Custom_rules:0:0:0,LFtime:29,LUA_SUMMARY:none X-HE-Tag: thumb11_2be3df0eaed14 X-Filterd-Recvd-Size: 2500 Received: from XPS-9350.home (unknown [47.151.153.53]) (Authenticated sender: joe@perches.com) by omf02.hostedemail.com (Postfix) with ESMTPA; Sun, 30 Sep 2018 23:48:21 +0000 (UTC) Message-ID: Subject: Re: [PATCH] ARM: disable ARMv6 for Clang older than 8.0 From: Joe Perches To: Stefan Agner , linux@armlinux.org.uk, arnd@arndb.de Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Date: Sun, 30 Sep 2018 16:48:20 -0700 In-Reply-To: <20180930222230.24167-1-stefan@agner.ch> References: <20180930222230.24167-1-stefan@agner.ch> Content-Type: text/plain; charset="ISO-8859-1" X-Mailer: Evolution 3.28.5-0ubuntu0.18.04.1 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 2018-10-01 at 00:22 +0200, Stefan Agner wrote: > 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 assembler fail. Prevent the user from > selecting ARMv6 when using Clang before 8.0. > > Signed-off-by: Stefan Agner > Link: https://github.com/ClangBuiltLinux/linux/issues/55 > --- > arch/arm/Kconfig | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig > index e8cd55a5b04c..8da160757381 100644 > --- a/arch/arm/Kconfig > +++ b/arch/arm/Kconfig > @@ -671,6 +671,7 @@ config ARCH_MULTI_V4_V5 > > config ARCH_MULTI_V6 > bool "ARMv6 based platforms (ARM11)" > + depends on !CC_IS_CLANG || CLANG_VERSION>=80000 > select ARCH_MULTI_V6_V7 > select CPU_V6K > Perhaps it'd be better to avoid this in selection criteria in Kconfig and instead add this to include/linux/compiler_clang.h --- 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..90fd16c85359 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) && CLANG_VERSION < 80000 +# error Sorry, your compiler is too old - please upgrade it. +#endif + /* Some compiler specific definitions are overwritten here * for Clang compiler */