Received: by 2002:a05:6a10:c604:0:0:0:0 with SMTP id y4csp636487pxt; Thu, 5 Aug 2021 08:06:39 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxu36S91riiAuFGVqpvxTGQDzhBOf5tEenEjtM8BUdbPyzbvoLGX8pduZxpw/Qi6Rsjef8o X-Received: by 2002:a17:906:f15:: with SMTP id z21mr5426901eji.177.1628175999331; Thu, 05 Aug 2021 08:06:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1628175999; cv=none; d=google.com; s=arc-20160816; b=EolW6OIU/CAc/VRamiJVH7cTJdoz5fpi2NmGazF/epSHAmGZgdpsUxvrBjNyozA/Ln Xh+jLPpqNeAS65nawSWh9jAlT1Fd9S5k5Xde+T8Y6K2EZJhUXDLZ07L2Fv2Gbt67DIdH Sj6n4e/YixwqEP8aDwfXPczf7rlCcDIjVXTy3jO4ZVhOwFpo33X4IvwgadjiL7hzrb5n 1aV4INeabMSmxW0+cZjpK2+40WYvKbIm2RjgJQh8GNJ/s1QahLdQhRgjinBFxu+GisDi 3Sjlx8sUhpXGI9ZjTqHDLKvoR+voPZhcJva0dNiGiXs5bR9x4fzsMMLWUqVTz9/v8Ws6 4DvA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature:dkim-filter; bh=/sZqN7YYOQzerHeaIfHq5IfDh5zbKuKicEifD7PVFaA=; b=O45pU1kXs4lP5poEfkF5qhbJWI5fMKCbhyruRX80fHBDxhUGPmxXDnSxvslcw71RKa HM5Pl3aSI/mw7BYXVcDIhW3+VMSboN+kA2pBiv0tJAxI8CeVf0yUtovN5yMYtjoEHzwD Al+KULWl5yaBbIUoCtIzRfdEANN/8raONhzvzOabJeLSp5Ioya9EQ7UIUBEzdHcE0JF5 g3oIRwx423eJUCQD2NERrK0cskYBJ0qPIVXmHpdYExoFhf6GLBv9Sx7MCQrI9LgA7vaH 31G29Gn4/qyZY6Smr6x4zt2+ATcUAP815qzudq34g7K7rLP83cDr8H6Gq/O4xmsZYR3Y vSGA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=Mo8HJV5A; 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 x10si6092652ejj.92.2021.08.05.08.06.14; Thu, 05 Aug 2021 08:06:39 -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=@nifty.com header.s=dec2015msa header.b=Mo8HJV5A; 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 S238199AbhHEPCx (ORCPT + 99 others); Thu, 5 Aug 2021 11:02:53 -0400 Received: from conuserg-07.nifty.com ([210.131.2.74]:23689 "EHLO conuserg-07.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230183AbhHEPCx (ORCPT ); Thu, 5 Aug 2021 11:02:53 -0400 Received: from localhost.localdomain (133-32-232-101.west.xps.vectant.ne.jp [133.32.232.101]) (authenticated) by conuserg-07.nifty.com with ESMTP id 175F13YC019006; Fri, 6 Aug 2021 00:01:03 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-07.nifty.com 175F13YC019006 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1628175664; bh=/sZqN7YYOQzerHeaIfHq5IfDh5zbKuKicEifD7PVFaA=; h=From:To:Cc:Subject:Date:From; b=Mo8HJV5AZnRz+AkF+qbp1D58uzEhoM49ic5mWOQkKtLh0vL3XgjbowgqPGK6TKC1u f7Ka0M7a30Zx6D1BYXulS0eMz0dFqXqKN9IAz9Y7t8W0ZLwRQ0tVbpoOTErkQFZWY6 mKr18UScOHZX9SYYZZKJP4dWAy30VUGeQR0cZE1bYMcse7amTAkiU23sMBXv4Y8ema +lWG7fPIizxEmc9JuPbv3pYaZFGIx0SLNWa7JIJeDFdP1Nt+yMSkYkceeV94FL/m0o W6tsiYI/ru59yDcEQ2cph1ycvHXgXjJgyDy8B5qH5pQwc8x5pbPNcbxnDbKPjey83s 4CnAww2LtLUXA== X-Nifty-SrcIP: [133.32.232.101] From: Masahiro Yamada To: linux-kbuild@vger.kernel.org Cc: Masahiro Yamada , Albert Ou , Michal Marek , Nathan Chancellor , Nick Desaulniers , Palmer Dabbelt , Paul Walmsley , clang-built-linux@googlegroups.com, linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org Subject: [PATCH] kbuild: check CONFIG_AS_IS_LLVM instead of LLVM_IAS Date: Fri, 6 Aug 2021 00:01:02 +0900 Message-Id: <20210805150102.131008-1-masahiroy@kernel.org> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- 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 -- 2.30.2