Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Revert "kconfig: fix __enabled_ macros definition for invisible and un-selected symbols"

This reverts commit 953742c8fe8ac45be453fee959d7be40cd89f920.

Dumping two lines into autoconf.h for all existing Kconfig options
results in a giant file (~16k lines) we have to process each time we
compile something. We've weaned IS_ENABLED() and similar off of
requiring the __enabled_ definitions so now we can revert the change
which caused all the extra lines.

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

authored by

Paul Gortmaker and committed by
Linus Torvalds
a9596135 69349c2d

+13 -36
+13 -36
scripts/kconfig/confdata.c
··· 489 489 fprintf(fp, "#define %s%s%s 1\n", 490 490 CONFIG_, sym->name, suffix); 491 491 } 492 + /* 493 + * Generate the __enabled_CONFIG_* and 494 + * __enabled_CONFIG_*_MODULE macros for use by the 495 + * IS_{ENABLED,BUILTIN,MODULE} macros. The _MODULE variant is 496 + * generated even for booleans so that the IS_ENABLED() macro 497 + * works. 498 + */ 499 + fprintf(fp, "#define __enabled_" CONFIG_ "%s %d\n", 500 + sym->name, (*value == 'y')); 501 + fprintf(fp, "#define __enabled_" CONFIG_ "%s_MODULE %d\n", 502 + sym->name, (*value == 'm')); 492 503 break; 493 504 } 494 505 case S_HEX: { ··· 547 536 static struct conf_printer header_printer_cb = 548 537 { 549 538 .print_symbol = header_print_symbol, 550 - .print_comment = header_print_comment, 551 - }; 552 - 553 - /* 554 - * Generate the __enabled_CONFIG_* and __enabled_CONFIG_*_MODULE macros for 555 - * use by the IS_{ENABLED,BUILTIN,MODULE} macros. The _MODULE variant is 556 - * generated even for booleans so that the IS_ENABLED() macro works. 557 - */ 558 - static void 559 - header_print__enabled_symbol(FILE *fp, struct symbol *sym, const char *value, void *arg) 560 - { 561 - 562 - switch (sym->type) { 563 - case S_BOOLEAN: 564 - case S_TRISTATE: { 565 - fprintf(fp, "#define __enabled_" CONFIG_ "%s %d\n", 566 - sym->name, (*value == 'y')); 567 - fprintf(fp, "#define __enabled_" CONFIG_ "%s_MODULE %d\n", 568 - sym->name, (*value == 'm')); 569 - break; 570 - } 571 - default: 572 - break; 573 - } 574 - } 575 - 576 - static struct conf_printer header__enabled_printer_cb = 577 - { 578 - .print_symbol = header_print__enabled_symbol, 579 539 .print_comment = header_print_comment, 580 540 }; 581 541 ··· 931 949 conf_write_heading(out_h, &header_printer_cb, NULL); 932 950 933 951 for_all_symbols(i, sym) { 934 - if (!sym->name) 935 - continue; 936 - 937 952 sym_calc_value(sym); 938 - 939 - conf_write_symbol(out_h, sym, &header__enabled_printer_cb, NULL); 940 - 941 - if (!(sym->flags & SYMBOL_WRITE)) 953 + if (!(sym->flags & SYMBOL_WRITE) || !sym->name) 942 954 continue; 943 955 956 + /* write symbol to auto.conf, tristate and header files */ 944 957 conf_write_symbol(out, sym, &kconfig_printer_cb, (void *)1); 945 958 946 959 conf_write_symbol(tristate, sym, &tristate_printer_cb, (void *)1);