Commit a887a07d authored by Geert Uytterhoeven's avatar Geert Uytterhoeven Committed by Sam Ravnborg

kbuild: sparse needs CF not CHECKFLAGS

Documentation/sparse.txt tells to use:

    make C=2 CHECKFLAGS="-D__CHECK_ENDIAN__"

However, this still doesn't enable endian checks. The correct syntax is:

    make C=2 CF="-D__CHECK_ENDIAN__"

This documentation bug was introduced by the following commit:

    commit 1c7bafe7
    Author: Robert P. J. Day <rpjday@mindspring.com>
    Date:   Wed Sep 13 07:57:50 2006 -0400

	kbuild: clarify "make C=" build option

	Clarify the use of "make C=" in the top-level Makefile, and fix a
	typo in the Documentation file.
Signed-off-by: default avatarSam Ravnborg <sam@ravnborg.org>

This `typo' was not a typo, as `CF' had been introduced much earlier, by:

    commit 7b49bb9a
    Author: viro@ZenIV.linux.org.uk <viro@ZenIV.linux.org.uk>
    Date:   Fri Sep 9 21:14:35 2005 +0100

	[PATCH] kbuild: CF=<arguments> passes arguments to sparse

	Allows to add to sparse arguments without mutilating makefiles - just
	pass CF=<arguments> and they will be added to CHECKFLAGS.
Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
Signed-off-by: default avatarSam Ravnborg <sam@ravnborg.org>
Signed-off-by: default avatarGeert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
Signed-off-by: default avatarSam Ravnborg <sam@ravnborg.org>
parent 74fc5c65
......@@ -73,10 +73,10 @@ recompiled, or use "make C=2" to run sparse on the files whether they need to
be recompiled or not. The latter is a fast way to check the whole tree if you
have already built it.
The optional make variable CHECKFLAGS can be used to pass arguments to sparse.
The build system passes -Wbitwise to sparse automatically. To perform
endianness checks, you may define __CHECK_ENDIAN__:
The optional make variable CF can be used to pass arguments to sparse. The
build system passes -Wbitwise to sparse automatically. To perform endianness
checks, you may define __CHECK_ENDIAN__:
make C=2 CHECKFLAGS="-D__CHECK_ENDIAN__"
make C=2 CF="-D__CHECK_ENDIAN__"
These checks are disabled by default as they generate a host of warnings.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment