Re: [PATCH 0/3] MIPS: Fix build issues from the introduction of `need-compiler'

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi, Maciej,

On Wed, Jul 19, 2023 at 11:39 PM Maciej W. Rozycki <macro@xxxxxxxxxxx> 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




[Index of Archives]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux