From: Luc Van Oostenryck Date: Tue, 31 Oct 2017 17:22:23 +0000 (+0100) Subject: tile: pass machine size to sparse X-Git-Tag: v4.14-rc8~13^2~1 X-Git-Url: http://git.samba.org/samba.git/?p=sfrench%2Fcifs-2.6.git;a=commitdiff_plain;h=ea82daf4354e45e9b830d9fe58713011c83b07b8;hp=8a5776a5f49812d29fe4b2d0a2d71675c3facf3f tile: pass machine size to sparse 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, like issuing false warnings like: 'constant ... is so big it is unsigned long long' or 'shift too big (32) for type unsigned long' when the architecture is 64bit while sparse was compiled on a 32bit machine, or worse, to not emit legitimate warnings in the reverse situation. Fix this by passing to sparse the appropriate -m32/-m64 flag. To: Chris Metcalf Signed-off-by: Luc Van Oostenryck Signed-off-by: Chris Metcalf --- diff --git a/arch/tile/Makefile b/arch/tile/Makefile index 4dc380a519d4..8fa0befba32b 100644 --- a/arch/tile/Makefile +++ b/arch/tile/Makefile @@ -51,6 +51,8 @@ else BITS := 32 endif +CHECKFLAGS += -m$(BITS) + head-y := arch/tile/kernel/head_$(BITS).o libs-y += arch/tile/lib/