Skip to content

Commit ff8583d

Browse files
committed
Merge tag 'kbuild-v5.2-2' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild
Pull more Kbuild updates from Masahiro Yamada: - remove unneeded use of cc-option, cc-disable-warning, cc-ldoption - exclude tracked files from .gitignore - re-enable -Wint-in-bool-context warning - refactor samples/Makefile - stop building immediately if syncconfig fails - do not sprinkle error messages when $(CC) does not exist - move arch/alpha/defconfig to the configs subdirectory - remove crappy header search path manipulation - add comment lines to .config to clarify the end of menu blocks - check uniqueness of module names (adding new warnings intentionally) * tag 'kbuild-v5.2-2' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild: (24 commits) kconfig: use 'else ifneq' for Makefile to improve readability kbuild: check uniqueness of module names kconfig: Terminate menu blocks with a comment in the generated config kbuild: add LICENSES to KBUILD_ALLDIRS kbuild: remove 'addtree' and 'flags' magic for header search paths treewide: prefix header search paths with $(srctree)/ media: prefix header search paths with $(srctree)/ media: remove unneeded header search paths alpha: move arch/alpha/defconfig to arch/alpha/configs/defconfig kbuild: terminate Kconfig when $(CC) or $(LD) is missing kbuild: turn auto.conf.cmd into a mandatory include file .gitignore: exclude .get_maintainer.ignore and .gitattributes kbuild: add all Clang-specific flags unconditionally kbuild: Don't try to add '-fcatch-undefined-behavior' flag kbuild: add some extra warning flags unconditionally kbuild: add -Wvla flag unconditionally arch: remove dangling asm-generic wrappers samples: guard sub-directories with CONFIG options kbuild: re-enable int-in-bool-context warning MAINTAINERS: kbuild: Add pattern for scripts/*vmlinux* ...
2 parents f23d871 + fc2694e commit ff8583d

File tree

74 files changed

+178
-172
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

74 files changed

+178
-172
lines changed

.gitignore

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -81,12 +81,14 @@ modules.builtin
8181
/tar-install/
8282

8383
#
84-
# git files that we don't want to ignore even if they are dot-files
84+
# We don't want to ignore the following even if they are dot-files
8585
#
86+
!.clang-format
87+
!.cocciconfig
88+
!.get_maintainer.ignore
89+
!.gitattributes
8690
!.gitignore
8791
!.mailmap
88-
!.cocciconfig
89-
!.clang-format
9092

9193
#
9294
# Generated include files

MAINTAINERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8542,6 +8542,7 @@ F: scripts/Kbuild*
85428542
F: scripts/Makefile*
85438543
F: scripts/basic/
85448544
F: scripts/mk*
8545+
F: scripts/*vmlinux*
85458546
F: scripts/mod/
85468547
F: scripts/package/
85478548

Makefile

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -537,7 +537,7 @@ endif
537537
# Some architectures define CROSS_COMPILE in arch/$(SRCARCH)/Makefile.
538538
# CC_VERSION_TEXT is referenced from Kconfig (so it needs export),
539539
# and from include/config/auto.conf.cmd to detect the compiler upgrade.
540-
CC_VERSION_TEXT = $(shell $(CC) --version | head -n 1)
540+
CC_VERSION_TEXT = $(shell $(CC) --version 2>/dev/null | head -n 1)
541541

542542
ifeq ($(config-targets),1)
543543
# ===========================================================================
@@ -651,7 +651,7 @@ ifeq ($(may-sync-config),1)
651651
# Read in dependencies to all Kconfig* files, make sure to run syncconfig if
652652
# changes are detected. This should be included after arch/$(SRCARCH)/Makefile
653653
# because some architectures define CROSS_COMPILE there.
654-
-include include/config/auto.conf.cmd
654+
include include/config/auto.conf.cmd
655655

656656
$(KCONFIG_CONFIG):
657657
@echo >&2 '***'
@@ -692,7 +692,6 @@ KBUILD_CFLAGS += $(call cc-option,-fno-delete-null-pointer-checks,)
692692
KBUILD_CFLAGS += $(call cc-disable-warning,frame-address,)
693693
KBUILD_CFLAGS += $(call cc-disable-warning, format-truncation)
694694
KBUILD_CFLAGS += $(call cc-disable-warning, format-overflow)
695-
KBUILD_CFLAGS += $(call cc-disable-warning, int-in-bool-context)
696695
KBUILD_CFLAGS += $(call cc-disable-warning, address-of-packed-member)
697696

698697
ifdef CONFIG_CC_OPTIMIZE_FOR_SIZE
@@ -732,16 +731,15 @@ stackp-flags-$(CONFIG_STACKPROTECTOR_STRONG) := -fstack-protector-strong
732731
KBUILD_CFLAGS += $(stackp-flags-y)
733732

734733
ifdef CONFIG_CC_IS_CLANG
735-
KBUILD_CPPFLAGS += $(call cc-option,-Qunused-arguments,)
736-
KBUILD_CFLAGS += $(call cc-disable-warning, format-invalid-specifier)
737-
KBUILD_CFLAGS += $(call cc-disable-warning, gnu)
734+
KBUILD_CPPFLAGS += -Qunused-arguments
735+
KBUILD_CFLAGS += -Wno-format-invalid-specifier
736+
KBUILD_CFLAGS += -Wno-gnu
738737
# Quiet clang warning: comparison of unsigned expression < 0 is always false
739-
KBUILD_CFLAGS += $(call cc-disable-warning, tautological-compare)
738+
KBUILD_CFLAGS += -Wno-tautological-compare
740739
# CLANG uses a _MergedGlobals as optimization, but this breaks modpost, as the
741740
# source of a reference will be _MergedGlobals and not on of the whitelisted names.
742741
# See modpost pattern 2
743-
KBUILD_CFLAGS += $(call cc-option, -mno-global-merge,)
744-
KBUILD_CFLAGS += $(call cc-option, -fcatch-undefined-behavior)
742+
KBUILD_CFLAGS += -mno-global-merge
745743
else
746744

747745
# These warnings generated too much noise in a regular build.
@@ -842,7 +840,7 @@ NOSTDINC_FLAGS += -nostdinc -isystem $(shell $(CC) -print-file-name=include)
842840
KBUILD_CFLAGS += -Wdeclaration-after-statement
843841

844842
# Variable Length Arrays (VLAs) should not be used anywhere in the kernel
845-
KBUILD_CFLAGS += $(call cc-option,-Wvla)
843+
KBUILD_CFLAGS += -Wvla
846844

847845
# disable pointer signed / unsigned warnings in gcc 4.0
848846
KBUILD_CFLAGS += -Wno-pointer-sign
@@ -1018,7 +1016,7 @@ export KBUILD_VMLINUX_LIBS := $(libs-y1)
10181016
export KBUILD_LDS := arch/$(SRCARCH)/kernel/vmlinux.lds
10191017
export LDFLAGS_vmlinux
10201018
# used by scripts/package/Makefile
1021-
export KBUILD_ALLDIRS := $(sort $(filter-out arch/%,$(vmlinux-alldirs)) arch include scripts tools)
1019+
export KBUILD_ALLDIRS := $(sort $(filter-out arch/%,$(vmlinux-alldirs)) LICENSES arch include scripts tools)
10221020

10231021
vmlinux-deps := $(KBUILD_LDS) $(KBUILD_VMLINUX_OBJS) $(KBUILD_VMLINUX_LIBS)
10241022

@@ -1290,6 +1288,7 @@ modules: $(vmlinux-dirs) $(if $(KBUILD_BUILTIN),vmlinux) modules.builtin
12901288
$(Q)$(AWK) '!x[$$0]++' $(vmlinux-dirs:%=$(objtree)/%/modules.order) > $(objtree)/modules.order
12911289
@$(kecho) ' Building modules, stage 2.';
12921290
$(Q)$(MAKE) -f $(srctree)/scripts/Makefile.modpost
1291+
$(Q)$(CONFIG_SHELL) $(srctree)/scripts/modules-check.sh
12931292

12941293
modules.builtin: $(vmlinux-dirs:%=%/modules.builtin)
12951294
$(Q)$(AWK) '!x[$$0]++' $^ > $(objtree)/modules.builtin

arch/alpha/Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
# Copyright (C) 1994 by Linus Torvalds
99
#
1010

11+
KBUILD_DEFCONFIG := defconfig
12+
1113
NM := $(NM) -B
1214

1315
LDFLAGS_vmlinux := -static -N #-relax
File renamed without changes.

arch/csky/boot/dts/include/dt-bindings

Lines changed: 0 additions & 1 deletion
This file was deleted.

arch/csky/include/asm/Kbuild

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
generic-y += asm-offsets.h
22
generic-y += bugs.h
3-
generic-y += clkdev.h
43
generic-y += compat.h
54
generic-y += current.h
65
generic-y += delay.h
@@ -29,15 +28,12 @@ generic-y += local64.h
2928
generic-y += mm-arch-hooks.h
3029
generic-y += mmiowb.h
3130
generic-y += module.h
32-
generic-y += mutex.h
3331
generic-y += pci.h
3432
generic-y += percpu.h
3533
generic-y += preempt.h
3634
generic-y += qrwlock.h
37-
generic-y += scatterlist.h
3835
generic-y += sections.h
3936
generic-y += serial.h
40-
generic-y += shm.h
4137
generic-y += timex.h
4238
generic-y += topology.h
4339
generic-y += trace_clock.h

arch/h8300/include/asm/Kbuild

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ generic-y += pci.h
3838
generic-y += percpu.h
3939
generic-y += pgalloc.h
4040
generic-y += preempt.h
41-
generic-y += scatterlist.h
4241
generic-y += sections.h
4342
generic-y += serial.h
4443
generic-y += shmparam.h

arch/ia64/kernel/Makefile.gate

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ quiet_cmd_gate = GATE $@
1111
cmd_gate = $(CC) -nostdlib $(GATECFLAGS_$(@F)) -Wl,-T,$(filter-out FORCE,$^) -o $@
1212

1313
GATECFLAGS_gate.so = -shared -s -Wl,-soname=linux-gate.so.1 \
14-
$(call cc-ldoption, -Wl$(comma)--hash-style=sysv)
14+
-Wl,--hash-style=sysv
1515
$(obj)/gate.so: $(obj)/gate.lds $(obj)/gate.o FORCE
1616
$(call if_changed,gate)
1717

arch/mips/pnx833x/Platform

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# NXP STB225
22
platform-$(CONFIG_SOC_PNX833X) += pnx833x/
3-
cflags-$(CONFIG_SOC_PNX833X) += -Iarch/mips/include/asm/mach-pnx833x
3+
cflags-$(CONFIG_SOC_PNX833X) += -I $(srctree)/arch/mips/include/asm/mach-pnx833x
44
load-$(CONFIG_NXP_STB220) += 0xffffffff80001000
55
load-$(CONFIG_NXP_STB225) += 0xffffffff80001000

0 commit comments

Comments
 (0)