[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAAhV-H7K2qM35GuGV+B2p=N_f30i98KazvwVNCuvvG9fYfrghw@mail.gmail.com>
Date: Thu, 20 Jul 2023 09:55:51 +0800
From: Huacai Chen <chenhuacai@...nel.org>
To: "Maciej W. Rozycki" <macro@...am.me.uk>
Cc: Thomas Bogendoerfer <tsbogend@...ha.franken.de>,
Jan-Benedict Glaw <jbglaw@...-owl.de>,
Guillaume Tucker <guillaume.tucker@...labora.com>,
Huacai Chen <chenhuacai@...ngson.cn>,
linux-mips@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 0/3] MIPS: Fix build issues from the introduction of `need-compiler'
Hi, Maciej,
On Wed, Jul 19, 2023 at 11:39 PM Maciej W. Rozycki <macro@...am.me.uk> wrote:
>
> On Tue, 18 Jul 2023, Huacai Chen wrote:
>
> > Even if patch-2 resolves the problem, I don't think patch-3 is
> > necessary because the original patch makes code simpler and more
> > compact.
>
> Please don't top-post on a public mailing list.
>
> If you're referring to this part:
>
> +ifdef CONFIG_CPU_LOONGSON64
> +cflags-$(CONFIG_CPU_LOONGSON64) += -Wa,--trap
> +cflags-$(CONFIG_CC_IS_GCC) += -march=loongson3a
> +cflags-$(CONFIG_CC_IS_CLANG) += -march=mips64r2
> +endif
>
> then it can be done with a separate clean-up. Otherwise it'll have been
> lost in the noise.
>
> Firstly:
>
> cflags-$(CONFIG_CPU_LOONGSON64) += -Wa,--trap
>
> doesn't have to be wrapped in `ifdef CONFIG_CPU_LOONGSON64'.
>
> Secondly:
>
> cflags-$(CONFIG_CC_IS_GCC) += -march=loongson3a
> cflags-$(CONFIG_CC_IS_CLANG) += -march=mips64r2
>
> document compiler peculiarities. Does Clang support, or intend to,
> `-march=loongson3a'? If so, what version can we expect this stuff in?
> GCC has had it since 4.6 or Y2010, which is pretty long ago.
GCC support loongson3a/mips64r2, Clang only support mips64r2. If we use
$(call cc-option,-march=loongson3a,-march=mips64r2)
both GCC and Clang can work and we don't need to care about the compiler.
Huacai
>
> Last but not least there are formatting anomalies there, which may have
> to be dealt with in a separate change.
>
> Maciej
Powered by blists - more mailing lists