Received: by 2002:a05:6a10:c604:0:0:0:0 with SMTP id y4csp866752pxt; Thu, 5 Aug 2021 13:46:53 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzWQQD7884Lg6YkqUlrZF3NBuXkbigqE5RS/g0GCXvi2soP55SabmUyP87HznZ5HjbfjhpG X-Received: by 2002:a05:6602:26cb:: with SMTP id g11mr1998839ioo.110.1628196413546; Thu, 05 Aug 2021 13:46:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1628196413; cv=none; d=google.com; s=arc-20160816; b=kTCxD0Ab+GlT3Mb7ZkE2mvaJb9co5eEI1qk0KNBca+64NtibTyrt1d3F8Z/aKJp7qZ k96YhNbqImNRMFuqNo13qkFQ+5PUcPqD/wkF/3/ZSmqPLA1QSL1aYacH19gdfR9m2B+N tIxIRTC/HQRDui5enLlW8idYMFy2btXO8XC+FURTBdiRLP7CpgOUrgPlLe7esXAWWIZk OD6yEroeMTzcn2KwMd3Z033ArfWZea6heMZlwSqV7d5gsdAvbqZVSnuu4pvwDjFD67EQ RJzybxf3y63lc02v4qhKAlqTylfkHQatbkEp/l/2xhMch5+Vd61DAKOG6Y0RYLGn9riI S+IA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature; bh=ImNgKqndIK6e3jolu5jEYlGW11oAJS7/ev2HoTAK87E=; b=Pr9syEkGQms78TtDMJFod7aOGJzKRKw+37G+td5LEZkRYFLBNx+egbpRjv3dOdUXLO 7yMHfmC2akZPoWHTSQtO4mN2RsuPrc/gBdUtrlFDg/LEM3AHv+mQxb/PHqCR7jHfIbsw RnQRvmCAqTNdK+GF1rwRoNtjNe5gqmhWhBH9uyEAzpyUUf9IRdQdVQ/cRrNMMWCGJ8rK 5YFV0dQgmjt2/OrRyll0DhgoOiI93PNtLSeqSTT1HOiKRGjpIEST9iQLenIUnnJhEwSr r9HXsf0J2CYBOtODhgLTQYUEHLWHLsK47nqD3egNP+Dotf3UfQrGoHwe2JxjS3rX8JgE RzXw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=RIRPV49x; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d11si7729697ilc.143.2021.08.05.13.46.36; Thu, 05 Aug 2021 13:46:53 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=RIRPV49x; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241591AbhHESqZ (ORCPT + 99 others); Thu, 5 Aug 2021 14:46:25 -0400 Received: from mail.kernel.org ([198.145.29.99]:40796 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241583AbhHESqZ (ORCPT ); Thu, 5 Aug 2021 14:46:25 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id B215F60F01; Thu, 5 Aug 2021 18:46:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1628189170; bh=Bdu1IVhpkrpzTBly0e81WLlBUlSkIup7ZFwVra1sxac=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=RIRPV49xtzJE48PquQUEG1on9n+WPaEfO6ZM8Psb5nUIv//tzxPvAh6o5Hy8zcxea g8e/hmPbBLrL8WQ9dYcb8TKph1uOrBUGtzqM0ERjQE/nS0YXUyIQkVbbPrufayqkd/ yBL2y54hnLK2pZWplhf8bm00fYRQs5qDMHfAh85kp9CnHbzOeoR3XuBMWO6MQioR3t xPgxiyr3nqAGKLurgeml3OmuCnWTZz4SUVxnf4Tgit5IMuv6SBMr8BZDcWtJLAlFtm yjqasM3MbExKqZJIBOGykkuxwS7hQ43o/45vmafKgm+qrbfxTtQvC2jLUB7CZw+cg+ f7kIJt6ZnVHRw== Subject: Re: [PATCH] kbuild: check CONFIG_AS_IS_LLVM instead of LLVM_IAS To: Masahiro Yamada , linux-kbuild@vger.kernel.org Cc: Albert Ou , Michal Marek , Nick Desaulniers , Palmer Dabbelt , Paul Walmsley , clang-built-linux@googlegroups.com, linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org References: <20210805150102.131008-1-masahiroy@kernel.org> From: Nathan Chancellor Message-ID: <59ce441e-8deb-39ff-700f-4e1c4e871177@kernel.org> Date: Thu, 5 Aug 2021 11:46:10 -0700 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.12.0 MIME-Version: 1.0 In-Reply-To: <20210805150102.131008-1-masahiroy@kernel.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 8/5/2021 8:01 AM, Masahiro Yamada wrote: > LLVM_IAS is the user interface to set the -(no-)integrated-as flag, > and it should be used only for that purpose. > > LLVM_IAS is checked in some places to determine the assembler type, > but it is not precise. > > $ make CC=gcc LLVM_IAS=1 > > ... will use the GNU assembler since LLVM_IAS=1 is effective only when > $(CC) is clang. > > Of course, the combination of CC=gcc and LLVM_IAS=1 does not make > sense, but the build system can be more robust against such insane > input. > > Commit ba64beb17493a ("kbuild: check the minimum assembler version in > Kconfig") introduced CONFIG_AS_IS_GNU/LLVM, which is more precise > because Kconfig checks the version string from the assembler in use. > > Signed-off-by: Masahiro Yamada Reviewed-by: Nathan Chancellor > --- > > Makefile | 2 +- > arch/riscv/Makefile | 2 +- > 2 files changed, 2 insertions(+), 2 deletions(-) > > diff --git a/Makefile b/Makefile > index 4ab151060931..8b56c9692c3c 100644 > --- a/Makefile > +++ b/Makefile > @@ -844,7 +844,7 @@ else > DEBUG_CFLAGS += -g > endif > > -ifneq ($(LLVM_IAS),1) > +ifndef CONFIG_AS_IS_LLVM > KBUILD_AFLAGS += -Wa,-gdwarf-2 > endif > > diff --git a/arch/riscv/Makefile b/arch/riscv/Makefile > index bc74afdbf31e..dcfbd2a87d41 100644 > --- a/arch/riscv/Makefile > +++ b/arch/riscv/Makefile > @@ -41,7 +41,7 @@ endif > ifeq ($(CONFIG_LD_IS_LLD),y) > KBUILD_CFLAGS += -mno-relax > KBUILD_AFLAGS += -mno-relax > -ifneq ($(LLVM_IAS),1) > +ifndef CONFIG_AS_IS_LLVM > KBUILD_CFLAGS += -Wa,-mno-relax > KBUILD_AFLAGS += -Wa,-mno-relax > endif >