Re: [PATCH 07/12] Compiler Attributes: remove unneeded sparse (__CHECKER__) tests

From: Linus Torvalds
Date: Wed Sep 05 2018 - 15:40:42 EST


On Wed, Sep 5, 2018 at 12:30 PM Josh Triplett <josh@xxxxxxxxxxxxxxxx> wrote:
>
> Unlike GCC, I don't think it's at all unreasonable to assume a
> *relatively* recent version of Sparse.

Yeah, sparse is small and easy to build and installs in your own
~/bin/ directory by default.

Anybody who can build the kernel can trivially fetch and build sparse
in seconds. It literally builds from scratch in 2.5s for me.

I don't think you even need any development packages that you don't
already need for the kernel. Just a C compiler and libc, basically.

Sure, some parts of sparse can use things like libxml and llvm and
even gtk, but that's for functionality that the "check kernel with
sparse" doesn't even need, and the makefile will automatically disable
them if you don't have it installed.

So if people are having trouble, just point them to the sparse repo,
and tell them that

git clone ...
cd sparse
make -j8
make install

fixes the issue in 30 seconds.

Although maybe I'm misstating just how easy sparse is to build and
install, and people have had problems?

Linus