openwrt/scripts/config
Nicolas Pitre e7ccc34478 config: fix relational operators for bool and tristate symbols
Since commit 31847b67bec0 ("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>
[rebased against OpenWrt kconfig, slightly reword commit message]
(backported from upstream 9059a3493efea6492451430c7e2fa0af799a2abb)
Signed-off-by: Jo-Philipp Wich <jo@mein.io>

(cherry picked from commit 75dcaf3d23)
2019-09-04 13:15:26 +02:00
..
lxdialog scripts/config: sync with linux upstream 2015-01-08 14:33:53 +00:00
.gitignore scripts/config: add qconf files to .gitignore 2017-11-02 15:58:45 +01:00
conf.c config: Change conf.c remove compiler warnings 2018-07-30 10:43:36 +02:00
confdata.c scripts/config: sync with latest linux upstream 2016-08-03 20:03:35 +02:00
expr.c config: fix relational operators for bool and tristate symbols 2019-09-04 13:15:26 +02:00
expr.h scripts/config: sync with latest linux upstream 2016-08-03 20:03:35 +02:00
images.c scripts/config: import qconf 2017-11-02 15:58:45 +01:00
list.h scripts/config: sync with linux upstream 2015-01-08 14:33:53 +00:00
lkc_proto.h scripts/config: sync with latest linux upstream 2016-08-03 20:03:35 +02:00
lkc.h scripts/config: sync with latest linux upstream 2016-08-03 20:03:35 +02:00
Makefile build: cleanup leftover qconf files 2018-02-13 11:35:35 +01:00
mconf.c merge: base: update base-files and basic config 2017-12-08 19:41:18 +01:00
menu.c scripts/config: sync with latest linux upstream 2016-08-03 20:03:35 +02:00
qconf.cc scripts/config: import qconf 2017-11-02 15:58:45 +01:00
qconf.h scripts/config: import qconf 2017-11-02 15:58:45 +01:00
README build: add new menuconfig code based on linux 3.9 2013-04-18 12:05:16 +00:00
symbol.c scripts/config: properly handle select on symbols with unmet direct dependencies 2016-08-03 20:03:36 +02:00
util.c scripts/config: sync with latest linux upstream 2016-08-03 20:03:35 +02:00
zconf.gperf scripts/config: sync with latest linux upstream 2016-08-03 20:03:35 +02:00
zconf.hash.c_shipped config: regenerate *_shipped sources 2019-09-04 13:15:26 +02:00
zconf.l scripts/config: sync with latest linux upstream 2016-08-03 20:03:35 +02:00
zconf.lex.c_shipped config: regenerate *_shipped sources 2019-09-04 13:15:26 +02:00
zconf.tab.c_shipped scripts/config: sync with latest linux upstream 2016-08-03 20:03:35 +02:00
zconf.y scripts/config: sync with latest linux upstream 2016-08-03 20:03:35 +02:00

These files were taken from the Linux 3.9 Kernel
Configuration System and modified for the OpenWrt Buildroot.