openwrt/scripts
Nicolas Pitre 75dcaf3d23 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>
2019-06-20 14:14:16 +02:00
..
config config: fix relational operators for bool and tristate symbols 2019-06-20 14:14:16 +02:00
flashing scripts: make eva_ramboot.py offset configurable 2019-02-28 11:32:55 +01:00
arm-magic.sh
brcmImage.pl
bundle-libraries.sh scripts: bundle-libraries: fix logic flaw 2018-08-29 14:19:43 +02:00
checkpatch.pl
clang-gcc-wrapper
clean-package.sh build: fix STAGING_DIR cleaning when filenames contain spaces 2019-05-17 21:41:43 +02:00
cleanfile
cleanpatch
combined-ext-image.sh
combined-image.sh
config.guess scripts: update config.guess and config.sub 2018-11-01 17:16:52 +01:00
config.rpath
config.sub scripts: update config.guess and config.sub 2018-11-01 17:16:52 +01:00
deptest.sh
diffconfig.sh
dl_cleanup.py
dl_github_archive.py scripts/dl_github_archive.py: stringify exception 2018-07-17 17:27:01 +00:00
download.pl
env
ext-toolchain.sh
feeds include/feeds.mk: rework generation of opkg distfeeds.conf 2018-07-12 21:18:41 +02:00
fixup-makefile.pl fixup-makefile.pl: fixup when PKG_SOURCE is defined elsewhere 2018-07-05 01:30:57 +08:00
gen_image_generic.sh scripts/gen_image_generic.sh: fail on errors 2019-03-27 00:13:30 +02:00
gen-dependencies.sh
get_source_date_epoch.sh
getver.sh
ipkg-build script: ipkg-build: honour $SOURCE_DATE_EPOCH 2018-11-08 11:52:33 +01:00
ipkg-make-index.sh scripts: ipkg-make-index.sh: dereference symbolic links 2019-01-31 12:35:29 +01:00
ipkg-remove scripts: ipkg-remove: handle existing .ipk files without SourceName field 2019-01-21 16:35:40 +01:00
kconfig.pl
linksys-image.sh build: add a script for generating Linksys factory images 2019-01-26 21:43:07 +01:00
make-ipkg-dir.sh
md5sum
metadata.pm build: add a config option for enabling a testing version of the target kernel 2019-05-11 11:37:10 +02:00
mkhash.c
mkits-qsdk-ipq-image.sh build: add helpers for generating QSDK sysupgrade compatible images 2019-02-25 17:36:16 +01:00
mkits.sh
om-fwupgradecfg-gen.sh ar71xx: Skip more hashed blocks for OM2P(-HS) 64k variant 2018-09-10 10:01:58 +02:00
package-metadata.pl build: add support to && in DEPENDS 2019-05-31 11:21:22 +02:00
pad_image
patch-kernel.sh
patch-specs.sh toolchain: Add GCC 9.1.0 release 2019-06-16 16:40:08 +02:00
portable_date.sh
qemustart scripts/qemustart: add notes on adding new options 2019-04-26 13:09:33 +00:00
redboot-script.pl
relink-lib.sh
remote-gdb
rstrip.sh scripts: rstrip.sh: allow rpath with sole $ORIGIN token 2018-12-19 15:36:05 +01:00
slugimage.pl
srecimage.pl
strip-kmod.sh
symlink-tree.sh
sysupgrade-tar.sh build: Drop user/group ID/name from sysupgrade.tar 2019-01-02 22:36:17 +01:00
target-metadata.pl build: add a config option for enabling a testing version of the target kernel 2019-05-11 11:37:10 +02:00
time.pl scripts: time.pl: avoid hard Time::HiRes dependency 2018-08-05 12:24:01 +02:00
timestamp.pl
ubinize-image.sh