diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2018-11-03 13:47:33 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2018-11-03 13:47:33 -0400 |
commit | 9a12efc5e01ac1dbad089f22e5d0e6f817970c3c (patch) | |
tree | 4bdb9f48dd19b2a8b176162d579bb4b00456696b /scripts | |
parent | 169447287bfb0a8e494f33c04dda50bb078cf2f0 (diff) | |
parent | 995167420797c000bff1f0787ab2390ffa1a9784 (diff) |
Merge tag 'kbuild-v4.20-2' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild
Pull Kbuild updates from Masahiro Yamada:
- clean-up leftovers in Kconfig files
- remove stale oldnoconfig and silentoldconfig targets
- remove unneeded cc-fullversion and cc-name variables
- improve merge_config script to allow overriding option prefix
* tag 'kbuild-v4.20-2' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild:
kbuild: remove cc-name variable
kbuild: replace cc-name test with CONFIG_CC_IS_CLANG
merge_config.sh: Allow to define config prefix
kbuild: remove unused cc-fullversion variable
kconfig: remove silentoldconfig target
kconfig: remove oldnoconfig target
powerpc: PCI_MSI needs PCI
powerpc: remove CONFIG_MCA leftovers
powerpc: remove CONFIG_PCI_QSPAN
scsi: aha152x: rename the PCMCIA define
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/Kbuild.include | 8 | ||||
-rw-r--r-- | scripts/Makefile.extrawarn | 2 | ||||
-rw-r--r-- | scripts/kconfig/Makefile | 16 | ||||
-rw-r--r-- | scripts/kconfig/conf.c | 7 | ||||
-rwxr-xr-x | scripts/kconfig/merge_config.sh | 6 |
5 files changed, 7 insertions, 32 deletions
diff --git a/scripts/Kbuild.include b/scripts/Kbuild.include index ca21a35fa244..bb015551c2d9 100644 --- a/scripts/Kbuild.include +++ b/scripts/Kbuild.include | |||
@@ -140,17 +140,9 @@ cc-option-yn = $(call try-run,\ | |||
140 | cc-disable-warning = $(call try-run,\ | 140 | cc-disable-warning = $(call try-run,\ |
141 | $(CC) -Werror $(KBUILD_CPPFLAGS) $(CC_OPTION_CFLAGS) -W$(strip $(1)) -c -x c /dev/null -o "$$TMP",-Wno-$(strip $(1))) | 141 | $(CC) -Werror $(KBUILD_CPPFLAGS) $(CC_OPTION_CFLAGS) -W$(strip $(1)) -c -x c /dev/null -o "$$TMP",-Wno-$(strip $(1))) |
142 | 142 | ||
143 | # cc-name | ||
144 | # Expands to either gcc or clang | ||
145 | cc-name = $(shell $(CC) -v 2>&1 | grep -q "clang version" && echo clang || echo gcc) | ||
146 | |||
147 | # cc-version | 143 | # cc-version |
148 | cc-version = $(shell $(CONFIG_SHELL) $(srctree)/scripts/gcc-version.sh $(CC)) | 144 | cc-version = $(shell $(CONFIG_SHELL) $(srctree)/scripts/gcc-version.sh $(CC)) |
149 | 145 | ||
150 | # cc-fullversion | ||
151 | cc-fullversion = $(shell $(CONFIG_SHELL) \ | ||
152 | $(srctree)/scripts/gcc-version.sh -p $(CC)) | ||
153 | |||
154 | # cc-ifversion | 146 | # cc-ifversion |
155 | # Usage: EXTRA_CFLAGS += $(call cc-ifversion, -lt, 0402, -O1) | 147 | # Usage: EXTRA_CFLAGS += $(call cc-ifversion, -lt, 0402, -O1) |
156 | cc-ifversion = $(shell [ $(cc-version) $(1) $(2) ] && echo $(3) || echo $(4)) | 148 | cc-ifversion = $(shell [ $(cc-version) $(1) $(2) ] && echo $(3) || echo $(4)) |
diff --git a/scripts/Makefile.extrawarn b/scripts/Makefile.extrawarn index cf6cd0ef6975..768306add591 100644 --- a/scripts/Makefile.extrawarn +++ b/scripts/Makefile.extrawarn | |||
@@ -65,7 +65,7 @@ endif | |||
65 | KBUILD_CFLAGS += $(warning) | 65 | KBUILD_CFLAGS += $(warning) |
66 | else | 66 | else |
67 | 67 | ||
68 | ifeq ($(cc-name),clang) | 68 | ifdef CONFIG_CC_IS_CLANG |
69 | KBUILD_CFLAGS += $(call cc-disable-warning, initializer-overrides) | 69 | KBUILD_CFLAGS += $(call cc-disable-warning, initializer-overrides) |
70 | KBUILD_CFLAGS += $(call cc-disable-warning, unused-value) | 70 | KBUILD_CFLAGS += $(call cc-disable-warning, unused-value) |
71 | KBUILD_CFLAGS += $(call cc-disable-warning, format) | 71 | KBUILD_CFLAGS += $(call cc-disable-warning, format) |
diff --git a/scripts/kconfig/Makefile b/scripts/kconfig/Makefile index 67ed9f6ccdf8..63b609243d03 100644 --- a/scripts/kconfig/Makefile +++ b/scripts/kconfig/Makefile | |||
@@ -68,21 +68,7 @@ PHONY += $(simple-targets) | |||
68 | $(simple-targets): $(obj)/conf | 68 | $(simple-targets): $(obj)/conf |
69 | $< $(silent) --$@ $(Kconfig) | 69 | $< $(silent) --$@ $(Kconfig) |
70 | 70 | ||
71 | PHONY += oldnoconfig silentoldconfig savedefconfig defconfig | 71 | PHONY += savedefconfig defconfig |
72 | |||
73 | # oldnoconfig is an alias of olddefconfig, because people already are dependent | ||
74 | # on its behavior (sets new symbols to their default value but not 'n') with the | ||
75 | # counter-intuitive name. | ||
76 | oldnoconfig: olddefconfig | ||
77 | @echo " WARNING: \"oldnoconfig\" target will be removed after Linux 4.19" | ||
78 | @echo " Please use \"olddefconfig\" instead, which is an alias." | ||
79 | |||
80 | # We do not expect manual invokcation of "silentoldcofig" (or "syncconfig"). | ||
81 | silentoldconfig: syncconfig | ||
82 | @echo " WARNING: \"silentoldconfig\" has been renamed to \"syncconfig\"" | ||
83 | @echo " and is now an internal implementation detail." | ||
84 | @echo " What you want is probably \"oldconfig\"." | ||
85 | @echo " \"silentoldconfig\" will be removed after Linux 4.19" | ||
86 | 72 | ||
87 | savedefconfig: $(obj)/conf | 73 | savedefconfig: $(obj)/conf |
88 | $< $(silent) --$@=defconfig $(Kconfig) | 74 | $< $(silent) --$@=defconfig $(Kconfig) |
diff --git a/scripts/kconfig/conf.c b/scripts/kconfig/conf.c index 7b2b37260669..98e0c7a34699 100644 --- a/scripts/kconfig/conf.c +++ b/scripts/kconfig/conf.c | |||
@@ -460,12 +460,6 @@ static struct option long_opts[] = { | |||
460 | {"randconfig", no_argument, NULL, randconfig}, | 460 | {"randconfig", no_argument, NULL, randconfig}, |
461 | {"listnewconfig", no_argument, NULL, listnewconfig}, | 461 | {"listnewconfig", no_argument, NULL, listnewconfig}, |
462 | {"olddefconfig", no_argument, NULL, olddefconfig}, | 462 | {"olddefconfig", no_argument, NULL, olddefconfig}, |
463 | /* | ||
464 | * oldnoconfig is an alias of olddefconfig, because people already | ||
465 | * are dependent on its behavior(sets new symbols to their default | ||
466 | * value but not 'n') with the counter-intuitive name. | ||
467 | */ | ||
468 | {"oldnoconfig", no_argument, NULL, olddefconfig}, | ||
469 | {NULL, 0, NULL, 0} | 463 | {NULL, 0, NULL, 0} |
470 | }; | 464 | }; |
471 | 465 | ||
@@ -480,7 +474,6 @@ static void conf_usage(const char *progname) | |||
480 | printf(" --syncconfig Similar to oldconfig but generates configuration in\n" | 474 | printf(" --syncconfig Similar to oldconfig but generates configuration in\n" |
481 | " include/{generated/,config/}\n"); | 475 | " include/{generated/,config/}\n"); |
482 | printf(" --olddefconfig Same as oldconfig but sets new symbols to their default value\n"); | 476 | printf(" --olddefconfig Same as oldconfig but sets new symbols to their default value\n"); |
483 | printf(" --oldnoconfig An alias of olddefconfig\n"); | ||
484 | printf(" --defconfig <file> New config with default defined in <file>\n"); | 477 | printf(" --defconfig <file> New config with default defined in <file>\n"); |
485 | printf(" --savedefconfig <file> Save the minimal current configuration to <file>\n"); | 478 | printf(" --savedefconfig <file> Save the minimal current configuration to <file>\n"); |
486 | printf(" --allnoconfig New config where all options are answered with no\n"); | 479 | printf(" --allnoconfig New config where all options are answered with no\n"); |
diff --git a/scripts/kconfig/merge_config.sh b/scripts/kconfig/merge_config.sh index 67d131447631..da66e7742282 100755 --- a/scripts/kconfig/merge_config.sh +++ b/scripts/kconfig/merge_config.sh | |||
@@ -33,12 +33,15 @@ usage() { | |||
33 | echo " -n use allnoconfig instead of alldefconfig" | 33 | echo " -n use allnoconfig instead of alldefconfig" |
34 | echo " -r list redundant entries when merging fragments" | 34 | echo " -r list redundant entries when merging fragments" |
35 | echo " -O dir to put generated output files. Consider setting \$KCONFIG_CONFIG instead." | 35 | echo " -O dir to put generated output files. Consider setting \$KCONFIG_CONFIG instead." |
36 | echo | ||
37 | echo "Used prefix: '$CONFIG_PREFIX'. You can redefine it with \$CONFIG_ environment variable." | ||
36 | } | 38 | } |
37 | 39 | ||
38 | RUNMAKE=true | 40 | RUNMAKE=true |
39 | ALLTARGET=alldefconfig | 41 | ALLTARGET=alldefconfig |
40 | WARNREDUN=false | 42 | WARNREDUN=false |
41 | OUTPUT=. | 43 | OUTPUT=. |
44 | CONFIG_PREFIX=${CONFIG_-CONFIG_} | ||
42 | 45 | ||
43 | while true; do | 46 | while true; do |
44 | case $1 in | 47 | case $1 in |
@@ -99,7 +102,8 @@ if [ ! -r "$INITFILE" ]; then | |||
99 | fi | 102 | fi |
100 | 103 | ||
101 | MERGE_LIST=$* | 104 | MERGE_LIST=$* |
102 | SED_CONFIG_EXP="s/^\(# \)\{0,1\}\(CONFIG_[a-zA-Z0-9_]*\)[= ].*/\2/p" | 105 | SED_CONFIG_EXP="s/^\(# \)\{0,1\}\(${CONFIG_PREFIX}[a-zA-Z0-9_]*\)[= ].*/\2/p" |
106 | |||
103 | TMP_FILE=$(mktemp ./.tmp.config.XXXXXXXXXX) | 107 | TMP_FILE=$(mktemp ./.tmp.config.XXXXXXXXXX) |
104 | 108 | ||
105 | echo "Using $INITFILE as base" | 109 | echo "Using $INITFILE as base" |