Skip to content

Commit 8e61ea1

Browse files
committed
Merge tag 'kbuild-fixes-v5.3' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild
Pull Kbuild fixes from Masahiro Yamada: - add compile_commands.json to .gitignore - fix false-positive warning from gen_compile_commands.py after allnoconfig build - remove unused code * tag 'kbuild-fixes-v5.3' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild: kbuild: remove unused single-used-m gen_compile_commands: lower the entry count threshold .gitignore: Add compilation database file kbuild: remove unused objectify macro
2 parents 04ce931 + b25e8a2 commit 8e61ea1

File tree

4 files changed

+5
-7
lines changed

4 files changed

+5
-7
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,3 +142,6 @@ x509.genkey
142142

143143
# Kdevelop4
144144
*.kdev4
145+
146+
# Clang's compilation database file
147+
/compile_commands.json

scripts/Kbuild.include

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -190,9 +190,6 @@ echo-cmd = $(if $($(quiet)cmd_$(1)),\
190190
# printing commands
191191
cmd = @set -e; $(echo-cmd) $(cmd_$(1))
192192

193-
# Add $(obj)/ for paths that are not absolute
194-
objectify = $(foreach o,$(1),$(if $(filter /%,$(o)),$(o),$(obj)/$(o)))
195-
196193
###
197194
# if_changed - execute command if any prerequisite is newer than
198195
# target, or command line has changed

scripts/Makefile.lib

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@ subdir-ym := $(sort $(subdir-y) $(subdir-m))
4545
multi-used-y := $(sort $(foreach m,$(obj-y), $(if $(strip $($(m:.o=-objs)) $($(m:.o=-y))), $(m))))
4646
multi-used-m := $(sort $(foreach m,$(obj-m), $(if $(strip $($(m:.o=-objs)) $($(m:.o=-y)) $($(m:.o=-m))), $(m))))
4747
multi-used := $(multi-used-y) $(multi-used-m)
48-
single-used-m := $(sort $(filter-out $(multi-used-m),$(obj-m)))
4948

5049
# $(subdir-obj-y) is the list of objects in $(obj-y) which uses dir/ to
5150
# tell kbuild to descend
@@ -91,7 +90,6 @@ lib-y := $(addprefix $(obj)/,$(lib-y))
9190
subdir-obj-y := $(addprefix $(obj)/,$(subdir-obj-y))
9291
real-obj-y := $(addprefix $(obj)/,$(real-obj-y))
9392
real-obj-m := $(addprefix $(obj)/,$(real-obj-m))
94-
single-used-m := $(addprefix $(obj)/,$(single-used-m))
9593
multi-used-m := $(addprefix $(obj)/,$(multi-used-m))
9694
subdir-ym := $(addprefix $(obj)/,$(subdir-ym))
9795

scripts/gen_compile_commands.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@
2121
_VALID_LOG_LEVELS = ['DEBUG', 'INFO', 'WARNING', 'ERROR', 'CRITICAL']
2222

2323
# A kernel build generally has over 2000 entries in its compile_commands.json
24-
# database. If this code finds 500 or fewer, then warn the user that they might
24+
# database. If this code finds 300 or fewer, then warn the user that they might
2525
# not have all the .cmd files, and they might need to compile the kernel.
26-
_LOW_COUNT_THRESHOLD = 500
26+
_LOW_COUNT_THRESHOLD = 300
2727

2828

2929
def parse_arguments():

0 commit comments

Comments
 (0)