Add config_enabled() from Linux

This change is taken from Linux. It allows to check for Kconfig
definitions in the preprocessor and source code using the same

Long term plan is to remove our Kconfig hack to #define values to 0,
and this helps.

This includes a tiny modification to the macros to fix romcc support.

Change-Id: I0fddbea8c8ca215cf226acf39cb329b0ba0445a5
Signed-off-by: Patrick Georgi <>
Tested-by: build bot (Jenkins)
Reviewed-by: Ronald G. Minnich <>
2 files changed