diff options
author | Paul Gortmaker <paul.gortmaker@windriver.com> | 2012-04-12 23:46:32 (GMT) |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-04-13 01:35:58 (GMT) |
commit | 69349c2dc01c489eccaa4c472542c08e370c6d7e (patch) | |
tree | 2422ef07a511d51714e0e16da1ac65c7256e9add /scripts/kconfig/confdata.c | |
parent | 7c427f45503f77f148cc2b66864e0684c60fa3a0 (diff) | |
download | linux-69349c2dc01c489eccaa4c472542c08e370c6d7e.tar.xz |
kconfig: fix IS_ENABLED to not require all options to be defined
Using IS_ENABLED() within C (vs. within CPP #if statements) in its
current form requires us to actually define every possible bool/tristate
Kconfig option twice (__enabled_* and __enabled_*_MODULE variants).
This results in a huge autoconf.h file, on the order of 16k lines for a
x86_64 defconfig.
Fixing IS_ENABLED to be able to work on the smaller subset of just
things that we really have defined is step one to fixing this. Which
means it has to not choke when fed non-enabled options, such as:
include/linux/netdevice.h:964:1: warning: "__enabled_CONFIG_FCOE_MODULE" is not defined [-Wundef]
The original prototype of how to implement a C and preprocessor
compatible way of doing this came from the Google+ user "comex ." in
response to Linus' crowdsourcing challenge for a possible improvement on
his earlier C specific solution:
#define config_enabled(x) (__stringify(x)[0] == '1')
In this implementation, I've chosen variable names that hopefully make
how it works more understandable.
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'scripts/kconfig/confdata.c')
0 files changed, 0 insertions, 0 deletions