Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp1772137pxb; Thu, 4 Mar 2021 22:10:32 -0800 (PST) X-Google-Smtp-Source: ABdhPJztJ8SFO01wK7IlgRiDX09hMbZOFy/n+0KU579WjUK59ws0XsHyFV5oVctrBP543k+alhZf X-Received: by 2002:a50:ee10:: with SMTP id g16mr7671141eds.215.1614924632462; Thu, 04 Mar 2021 22:10:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614924632; cv=none; d=google.com; s=arc-20160816; b=PeFL5GsYA7WHdqD050C9YlkZmLGxaqnNP7BnKj9KK7EAgEDlARA6pRV+DlmELhvB+C vDs2iy3Qy6k1mduq3msNW6doqPsyP3jlmHjsbZFZVi3deMYs347IfP4Vdd2sAloLK9Dl b1audr9rcCgkwW97vsIz/tiRemz/xlJ981Bd1oRPfriml5iaG2mSasDGFgrEZqsjchhX 5Ela1+l6JUZwkUjZO+NYQIm4WqsG5lNbL+cvtp5LdNIiIuyJ5ue1Qn5H2HoFQu7AJt0W Ff21SDdnPZ6M3UMPj2r0G9332lan4C1hmF86J0CI0chmmEYsZJhOZXKb4Hyh8BR4bCpu R4ZQ== 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:dkim-filter; bh=axtBVNcIKru8BTiupCH9xPKdR4trfvDzg7QV+dWIl84=; b=sfZGg8QP+C/n5I306RMXDUoOfurkxeDd/zb9fQuLJ99a6oHy2Eb4pwWCzFqHkCmGJ7 MjS5gXIiU6f6DqoAvCdzNQ1lEkyHNiH8kTOUzYBR1ydfU3jCYGapO4lzXCo7y5icYEXq RX/Dv+GgWtifu/l/DycnGJFqb1u1mjj1ODVBujzSJSdcIY623q7pjFwPXYtRxrrODpmh pFgCFDdbEYfulY4EDE1ZyU+tks3VKUPMERvBaBlugxSsUpGxAFWj3CFpelE2F04cwWii SO/ugTGdgSRGNKOYxa8uUMkUerjRg+Y8iZJLwNipYgOjyc0Fl/fESG+QUT4oL3b5s2HG ZDQw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=UnkXThtI; 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 x4si1120501edd.118.2021.03.04.22.10.09; Thu, 04 Mar 2021 22:10:32 -0800 (PST) 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=UnkXThtI; 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 S229615AbhCEGHE (ORCPT + 99 others); Fri, 5 Mar 2021 01:07:04 -0500 Received: from conssluserg-03.nifty.com ([210.131.2.82]:35590 "EHLO conssluserg-03.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229637AbhCEGHD (ORCPT ); Fri, 5 Mar 2021 01:07:03 -0500 Received: from mail-pj1-f52.google.com (mail-pj1-f52.google.com [209.85.216.52]) (authenticated) by conssluserg-03.nifty.com with ESMTP id 12566f6G027079; Fri, 5 Mar 2021 15:06:41 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conssluserg-03.nifty.com 12566f6G027079 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1614924402; bh=axtBVNcIKru8BTiupCH9xPKdR4trfvDzg7QV+dWIl84=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=UnkXThtIV0P6A/Qzd4zEc4txigdJdqvV4LMYz7RB4w8evjXA7uK9k7JKeDmrgkx0l V7qFVyxGKYTsB8OOm0EjA9GNgxLGN/h7rU3WnQ7B4Vd9OMFcisej3JRDlhmd4RWIjG oN4NI9c8IGZSpbVin9dKx8ffN3piql5iEkxqTc5HDJJJGbkoIl6lMMPsUy03rV5Y09 /HqahoJxUNGrJnWbYS5pgbyPpkgy7KoY6Oux/ed3+931R7hSo+Dsd7hGogTxDZVW2b pQ22CoI+r/TCEglDS3IPq+YbUC9+vNd23u38ZHy1RGm+Rp8ZVTxz4pLZRpuSqK72qy DksjTPPFDfPEQ== X-Nifty-SrcIP: [209.85.216.52] Received: by mail-pj1-f52.google.com with SMTP id jx13so1216621pjb.1; Thu, 04 Mar 2021 22:06:41 -0800 (PST) X-Gm-Message-State: AOAM531Q/O1oVqNVs3utaBHgWY3eaoh9/pjdccq2bhgrBjeGYyGVtRuM nZGtUFtxo2yEQMc8qEKC3fU7xzCTrAu8GCvSVrM= X-Received: by 2002:a17:90a:dc08:: with SMTP id i8mr8206973pjv.153.1614924401138; Thu, 04 Mar 2021 22:06:41 -0800 (PST) MIME-Version: 1.0 References: <20210303183333.46543-1-masahiroy@kernel.org> In-Reply-To: From: Masahiro Yamada Date: Fri, 5 Mar 2021 15:06:04 +0900 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 1/4] kbuild: remove LLVM=1 test from HAS_LTO_CLANG To: Nick Desaulniers Cc: Sami Tolvanen , Linux Kbuild mailing list , clang-built-linux , Nathan Chancellor , LKML Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Mar 4, 2021 at 5:47 AM 'Nick Desaulniers' via Clang Built Linux wrote: > > + Sami > > On Wed, Mar 3, 2021 at 10:34 AM Masahiro Yamada wrote: > > > > This guarding is wrong. As Documentation/kbuild/llvm.rst notes, LLVM=1 > > switches the default of tools, but you can still override CC, LD, etc. > > individually. > > > > BTW, LLVM is not 1/0 flag. If LLVM is not passed in, it is empty. > > Do we have the same problem with LLVM_IAS? LGTM otherwise, but wanted > to check that before signing off. 3/4 will replace this LLVM_IAS check with AS_IS_LLVM. We do not need to add a noise change. > > (Also, the rest of the patches in this series seem more related to > DWARFv5 cleanups; this patch seems orthogonal while those are a > visible progression). Kind of orthogonal, but I am touching the same code hunk, which would cause a merge conflict. > > > > Non-zero return code is all treated as failure anyway. > > > > So, $(success,test $(LLVM) -eq 1) and $(success,test "$(LLVM)" = 1) > > works equivalently in the sense that both are expanded to 'n' if LLVM > > is not given. The difference is that the former internally fails due > > to syntax error. > > > > $ test ${LLVM} -eq 1 > > bash: test: -eq: unary operator expected > > $ echo $? > > 2 > > > > $ test "${LLVM}" -eq 1 > > bash: test: : integer expression expected > > $ echo $? > > 2 > > > > $ test "${LLVM}" = 1 > > echo $? > > 1 > > > > $ test -n "${LLVM}" > > $ echo $? > > 1 > > > > Signed-off-by: Masahiro Yamada > > --- > > > > arch/Kconfig | 1 - > > 1 file changed, 1 deletion(-) > > > > diff --git a/arch/Kconfig b/arch/Kconfig > > index 2bb30673d8e6..2af10ebe5ed0 100644 > > --- a/arch/Kconfig > > +++ b/arch/Kconfig > > @@ -632,7 +632,6 @@ config HAS_LTO_CLANG > > def_bool y > > # Clang >= 11: https://github.com/ClangBuiltLinux/linux/issues/510 > > depends on CC_IS_CLANG && CLANG_VERSION >= 110000 && LD_IS_LLD > > - depends on $(success,test $(LLVM) -eq 1) > > IIRC, we needed some other LLVM utilities like llvm-nm and llvm-ar, > which are checked below. So I guess we can still support CC=clang > AR=llvm-ar NM=llvm-nm, and this check is redundant. Yes, I think so. > > > depends on $(success,test $(LLVM_IAS) -eq 1) > > depends on $(success,$(NM) --help | head -n 1 | grep -qi llvm) > > depends on $(success,$(AR) --help | head -n 1 | grep -qi llvm) > > -- > > 2.27.0 > > > > > -- > Thanks, > ~Nick Desaulniers > > -- > You received this message because you are subscribed to the Google Groups "Clang Built Linux" group. > To unsubscribe from this group and stop receiving emails from it, send an email to clang-built-linux+unsubscribe@googlegroups.com. > To view this discussion on the web visit https://groups.google.com/d/msgid/clang-built-linux/CAKwvOdkhZGv_q9vgDdYY44OrbzmMD_E%2BGL3SyOk-jQ0kdXtMzg%40mail.gmail.com. -- Best Regards Masahiro Yamada