Skip to content

Commit

Permalink
nds32: define __NDS32_E[BL]__ for sparse
Browse files Browse the repository at this point in the history
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 <[email protected]>
Acked-by: Greentime Hu <[email protected]>
Signed-off-by: Greentime Hu <[email protected]>
  • Loading branch information
lucvoo authored and Greentime Hu committed Jun 19, 2018
1 parent ce397d2 commit 97d1e3d
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions arch/nds32/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 97d1e3d

Please sign in to comment.