tools: kbuild: use interpreters to invoke scripts
Subsystems (5)
RFC PATCH 1/1 tools: kbuild: use interpreters to invoke scripts
We cannot rely on execute bits to be set on files in the repository. The build script should use the explicit interpreter when invoking any script from the repository.
Suggested-by Andrew Morton <[email protected]>
Suggested-by Kees Cook <[email protected]>
Suggested-by Lukas Bulwahn <[email protected]>
Signed-off-by Ujjwal Kumar <[email protected]>
--- tools/bootconfig/Makefile | 2 +- tools/bpf/Makefile.helpers | 2 +- tools/lib/bpf/Makefile | 2 +- tools/perf/Makefile.perf | 2 +- tools/power/cpupower/Makefile | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-)
tools/bootconfig/Makefile +1 -1
@@ -21,7 +21,7 @@ $(OUTPUT)bootconfig: main.c $(LIBSRC) $(CC) $(filter %.c,$^) $(CFLAGS) -o $@ test: $(ALL_PROGRAMS) test-bootconfig.sh - ./test-bootconfig.sh $(OUTPUT) + $(CONFIG_SHELL) ./test-bootconfig.sh $(OUTPUT) install: $(ALL_PROGRAMS) install $(OUTPUT)bootconfig $(DESTDIR)$(bindir)
tools/bpf/Makefile.helpers +1 -1
@@ -35,7 +35,7 @@ man7: $(DOC_MAN7) RST2MAN_DEP := $(shell command -v rst2man 2>/dev/null) $(OUTPUT)$(HELPERS_RST): $(UP2DIR)../../include/uapi/linux/bpf.h - $(QUIET_GEN)$(UP2DIR)../../scripts/bpf_helpers_doc.py --filename $< > $@ + $(QUIET_GEN)$(PYTHON3) $(UP2DIR)../../scripts/bpf_helpers_doc.py --filename $< > $@ $(OUTPUT)%.7: $(OUTPUT)%.rst ifndef RST2MAN_DEP
tools/lib/bpf/Makefile +1 -1
@@ -179,7 +179,7 @@ $(BPF_IN_STATIC): force elfdep zdep bpfdep $(BPF_HELPER_DEFS) $(Q)$(MAKE) $(build)=libbpf OUTPUT=$(STATIC_OBJDIR) $(BPF_HELPER_DEFS): $(srctree)/tools/include/uapi/linux/bpf.h - $(QUIET_GEN)$(srctree)/scripts/bpf_helpers_doc.py --header \ + $(QUIET_GEN)$(PYTHON3) $(srctree)/scripts/bpf_helpers_doc.py --header \ --file $(srctree)/tools/include/uapi/linux/bpf.h > $(BPF_HELPER_DEFS) $(OUTPUT)libbpf.so: $(OUTPUT)libbpf.so.$(LIBBPF_VERSION)
tools/perf/Makefile.perf +1 -1
@@ -229,7 +229,7 @@ goals := $(filter-out all sub-make, $(MAKECMDGOALS)) $(goals) all: sub-make sub-make: fixdep - @./check-headers.sh + $(Q)$(SHELL) ./check-headers.sh $(Q)$(MAKE) FIXDEP=1 -f Makefile.perf $(goals) else # force_fixdep
tools/power/cpupower/Makefile +1 -1
@@ -51,7 +51,7 @@ DESTDIR ?= # Package-related definitions. Distributions can modify the version # and _should_ modify the PACKAGE_BUGREPORT definition -VERSION:= $(shell ./utils/version-gen.sh) +VERSION:= $($(CONFIG_SHELL) ./utils/version-gen.sh) LIB_MAJ= 0.0.1 LIB_MIN= 0
Signature · 6 lines
2.26.2 _______________________________________________ Linux-kernel-mentees mailing list [email protected] https://lists.linuxfoundation.org/mailman/listinfo/linux-kernel-mentees