kernel_optimize_test/scripts/kconfig
Nicolas Pitre 9059a3493e kconfig: fix relational operators for bool and tristate symbols
Since commit 31847b67be ("kconfig: allow use of relations other than
(in)equality") it is possible to use relational operators in Kconfig
statements. However, those operators give unexpected results when
applied to bool/tristate values:

	(n < y) = y (correct)
	(m < y) = y (correct)
	(n < m) = n (wrong)

This happens because relational operators process bool and tristate
symbols as strings and m sorts before n. It makes little sense to do a
lexicographical compare on bool and tristate values though.

Documentation/kbuild/kconfig-language.txt states that expression can have
a value of 'n', 'm' or 'y' (or 0, 1, 2 respectively for calculations).
Let's make it so for relational comparisons with bool/tristate
expressions as well and document them. If at least one symbol is an
actual string then the lexicographical compare works just as before.

Signed-off-by: Nicolas Pitre <nico@linaro.org>
Acked-by: Randy Dunlap <rdunlap@infradead.org>
Tested-by: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2018-01-06 02:31:23 +09:00
..
lxdialog License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
.gitignore Remove gperf usage from toolchain 2017-08-19 11:02:53 -07:00
check.sh License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
conf.c
confdata.c
expr.c kconfig: fix relational operators for bool and tristate symbols 2018-01-06 02:31:23 +09:00
expr.h
gconf.c
gconf.glade
images.c
kconf_id.c Remove gperf usage from toolchain 2017-08-19 11:02:53 -07:00
kxgettext.c
list.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
lkc_proto.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
lkc.h Remove gperf usage from toolchain 2017-08-19 11:02:53 -07:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
mconf.c
menu.c
merge_config.sh
nconf.c
nconf.gui.c
nconf.h
POTFILES.in
qconf.cc
qconf.h
streamline_config.pl
symbol.c kconfig/symbol.c: use correct pointer type argument for sizeof 2017-11-23 23:12:02 +09:00
util.c
zconf.l
zconf.lex.c_shipped
zconf.tab.c_shipped Remove gperf usage from toolchain 2017-08-19 11:02:53 -07:00
zconf.y Remove gperf usage from toolchain 2017-08-19 11:02:53 -07:00