9
0
Fork 0
barebox/include
Sascha Hauer f72b0713d6 kconfig: fix IS_ENABLED to not require all options to be defined
From Linux commit 69349c2dc01c489eccaa4c472542c08e370c6d7e:

    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>

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-07-25 09:27:16 +02:00
..
asm-generic ARM: add initial i.MX6 support 2012-04-24 10:31:44 +02:00
cramfs Change byte order detection mechanism to kernel style 2012-06-28 13:49:16 +02:00
i2c Allow data-only i2c transfers 2011-10-07 15:42:48 +02:00
linux kconfig: fix IS_ENABLED to not require all options to be defined 2012-07-25 09:27:16 +02:00
mci twl6030: add missing twl6030 header file. 2012-01-06 09:50:11 +01:00
mfd Add MC13783 SWx definitions 2012-04-11 09:51:01 +02:00
mtd barebox ubi changes 2010-07-05 15:07:14 +02:00
net drivers/net: add designware driver 2012-06-26 17:41:12 +02:00
spi spi: indicate in the docs that per-transfer bpw setting is not supported 2011-09-29 12:27:32 +02:00
usb Merge branch 'for-next/dma-cache-align' 2012-07-02 10:59:22 +02:00
.gitignore move barebox_default_env.h to include/generated/ 2010-09-17 10:56:24 +08:00
aimage.h arm: add Android boot image support 2012-04-13 12:08:42 +02:00
ata_drive.h ATA Disk Support: Add support for native ATA type drives 2011-11-28 09:23:24 +01:00
binfmt.h Introduce binfmt support 2012-04-18 20:14:12 +08:00
block.h block: reimplement caching 2012-02-15 08:21:43 +01:00
bmp_layout.h framebuffer: Add bmp command to show bmp files 2009-07-31 15:08:49 +02:00
boot.h booting: more flexible Linux bootargs generation 2012-05-14 09:16:31 +02:00
bunzip2.h use kernel bunzip implementation 2011-11-29 21:12:27 +01:00
cache.h remove strange flush_cache functions 2010-10-21 22:21:25 +02:00
clock.h clocksource: move the NSEC_PER_SEC constant to common header 2012-06-29 10:19:58 +02:00
command.h complete: add generic command complete framework 2012-04-30 20:29:50 +08:00
common.h Merge branch 'for-next/poweroff' 2012-07-02 11:04:44 +02:00
complete.h common: fix typo cammand_var_complete 2012-06-30 12:47:04 +02:00
console.h console: remove unused function prototypes 2012-01-26 12:28:22 +01:00
crc.h Some code cleanup 2006-04-16 10:51:58 +02:00
crc7.h crypto: Add crc7 function 2011-11-25 12:37:25 +01:00
debug_ll.h debug_ll.h: add PUTS_LL() function 2011-07-18 23:04:18 +02:00
digest.h digest: factorise file digest to common/digest.c 2011-10-12 08:52:49 +02:00
disks.h DISK: Add common partition handling for disk like media 2011-11-28 09:23:24 +01:00
dm9000.h dm9000: introduce add_dm9000_device to register dm9000 device 2011-07-29 14:04:24 +08:00
dma.h blackfin, mips, openrisc, ppc, sandbox, x86: add generic dma_alloc, dma_free inlines 2012-06-30 12:46:25 +02:00
driver.h fs: fix standard zero, full devices 2012-07-04 08:38:22 +02:00
elf.h replace elf.h with the one from the linux kernel. It does not have powerpc 2007-09-28 19:59:12 +02:00
envfs.h Change byte order detection mechanism to kernel style 2012-06-28 13:49:16 +02:00
environment.h environment: export_/getenv_ull as inline ifndef CONFIG_ENVIRONMENT_VARIABLES 2012-01-11 09:36:30 +01:00
errno.h add strerror function 2009-05-25 16:52:35 +02:00
fb.h Add the feature to change the video mode at runtime 2010-12-21 08:26:08 +01:00
fcntl.h rename U-Boot-v2 project to barebox 2009-12-15 10:18:30 +01:00
fdt.h initial libfdt support 2011-10-19 10:08:48 +02:00
fec.h net fec: Add i.MX6 support 2012-04-24 10:31:47 +02:00
filetype.h MIPS: bootm: add "MIPS barebox" handler 2012-05-11 09:05:11 +02:00
fnmatch.h add globbing support 2008-03-09 22:35:38 +01:00
fs.h fs: fix standard zero, full devices 2012-07-04 08:38:22 +02:00
getopt.h getopt: save and restore context 2012-02-27 19:53:47 +01:00
glob.h hardcode _FILE_OFFSET_BITS to 32 2008-06-03 13:34:45 +02:00
globalvar.h add 'global' command 2012-05-14 08:57:01 +02:00
gpio.h GPIO support 2008-10-27 17:29:57 +01:00
gpio_keys.h add gpio keyboard support 2012-02-16 18:17:30 +08:00
gunzip.h decompress_inflate.c: fix "no previous prototype for 'gunzip'" warning 2012-01-02 12:33:52 +01:00
image.h hostcc tools: include "compiler.h", fix included headers 2012-06-05 21:40:15 +02:00
init.h init: introduce mem, mmu and postmmu initcall 2011-08-01 16:31:46 +02:00
io.h Fix big endian MMIO primitives. 2012-05-07 09:50:29 +02:00
ioctl.h add basic at91sam9260 support. Currently only second stage 2008-06-06 09:30:32 +02:00
kallsyms.h kallsyms/printk: enable symbol printing support (%pS) 2011-03-10 14:50:16 +01:00
kfifo.h kfifo: change kfifo_init to work with a preallocated fifo 2012-01-26 13:57:43 +01:00
kgdb.h Initial revision 2002-08-27 10:38:37 +00:00
led.h LED: Add LED trigger support 2010-12-20 09:57:35 +01:00
libbb.h libbb: add read_full/write_full functions 2011-12-15 10:20:09 +01:00
libfdt.h initial libfdt support 2011-10-19 10:08:48 +02:00
libfdt_env.h initial libfdt support 2011-10-19 10:08:48 +02:00
libgen.h move dirname() and basename() to lib/libgen.c and add header file 2007-09-24 16:57:12 +02:00
lzo.h remove now unused unlzo function 2011-11-29 21:12:42 +01:00
magicvar.h magicvar: Add magicvar macro with additional name argument 2012-05-15 09:05:51 +02:00
malloc.h malloc: put common memory functions to seperate file 2011-04-11 15:57:51 +02:00
mci.h mci: Fix 8 bit mmc cards 2012-02-09 14:35:20 +01:00
memory.h register sdram as resources 2011-12-04 22:26:07 +01:00
menu.h menu: factor out a function to print an entry 2012-06-28 12:45:19 +02:00
miidev.h miidev: add support for 1000Mbit 2012-06-30 13:58:18 +02:00
module.h module: move EXPORT_SYMBOL_GPL define to module.h 2010-08-30 14:36:09 +02:00
nand.h nand bb: add proper bb remove function 2011-04-12 09:54:56 +02:00
net.h eth: eth MAC addresses are six bytes 2012-06-30 13:58:18 +02:00
notifier.h notifier: sparse fixes 2010-10-21 22:21:23 +02:00
ns16550.h ns16550: support for UART with broken FIFO 2012-01-19 09:46:02 +01:00
of.h oftree: add of_fix_tree() 2011-12-15 10:18:14 +01:00
param.h parameter: remove unused struct member 2012-05-13 14:03:07 +02:00
part.h rename U-Boot-v2 project to barebox 2009-12-15 10:18:30 +01:00
partition.h partitions: Make 64bit capable 2012-06-30 16:53:25 +02:00
password.h login: add timeout support 2011-08-11 09:22:07 +02:00
platform_ide.h Add driver for IDE like interfaces 2011-11-28 09:23:24 +01:00
poller.h Add generic poll infrastructure 2010-12-20 09:28:21 +01:00
progress.h add progression bar function 2010-06-28 10:43:55 +02:00
pwm.h drivers/pwm: add duty_ns and period_ns to core pwm chip 2012-02-17 10:18:30 +01:00
qsort.h qsort: declare strcmp_compar publically 2012-06-30 22:34:54 +02:00
readkey.h readkey: add define for Ascii keys 2012-02-16 18:17:32 +08:00
rtc.h Initial revision 2001-04-09 21:43:07 +00:00
s_record.h Initial revision 2001-04-28 17:59:11 +00:00
scsi.h USB mass storage device driver initial implementation 2011-09-23 08:53:22 +02:00
sizes.h svn_rev_082 2007-07-05 18:01:21 +02:00
stdio.h fix fprintf prototype and return value 2011-11-11 16:19:48 +01:00
stdlib.h include support for a simple pseudo number generator 2010-06-22 15:44:44 +02:00
string.h add protection from double inclusion in string.h 2008-03-31 21:55:34 +02:00
stringlist.h stringlist: implement string_list_add_asprintf 2012-04-30 20:22:23 +08:00
tlsf.h adapt tlsf for barebox 2011-12-23 11:26:42 +01:00
types.h add __[lb]e types 2009-04-06 11:12:54 +02:00
ubi-media.h documentation updates 2009-12-15 11:32:02 +01:00
uncompress.h Add generic uncompress function 2011-11-29 21:12:42 +01:00
usb_dfu_trailer.h rename U-Boot-v2 project to barebox 2009-12-15 10:18:30 +01:00
watchdog.h Add a simple watchdog framework 2012-06-29 15:16:34 +02:00
xfuncs.h Fix error handling with malloc, memalign etc. Introduce xmemalign(). 2011-01-07 10:21:22 +01:00
xyzModem.h stddef: introduce true/false enum 2010-08-06 19:12:07 +02:00