kbuild: add machine size to CHECKFLAGS
authorLuc Van Oostenryck <luc.vanoostenryck@gmail.com>
Wed, 30 May 2018 20:48:38 +0000 (22:48 +0200)
committerMasahiro Yamada <yamada.masahiro@socionext.com>
Fri, 1 Jun 2018 02:36:58 +0000 (11:36 +0900)
commit1f2f01b122d7c78a9e842a126ef168afb279552b
tree1b1732ed86d8ff44efe1ee7812b26ee1741939b3
parent145167650b96967d6b726efef978c74831e6b2bd
kbuild: add machine size to CHECKFLAGS

By default, sparse assumes a 64bit machine when compiled on x86-64
and 32bit when compiled on anything else.

This can of course create all sort of problems for the other archs, like
issuing false warnings ('shift too big (32) for type unsigned long'), or
worse, failing to emit legitimate warnings.

Fix this by adding the -m32/-m64 flag, depending on CONFIG_64BIT,
to CHECKFLAGS in the main Makefile (and so for all archs).
Also, remove the now unneeded -m32/-m64 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/alpha/Makefile
arch/arm/Makefile
arch/arm64/Makefile
arch/ia64/Makefile
arch/mips/Makefile
arch/parisc/Makefile
arch/sparc/Makefile
arch/x86/Makefile