Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp295103ybb; Thu, 9 Apr 2020 23:40:03 -0700 (PDT) X-Google-Smtp-Source: APiQypKwP2vHGCbGJIaKW8AAsHODG8IPSiwJ4ubb0tY+SdRwtlCkX2qs5KHXKyY1yzTXnRPxRzwF X-Received: by 2002:ae9:e84b:: with SMTP id a72mr2691316qkg.28.1586500803016; Thu, 09 Apr 2020 23:40:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1586500803; cv=none; d=google.com; s=arc-20160816; b=xGf8gLhVooYU5IHQbWp2rpsvuVB72MM1ZSX61cBtkojjDhsPcf3nbiuIbUTLf4drHr VPQxAanGtYLb6DROBuDA7KnukxHmMwb3Szt+NIbw4BI9JBmLqLBOXZvk2nCMnCuCyaN0 EZ58yLSFHRqHStugPm+fyuYkwwj3QhkPfa4YSHyL/5WVwLpC/oVO240HMsXskB2oPUjp iYVXFsivsCNvgj7y/8LOb3THR0eGyI/hPXRpevucA5xbAC2h3Jngg9NWgjUmNj6A+MPX 2zwKfvNC0q2SnT5zCgECBJTQw37BG9E7BuxEXeAL/aDvDYf8W1IAt6h177oHTTbEYtQB pc/w== 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:cc:to:subject :message-id:date:from:reply-to:in-reply-to:references:mime-version :dkim-signature; bh=3YosXBMphFBPTyrYk/RdbHSh5tz3MJefldr296tJxNs=; b=i4YX/c8Cu1KDCn4FxoYy8gYdMsv1Mj4LvlO1o3kQfQK3WrXSyVLOcsVSgKTQ5SjKKi 7HL1gsNJH5izRICDHOp1eF86J7W1SfYLoPMb2eQrhP904i0PtldhD3eoQlW/DbTsX3vc linv02YUJG9AEc5n3AOZ2Sz3toWI3PRvCXbBrtoLoVDAaKuWxFwJz66CXm9oMpJkfkRc dK/XgeLhmWUqFxguSXORj6214a0P9pJSLohgtNngszODM6xrPU81+XTNeNj2bDZAePML TgPqSfGdVsH4GaT2DZbIfbz14LnBIJHh5XnK3hxb5EDYxb/07dDwFCTbs9h8vfsK+jPc kzwQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Vjn+dT6R; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m18si496453qvw.145.2020.04.09.23.39.48; Thu, 09 Apr 2020 23:40:02 -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=pass header.i=@gmail.com header.s=20161025 header.b=Vjn+dT6R; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726646AbgDJGiS (ORCPT + 99 others); Fri, 10 Apr 2020 02:38:18 -0400 Received: from mail-wm1-f65.google.com ([209.85.128.65]:38361 "EHLO mail-wm1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725880AbgDJGiR (ORCPT ); Fri, 10 Apr 2020 02:38:17 -0400 Received: by mail-wm1-f65.google.com with SMTP id f20so1682017wmh.3 for ; Thu, 09 Apr 2020 23:38:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:reply-to:from:date:message-id :subject:to:cc:content-transfer-encoding; bh=3YosXBMphFBPTyrYk/RdbHSh5tz3MJefldr296tJxNs=; b=Vjn+dT6RSkP4SXd4EAigedogTETClRN5OUv8bPPBIdh3k1J0oiDsg0cz7QCHWAh/Fk lmpV4KJ7By7X5jZ3FJ/ZBogm50ty6/nQCi5cpzEYS9zqMVlHmUhpbzOszrDmo0wiqg39 kA/tdHzXAT2K8D001TWOM0KwkXzuqhVxpz42PVyT4EUeH4bg4xQZCf/qtruPHfyecmJD Q7DX/s8q8+vzIoqqeyR+VgGCHTQulaPZRdhbq5m1FCXTc53Tu64NZdTdfoUekdXneCT9 cLDM8Otykr7WH3dOeLe1xnBsgEcQ6eymvkLc/eNqSsnxNMGT7MOwQqMkbEqkwrJArnIp MYsQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:reply-to :from:date:message-id:subject:to:cc:content-transfer-encoding; bh=3YosXBMphFBPTyrYk/RdbHSh5tz3MJefldr296tJxNs=; b=Fl51SEi87QMIPgGT6tSnNmMCaeTOzaHlGT20vZLVfHP0Z7mHP756tcFBg8Ngh06AR7 wpiHUvTKDZSVD6XC2CcJvKPhAkxR3yMZVsWMVjokGRqTUGfQvjlGt91RzM2sg5d2nuyb Jbi7yGyjnya9VjR/Tq053ljrfYTWklH/QkeDBf8fbqtUBHu6YpWzIauox4mEvhDBkxt7 ohrz6ZumcGrTEwsnnm5EUozU5BAkhppQSHbHiRWdZQx/6N52BiYHxSLWWb5XWm4Izr5I qYtm2YHuiF5ZdyUJbx9e3V1tqKSt7P4Q/Mo6N2xI+KhT49lVCin3Mxrpm/eW/ESQ8rhu DFHg== X-Gm-Message-State: AGi0PuYSXBBMKUav6EA7+8tkq8QOcgZT4If/PY65e05Rjohx13f9ZtOm kIv18e146Vo+8Wg6BAQ9NJJnjKwMbgDvd89ea+Y= X-Received: by 2002:a7b:c927:: with SMTP id h7mr3520294wml.122.1586500696907; Thu, 09 Apr 2020 23:38:16 -0700 (PDT) MIME-Version: 1.0 References: <20200409232728.231527-1-caij2003@gmail.com> In-Reply-To: <20200409232728.231527-1-caij2003@gmail.com> Reply-To: sedat.dilek@gmail.com From: Sedat Dilek Date: Fri, 10 Apr 2020 08:38:05 +0200 Message-ID: Subject: Re: [PATCH] ARM: do not assemble iwmmxt.S with LLVM toolchain To: Jian Cai Cc: Nick Desaulniers , manojgupta@google.com, Peter.Smith@arm.com, stefan@agner.ch, samitolvanen@google.com, ilie.halip@gmail.com, jiancai@google.com, Russell King , Arnd Bergmann , Linus Walleij , Andrew Morton , Mauro Carvalho Chehab , Doug Anderson , Benjamin Gaignard , Bartosz Golaszewski , Masahiro Yamada , Masami Hiramatsu , "Steven Rostedt (VMware)" , Greg Kroah-Hartman , Tejun Heo , "Joel Fernandes (Google)" , Patrick Bellasi , Krzysztof Kozlowski , Dan Williams , "Eric W. Biederman" , David Howells , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Clang-Built-Linux ML Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Apr 10, 2020 at 1:28 AM Jian Cai wrote: > > iwmmxt.S contains XScale instructions LLVM ARM backend does not support. > Skip this file if LLVM integrated assemmbler or LLD is used to build ARM > kernel. > > Signed-off-by: Jian Cai > --- > arch/arm/Kconfig | 2 +- > init/Kconfig | 6 ++++++ > 2 files changed, 7 insertions(+), 1 deletion(-) > > diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig > index 66a04f6f4775..39de8fc64a73 100644 > --- a/arch/arm/Kconfig > +++ b/arch/arm/Kconfig > @@ -804,7 +804,7 @@ source "arch/arm/mm/Kconfig" > > config IWMMXT > bool "Enable iWMMXt support" > - depends on CPU_XSCALE || CPU_XSC3 || CPU_MOHAWK || CPU_PJ4 || CPU= _PJ4B > + depends on !AS_IS_CLANG && !LD_IS_LLD && (CPU_XSCALE || CPU_XSC3 = || CPU_MOHAWK || CPU_PJ4 || CPU_PJ4B) > default y if PXA27x || PXA3xx || ARCH_MMP || CPU_PJ4 || CPU_PJ4B > help > Enable support for iWMMXt context switching at run time if > diff --git a/init/Kconfig b/init/Kconfig > index 1c12059e0f7e..b0ab3271e900 100644 > --- a/init/Kconfig > +++ b/init/Kconfig > @@ -19,6 +19,12 @@ config GCC_VERSION > config CC_IS_CLANG > def_bool $(success,$(CC) --version | head -n 1 | grep -q clang) > > +config AS_IS_CLANG > + def_bool $(success,$(AS) --version | head -n 1 | grep -q clang) > + > +config LD_IS_LLD > + def_bool $(success,$(LD) --version | head -n 1 | grep -q LLD) > + > config CLANG_VERSION > int > default $(shell,$(srctree)/scripts/clang-version.sh $(CC)) > -- > 2.26.0.110.g2183baf09c-goog Yesterday, when looking trough commits in Linus tree, I saw: "init/kconfig: Add LD_VERSION Kconfig" Nick had a patchset to distinguish LINKER via Kconfig (I cannot find it right now). So we should do all this the way CC_IS_XXX CC_VERSION handling is done. I just want to point to [2] where we can rework (simplify) this handling for CC and LD handling in a further step. In one of Peter Z. tree someone started to do so (I was inspired by that). Unfortunately, the hunk from [1] is IMHO a bit mis-placed and CC and LD handling should stay together: CC_IS_XXX where XXX is GCC or CLANG CC_VERSION where CC is GCC or CLANG LD_IS_XXX where XXX is BFD or GOLD or LLD LD_VERSION Just my =E2=82=AC0,02. Regards, - Sedat - [1] https://git.kernel.org/linus/9553d16fa671b9621c5e2847d08bd90d3be3349c [2] https://github.com/ClangBuiltLinux/linux/issues/941