提交 ea82daf4 编写于 作者: L Luc Van Oostenryck 提交者: Chris Metcalf

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 <cmetcalf@mellanox.com>
Signed-off-by: NLuc Van Oostenryck <luc.vanoostenryck@gmail.com>
Signed-off-by: NChris Metcalf <cmetcalf@mellanox.com>
上级 8a5776a5
......@@ -51,6 +51,8 @@ else
BITS := 32
endif
CHECKFLAGS += -m$(BITS)
head-y := arch/tile/kernel/head_$(BITS).o
libs-y += arch/tile/lib/
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册