diff options
Diffstat (limited to 'scripts')
| -rw-r--r-- | scripts/Makefile.build | 2 | ||||
| -rw-r--r-- | scripts/Makefile.host | 2 | ||||
| -rw-r--r-- | scripts/Makefile.lib | 2 | ||||
| -rw-r--r-- | scripts/Makefile.modbuiltin | 2 | ||||
| -rw-r--r-- | scripts/Makefile.modpost | 2 | ||||
| -rw-r--r-- | scripts/gdb/linux/Makefile | 2 | ||||
| -rwxr-xr-x | scripts/link-vmlinux.sh | 3 | ||||
| -rwxr-xr-x | scripts/mkmakefile | 26 | ||||
| -rwxr-xr-x | scripts/recordmcount.pl | 2 | ||||
| -rwxr-xr-x | scripts/tags.sh | 2 |
10 files changed, 13 insertions, 32 deletions
diff --git a/scripts/Makefile.build b/scripts/Makefile.build index 0c5969fa795f..ae9cf740633e 100644 --- a/scripts/Makefile.build +++ b/scripts/Makefile.build | |||
| @@ -504,7 +504,7 @@ existing-targets := $(wildcard $(sort $(targets))) | |||
| 504 | 504 | ||
| 505 | -include $(foreach f,$(existing-targets),$(dir $(f)).$(notdir $(f)).cmd) | 505 | -include $(foreach f,$(existing-targets),$(dir $(f)).$(notdir $(f)).cmd) |
| 506 | 506 | ||
| 507 | ifneq ($(KBUILD_SRC),) | 507 | ifneq ($(srctree),.) |
| 508 | # Create directories for object files if they do not exist | 508 | # Create directories for object files if they do not exist |
| 509 | obj-dirs := $(sort $(obj) $(patsubst %/,%, $(dir $(targets)))) | 509 | obj-dirs := $(sort $(obj) $(patsubst %/,%, $(dir $(targets)))) |
| 510 | # If targets exist, their directories apparently exist. Skip mkdir. | 510 | # If targets exist, their directories apparently exist. Skip mkdir. |
diff --git a/scripts/Makefile.host b/scripts/Makefile.host index a115259b57e7..73b804197fca 100644 --- a/scripts/Makefile.host +++ b/scripts/Makefile.host | |||
| @@ -71,7 +71,7 @@ __hostc_flags = $(_hostc_flags) | |||
| 71 | __hostcxx_flags = $(_hostcxx_flags) | 71 | __hostcxx_flags = $(_hostcxx_flags) |
| 72 | 72 | ||
| 73 | ifeq ($(KBUILD_EXTMOD),) | 73 | ifeq ($(KBUILD_EXTMOD),) |
| 74 | ifneq ($(KBUILD_SRC),) | 74 | ifneq ($(srctree),.) |
| 75 | __hostc_flags = -I$(obj) $(call flags,_hostc_flags) | 75 | __hostc_flags = -I$(obj) $(call flags,_hostc_flags) |
| 76 | __hostcxx_flags = -I$(obj) $(call flags,_hostcxx_flags) | 76 | __hostcxx_flags = -I$(obj) $(call flags,_hostcxx_flags) |
| 77 | endif | 77 | endif |
diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib index 8a1f64f17740..41e98fa66b91 100644 --- a/scripts/Makefile.lib +++ b/scripts/Makefile.lib | |||
| @@ -144,7 +144,7 @@ __cpp_flags = $(_cpp_flags) | |||
| 144 | # If building the kernel in a separate objtree expand all occurrences | 144 | # If building the kernel in a separate objtree expand all occurrences |
| 145 | # of -Idir to -I$(srctree)/dir except for absolute paths (starting with '/'). | 145 | # of -Idir to -I$(srctree)/dir except for absolute paths (starting with '/'). |
| 146 | ifeq ($(KBUILD_EXTMOD),) | 146 | ifeq ($(KBUILD_EXTMOD),) |
| 147 | ifneq ($(KBUILD_SRC),) | 147 | ifneq ($(srctree),.) |
| 148 | 148 | ||
| 149 | # -I$(obj) locates generated .h files | 149 | # -I$(obj) locates generated .h files |
| 150 | # $(call addtree,-I$(obj)) locates .h files in srctree, from generated .c files | 150 | # $(call addtree,-I$(obj)) locates .h files in srctree, from generated .c files |
diff --git a/scripts/Makefile.modbuiltin b/scripts/Makefile.modbuiltin index a072a4267746..ea90a90b41a0 100644 --- a/scripts/Makefile.modbuiltin +++ b/scripts/Makefile.modbuiltin | |||
| @@ -15,7 +15,7 @@ include include/config/tristate.conf | |||
| 15 | 15 | ||
| 16 | include scripts/Kbuild.include | 16 | include scripts/Kbuild.include |
| 17 | 17 | ||
| 18 | ifneq ($(KBUILD_SRC),) | 18 | ifneq ($(srctree),.) |
| 19 | # Create output directory if not already present | 19 | # Create output directory if not already present |
| 20 | _dummy := $(shell [ -d $(obj) ] || mkdir -p $(obj)) | 20 | _dummy := $(shell [ -d $(obj) ] || mkdir -p $(obj)) |
| 21 | endif | 21 | endif |
diff --git a/scripts/Makefile.modpost b/scripts/Makefile.modpost index 6b7f354f189a..fec6ec2ffa47 100644 --- a/scripts/Makefile.modpost +++ b/scripts/Makefile.modpost | |||
| @@ -78,7 +78,7 @@ modpost = scripts/mod/modpost \ | |||
| 78 | $(if $(KBUILD_EXTRA_SYMBOLS), $(patsubst %, -e %,$(KBUILD_EXTRA_SYMBOLS))) \ | 78 | $(if $(KBUILD_EXTRA_SYMBOLS), $(patsubst %, -e %,$(KBUILD_EXTRA_SYMBOLS))) \ |
| 79 | $(if $(KBUILD_EXTMOD),-o $(modulesymfile)) \ | 79 | $(if $(KBUILD_EXTMOD),-o $(modulesymfile)) \ |
| 80 | $(if $(CONFIG_SECTION_MISMATCH_WARN_ONLY),,-E) \ | 80 | $(if $(CONFIG_SECTION_MISMATCH_WARN_ONLY),,-E) \ |
| 81 | $(if $(KBUILD_EXTMOD)$(KBUILD_MODPOST_WARN),-w) | 81 | $(if $(KBUILD_MODPOST_WARN),-w) |
| 82 | 82 | ||
| 83 | MODPOST_OPT=$(subst -i,-n,$(filter -i,$(MAKEFLAGS))) | 83 | MODPOST_OPT=$(subst -i,-n,$(filter -i,$(MAKEFLAGS))) |
| 84 | 84 | ||
diff --git a/scripts/gdb/linux/Makefile b/scripts/gdb/linux/Makefile index 3df395a9c2ce..9fd3d8ed731a 100644 --- a/scripts/gdb/linux/Makefile +++ b/scripts/gdb/linux/Makefile | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | # SPDX-License-Identifier: GPL-2.0 | 1 | # SPDX-License-Identifier: GPL-2.0 |
| 2 | 2 | ||
| 3 | ifneq ($(KBUILD_SRC),) | 3 | ifneq ($(srctree),.) |
| 4 | 4 | ||
| 5 | symlinks := $(patsubst $(srctree)/$(src)/%,%,$(wildcard $(srctree)/$(src)/*.py)) | 5 | symlinks := $(patsubst $(srctree)/$(src)/%,%,$(wildcard $(srctree)/$(src)/*.py)) |
| 6 | 6 | ||
diff --git a/scripts/link-vmlinux.sh b/scripts/link-vmlinux.sh index e3c06b9482a2..a7124f895b24 100755 --- a/scripts/link-vmlinux.sh +++ b/scripts/link-vmlinux.sh | |||
| @@ -212,6 +212,9 @@ modpost_link vmlinux.o | |||
| 212 | # modpost vmlinux.o to check for section mismatches | 212 | # modpost vmlinux.o to check for section mismatches |
| 213 | ${MAKE} -f "${srctree}/scripts/Makefile.modpost" vmlinux.o | 213 | ${MAKE} -f "${srctree}/scripts/Makefile.modpost" vmlinux.o |
| 214 | 214 | ||
| 215 | info MODINFO modules.builtin.modinfo | ||
| 216 | ${OBJCOPY} -j .modinfo -O binary vmlinux.o modules.builtin.modinfo | ||
| 217 | |||
| 215 | kallsymso="" | 218 | kallsymso="" |
| 216 | kallsyms_vmlinux="" | 219 | kallsyms_vmlinux="" |
| 217 | if [ -n "${CONFIG_KALLSYMS}" ]; then | 220 | if [ -n "${CONFIG_KALLSYMS}" ]; then |
diff --git a/scripts/mkmakefile b/scripts/mkmakefile index 412f13fdff52..4d0faebb1719 100755 --- a/scripts/mkmakefile +++ b/scripts/mkmakefile | |||
| @@ -7,33 +7,11 @@ | |||
| 7 | # Usage | 7 | # Usage |
| 8 | # $1 - Kernel src directory | 8 | # $1 - Kernel src directory |
| 9 | 9 | ||
| 10 | # Only overwrite automatically generated Makefiles | ||
| 11 | # (so we do not overwrite kernel Makefile) | ||
| 12 | if test -e Makefile && ! grep -q Automatically Makefile | ||
| 13 | then | ||
| 14 | exit 0 | ||
| 15 | fi | ||
| 16 | if [ "${quiet}" != "silent_" ]; then | 10 | if [ "${quiet}" != "silent_" ]; then |
| 17 | echo " GEN Makefile" | 11 | echo " GEN Makefile" |
| 18 | fi | 12 | fi |
| 19 | 13 | ||
| 20 | cat << EOF > Makefile | 14 | cat << EOF > Makefile |
| 21 | # Automatically generated by $0: don't edit | 15 | # Automatically generated by $(realpath $0): don't edit |
| 22 | 16 | include $(realpath $1/Makefile) | |
| 23 | ifeq ("\$(origin V)", "command line") | ||
| 24 | VERBOSE := \$(V) | ||
| 25 | endif | ||
| 26 | ifneq (\$(VERBOSE),1) | ||
| 27 | Q := @ | ||
| 28 | endif | ||
| 29 | |||
| 30 | MAKEFLAGS += --no-print-directory | ||
| 31 | |||
| 32 | .PHONY: __sub-make \$(MAKECMDGOALS) | ||
| 33 | |||
| 34 | __sub-make: | ||
| 35 | \$(Q)\$(MAKE) -C $1 O=\$(CURDIR) \$(MAKECMDGOALS) | ||
| 36 | |||
| 37 | \$(filter-out __sub-make, \$(MAKECMDGOALS)): __sub-make | ||
| 38 | @: | ||
| 39 | EOF | 17 | EOF |
diff --git a/scripts/recordmcount.pl b/scripts/recordmcount.pl index f71666899245..d24759214efd 100755 --- a/scripts/recordmcount.pl +++ b/scripts/recordmcount.pl | |||
| @@ -496,7 +496,7 @@ sub update_funcs | |||
| 496 | # | 496 | # |
| 497 | # Step 2: find the sections and mcount call sites | 497 | # Step 2: find the sections and mcount call sites |
| 498 | # | 498 | # |
| 499 | open(IN, "$objdump -hdr $inputfile|") || die "error running $objdump"; | 499 | open(IN, "LANG=C $objdump -hdr $inputfile|") || die "error running $objdump"; |
| 500 | 500 | ||
| 501 | my $text; | 501 | my $text; |
| 502 | 502 | ||
diff --git a/scripts/tags.sh b/scripts/tags.sh index f470d9919ed7..70e14c67bde7 100755 --- a/scripts/tags.sh +++ b/scripts/tags.sh | |||
| @@ -19,7 +19,7 @@ ignore="$ignore ( -name *.mod.c ) -prune -o" | |||
| 19 | # Do not use full path if we do not use O=.. builds | 19 | # Do not use full path if we do not use O=.. builds |
| 20 | # Use make O=. {tags|cscope} | 20 | # Use make O=. {tags|cscope} |
| 21 | # to force full paths for a non-O= build | 21 | # to force full paths for a non-O= build |
| 22 | if [ "${KBUILD_SRC}" = "" ]; then | 22 | if [ "${srctree}" = "." -o -z "${srctree}" ]; then |
| 23 | tree= | 23 | tree= |
| 24 | else | 24 | else |
| 25 | tree=${srctree}/ | 25 | tree=${srctree}/ |
