kbuild: add endianness flag to CHEKCFLAGS
authorLuc Van Oostenryck <luc.vanoostenryck@gmail.com>
Mon, 28 May 2018 18:27:35 +0000 (20:27 +0200)
committerMasahiro Yamada <yamada.masahiro@socionext.com>
Tue, 29 May 2018 13:05:08 +0000 (22:05 +0900)
commit145167650b96967d6b726efef978c74831e6b2bd
treed44acd9ef948a6ac63f1b72194a4b1691478bac1
parent59f7b5847b0c279d416977d07b7d23aaa7fdc1be
kbuild: add endianness flag to CHEKCFLAGS

The kernel depends on macros like __BYTE_ORDER__,
__BIG_ENDIAN__ or __LITTLE_ENDIAN__.

OTOH, sparse doesn't know about the endianness of the kernel and
by default uses the same as the machine on which sparse was built.

Ensure that sparse can predefine the macros corresponding to
how the kernel was configured by adding -m{big,little}-endian
to CHECKFLAGS in the main Makefile (and so for all archs).
Also, remove the equivalent done in arch specific Makefiles.

Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Makefile
arch/openrisc/Makefile
arch/parisc/Makefile
arch/s390/Makefile