diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2019-07-28 13:35:04 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2019-07-28 13:35:04 -0400 |
commit | 8e61ea11c23b108c8ce062f791dfa737896da346 (patch) | |
tree | 18c284e15a6ef26d56cfb0fdb152efa9c9014712 /scripts | |
parent | 04ce9318898b294001459b5d705795085a9eac64 (diff) | |
parent | b25e8a23d4ea7e8ade2c349c22efe88da88c0988 (diff) |
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
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/Kbuild.include | 3 | ||||
-rw-r--r-- | scripts/Makefile.lib | 2 | ||||
-rwxr-xr-x | scripts/gen_compile_commands.py | 4 |
3 files changed, 2 insertions, 7 deletions
diff --git a/scripts/Kbuild.include b/scripts/Kbuild.include index 77c742fa4fb1..4b0432e095ae 100644 --- a/scripts/Kbuild.include +++ b/scripts/Kbuild.include | |||
@@ -190,9 +190,6 @@ echo-cmd = $(if $($(quiet)cmd_$(1)),\ | |||
190 | # printing commands | 190 | # printing commands |
191 | cmd = @set -e; $(echo-cmd) $(cmd_$(1)) | 191 | cmd = @set -e; $(echo-cmd) $(cmd_$(1)) |
192 | 192 | ||
193 | # Add $(obj)/ for paths that are not absolute | ||
194 | objectify = $(foreach o,$(1),$(if $(filter /%,$(o)),$(o),$(obj)/$(o))) | ||
195 | |||
196 | ### | 193 | ### |
197 | # if_changed - execute command if any prerequisite is newer than | 194 | # if_changed - execute command if any prerequisite is newer than |
198 | # target, or command line has changed | 195 | # target, or command line has changed |
diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib index 5241d0751eb0..41c50f9461e5 100644 --- a/scripts/Makefile.lib +++ b/scripts/Makefile.lib | |||
@@ -45,7 +45,6 @@ subdir-ym := $(sort $(subdir-y) $(subdir-m)) | |||
45 | multi-used-y := $(sort $(foreach m,$(obj-y), $(if $(strip $($(m:.o=-objs)) $($(m:.o=-y))), $(m)))) | 45 | multi-used-y := $(sort $(foreach m,$(obj-y), $(if $(strip $($(m:.o=-objs)) $($(m:.o=-y))), $(m)))) |
46 | multi-used-m := $(sort $(foreach m,$(obj-m), $(if $(strip $($(m:.o=-objs)) $($(m:.o=-y)) $($(m:.o=-m))), $(m)))) | 46 | multi-used-m := $(sort $(foreach m,$(obj-m), $(if $(strip $($(m:.o=-objs)) $($(m:.o=-y)) $($(m:.o=-m))), $(m)))) |
47 | multi-used := $(multi-used-y) $(multi-used-m) | 47 | multi-used := $(multi-used-y) $(multi-used-m) |
48 | single-used-m := $(sort $(filter-out $(multi-used-m),$(obj-m))) | ||
49 | 48 | ||
50 | # $(subdir-obj-y) is the list of objects in $(obj-y) which uses dir/ to | 49 | # $(subdir-obj-y) is the list of objects in $(obj-y) which uses dir/ to |
51 | # tell kbuild to descend | 50 | # tell kbuild to descend |
@@ -91,7 +90,6 @@ lib-y := $(addprefix $(obj)/,$(lib-y)) | |||
91 | subdir-obj-y := $(addprefix $(obj)/,$(subdir-obj-y)) | 90 | subdir-obj-y := $(addprefix $(obj)/,$(subdir-obj-y)) |
92 | real-obj-y := $(addprefix $(obj)/,$(real-obj-y)) | 91 | real-obj-y := $(addprefix $(obj)/,$(real-obj-y)) |
93 | real-obj-m := $(addprefix $(obj)/,$(real-obj-m)) | 92 | real-obj-m := $(addprefix $(obj)/,$(real-obj-m)) |
94 | single-used-m := $(addprefix $(obj)/,$(single-used-m)) | ||
95 | multi-used-m := $(addprefix $(obj)/,$(multi-used-m)) | 93 | multi-used-m := $(addprefix $(obj)/,$(multi-used-m)) |
96 | subdir-ym := $(addprefix $(obj)/,$(subdir-ym)) | 94 | subdir-ym := $(addprefix $(obj)/,$(subdir-ym)) |
97 | 95 | ||
diff --git a/scripts/gen_compile_commands.py b/scripts/gen_compile_commands.py index 7915823b92a5..c458696ef3a7 100755 --- a/scripts/gen_compile_commands.py +++ b/scripts/gen_compile_commands.py | |||
@@ -21,9 +21,9 @@ _LINE_PATTERN = r'^cmd_[^ ]*\.o := (.* )([^ ]*\.c)$' | |||
21 | _VALID_LOG_LEVELS = ['DEBUG', 'INFO', 'WARNING', 'ERROR', 'CRITICAL'] | 21 | _VALID_LOG_LEVELS = ['DEBUG', 'INFO', 'WARNING', 'ERROR', 'CRITICAL'] |
22 | 22 | ||
23 | # A kernel build generally has over 2000 entries in its compile_commands.json | 23 | # 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 |
25 | # not have all the .cmd files, and they might need to compile the kernel. | 25 | # not have all the .cmd files, and they might need to compile the kernel. |
26 | _LOW_COUNT_THRESHOLD = 500 | 26 | _LOW_COUNT_THRESHOLD = 300 |
27 | 27 | ||
28 | 28 | ||
29 | def parse_arguments(): | 29 | def parse_arguments(): |