From: Nathan Chancellor <nathan@kernel.org> To: Masahiro Yamada <masahiroy@kernel.org>, linux-kbuild@vger.kernel.org Cc: Albert Ou <aou@eecs.berkeley.edu>, Michal Marek <michal.lkml@markovi.net>, Nick Desaulniers <ndesaulniers@google.com>, Palmer Dabbelt <palmer@dabbelt.com>, Paul Walmsley <paul.walmsley@sifive.com>, clang-built-linux@googlegroups.com, linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org Subject: Re: [PATCH] kbuild: check CONFIG_AS_IS_LLVM instead of LLVM_IAS Date: Thu, 5 Aug 2021 11:46:10 -0700 [thread overview] Message-ID: <59ce441e-8deb-39ff-700f-4e1c4e871177@kernel.org> (raw) In-Reply-To: <20210805150102.131008-1-masahiroy@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 <masahiroy@kernel.org> Reviewed-by: Nathan Chancellor <nathan@kernel.org> > --- > > 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 >
WARNING: multiple messages have this Message-ID (diff)
From: Nathan Chancellor <nathan@kernel.org> To: Masahiro Yamada <masahiroy@kernel.org>, linux-kbuild@vger.kernel.org Cc: Albert Ou <aou@eecs.berkeley.edu>, Michal Marek <michal.lkml@markovi.net>, Nick Desaulniers <ndesaulniers@google.com>, Palmer Dabbelt <palmer@dabbelt.com>, Paul Walmsley <paul.walmsley@sifive.com>, clang-built-linux@googlegroups.com, linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org Subject: Re: [PATCH] kbuild: check CONFIG_AS_IS_LLVM instead of LLVM_IAS Date: Thu, 5 Aug 2021 11:46:10 -0700 [thread overview] Message-ID: <59ce441e-8deb-39ff-700f-4e1c4e871177@kernel.org> (raw) In-Reply-To: <20210805150102.131008-1-masahiroy@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 <masahiroy@kernel.org> Reviewed-by: Nathan Chancellor <nathan@kernel.org> > --- > > 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 > _______________________________________________ linux-riscv mailing list linux-riscv@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-riscv
next prev parent reply other threads:[~2021-08-05 18:46 UTC|newest] Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-08-05 15:01 [PATCH] kbuild: check CONFIG_AS_IS_LLVM instead of LLVM_IAS Masahiro Yamada 2021-08-05 15:01 ` Masahiro Yamada 2021-08-05 18:22 ` Nick Desaulniers 2021-08-05 18:22 ` Nick Desaulniers 2021-08-05 18:46 ` Nathan Chancellor [this message] 2021-08-05 18:46 ` Nathan Chancellor 2021-08-10 0:05 ` Masahiro Yamada 2021-08-10 0:05 ` Masahiro Yamada
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=59ce441e-8deb-39ff-700f-4e1c4e871177@kernel.org \ --to=nathan@kernel.org \ --cc=aou@eecs.berkeley.edu \ --cc=clang-built-linux@googlegroups.com \ --cc=linux-kbuild@vger.kernel.org \ --cc=linux-kernel@vger.kernel.org \ --cc=linux-riscv@lists.infradead.org \ --cc=masahiroy@kernel.org \ --cc=michal.lkml@markovi.net \ --cc=ndesaulniers@google.com \ --cc=palmer@dabbelt.com \ --cc=paul.walmsley@sifive.com \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.