kconfig: allow use of relations other than (in)equality
authorJan Beulich <JBeulich@suse.com>
Mon, 15 Jun 2015 12:00:21 +0000 (13:00 +0100)
committerChristian Lamparter <chunkeey@googlemail.com>
Wed, 27 Apr 2016 14:17:14 +0000 (16:17 +0200)
commitb049eebc30b8654df29be2960f85762f679a6699
tree7d2b08ff0ad76115e22f413395abfb2e340a14d2
parentb5b81a87c764e579256cb533ed5ace8315e9ceff
kconfig: allow use of relations other than (in)equality

Over the years I found it desirable to be able to use all sorts of
relations, not just (in)equality. And apparently I'm not the only one,
as there's at least one example in the tree where the programmer
assumed this would work (see DEBUG_UART_8250_WORD in
arch/arm/Kconfig.debug). Another possible use would e.g. be to fold the
two SMP/NR_CPUS prompts into one: SMP could be promptless, simply
depending on NR_CPUS > 1.

A (desirable) side effect of this change - resulting from numeric
values now necessarily being compared as numbers rather than as
strings - is that comparing hex values now works as expected: Other
than int ones (which aren't allowed to have leading zeroes), zeroes
following the 0x prefix made them compare unequal even if their values
were equal.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
config/expr.c
config/expr.h
config/symbol.c
config/zconf.l
config/zconf.y