[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAEbi=3dB=12nPiqk1zC6PTqBb_Z4GaoYUZBww7t_jy3REd=P4A@mail.gmail.com>
Date: Tue, 29 May 2018 17:29:03 +0800
From: Greentime Hu <green.hu@...il.com>
To: Luc Van Oostenryck <luc.vanoostenryck@...il.com>
Cc: Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Vincent Chen <deanbo422@...il.com>
Subject: Re: [PATCH] nds32: define __NDS32_E[BL]__ for sparse
2018-05-29 0:29 GMT+08:00 Luc Van Oostenryck <luc.vanoostenryck@...il.com>:
> nds32 depends on the macros '__NDS32_E[BL]__' to correctly
> select or define endian-specific macros, structures or pieces
> of code.
>
> These macros are predefined by the compiler but sparse knows nothing
> about them and thus may pre-process files differently from what
> GCC would.
>
> Fix this by adding '-D__NDS32_E[BL]__' to CHECKFLAGS.
>
> Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@...il.com>
> ---
> arch/nds32/Makefile | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/arch/nds32/Makefile b/arch/nds32/Makefile
> index 513bb2e9b..031c67682 100644
> --- a/arch/nds32/Makefile
> +++ b/arch/nds32/Makefile
> @@ -34,10 +34,12 @@ ifdef CONFIG_CPU_LITTLE_ENDIAN
> KBUILD_CFLAGS += $(call cc-option, -EL)
> KBUILD_AFLAGS += $(call cc-option, -EL)
> LDFLAGS += $(call cc-option, -EL)
> +CHECKFLAGS += -D__NDS32_EL__
> else
> KBUILD_CFLAGS += $(call cc-option, -EB)
> KBUILD_AFLAGS += $(call cc-option, -EB)
> LDFLAGS += $(call cc-option, -EB)
> +CHECKFLAGS += -D__NDS32_EB__
> endif
>
> boot := arch/nds32/boot
Thank you Luc.
I'll pick it in my tree.
Acked-by: Greentime Hu <greentime@...estech.com>
Powered by blists - more mailing lists