205-kconfig-exit.patch 913 B

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