Skip to content

Commit 9a12efc

Browse files
committed
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
2 parents 1694472 + 9951674 commit 9a12efc

File tree

17 files changed

+28
-78
lines changed

17 files changed

+28
-78
lines changed

Documentation/kbuild/makefiles.txt

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -537,21 +537,6 @@ more details, with real examples.
537537
The third parameter may be a text as in this example, but it may also
538538
be an expanded variable or a macro.
539539

540-
cc-fullversion
541-
cc-fullversion is useful when the exact version of gcc is needed.
542-
One typical use-case is when a specific GCC version is broken.
543-
cc-fullversion points out a more specific version than cc-version does.
544-
545-
Example:
546-
#arch/powerpc/Makefile
547-
$(Q)if test "$(cc-fullversion)" = "040200" ; then \
548-
echo -n '*** GCC-4.2.0 cannot compile the 64-bit powerpc ' ; \
549-
false ; \
550-
fi
551-
552-
In this example for a specific GCC version the build will error out
553-
explaining to the user why it stops.
554-
555540
cc-cross-prefix
556541
cc-cross-prefix is used to check if there exists a $(CC) in path with
557542
one of the listed prefixes. The first prefix where there exist a

Documentation/networking/ice.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ Enabling the driver
2020
The driver is enabled via the standard kernel configuration system,
2121
using the make command::
2222

23-
make oldconfig/silentoldconfig/menuconfig/etc.
23+
make oldconfig/menuconfig/etc.
2424

2525
The driver is located in the menu structure at:
2626

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -485,7 +485,7 @@ ifneq ($(KBUILD_SRC),)
485485
$(Q)$(CONFIG_SHELL) $(srctree)/scripts/mkmakefile $(srctree)
486486
endif
487487

488-
ifeq ($(cc-name),clang)
488+
ifneq ($(shell $(CC) --version 2>&1 | head -n 1 | grep clang),)
489489
ifneq ($(CROSS_COMPILE),)
490490
CLANG_TARGET := --target=$(notdir $(CROSS_COMPILE:%-=%))
491491
GCC_TOOLCHAIN_DIR := $(dir $(shell which $(LD)))
@@ -702,7 +702,7 @@ stackp-flags-$(CONFIG_STACKPROTECTOR_STRONG) := -fstack-protector-strong
702702

703703
KBUILD_CFLAGS += $(stackp-flags-y)
704704

705-
ifeq ($(cc-name),clang)
705+
ifdef CONFIG_CC_IS_CLANG
706706
KBUILD_CPPFLAGS += $(call cc-option,-Qunused-arguments,)
707707
KBUILD_CFLAGS += $(call cc-disable-warning, format-invalid-specifier)
708708
KBUILD_CFLAGS += $(call cc-disable-warning, gnu)

arch/mips/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ cflags-y += -ffreestanding
128128
# clang's output will be based upon the build machine. So for clang we simply
129129
# unconditionally specify -EB or -EL as appropriate.
130130
#
131-
ifeq ($(cc-name),clang)
131+
ifdef CONFIG_CC_IS_CLANG
132132
cflags-$(CONFIG_CPU_BIG_ENDIAN) += -EB
133133
cflags-$(CONFIG_CPU_LITTLE_ENDIAN) += -EL
134134
else

arch/mips/vdso/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ ccflags-vdso := \
1010
$(filter -march=%,$(KBUILD_CFLAGS)) \
1111
-D__VDSO__
1212

13-
ifeq ($(cc-name),clang)
13+
ifdef CONFIG_CC_IS_CLANG
1414
ccflags-vdso += $(filter --target=%,$(KBUILD_CFLAGS))
1515
endif
1616

arch/powerpc/Kconfig

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -930,10 +930,6 @@ config FSL_GTM
930930
help
931931
Freescale General-purpose Timers support
932932

933-
# Yes MCA RS/6000s exist but Linux-PPC does not currently support any
934-
config MCA
935-
bool
936-
937933
# Platforms that what PCI turned unconditionally just do select PCI
938934
# in their config node. Platforms that want to choose at config
939935
# time should select PPC_PCI_CHOICE
@@ -944,7 +940,6 @@ config PCI
944940
bool "PCI support" if PPC_PCI_CHOICE
945941
default y if !40x && !CPM2 && !PPC_8xx && !PPC_83xx \
946942
&& !PPC_85xx && !PPC_86xx && !GAMECUBE_COMMON
947-
default PCI_QSPAN if PPC_8xx
948943
select GENERIC_PCI_IOMAP
949944
help
950945
Find out whether your system includes a PCI bus. PCI is the name of
@@ -958,14 +953,6 @@ config PCI_DOMAINS
958953
config PCI_SYSCALL
959954
def_bool PCI
960955

961-
config PCI_QSPAN
962-
bool "QSpan PCI"
963-
depends on PPC_8xx
964-
select PPC_I8259
965-
help
966-
Say Y here if you have a system based on a Motorola 8xx-series
967-
embedded processor with a QSPAN PCI interface, otherwise say N.
968-
969956
config PCI_8260
970957
bool
971958
depends on PCI && 8260

arch/powerpc/Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ aflags-$(CONFIG_CPU_BIG_ENDIAN) += $(call cc-option,-mabi=elfv1)
9696
aflags-$(CONFIG_CPU_LITTLE_ENDIAN) += -mabi=elfv2
9797
endif
9898

99-
ifneq ($(cc-name),clang)
99+
ifndef CONFIG_CC_IS_CLANG
100100
cflags-$(CONFIG_CPU_LITTLE_ENDIAN) += -mno-strict-align
101101
endif
102102

@@ -175,7 +175,7 @@ endif
175175
# Work around gcc code-gen bugs with -pg / -fno-omit-frame-pointer in gcc <= 4.8
176176
# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=44199
177177
# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52828
178-
ifneq ($(cc-name),clang)
178+
ifndef CONFIG_CC_IS_CLANG
179179
CC_FLAGS_FTRACE += $(call cc-ifversion, -lt, 0409, -mno-sched-epilog)
180180
endif
181181
endif

arch/powerpc/platforms/40x/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ config KILAUEA
2929
select 405EX
3030
select PPC40x_SIMPLE
3131
select PPC4xx_PCI_EXPRESS
32+
select PCI
3233
select PCI_MSI
3334
select PPC4xx_MSI
3435
help

arch/powerpc/platforms/44x/Kconfig

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ config BLUESTONE
2121
depends on 44x
2222
select PPC44x_SIMPLE
2323
select APM821xx
24+
select PCI
2425
select PCI_MSI
2526
select PPC4xx_MSI
2627
select PPC4xx_PCI_EXPRESS
@@ -200,6 +201,7 @@ config AKEBONO
200201
select SWIOTLB
201202
select 476FPE
202203
select PPC4xx_PCI_EXPRESS
204+
select PCI
203205
select PCI_MSI
204206
select PPC4xx_HSTA_MSI
205207
select I2C

drivers/scsi/Kconfig

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -538,7 +538,7 @@ config SCSI_HPTIOP
538538

539539
config SCSI_BUSLOGIC
540540
tristate "BusLogic SCSI support"
541-
depends on (PCI || ISA || MCA) && SCSI && ISA_DMA_API && VIRT_TO_BUS
541+
depends on (PCI || ISA) && SCSI && ISA_DMA_API && VIRT_TO_BUS
542542
---help---
543543
This is support for BusLogic MultiMaster and FlashPoint SCSI Host
544544
Adapters. Consult the SCSI-HOWTO, available from
@@ -1175,12 +1175,12 @@ config SCSI_LPFC_DEBUG_FS
11751175

11761176
config SCSI_SIM710
11771177
tristate "Simple 53c710 SCSI support (Compaq, NCR machines)"
1178-
depends on (EISA || MCA) && SCSI
1178+
depends on EISA && SCSI
11791179
select SCSI_SPI_ATTRS
11801180
---help---
11811181
This driver is for NCR53c710 based SCSI host adapters.
11821182

1183-
It currently supports Compaq EISA cards and NCR MCA cards
1183+
It currently supports Compaq EISA cards.
11841184

11851185
config SCSI_DC395x
11861186
tristate "Tekram DC395(U/UW/F) and DC315(U) SCSI support"

drivers/scsi/aha152x.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,7 @@ static LIST_HEAD(aha152x_host_list);
269269
/* DEFINES */
270270

271271
/* For PCMCIA cards, always use AUTOCONF */
272-
#if defined(PCMCIA) || defined(MODULE)
272+
#if defined(AHA152X_PCMCIA) || defined(MODULE)
273273
#if !defined(AUTOCONF)
274274
#define AUTOCONF
275275
#endif
@@ -297,7 +297,7 @@ CMD_INC_RESID(struct scsi_cmnd *cmd, int inc)
297297

298298
#define DELAY_DEFAULT 1000
299299

300-
#if defined(PCMCIA)
300+
#if defined(AHA152X_PCMCIA)
301301
#define IRQ_MIN 0
302302
#define IRQ_MAX 16
303303
#else
@@ -328,7 +328,7 @@ MODULE_AUTHOR("Jürgen Fischer");
328328
MODULE_DESCRIPTION(AHA152X_REVID);
329329
MODULE_LICENSE("GPL");
330330

331-
#if !defined(PCMCIA)
331+
#if !defined(AHA152X_PCMCIA)
332332
#if defined(MODULE)
333333
static int io[] = {0, 0};
334334
module_param_hw_array(io, int, ioport, NULL, 0);
@@ -391,7 +391,7 @@ static struct isapnp_device_id id_table[] = {
391391
MODULE_DEVICE_TABLE(isapnp, id_table);
392392
#endif /* ISAPNP */
393393

394-
#endif /* !PCMCIA */
394+
#endif /* !AHA152X_PCMCIA */
395395

396396
static struct scsi_host_template aha152x_driver_template;
397397

@@ -863,7 +863,7 @@ void aha152x_release(struct Scsi_Host *shpnt)
863863
if (shpnt->irq)
864864
free_irq(shpnt->irq, shpnt);
865865

866-
#if !defined(PCMCIA)
866+
#if !defined(AHA152X_PCMCIA)
867867
if (shpnt->io_port)
868868
release_region(shpnt->io_port, IO_RANGE);
869869
#endif
@@ -2924,7 +2924,7 @@ static struct scsi_host_template aha152x_driver_template = {
29242924
.slave_alloc = aha152x_adjust_queue,
29252925
};
29262926

2927-
#if !defined(PCMCIA)
2927+
#if !defined(AHA152X_PCMCIA)
29282928
static int setup_count;
29292929
static struct aha152x_setup setup[2];
29302930

@@ -3392,4 +3392,4 @@ static int __init aha152x_setup(char *str)
33923392
__setup("aha152x=", aha152x_setup);
33933393
#endif
33943394

3395-
#endif /* !PCMCIA */
3395+
#endif /* !AHA152X_PCMCIA */

drivers/scsi/pcmcia/aha152x_core.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
#define PCMCIA 1
1+
#define AHA152X_PCMCIA 1
22
#define AHA152X_STAT 1
33
#include "aha152x.c"

scripts/Kbuild.include

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -140,17 +140,9 @@ cc-option-yn = $(call try-run,\
140140
cc-disable-warning = $(call try-run,\
141141
$(CC) -Werror $(KBUILD_CPPFLAGS) $(CC_OPTION_CFLAGS) -W$(strip $(1)) -c -x c /dev/null -o "$$TMP",-Wno-$(strip $(1)))
142142

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-
147143
# cc-version
148144
cc-version = $(shell $(CONFIG_SHELL) $(srctree)/scripts/gcc-version.sh $(CC))
149145

150-
# cc-fullversion
151-
cc-fullversion = $(shell $(CONFIG_SHELL) \
152-
$(srctree)/scripts/gcc-version.sh -p $(CC))
153-
154146
# cc-ifversion
155147
# Usage: EXTRA_CFLAGS += $(call cc-ifversion, -lt, 0402, -O1)
156148
cc-ifversion = $(shell [ $(cc-version) $(1) $(2) ] && echo $(3) || echo $(4))

scripts/Makefile.extrawarn

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ endif
6565
KBUILD_CFLAGS += $(warning)
6666
else
6767

68-
ifeq ($(cc-name),clang)
68+
ifdef CONFIG_CC_IS_CLANG
6969
KBUILD_CFLAGS += $(call cc-disable-warning, initializer-overrides)
7070
KBUILD_CFLAGS += $(call cc-disable-warning, unused-value)
7171
KBUILD_CFLAGS += $(call cc-disable-warning, format)

scripts/kconfig/Makefile

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -68,21 +68,7 @@ PHONY += $(simple-targets)
6868
$(simple-targets): $(obj)/conf
6969
$< $(silent) --$@ $(Kconfig)
7070

71-
PHONY += oldnoconfig silentoldconfig 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"
71+
PHONY += savedefconfig defconfig
8672

8773
savedefconfig: $(obj)/conf
8874
$< $(silent) --$@=defconfig $(Kconfig)

scripts/kconfig/conf.c

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -460,12 +460,6 @@ static struct option long_opts[] = {
460460
{"randconfig", no_argument, NULL, randconfig},
461461
{"listnewconfig", no_argument, NULL, listnewconfig},
462462
{"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},
469463
{NULL, 0, NULL, 0}
470464
};
471465

@@ -480,7 +474,6 @@ static void conf_usage(const char *progname)
480474
printf(" --syncconfig Similar to oldconfig but generates configuration in\n"
481475
" include/{generated/,config/}\n");
482476
printf(" --olddefconfig Same as oldconfig but sets new symbols to their default value\n");
483-
printf(" --oldnoconfig An alias of olddefconfig\n");
484477
printf(" --defconfig <file> New config with default defined in <file>\n");
485478
printf(" --savedefconfig <file> Save the minimal current configuration to <file>\n");
486479
printf(" --allnoconfig New config where all options are answered with no\n");

scripts/kconfig/merge_config.sh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,15 @@ usage() {
3333
echo " -n use allnoconfig instead of alldefconfig"
3434
echo " -r list redundant entries when merging fragments"
3535
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."
3638
}
3739

3840
RUNMAKE=true
3941
ALLTARGET=alldefconfig
4042
WARNREDUN=false
4143
OUTPUT=.
44+
CONFIG_PREFIX=${CONFIG_-CONFIG_}
4245

4346
while true; do
4447
case $1 in
@@ -99,7 +102,8 @@ if [ ! -r "$INITFILE" ]; then
99102
fi
100103

101104
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+
103107
TMP_FILE=$(mktemp ./.tmp.config.XXXXXXXXXX)
104108

105109
echo "Using $INITFILE as base"

0 commit comments

Comments
 (0)