[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAAhV-H5tB9nvD8Uufn5SQ1s0hzob4TuxRTaSri-cxHVqtRH6uw@mail.gmail.com>
Date: Mon, 29 Aug 2022 12:33:02 +0800
From: Huacai Chen <chenhuacai@...nel.org>
To: Xi Ruoyao <xry111@...111.site>, Arnd Bergmann <arnd@...db.de>
Cc: loongarch@...ts.linux.dev, LKML <linux-kernel@...r.kernel.org>,
WANG Xuerui <kernel@...0n.name>,
Youling Tang <tangyouling@...ngson.cn>,
Jinyang He <hejinyang@...ngson.cn>
Subject: Re: [PATCH 0/8] LoongArch: Support toolchain with new relocation types
Hi, Ruoyao,
On Mon, Aug 29, 2022 at 12:17 AM Xi Ruoyao <xry111@...111.site> wrote:
>
> On Sun, 2022-08-28 at 22:15 +0800, Huacai Chen wrote:
> > 1, You can still call it v5, even if it has changed a lot;
>
> Ok, so should I call the next version v2 or v6?
V6 is reasonable to me.
>
> Sorry for introducing such a mess :(.
>
> > 2, In my opinion, patch 4,5,7,8 can be combined, but I don't insist if
> > you have a good reason to separate.
>
> If we'll drop support for old GCC/Binutils, we can drop patch 5 (it's
> only needed for the combination of old GCC and new Binutils). Then
> squash 4 and 7. 8 should still be standalone IMO.
Whether we can drop old toolchains depends on Arnd. :)
But even if we should support old toolchains, I think we only need to
consider new binutils + new gcc and old binutils + old gcc, I don't
think new binutils + old gcc and old binutils + new gcc can exist in
the real world.
>
> > 3, If possible, I still prefer to remove old relocation types support,
> > in order to make life easier, especially for objtool that is queued
> > for upstream.
>
> How about this? I'm not sure if it's proper to invoke "error" in
> Makefile.
>
> ifneq ($(shell $(CC) $(srctree)/arch/loongarch/scripts/toolchain-check.c &> /dev/null -o /dev/null && echo "ok"), ok)
> ifdef CONFIG_MODULES
> $(error "toolchain is too old for LoongArch modular kernel")
> endif
> endif
>
> toolchain-check.c:
>
> #if !__has_attribute(model)
> #error no model attribute
> #endif
>
> int main()
> {
> __asm__("x:pcalau12i $t0,%pc_hi20(x)");
> }
Compared to toolchain-check.c, I prefer to change Kconfig, so please
keep the old way. But since new binutils + old gcc and old binutils +
new gcc can hardly exist, can we only check the gcc features
(explicit-relocs and has_attribute)?
Huacai
> --
> Xi Ruoyao <xry111@...111.site>
> School of Aerospace Science and Technology, Xidian University
Powered by blists - more mailing lists