generic: Convert incorrect generic/5.10 patches
[openwrt/staging/nbd.git] / target / linux / generic / hack-5.10 / 205-kconfig-exit.patch
1 From: David Bauer <mail@david-bauer.net>
2 Subject: Kconfig: exit on unset symbol
3
4 When a target configuration has unset Kconfig symbols, the build will
5 fail when OpenWrt is compiled with V=s and stdin is connected to a tty.
6
7 In case OpenWrt is compiled without either of these preconditions, the
8 build will succeed with the symbols in question being unset.
9
10 Modify the kernel configuration in a way it fails on unset symbols
11 regardless of the aforementioned preconditions.
12
13 Submitted-by: David Bauer <mail@david-bauer.net>
14 ---
15 scripts/kconfig/conf.c | 2 +
16 1 files changed, 2 insertions(+)
17
18 --- a/scripts/kconfig/conf.c
19 +++ b/scripts/kconfig/conf.c
20 @@ -215,6 +215,8 @@ static int conf_sym(struct menu *menu)
21 break;
22 continue;
23 case 0:
24 + if (!sym_has_value(sym) && !tty_stdio && getenv("FAIL_ON_UNCONFIGURED"))
25 + exit(1);
26 newval = oldval;
27 break;
28 case '?':