From: Xi Ruoyao <xry111@xry111.site>
To: Huacai Chen <chenhuacai@kernel.org>
Cc: Tiezhu Yang <yangtiezhu@loongson.cn>,
Josh Poimboeuf <jpoimboe@kernel.org>,
Peter Zijlstra <peterz@infradead.org>,
loongarch@lists.linux.dev, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3 3/4] LoongArch: Set AS_HAS_THIN_ADD_SUB as y if AS_IS_LLVM
Date: Mon, 09 Sep 2024 14:13:55 +0800 [thread overview]
Message-ID: <79f74b9c3df579fb8f22276c8dfe7196221e806e.camel@xry111.site> (raw)
In-Reply-To: <CAAhV-H79ToM4t_=b-teWT=2HVF8JcrwHYC+OeepXm51QjTw_eA@mail.gmail.com>
On Mon, 2024-09-09 at 09:04 +0800, Huacai Chen wrote:
> On Sun, Sep 8, 2024 at 10:43 PM Xi Ruoyao <xry111@xry111.site> wrote:
> >
> > On Wed, 2024-08-07 at 16:59 +0800, Tiezhu Yang wrote:
> > > When building kernel with "make CC=clang defconfig", LLVM Assembler
> > > is used due to LLVM_IAS=0 is not specified, then AS_HAS_THIN_ADD_SUB
> > > is not set, thus objtool can not be built after enable it for Clang.
> > >
> > > config AS_HAS_THIN_ADD_SUB is to check whether -mthin-add-sub option is
> > > available to know R_LARCH_{32,64}_PCREL are supported for GNU Assembler,
> > > there is no this option for LLVM Assembler. The minimal version of Clang
> > > is 18 for building LoongArch kernel, and Clang >= 17 already supports
> > > R_LARCH_{32,64}_PCREL, that is to say, there is no need to depend on
> > > AS_HAS_THIN_ADD_SUB for Clang, so just set AS_HAS_THIN_ADD_SUB as y if
> > > AS_IS_LLVM.
> > >
> > > Fixes: 120dd4118e58 ("LoongArch: Only allow OBJTOOL & ORC unwinder if toolchain supports -mthin-add-sub")
> > > Signed-off-by: Tiezhu Yang <yangtiezhu@loongson.cn>
> >
> > This is what I wanted in
> > https://lore.kernel.org/all/20240604150741.30252-1-xry111@xry111.site/.
> Then which one is better? AS_IS_LLVM or CC_IS_CLANG?
AS_IS_LLVM should be better because when "make LLVM=1 LLVM_IAS=0" we
still need to check against gas from binutils.
--
Xi Ruoyao <xry111@xry111.site>
School of Aerospace Science and Technology, Xidian University
next prev parent reply other threads:[~2024-09-09 6:14 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-07 8:59 [PATCH v3 0/4] Fix objtool issues about do_syscall() and Clang on LoongArch Tiezhu Yang
2024-08-07 8:59 ` [PATCH v3 1/4] objtool: Handle frame pointer related instructions Tiezhu Yang
2024-09-09 1:10 ` Jinyang He
2024-08-07 8:59 ` [PATCH v3 2/4] LoongArch: Remove STACK_FRAME_NON_STANDARD(do_syscall) Tiezhu Yang
2024-08-07 8:59 ` [PATCH v3 3/4] LoongArch: Set AS_HAS_THIN_ADD_SUB as y if AS_IS_LLVM Tiezhu Yang
2024-09-08 14:42 ` Xi Ruoyao
2024-09-09 1:04 ` Huacai Chen
2024-09-09 6:13 ` Xi Ruoyao [this message]
2024-08-07 8:59 ` [PATCH v3 4/4] LoongArch: Enable objtool for Clang Tiezhu Yang
2024-09-08 12:01 ` [PATCH v3 0/4] Fix objtool issues about do_syscall() and Clang on LoongArch Huacai Chen
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=79f74b9c3df579fb8f22276c8dfe7196221e806e.camel@xry111.site \
--to=xry111@xry111.site \
--cc=chenhuacai@kernel.org \
--cc=jpoimboe@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=loongarch@lists.linux.dev \
--cc=peterz@infradead.org \
--cc=yangtiezhu@loongson.cn \
/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: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®