Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp285955imm; Mon, 1 Oct 2018 09:54:16 -0700 (PDT) X-Google-Smtp-Source: ACcGV62379sTr3JfAvHQzLF9ol0WMXu2TsOSfbTUTxpMjlsfd0DoJ2k+8vUmdWfHwO4bSNVGFEGh X-Received: by 2002:a65:4301:: with SMTP id j1-v6mr8596195pgq.279.1538412855946; Mon, 01 Oct 2018 09:54:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538412855; cv=none; d=google.com; s=arc-20160816; b=bnF3eRpKPg/MwbsUtjyoiyD8Q+lUcqfU9ZPTHLPdwiC4KHmjRQyXsFMv+6COlM4MKV 0w/pSuK5G1IPRbQbmokI1GQvswBtRUxc6MtRdlgK/pg1mfYb+ZFc8HPV6uXS3BHCJT6q m167OO/lpNBWIZ/+Xq5QTKpPbVZlqjtYGxE+9JLU7YCTpvW23HPrRKKgTtRemutea7tX db2nCEz5YzSVIa09SvVbO8S1wU2udE9zZdkZZHz2cCKf4JSnPuH/xdZv0ObBV/QO77vj V63lUzDrL5GQH2HVMOz2GLSOn0jrkJaghRJRIh/55raw6AePMQYcfhEqPm+BDwwcyxAy 0K3w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=zU9RtA6dvNz508u6EhRvjciaC//O0BCa+iW5FGW84kw=; b=YvI5sJI3vRdpRboKsOPpV72zPoWhhhptCj/3IZd8GAs4rpbyAxvVOrFKoPE/7LvXM1 koXQj4H+9qtEOIBz1XUEKL3eMznedbnCMeoQU2ULra7tziqvx+aArPuxf7My6qtlh9ku OyUq6T3gqQcGPYGWtyBjuSVJZ30kGpCOqTsY0PglKjGnhb6pUjQ/fbmciCnYZLDJqgEJ MtNk6U7zea7EP5OsC7lWYk4UvVHYawVHKI/yql2ixoXIBofqBIefDJdcRar+lnNaFHlf U9V52akgAN7ZGTMTbWfwwqJT8GOsDsmc9ybZu2jdar5e3a0wrtUmlC5/jiFJG9PaiArU uDfA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@armlinux.org.uk header.s=pandora-2014 header.b=XM3RivOF; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=armlinux.org.uk Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u21-v6si12374490pgm.406.2018.10.01.09.54.00; Mon, 01 Oct 2018 09:54:15 -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; dkim=fail header.i=@armlinux.org.uk header.s=pandora-2014 header.b=XM3RivOF; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=armlinux.org.uk Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726176AbeJAXch (ORCPT + 99 others); Mon, 1 Oct 2018 19:32:37 -0400 Received: from pandora.armlinux.org.uk ([78.32.30.218]:47196 "EHLO pandora.armlinux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725906AbeJAXch (ORCPT ); Mon, 1 Oct 2018 19:32:37 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=armlinux.org.uk; s=pandora-2014; h=Sender:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=zU9RtA6dvNz508u6EhRvjciaC//O0BCa+iW5FGW84kw=; b=XM3RivOF6V/TiPa85+AQg9PUR txnJR6ZhTTA2vn9oamuDi/utO6UxJWm+9xcpwzRc+8V7WhL3yrD9QgGi/K4d1zz0LgY0oGk+8W/6o VlVY0ejLkcOccOr9BiFroeginHF0DYo2hFW7ScMvBZ37ijs4k0ORL8VXOBLSAbGeVb/jc=; Received: from n2100.armlinux.org.uk ([2001:4d48:ad52:3201:214:fdff:fe10:4f86]:60133) by pandora.armlinux.org.uk with esmtpsa (TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128) (Exim 4.90_1) (envelope-from ) id 1g71S8-0006nX-5O; Mon, 01 Oct 2018 17:53:48 +0100 Received: from linux by n2100.armlinux.org.uk with local (Exim 4.90_1) (envelope-from ) id 1g71S4-0007Y2-4T; Mon, 01 Oct 2018 17:53:44 +0100 Date: Mon, 1 Oct 2018 17:53:42 +0100 From: Russell King - ARM Linux To: Joe Perches Cc: Stefan Agner , arnd@arndb.de, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] ARM: disable ARMv6 for Clang older than 8.0 Message-ID: <20181001165342.GR30658@n2100.armlinux.org.uk> References: <20180930222230.24167-1-stefan@agner.ch> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Sep 30, 2018 at 04:48:20PM -0700, Joe Perches wrote: > 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 (a) does it makes sense to have arch CONFIG_* in linux/*.h? It could instead go in arch/arm/kernel/asm-offsets.c, where we have the other tests similar to this for GCC. (b) do we get far enough that the #error will be generated before the reported assembler error happens? IOW, would the assembler error mask this #error? I think it needs confirmation that a #error for this problem results in the desired behaviour. -- RMK's Patch system: http://www.armlinux.org.uk/developer/patches/ FTTC broadband for 0.8mile line in suburbia: sync at 14.8Mbps down 650kbps up According to speedtest.net: 13Mbps down 490kbps up