Received: by 2002:a05:6a10:c604:0:0:0:0 with SMTP id y4csp851834pxt; Thu, 5 Aug 2021 13:21:07 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwQTNUqovHbG3ULFW6ttsS+bB2fTjsDQkHoIC39QFe1dZPu3+CrmV3d4f0lphjOgEOI8sEF X-Received: by 2002:a02:cf9c:: with SMTP id w28mr4108929jar.102.1628194867073; Thu, 05 Aug 2021 13:21:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1628194867; cv=none; d=google.com; s=arc-20160816; b=WVzGtGLU8hSPEytLHKjxdHuL4ycS4WLpPsq1Rg8T6U68Qirgll1KOOdmIgBv73N50/ htuWrTt0H9VmQcMadkenM5G7oRQIDQ5FFc9IPnjPYfcESnalQZXICtsVGUIOuzoUjoM1 RVP8v7ZmzRY7G3LZNgs5LwmdqPnoBm7A5qxuP3WDawDFtQiauupMYwjHzu34IQN+ZfdG XYKwtYyMT4qleIjShaCyubIr40hgXqUUET+TTXN9w8bjATYSSH4sf+wV7O05gQbrcV5c jM/Qt+kcs0sgHczeCVwjZTJNTKPvCixZgNuA4IiCBQU4j/h9AU1slB1WR9zSJT0HKdJy K2zQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=LNpT8+EvILfJwMhJDbf0NVaUrZW6zw0xKERByrH5p/E=; b=dabVegLlHXLb+VlSumcoWNmSsas7nlhEOmKoS1dwjTQOhmWFT/5H+Ulb6Efbxxz2JN cTxbKikTXdTmYntdGwZBgzdCTbU4F6W3rRlx1kqMFAdH58JxfrG/b2nZU0oGo7hV38h7 oaaYKiAr3H6I4fQM7Lvg1vGAM9Hcj3G20AitmkRUhidSfsjiem+05cjJoM3S12FchggX Ergoifha/scnymfJzfoPmEiTcuVrAPE2tNIStbNL1Q54LxDYpZ1/g12pVazZC/T2Mtt8 mYrw5AHWHYWdb7345xCe4Z0tdBQ2k9APGFJJSc7tyODApETNnOAprYsCqSYtjf2v2FgV KmTQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=Y2oK9TpD; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id v20si3572964jas.98.2021.08.05.13.20.50; Thu, 05 Aug 2021 13:21:07 -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=@google.com header.s=20161025 header.b=Y2oK9TpD; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241135AbhHESWi (ORCPT + 99 others); Thu, 5 Aug 2021 14:22:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39880 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237370AbhHESWi (ORCPT ); Thu, 5 Aug 2021 14:22:38 -0400 Received: from mail-lj1-x232.google.com (mail-lj1-x232.google.com [IPv6:2a00:1450:4864:20::232]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 78378C061798 for ; Thu, 5 Aug 2021 11:22:23 -0700 (PDT) Received: by mail-lj1-x232.google.com with SMTP id e5so8311661ljp.6 for ; Thu, 05 Aug 2021 11:22:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=LNpT8+EvILfJwMhJDbf0NVaUrZW6zw0xKERByrH5p/E=; b=Y2oK9TpDhBO7ojoFD7/ZGm1Vo4Q4+SveD8msknb3vaTKUGGyIi7lO02RrvoHgt+oFU eLoj0GPIulWoDqtcS/1D6J/RO07/jT5HY76dgvqoYHM7yxInkwOqPjJl/c+Evze2+mgN Yg/mZLJ9Tj1NX1d4prbdV1Yyb2fC0mJ4qyn6BsHr2GPVNJLmRIaH0ufv2gF/s21HQfF0 x8DNVd0msrA6o/siIIKWBuWCUvrk8G32z6H6laIAVGXZLbI60vhZlhaVzK3C1Fuy4haa Vy0D0PaQ5ZcXJrhKOmbCJMW6vCV5E8I3Pog57qHQwxW8sQGHtqlbQiqVHwuRpOA3O5WN 3lWw== 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:from:date :message-id:subject:to:cc; bh=LNpT8+EvILfJwMhJDbf0NVaUrZW6zw0xKERByrH5p/E=; b=E6QOlCvhHUEIoE5d/sFwW8xJ5oR9szyOCbMyAjKixuCD/u30+N3kxYlENIFAoj4Q/y 0d56mEolqtf4/cpkZTNpS4qJAQBuMB84+qkj13dEICO5VJsekMTl/69L66LuQcuVCTtO KQ5o5ylLNlWp/gEwiylZzrZeNwGArpvtIIYcfQe/Q3TuHTSxxI8UP4HDEvUDPZzPkxRH pLgK4stUyssL9Cocm1O7g4YjuZAN1zUVW0HX8xmlePI0+K6pP+lc2atfA/7zUg5XbwNS vgXl9y73aEvfeTemWCuLcCaY0YVfm8yiE+1O/yAxOkiOkLvw/C4VG75L/Lehr6xYND4o 8GOQ== X-Gm-Message-State: AOAM533G1lAAeux/ZDOYCYOy++GdMXvJcWs7ijM7JEZGl51rtJ7J20+K VBwcEL3ukyg+GUQwgbxi1yzqITg0gbeCdzE1QdkAJg== X-Received: by 2002:a2e:a911:: with SMTP id j17mr3939091ljq.341.1628187741325; Thu, 05 Aug 2021 11:22:21 -0700 (PDT) MIME-Version: 1.0 References: <20210805150102.131008-1-masahiroy@kernel.org> In-Reply-To: <20210805150102.131008-1-masahiroy@kernel.org> From: Nick Desaulniers Date: Thu, 5 Aug 2021 11:22:10 -0700 Message-ID: Subject: Re: [PATCH] kbuild: check CONFIG_AS_IS_LLVM instead of LLVM_IAS To: Masahiro Yamada Cc: linux-kbuild@vger.kernel.org, Albert Ou , Michal Marek , Nathan Chancellor , Palmer Dabbelt , Paul Walmsley , clang-built-linux@googlegroups.com, linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Aug 5, 2021 at 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: Nick Desaulniers > --- > > 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 > -- Thanks, ~Nick Desaulniers