Skip to content

Commit 3f44ae9

Browse files
committed
Merge tag 'kbuild-fixes-v6.11-2' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild
Pull Kbuild fixes from Masahiro Yamada: - Eliminate the fdtoverlay command duplication in scripts/Makefile.lib - Fix 'make compile_commands.json' for external modules - Ensure scripts/kconfig/merge_config.sh handles missing newlines - Fix some build errors on macOS * tag 'kbuild-fixes-v6.11-2' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild: kbuild: fix typos "prequisites" to "prerequisites" Documentation/llvm: turn make command for ccache into code block kbuild: avoid scripts/kallsyms parsing /dev/null treewide: remove unnecessary <linux/version.h> inclusion scripts: kconfig: merge_config: config files: add a trailing newline Makefile: add $(srctree) to dependency of compile_commands.json target kbuild: clean up code duplication in cmd_fdtoverlay
2 parents 872cf28 + 8fb4ac1 commit 3f44ae9

File tree

14 files changed

+20
-30
lines changed

14 files changed

+20
-30
lines changed

Documentation/kbuild/llvm.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ Ccache
126126

127127
``ccache`` can be used with ``clang`` to improve subsequent builds, (though
128128
KBUILD_BUILD_TIMESTAMP_ should be set to a deterministic value between builds
129-
in order to avoid 100% cache misses, see Reproducible_builds_ for more info):
129+
in order to avoid 100% cache misses, see Reproducible_builds_ for more info)::
130130

131131
KBUILD_BUILD_TIMESTAMP='' make LLVM=1 CC="ccache clang"
132132

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1980,7 +1980,7 @@ nsdeps: modules
19801980
quiet_cmd_gen_compile_commands = GEN $@
19811981
cmd_gen_compile_commands = $(PYTHON3) $< -a $(AR) -o $@ $(filter-out $<, $(real-prereqs))
19821982

1983-
$(extmod_prefix)compile_commands.json: scripts/clang-tools/gen_compile_commands.py \
1983+
$(extmod_prefix)compile_commands.json: $(srctree)/scripts/clang-tools/gen_compile_commands.py \
19841984
$(if $(KBUILD_EXTMOD),, vmlinux.a $(KBUILD_VMLINUX_LIBS)) \
19851985
$(if $(CONFIG_MODULES), $(MODORDER)) FORCE
19861986
$(call if_changed,gen_compile_commands)

drivers/accessibility/speakup/genmap.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
#include <stdio.h>
1111
#include <libgen.h>
1212
#include <string.h>
13-
#include <linux/version.h>
1413
#include <ctype.h>
1514
#include "utils.h"
1615

drivers/accessibility/speakup/makemapdata.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
#include <stdio.h>
1111
#include <libgen.h>
1212
#include <string.h>
13-
#include <linux/version.h>
1413
#include <ctype.h>
1514
#include "utils.h"
1615

drivers/staging/media/atomisp/include/linux/atomisp.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
#define _ATOM_ISP_H
2121

2222
#include <linux/types.h>
23-
#include <linux/version.h>
2423

2524
/* struct media_device_info.hw_revision */
2625
#define ATOMISP_HW_REVISION_MASK 0x0000ff00

samples/trace_events/trace_custom_sched.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
#define pr_fmt(fmt) fmt
99

1010
#include <linux/trace_events.h>
11-
#include <linux/version.h>
1211
#include <linux/module.h>
1312
#include <linux/sched.h>
1413

scripts/Makefile.build

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -487,7 +487,7 @@ $(subdir-ym):
487487
need-modorder=$(if $(filter $@/modules.order, $(subdir-modorder)),1) \
488488
$(filter $@/%, $(single-subdir-goals))
489489

490-
# Add FORCE to the prequisites of a target to force it to be always rebuilt.
490+
# Add FORCE to the prerequisites of a target to force it to be always rebuilt.
491491
# ---------------------------------------------------------------------------
492492

493493
PHONY += FORCE

scripts/Makefile.lib

Lines changed: 10 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -400,26 +400,23 @@ $(obj)/%.dtb.S: $(obj)/%.dtb FORCE
400400
$(obj)/%.dtbo.S: $(obj)/%.dtbo FORCE
401401
$(call if_changed,wrap_S_dtb)
402402

403-
quiet_cmd_dtc = DTC $@
403+
quiet_dtb_check_tag = $(if $(dtb-check-enabled),[C], )
404+
cmd_dtb_check = $(if $(dtb-check-enabled),; $(DT_CHECKER) $(DT_CHECKER_FLAGS) -u $(srctree)/$(DT_BINDING_DIR) -p $(DT_TMP_SCHEMA) $@ || true)
405+
406+
quiet_cmd_dtc = DTC $(quiet_dtb_check_tag) $@
404407
cmd_dtc = $(HOSTCC) -E $(dtc_cpp_flags) -x assembler-with-cpp -o $(dtc-tmp) $< ; \
405408
$(DTC) -o $@ -b 0 \
406409
$(addprefix -i,$(dir $<) $(DTC_INCLUDE)) $(DTC_FLAGS) \
407410
-d $(depfile).dtc.tmp $(dtc-tmp) ; \
408-
cat $(depfile).pre.tmp $(depfile).dtc.tmp > $(depfile)
409-
410-
DT_CHECK_CMD = $(DT_CHECKER) $(DT_CHECKER_FLAGS) -u $(srctree)/$(DT_BINDING_DIR) -p $(DT_TMP_SCHEMA)
411+
cat $(depfile).pre.tmp $(depfile).dtc.tmp > $(depfile) \
412+
$(cmd_dtb_check)
411413

412414
# NOTE:
413415
# Do not replace $(filter %.dtb %.dtbo, $^) with $(real-prereqs). When a single
414416
# DTB is turned into a multi-blob DTB, $^ will contain header file dependencies
415417
# recorded in the .*.cmd file.
416-
ifneq ($(CHECK_DTBS),)
417-
quiet_cmd_fdtoverlay = DTOVLCH $@
418-
cmd_fdtoverlay = $(objtree)/scripts/dtc/fdtoverlay -o $@ -i $(filter %.dtb %.dtbo, $^) ; $(DT_CHECK_CMD) $@ || true
419-
else
420-
quiet_cmd_fdtoverlay = DTOVL $@
421-
cmd_fdtoverlay = $(objtree)/scripts/dtc/fdtoverlay -o $@ -i $(filter %.dtb %.dtbo, $^)
422-
endif
418+
quiet_cmd_fdtoverlay = OVL $(quiet_dtb_check_tag) $@
419+
cmd_fdtoverlay = $(objtree)/scripts/dtc/fdtoverlay -o $@ -i $(filter %.dtb %.dtbo, $^) $(cmd_dtb_check)
423420

424421
$(multi-dtb-y): FORCE
425422
$(call if_changed,fdtoverlay)
@@ -430,16 +427,11 @@ DT_CHECKER ?= dt-validate
430427
DT_CHECKER_FLAGS ?= $(if $(DT_SCHEMA_FILES),-l $(DT_SCHEMA_FILES),-m)
431428
DT_BINDING_DIR := Documentation/devicetree/bindings
432429
DT_TMP_SCHEMA := $(objtree)/$(DT_BINDING_DIR)/processed-schema.json
433-
434-
quiet_cmd_dtb = DTC_CHK $@
435-
cmd_dtb = $(cmd_dtc) ; $(DT_CHECK_CMD) $@ || true
436-
else
437-
quiet_cmd_dtb = $(quiet_cmd_dtc)
438-
cmd_dtb = $(cmd_dtc)
430+
dtb-check-enabled = $(if $(filter %.dtb, $@),y)
439431
endif
440432

441433
$(obj)/%.dtb: $(obj)/%.dts $(DTC) $(DT_TMP_SCHEMA) FORCE
442-
$(call if_changed_dep,dtb)
434+
$(call if_changed_dep,dtc)
443435

444436
$(obj)/%.dtbo: $(src)/%.dtso $(DTC) FORCE
445437
$(call if_changed_dep,dtc)

scripts/Makefile.modfinal

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ endif
6262

6363
targets += $(modules:%.o=%.ko) $(modules:%.o=%.mod.o)
6464

65-
# Add FORCE to the prequisites of a target to force it to be always rebuilt.
65+
# Add FORCE to the prerequisites of a target to force it to be always rebuilt.
6666
# ---------------------------------------------------------------------------
6767

6868
PHONY += FORCE

scripts/Makefile.vmlinux

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ targets += vmlinux
3333
vmlinux: scripts/link-vmlinux.sh vmlinux.o $(KBUILD_LDS) FORCE
3434
+$(call if_changed_dep,link_vmlinux)
3535

36-
# Add FORCE to the prequisites of a target to force it to be always rebuilt.
36+
# Add FORCE to the prerequisites of a target to force it to be always rebuilt.
3737
# ---------------------------------------------------------------------------
3838

3939
PHONY += FORCE

0 commit comments

Comments
 (0)