LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH] nds32: define __NDS32_E[BL]__ for sparse
@ 2018-05-28 16:29 Luc Van Oostenryck
2018-05-29 9:29 ` Greentime Hu
0 siblings, 1 reply; 2+ messages in thread
From: Luc Van Oostenryck @ 2018-05-28 16:29 UTC (permalink / raw)
To: linux-kernel, Greentime Hu, Vincent Chen; +Cc: Luc Van Oostenryck
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@gmail.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
--
2.17.0
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] nds32: define __NDS32_E[BL]__ for sparse
2018-05-28 16:29 [PATCH] nds32: define __NDS32_E[BL]__ for sparse Luc Van Oostenryck
@ 2018-05-29 9:29 ` Greentime Hu
0 siblings, 0 replies; 2+ messages in thread
From: Greentime Hu @ 2018-05-29 9:29 UTC (permalink / raw)
To: Luc Van Oostenryck; +Cc: Linux Kernel Mailing List, Vincent Chen
2018-05-29 0:29 GMT+08:00 Luc Van Oostenryck <luc.vanoostenryck@gmail.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@gmail.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@andestech.com>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-05-29 9:29 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-05-28 16:29 [PATCH] nds32: define __NDS32_E[BL]__ for sparse Luc Van Oostenryck
2018-05-29 9:29 ` Greentime Hu
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).