diff options
| -rw-r--r-- | .gitignore | 16 | ||||
| -rw-r--r-- | Documentation/dontdiff | 1 | ||||
| -rw-r--r-- | Documentation/kbuild/kbuild.txt | 5 | ||||
| -rw-r--r-- | Makefile | 146 | ||||
| -rw-r--r-- | arch/arm/plat-omap/dma.c | 1 | ||||
| -rw-r--r-- | drivers/clocksource/timer-ti-dm.c | 1 | ||||
| -rw-r--r-- | drivers/memory/Makefile | 7 | ||||
| -rw-r--r-- | drivers/memory/Makefile.asm-offsets | 4 | ||||
| -rw-r--r-- | drivers/mfd/omap-usb-tll.c | 1 | ||||
| -rw-r--r-- | include/asm-generic/vmlinux.lds.h | 1 | ||||
| -rw-r--r-- | include/linux/module.h | 1 | ||||
| -rw-r--r-- | include/linux/moduleparam.h | 12 | ||||
| -rw-r--r-- | samples/Kconfig | 7 | ||||
| -rw-r--r-- | samples/Makefile | 2 | ||||
| -rw-r--r-- | samples/seccomp/Makefile | 2 | ||||
| -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 |
25 files changed, 128 insertions, 124 deletions
diff --git a/.gitignore b/.gitignore index a20ac26aa2f5..d263ca9a276c 100644 --- a/.gitignore +++ b/.gitignore | |||
| @@ -58,6 +58,7 @@ modules.builtin | |||
| 58 | /vmlinuz | 58 | /vmlinuz |
| 59 | /System.map | 59 | /System.map |
| 60 | /Module.markers | 60 | /Module.markers |
| 61 | /modules.builtin.modinfo | ||
| 61 | 62 | ||
| 62 | # | 63 | # |
| 63 | # RPM spec file (make rpm-pkg) | 64 | # RPM spec file (make rpm-pkg) |
| @@ -90,10 +91,10 @@ modules.builtin | |||
| 90 | # | 91 | # |
| 91 | # Generated include files | 92 | # Generated include files |
| 92 | # | 93 | # |
| 93 | include/config | 94 | /include/config/ |
| 94 | include/generated | 95 | /include/generated/ |
| 95 | include/ksym | 96 | /include/ksym/ |
| 96 | arch/*/include/generated | 97 | /arch/*/include/generated/ |
| 97 | 98 | ||
| 98 | # stgit generated dirs | 99 | # stgit generated dirs |
| 99 | patches-* | 100 | patches-* |
| @@ -129,7 +130,12 @@ signing_key.x509 | |||
| 129 | x509.genkey | 130 | x509.genkey |
| 130 | 131 | ||
| 131 | # Kconfig presets | 132 | # Kconfig presets |
| 132 | all.config | 133 | /all.config |
| 134 | /alldef.config | ||
| 135 | /allmod.config | ||
| 136 | /allno.config | ||
| 137 | /allrandom.config | ||
| 138 | /allyes.config | ||
| 133 | 139 | ||
| 134 | # Kdevelop4 | 140 | # Kdevelop4 |
| 135 | *.kdev4 | 141 | *.kdev4 |
diff --git a/Documentation/dontdiff b/Documentation/dontdiff index 93693775639f..48e1930fb4a4 100644 --- a/Documentation/dontdiff +++ b/Documentation/dontdiff | |||
| @@ -179,6 +179,7 @@ mktree | |||
| 179 | mkutf8data | 179 | mkutf8data |
| 180 | modpost | 180 | modpost |
| 181 | modules.builtin | 181 | modules.builtin |
| 182 | modules.builtin.modinfo | ||
| 182 | modules.order | 183 | modules.order |
| 183 | modversions.h* | 184 | modversions.h* |
| 184 | nconf | 185 | nconf |
diff --git a/Documentation/kbuild/kbuild.txt b/Documentation/kbuild/kbuild.txt index 8a3830b39c7d..9c230ea71963 100644 --- a/Documentation/kbuild/kbuild.txt +++ b/Documentation/kbuild/kbuild.txt | |||
| @@ -11,6 +11,11 @@ modules.builtin | |||
| 11 | This file lists all modules that are built into the kernel. This is used | 11 | This file lists all modules that are built into the kernel. This is used |
| 12 | by modprobe to not fail when trying to load something builtin. | 12 | by modprobe to not fail when trying to load something builtin. |
| 13 | 13 | ||
| 14 | modules.builtin.modinfo | ||
| 15 | -------------------------------------------------- | ||
| 16 | This file contains modinfo from all modules that are built into the kernel. | ||
| 17 | Unlike modinfo of a separate module, all fields are prefixed with module name. | ||
| 18 | |||
| 14 | 19 | ||
| 15 | Environment variables | 20 | Environment variables |
| 16 | 21 | ||
| @@ -96,56 +96,65 @@ endif | |||
| 96 | 96 | ||
| 97 | export quiet Q KBUILD_VERBOSE | 97 | export quiet Q KBUILD_VERBOSE |
| 98 | 98 | ||
| 99 | # kbuild supports saving output files in a separate directory. | 99 | # Kbuild will save output files in the current working directory. |
| 100 | # To locate output files in a separate directory two syntaxes are supported. | 100 | # This does not need to match to the root of the kernel source tree. |
| 101 | # In both cases the working directory must be the root of the kernel src. | 101 | # |
| 102 | # For example, you can do this: | ||
| 103 | # | ||
| 104 | # cd /dir/to/store/output/files; make -f /dir/to/kernel/source/Makefile | ||
| 105 | # | ||
| 106 | # If you want to save output files in a different location, there are | ||
| 107 | # two syntaxes to specify it. | ||
| 108 | # | ||
| 102 | # 1) O= | 109 | # 1) O= |
| 103 | # Use "make O=dir/to/store/output/files/" | 110 | # Use "make O=dir/to/store/output/files/" |
| 104 | # | 111 | # |
| 105 | # 2) Set KBUILD_OUTPUT | 112 | # 2) Set KBUILD_OUTPUT |
| 106 | # Set the environment variable KBUILD_OUTPUT to point to the directory | 113 | # Set the environment variable KBUILD_OUTPUT to point to the output directory. |
| 107 | # where the output files shall be placed. | 114 | # export KBUILD_OUTPUT=dir/to/store/output/files/; make |
| 108 | # export KBUILD_OUTPUT=dir/to/store/output/files/ | ||
| 109 | # make | ||
| 110 | # | 115 | # |
| 111 | # The O= assignment takes precedence over the KBUILD_OUTPUT environment | 116 | # The O= assignment takes precedence over the KBUILD_OUTPUT environment |
| 112 | # variable. | 117 | # variable. |
| 113 | 118 | ||
| 114 | # KBUILD_SRC is not intended to be used by the regular user (for now), | 119 | # Do we want to change the working directory? |
| 115 | # it is set on invocation of make with KBUILD_OUTPUT or O= specified. | ||
| 116 | |||
| 117 | # OK, Make called in directory where kernel src resides | ||
| 118 | # Do we want to locate output files in a separate directory? | ||
| 119 | ifeq ("$(origin O)", "command line") | 120 | ifeq ("$(origin O)", "command line") |
| 120 | KBUILD_OUTPUT := $(O) | 121 | KBUILD_OUTPUT := $(O) |
| 121 | endif | 122 | endif |
| 122 | 123 | ||
| 123 | ifneq ($(words $(subst :, ,$(CURDIR))), 1) | 124 | ifneq ($(KBUILD_OUTPUT),) |
| 124 | $(error main directory cannot contain spaces nor colons) | 125 | # Make's built-in functions such as $(abspath ...), $(realpath ...) cannot |
| 126 | # expand a shell special character '~'. We use a somewhat tedious way here. | ||
| 127 | abs_objtree := $(shell mkdir -p $(KBUILD_OUTPUT) && cd $(KBUILD_OUTPUT) && pwd) | ||
| 128 | $(if $(abs_objtree),, \ | ||
| 129 | $(error failed to create output directory "$(KBUILD_OUTPUT)")) | ||
| 130 | |||
| 131 | # $(realpath ...) resolves symlinks | ||
| 132 | abs_objtree := $(realpath $(abs_objtree)) | ||
| 133 | else | ||
| 134 | abs_objtree := $(CURDIR) | ||
| 135 | endif # ifneq ($(KBUILD_OUTPUT),) | ||
| 136 | |||
| 137 | ifeq ($(abs_objtree),$(CURDIR)) | ||
| 138 | # Suppress "Entering directory ..." unless we are changing the work directory. | ||
| 139 | MAKEFLAGS += --no-print-directory | ||
| 140 | else | ||
| 141 | need-sub-make := 1 | ||
| 125 | endif | 142 | endif |
| 126 | 143 | ||
| 127 | ifneq ($(KBUILD_OUTPUT),) | 144 | abs_srctree := $(realpath $(dir $(lastword $(MAKEFILE_LIST)))) |
| 128 | # check that the output directory actually exists | ||
| 129 | saved-output := $(KBUILD_OUTPUT) | ||
| 130 | KBUILD_OUTPUT := $(shell mkdir -p $(KBUILD_OUTPUT) && cd $(KBUILD_OUTPUT) \ | ||
| 131 | && pwd) | ||
| 132 | $(if $(KBUILD_OUTPUT),, \ | ||
| 133 | $(error failed to create output directory "$(saved-output)")) | ||
| 134 | 145 | ||
| 146 | ifneq ($(words $(subst :, ,$(abs_srctree))), 1) | ||
| 147 | $(error source directory cannot contain spaces or colons) | ||
| 148 | endif | ||
| 149 | |||
| 150 | ifneq ($(abs_srctree),$(abs_objtree)) | ||
| 135 | # Look for make include files relative to root of kernel src | 151 | # Look for make include files relative to root of kernel src |
| 136 | # | 152 | # |
| 137 | # This does not become effective immediately because MAKEFLAGS is re-parsed | 153 | # This does not become effective immediately because MAKEFLAGS is re-parsed |
| 138 | # once after the Makefile is read. It is OK since we are going to invoke | 154 | # once after the Makefile is read. We need to invoke sub-make. |
| 139 | # 'sub-make' below. | 155 | MAKEFLAGS += --include-dir=$(abs_srctree) |
| 140 | MAKEFLAGS += --include-dir=$(CURDIR) | ||
| 141 | |||
| 142 | need-sub-make := 1 | 156 | need-sub-make := 1 |
| 143 | else | 157 | endif |
| 144 | |||
| 145 | # Do not print "Entering directory ..." at all for in-tree build. | ||
| 146 | MAKEFLAGS += --no-print-directory | ||
| 147 | |||
| 148 | endif # ifneq ($(KBUILD_OUTPUT),) | ||
| 149 | 158 | ||
| 150 | ifneq ($(filter 3.%,$(MAKE_VERSION)),) | 159 | ifneq ($(filter 3.%,$(MAKE_VERSION)),) |
| 151 | # 'MAKEFLAGS += -rR' does not immediately become effective for GNU Make 3.x | 160 | # 'MAKEFLAGS += -rR' does not immediately become effective for GNU Make 3.x |
| @@ -155,20 +164,19 @@ need-sub-make := 1 | |||
| 155 | $(lastword $(MAKEFILE_LIST)): ; | 164 | $(lastword $(MAKEFILE_LIST)): ; |
| 156 | endif | 165 | endif |
| 157 | 166 | ||
| 167 | export abs_srctree abs_objtree | ||
| 158 | export sub_make_done := 1 | 168 | export sub_make_done := 1 |
| 159 | 169 | ||
| 160 | ifeq ($(need-sub-make),1) | 170 | ifeq ($(need-sub-make),1) |
| 161 | 171 | ||
| 162 | PHONY += $(MAKECMDGOALS) sub-make | 172 | PHONY += $(MAKECMDGOALS) sub-make |
| 163 | 173 | ||
| 164 | $(filter-out _all sub-make $(CURDIR)/Makefile, $(MAKECMDGOALS)) _all: sub-make | 174 | $(filter-out _all sub-make $(lastword $(MAKEFILE_LIST)), $(MAKECMDGOALS)) _all: sub-make |
| 165 | @: | 175 | @: |
| 166 | 176 | ||
| 167 | # Invoke a second make in the output directory, passing relevant variables | 177 | # Invoke a second make in the output directory, passing relevant variables |
| 168 | sub-make: | 178 | sub-make: |
| 169 | $(Q)$(MAKE) \ | 179 | $(Q)$(MAKE) -C $(abs_objtree) -f $(abs_srctree)/Makefile $(MAKECMDGOALS) |
| 170 | $(if $(KBUILD_OUTPUT),-C $(KBUILD_OUTPUT) KBUILD_SRC=$(CURDIR)) \ | ||
| 171 | -f $(CURDIR)/Makefile $(filter-out _all sub-make,$(MAKECMDGOALS)) | ||
| 172 | 180 | ||
| 173 | endif # need-sub-make | 181 | endif # need-sub-make |
| 174 | endif # sub_make_done | 182 | endif # sub_make_done |
| @@ -213,16 +221,21 @@ ifeq ("$(origin M)", "command line") | |||
| 213 | KBUILD_EXTMOD := $(M) | 221 | KBUILD_EXTMOD := $(M) |
| 214 | endif | 222 | endif |
| 215 | 223 | ||
| 216 | ifeq ($(KBUILD_SRC),) | 224 | ifeq ($(abs_srctree),$(abs_objtree)) |
| 217 | # building in the source tree | 225 | # building in the source tree |
| 218 | srctree := . | 226 | srctree := . |
| 219 | else | 227 | else |
| 220 | ifeq ($(KBUILD_SRC)/,$(dir $(CURDIR))) | 228 | ifeq ($(abs_srctree)/,$(dir $(abs_objtree))) |
| 221 | # building in a subdirectory of the source tree | 229 | # building in a subdirectory of the source tree |
| 222 | srctree := .. | 230 | srctree := .. |
| 223 | else | 231 | else |
| 224 | srctree := $(KBUILD_SRC) | 232 | srctree := $(abs_srctree) |
| 225 | endif | 233 | endif |
| 234 | |||
| 235 | # TODO: | ||
| 236 | # KBUILD_SRC is only used to distinguish in-tree/out-of-tree build. | ||
| 237 | # Replace it with $(srctree) or something. | ||
| 238 | KBUILD_SRC := $(abs_srctree) | ||
| 226 | endif | 239 | endif |
| 227 | 240 | ||
| 228 | export KBUILD_CHECKSRC KBUILD_EXTMOD KBUILD_SRC | 241 | export KBUILD_CHECKSRC KBUILD_EXTMOD KBUILD_SRC |
| @@ -436,7 +449,7 @@ USERINCLUDE := \ | |||
| 436 | LINUXINCLUDE := \ | 449 | LINUXINCLUDE := \ |
| 437 | -I$(srctree)/arch/$(SRCARCH)/include \ | 450 | -I$(srctree)/arch/$(SRCARCH)/include \ |
| 438 | -I$(objtree)/arch/$(SRCARCH)/include/generated \ | 451 | -I$(objtree)/arch/$(SRCARCH)/include/generated \ |
| 439 | $(if $(KBUILD_SRC), -I$(srctree)/include) \ | 452 | $(if $(filter .,$(srctree)),,-I$(srctree)/include) \ |
| 440 | -I$(objtree)/include \ | 453 | -I$(objtree)/include \ |
| 441 | $(USERINCLUDE) | 454 | $(USERINCLUDE) |
| 442 | 455 | ||
| @@ -497,7 +510,7 @@ PHONY += outputmakefile | |||
| 497 | # At the same time when output Makefile generated, generate .gitignore to | 510 | # At the same time when output Makefile generated, generate .gitignore to |
| 498 | # ignore whole output directory | 511 | # ignore whole output directory |
| 499 | outputmakefile: | 512 | outputmakefile: |
| 500 | ifneq ($(KBUILD_SRC),) | 513 | ifneq ($(srctree),.) |
| 501 | $(Q)ln -fsn $(srctree) source | 514 | $(Q)ln -fsn $(srctree) source |
| 502 | $(Q)$(CONFIG_SHELL) $(srctree)/scripts/mkmakefile $(srctree) | 515 | $(Q)$(CONFIG_SHELL) $(srctree)/scripts/mkmakefile $(srctree) |
| 503 | $(Q)test -e .gitignore || \ | 516 | $(Q)test -e .gitignore || \ |
| @@ -520,15 +533,6 @@ KBUILD_AFLAGS += $(CLANG_FLAGS) | |||
| 520 | export CLANG_FLAGS | 533 | export CLANG_FLAGS |
| 521 | endif | 534 | endif |
| 522 | 535 | ||
| 523 | RETPOLINE_CFLAGS_GCC := -mindirect-branch=thunk-extern -mindirect-branch-register | ||
| 524 | RETPOLINE_VDSO_CFLAGS_GCC := -mindirect-branch=thunk-inline -mindirect-branch-register | ||
| 525 | RETPOLINE_CFLAGS_CLANG := -mretpoline-external-thunk | ||
| 526 | RETPOLINE_VDSO_CFLAGS_CLANG := -mretpoline | ||
| 527 | RETPOLINE_CFLAGS := $(call cc-option,$(RETPOLINE_CFLAGS_GCC),$(call cc-option,$(RETPOLINE_CFLAGS_CLANG))) | ||
| 528 | RETPOLINE_VDSO_CFLAGS := $(call cc-option,$(RETPOLINE_VDSO_CFLAGS_GCC),$(call cc-option,$(RETPOLINE_VDSO_CFLAGS_CLANG))) | ||
| 529 | export RETPOLINE_CFLAGS | ||
| 530 | export RETPOLINE_VDSO_CFLAGS | ||
| 531 | |||
| 532 | # The expansion should be delayed until arch/$(SRCARCH)/Makefile is included. | 536 | # The expansion should be delayed until arch/$(SRCARCH)/Makefile is included. |
| 533 | # Some architectures define CROSS_COMPILE in arch/$(SRCARCH)/Makefile. | 537 | # Some architectures define CROSS_COMPILE in arch/$(SRCARCH)/Makefile. |
| 534 | # CC_VERSION_TEXT is referenced from Kconfig (so it needs export), | 538 | # CC_VERSION_TEXT is referenced from Kconfig (so it needs export), |
| @@ -595,20 +599,21 @@ endif | |||
| 595 | 599 | ||
| 596 | export KBUILD_MODULES KBUILD_BUILTIN | 600 | export KBUILD_MODULES KBUILD_BUILTIN |
| 597 | 601 | ||
| 602 | ifeq ($(dot-config),1) | ||
| 603 | include include/config/auto.conf | ||
| 604 | endif | ||
| 605 | |||
| 598 | ifeq ($(KBUILD_EXTMOD),) | 606 | ifeq ($(KBUILD_EXTMOD),) |
| 599 | # Objects we will link into vmlinux / subdirs we need to visit | 607 | # Objects we will link into vmlinux / subdirs we need to visit |
| 600 | init-y := init/ | 608 | init-y := init/ |
| 601 | drivers-y := drivers/ sound/ | 609 | drivers-y := drivers/ sound/ |
| 610 | drivers-$(CONFIG_SAMPLES) += samples/ | ||
| 602 | net-y := net/ | 611 | net-y := net/ |
| 603 | libs-y := lib/ | 612 | libs-y := lib/ |
| 604 | core-y := usr/ | 613 | core-y := usr/ |
| 605 | virt-y := virt/ | 614 | virt-y := virt/ |
| 606 | endif # KBUILD_EXTMOD | 615 | endif # KBUILD_EXTMOD |
| 607 | 616 | ||
| 608 | ifeq ($(dot-config),1) | ||
| 609 | include include/config/auto.conf | ||
| 610 | endif | ||
| 611 | |||
| 612 | # The all: target is the default when no target is given on the | 617 | # The all: target is the default when no target is given on the |
| 613 | # command line. | 618 | # command line. |
| 614 | # This allow a user to issue only 'make' to build a kernel including modules | 619 | # This allow a user to issue only 'make' to build a kernel including modules |
| @@ -625,6 +630,15 @@ ifdef CONFIG_FUNCTION_TRACER | |||
| 625 | CC_FLAGS_FTRACE := -pg | 630 | CC_FLAGS_FTRACE := -pg |
| 626 | endif | 631 | endif |
| 627 | 632 | ||
| 633 | RETPOLINE_CFLAGS_GCC := -mindirect-branch=thunk-extern -mindirect-branch-register | ||
| 634 | RETPOLINE_VDSO_CFLAGS_GCC := -mindirect-branch=thunk-inline -mindirect-branch-register | ||
| 635 | RETPOLINE_CFLAGS_CLANG := -mretpoline-external-thunk | ||
| 636 | RETPOLINE_VDSO_CFLAGS_CLANG := -mretpoline | ||
| 637 | RETPOLINE_CFLAGS := $(call cc-option,$(RETPOLINE_CFLAGS_GCC),$(call cc-option,$(RETPOLINE_CFLAGS_CLANG))) | ||
| 638 | RETPOLINE_VDSO_CFLAGS := $(call cc-option,$(RETPOLINE_VDSO_CFLAGS_GCC),$(call cc-option,$(RETPOLINE_VDSO_CFLAGS_CLANG))) | ||
| 639 | export RETPOLINE_CFLAGS | ||
| 640 | export RETPOLINE_VDSO_CFLAGS | ||
| 641 | |||
| 628 | # The arch Makefile can set ARCH_{CPP,A,C}FLAGS to override the default | 642 | # The arch Makefile can set ARCH_{CPP,A,C}FLAGS to override the default |
| 629 | # values of the respective KBUILD_* variables | 643 | # values of the respective KBUILD_* variables |
| 630 | ARCH_CPPFLAGS := | 644 | ARCH_CPPFLAGS := |
| @@ -985,8 +999,9 @@ vmlinux-dirs := $(patsubst %/,%,$(filter %/, $(init-y) $(init-m) \ | |||
| 985 | $(core-y) $(core-m) $(drivers-y) $(drivers-m) \ | 999 | $(core-y) $(core-m) $(drivers-y) $(drivers-m) \ |
| 986 | $(net-y) $(net-m) $(libs-y) $(libs-m) $(virt-y))) | 1000 | $(net-y) $(net-m) $(libs-y) $(libs-m) $(virt-y))) |
| 987 | 1001 | ||
| 988 | vmlinux-alldirs := $(sort $(vmlinux-dirs) $(patsubst %/,%,$(filter %/, \ | 1002 | vmlinux-alldirs := $(sort $(vmlinux-dirs) Documentation \ |
| 989 | $(init-) $(core-) $(drivers-) $(net-) $(libs-) $(virt-)))) | 1003 | $(patsubst %/,%,$(filter %/, $(init-) $(core-) \ |
| 1004 | $(drivers-) $(net-) $(libs-) $(virt-)))) | ||
| 990 | 1005 | ||
| 991 | init-y := $(patsubst %/, %/built-in.a, $(init-y)) | 1006 | init-y := $(patsubst %/, %/built-in.a, $(init-y)) |
| 992 | core-y := $(patsubst %/, %/built-in.a, $(core-y)) | 1007 | core-y := $(patsubst %/, %/built-in.a, $(core-y)) |
| @@ -1003,7 +1018,7 @@ export KBUILD_VMLINUX_LIBS := $(libs-y1) | |||
| 1003 | export KBUILD_LDS := arch/$(SRCARCH)/kernel/vmlinux.lds | 1018 | export KBUILD_LDS := arch/$(SRCARCH)/kernel/vmlinux.lds |
| 1004 | export LDFLAGS_vmlinux | 1019 | export LDFLAGS_vmlinux |
| 1005 | # used by scripts/package/Makefile | 1020 | # used by scripts/package/Makefile |
| 1006 | export KBUILD_ALLDIRS := $(sort $(filter-out arch/%,$(vmlinux-alldirs)) arch Documentation include samples scripts tools) | 1021 | export KBUILD_ALLDIRS := $(sort $(filter-out arch/%,$(vmlinux-alldirs)) arch include scripts tools) |
| 1007 | 1022 | ||
| 1008 | vmlinux-deps := $(KBUILD_LDS) $(KBUILD_VMLINUX_OBJS) $(KBUILD_VMLINUX_LIBS) | 1023 | vmlinux-deps := $(KBUILD_LDS) $(KBUILD_VMLINUX_OBJS) $(KBUILD_VMLINUX_LIBS) |
| 1009 | 1024 | ||
| @@ -1040,11 +1055,8 @@ vmlinux: scripts/link-vmlinux.sh autoksyms_recursive $(vmlinux-deps) FORCE | |||
| 1040 | 1055 | ||
| 1041 | targets := vmlinux | 1056 | targets := vmlinux |
| 1042 | 1057 | ||
| 1043 | # Build samples along the rest of the kernel. This needs headers_install. | 1058 | # Some samples need headers_install. |
| 1044 | ifdef CONFIG_SAMPLES | ||
| 1045 | vmlinux-dirs += samples | ||
| 1046 | samples: headers_install | 1059 | samples: headers_install |
| 1047 | endif | ||
| 1048 | 1060 | ||
| 1049 | # The actual objects are generated when descending, | 1061 | # The actual objects are generated when descending, |
| 1050 | # make sure no implicit rule kicks in | 1062 | # make sure no implicit rule kicks in |
| @@ -1064,7 +1076,7 @@ filechk_kernel.release = \ | |||
| 1064 | echo "$(KERNELVERSION)$$($(CONFIG_SHELL) $(srctree)/scripts/setlocalversion $(srctree))" | 1076 | echo "$(KERNELVERSION)$$($(CONFIG_SHELL) $(srctree)/scripts/setlocalversion $(srctree))" |
| 1065 | 1077 | ||
| 1066 | # Store (new) KERNELRELEASE string in include/config/kernel.release | 1078 | # Store (new) KERNELRELEASE string in include/config/kernel.release |
| 1067 | include/config/kernel.release: $(srctree)/Makefile FORCE | 1079 | include/config/kernel.release: FORCE |
| 1068 | $(call filechk,kernel.release) | 1080 | $(call filechk,kernel.release) |
| 1069 | 1081 | ||
| 1070 | # Additional helpers built in scripts/ | 1082 | # Additional helpers built in scripts/ |
| @@ -1086,9 +1098,11 @@ PHONY += prepare archprepare prepare1 prepare3 | |||
| 1086 | # and if so do: | 1098 | # and if so do: |
| 1087 | # 1) Check that make has not been executed in the kernel src $(srctree) | 1099 | # 1) Check that make has not been executed in the kernel src $(srctree) |
| 1088 | prepare3: include/config/kernel.release | 1100 | prepare3: include/config/kernel.release |
| 1089 | ifneq ($(KBUILD_SRC),) | 1101 | ifneq ($(srctree),.) |
| 1090 | @$(kecho) ' Using $(srctree) as source for kernel' | 1102 | @$(kecho) ' Using $(srctree) as source for kernel' |
| 1091 | $(Q)if [ -f $(srctree)/.config -o -d $(srctree)/include/config ]; then \ | 1103 | $(Q)if [ -f $(srctree)/.config -o \ |
| 1104 | -d $(srctree)/include/config -o \ | ||
| 1105 | -d $(srctree)/arch/$(SRCARCH)/include/generated ]; then \ | ||
| 1092 | echo >&2 " $(srctree) is not clean, please run 'make mrproper'"; \ | 1106 | echo >&2 " $(srctree) is not clean, please run 'make mrproper'"; \ |
| 1093 | echo >&2 " in the '$(srctree)' directory.";\ | 1107 | echo >&2 " in the '$(srctree)' directory.";\ |
| 1094 | /bin/false; \ | 1108 | /bin/false; \ |
| @@ -1304,6 +1318,7 @@ _modinst_: | |||
| 1304 | fi | 1318 | fi |
| 1305 | @cp -f $(objtree)/modules.order $(MODLIB)/ | 1319 | @cp -f $(objtree)/modules.order $(MODLIB)/ |
| 1306 | @cp -f $(objtree)/modules.builtin $(MODLIB)/ | 1320 | @cp -f $(objtree)/modules.builtin $(MODLIB)/ |
| 1321 | @cp -f $(objtree)/modules.builtin.modinfo $(MODLIB)/ | ||
| 1307 | $(Q)$(MAKE) -f $(srctree)/scripts/Makefile.modinst | 1322 | $(Q)$(MAKE) -f $(srctree)/scripts/Makefile.modinst |
| 1308 | 1323 | ||
| 1309 | # This depmod is only for convenience to give the initial | 1324 | # This depmod is only for convenience to give the initial |
| @@ -1344,10 +1359,11 @@ endif # CONFIG_MODULES | |||
| 1344 | 1359 | ||
| 1345 | # Directories & files removed with 'make clean' | 1360 | # Directories & files removed with 'make clean' |
| 1346 | CLEAN_DIRS += $(MODVERDIR) include/ksym | 1361 | CLEAN_DIRS += $(MODVERDIR) include/ksym |
| 1362 | CLEAN_FILES += modules.builtin.modinfo | ||
| 1347 | 1363 | ||
| 1348 | # Directories & files removed with 'make mrproper' | 1364 | # Directories & files removed with 'make mrproper' |
| 1349 | MRPROPER_DIRS += include/config usr/include include/generated \ | 1365 | MRPROPER_DIRS += include/config usr/include include/generated \ |
| 1350 | arch/*/include/generated .tmp_objdiff | 1366 | arch/$(SRCARCH)/include/generated .tmp_objdiff |
| 1351 | MRPROPER_FILES += .config .config.old .version \ | 1367 | MRPROPER_FILES += .config .config.old .version \ |
| 1352 | Module.symvers tags TAGS cscope* GPATH GTAGS GRTAGS GSYMS \ | 1368 | Module.symvers tags TAGS cscope* GPATH GTAGS GRTAGS GSYMS \ |
| 1353 | signing_key.pem signing_key.priv signing_key.x509 \ | 1369 | signing_key.pem signing_key.priv signing_key.x509 \ |
| @@ -1358,7 +1374,7 @@ MRPROPER_FILES += .config .config.old .version \ | |||
| 1358 | # | 1374 | # |
| 1359 | clean: rm-dirs := $(CLEAN_DIRS) | 1375 | clean: rm-dirs := $(CLEAN_DIRS) |
| 1360 | clean: rm-files := $(CLEAN_FILES) | 1376 | clean: rm-files := $(CLEAN_FILES) |
| 1361 | clean-dirs := $(addprefix _clean_, . $(vmlinux-alldirs) Documentation samples) | 1377 | clean-dirs := $(addprefix _clean_, . $(vmlinux-alldirs)) |
| 1362 | 1378 | ||
| 1363 | PHONY += $(clean-dirs) clean archclean vmlinuxclean | 1379 | PHONY += $(clean-dirs) clean archclean vmlinuxclean |
| 1364 | $(clean-dirs): | 1380 | $(clean-dirs): |
diff --git a/arch/arm/plat-omap/dma.c b/arch/arm/plat-omap/dma.c index d4012d6c0dcb..5ca4c5fd627a 100644 --- a/arch/arm/plat-omap/dma.c +++ b/arch/arm/plat-omap/dma.c | |||
| @@ -1449,7 +1449,6 @@ static void __exit omap_system_dma_exit(void) | |||
| 1449 | 1449 | ||
| 1450 | MODULE_DESCRIPTION("OMAP SYSTEM DMA DRIVER"); | 1450 | MODULE_DESCRIPTION("OMAP SYSTEM DMA DRIVER"); |
| 1451 | MODULE_LICENSE("GPL"); | 1451 | MODULE_LICENSE("GPL"); |
| 1452 | MODULE_ALIAS("platform:" DRIVER_NAME); | ||
| 1453 | MODULE_AUTHOR("Texas Instruments Inc"); | 1452 | MODULE_AUTHOR("Texas Instruments Inc"); |
| 1454 | 1453 | ||
| 1455 | /* | 1454 | /* |
diff --git a/drivers/clocksource/timer-ti-dm.c b/drivers/clocksource/timer-ti-dm.c index ee8ec5a8cb16..e40b55a7086f 100644 --- a/drivers/clocksource/timer-ti-dm.c +++ b/drivers/clocksource/timer-ti-dm.c | |||
| @@ -970,5 +970,4 @@ module_platform_driver(omap_dm_timer_driver); | |||
| 970 | 970 | ||
| 971 | MODULE_DESCRIPTION("OMAP Dual-Mode Timer Driver"); | 971 | MODULE_DESCRIPTION("OMAP Dual-Mode Timer Driver"); |
| 972 | MODULE_LICENSE("GPL"); | 972 | MODULE_LICENSE("GPL"); |
| 973 | MODULE_ALIAS("platform:" DRIVER_NAME); | ||
| 974 | MODULE_AUTHOR("Texas Instruments Inc"); | 973 | MODULE_AUTHOR("Texas Instruments Inc"); |
diff --git a/drivers/memory/Makefile b/drivers/memory/Makefile index 90161dec6fa5..91ae4eb0e913 100644 --- a/drivers/memory/Makefile +++ b/drivers/memory/Makefile | |||
| @@ -28,6 +28,9 @@ ti-emif-sram-objs := ti-emif-pm.o ti-emif-sram-pm.o | |||
| 28 | 28 | ||
| 29 | AFLAGS_ti-emif-sram-pm.o :=-Wa,-march=armv7-a | 29 | AFLAGS_ti-emif-sram-pm.o :=-Wa,-march=armv7-a |
| 30 | 30 | ||
| 31 | include drivers/memory/Makefile.asm-offsets | ||
| 32 | |||
| 33 | drivers/memory/ti-emif-sram-pm.o: include/generated/ti-emif-asm-offsets.h | 31 | drivers/memory/ti-emif-sram-pm.o: include/generated/ti-emif-asm-offsets.h |
| 32 | |||
| 33 | include/generated/ti-emif-asm-offsets.h: drivers/memory/emif-asm-offsets.s FORCE | ||
| 34 | $(call filechk,offsets,__TI_EMIF_ASM_OFFSETS_H__) | ||
| 35 | |||
| 36 | targets += emif-asm-offsets.s | ||
diff --git a/drivers/memory/Makefile.asm-offsets b/drivers/memory/Makefile.asm-offsets deleted file mode 100644 index 0447e174c752..000000000000 --- a/drivers/memory/Makefile.asm-offsets +++ /dev/null | |||
| @@ -1,4 +0,0 @@ | |||
| 1 | include/generated/ti-emif-asm-offsets.h: drivers/memory/emif-asm-offsets.s FORCE | ||
| 2 | $(call filechk,offsets,__TI_EMIF_ASM_OFFSETS_H__) | ||
| 3 | |||
| 4 | targets += emif-asm-offsets.s | ||
diff --git a/drivers/mfd/omap-usb-tll.c b/drivers/mfd/omap-usb-tll.c index 446713dbee27..93177d85e7a9 100644 --- a/drivers/mfd/omap-usb-tll.c +++ b/drivers/mfd/omap-usb-tll.c | |||
| @@ -459,7 +459,6 @@ EXPORT_SYMBOL_GPL(omap_tll_disable); | |||
| 459 | 459 | ||
| 460 | MODULE_AUTHOR("Keshava Munegowda <keshava_mgowda@ti.com>"); | 460 | MODULE_AUTHOR("Keshava Munegowda <keshava_mgowda@ti.com>"); |
| 461 | MODULE_AUTHOR("Roger Quadros <rogerq@ti.com>"); | 461 | MODULE_AUTHOR("Roger Quadros <rogerq@ti.com>"); |
| 462 | MODULE_ALIAS("platform:" USBHS_DRIVER_NAME); | ||
| 463 | MODULE_LICENSE("GPL v2"); | 462 | MODULE_LICENSE("GPL v2"); |
| 464 | MODULE_DESCRIPTION("usb tll driver for TI OMAP EHCI and OHCI controllers"); | 463 | MODULE_DESCRIPTION("usb tll driver for TI OMAP EHCI and OHCI controllers"); |
| 465 | 464 | ||
diff --git a/include/asm-generic/vmlinux.lds.h b/include/asm-generic/vmlinux.lds.h index f8f6f04c4453..bbb9e332f2fe 100644 --- a/include/asm-generic/vmlinux.lds.h +++ b/include/asm-generic/vmlinux.lds.h | |||
| @@ -844,6 +844,7 @@ | |||
| 844 | EXIT_CALL \ | 844 | EXIT_CALL \ |
| 845 | *(.discard) \ | 845 | *(.discard) \ |
| 846 | *(.discard.*) \ | 846 | *(.discard.*) \ |
| 847 | *(.modinfo) \ | ||
| 847 | } | 848 | } |
| 848 | 849 | ||
| 849 | /** | 850 | /** |
diff --git a/include/linux/module.h b/include/linux/module.h index 7dc4dc79b634..484b5cbb3410 100644 --- a/include/linux/module.h +++ b/include/linux/module.h | |||
| @@ -253,6 +253,7 @@ extern typeof(name) __mod_##type##__##name##_device_table \ | |||
| 253 | #define MODULE_VERSION(_version) MODULE_INFO(version, _version) | 253 | #define MODULE_VERSION(_version) MODULE_INFO(version, _version) |
| 254 | #else | 254 | #else |
| 255 | #define MODULE_VERSION(_version) \ | 255 | #define MODULE_VERSION(_version) \ |
| 256 | MODULE_INFO(version, _version); \ | ||
| 256 | static struct module_version_attribute ___modver_attr = { \ | 257 | static struct module_version_attribute ___modver_attr = { \ |
| 257 | .mattr = { \ | 258 | .mattr = { \ |
| 258 | .attr = { \ | 259 | .attr = { \ |
diff --git a/include/linux/moduleparam.h b/include/linux/moduleparam.h index ba36506db4fb..5ba250d9172a 100644 --- a/include/linux/moduleparam.h +++ b/include/linux/moduleparam.h | |||
| @@ -10,23 +10,21 @@ | |||
| 10 | module name. */ | 10 | module name. */ |
| 11 | #ifdef MODULE | 11 | #ifdef MODULE |
| 12 | #define MODULE_PARAM_PREFIX /* empty */ | 12 | #define MODULE_PARAM_PREFIX /* empty */ |
| 13 | #define __MODULE_INFO_PREFIX /* empty */ | ||
| 13 | #else | 14 | #else |
| 14 | #define MODULE_PARAM_PREFIX KBUILD_MODNAME "." | 15 | #define MODULE_PARAM_PREFIX KBUILD_MODNAME "." |
| 16 | /* We cannot use MODULE_PARAM_PREFIX because some modules override it. */ | ||
| 17 | #define __MODULE_INFO_PREFIX KBUILD_MODNAME "." | ||
| 15 | #endif | 18 | #endif |
| 16 | 19 | ||
| 17 | /* Chosen so that structs with an unsigned long line up. */ | 20 | /* Chosen so that structs with an unsigned long line up. */ |
| 18 | #define MAX_PARAM_PREFIX_LEN (64 - sizeof(unsigned long)) | 21 | #define MAX_PARAM_PREFIX_LEN (64 - sizeof(unsigned long)) |
| 19 | 22 | ||
| 20 | #ifdef MODULE | ||
| 21 | #define __MODULE_INFO(tag, name, info) \ | 23 | #define __MODULE_INFO(tag, name, info) \ |
| 22 | static const char __UNIQUE_ID(name)[] \ | 24 | static const char __UNIQUE_ID(name)[] \ |
| 23 | __used __attribute__((section(".modinfo"), unused, aligned(1))) \ | 25 | __used __attribute__((section(".modinfo"), unused, aligned(1))) \ |
| 24 | = __stringify(tag) "=" info | 26 | = __MODULE_INFO_PREFIX __stringify(tag) "=" info |
| 25 | #else /* !MODULE */ | 27 | |
| 26 | /* This struct is here for syntactic coherency, it is not used */ | ||
| 27 | #define __MODULE_INFO(tag, name, info) \ | ||
| 28 | struct __UNIQUE_ID(name) {} | ||
| 29 | #endif | ||
| 30 | #define __MODULE_PARM_TYPE(name, _type) \ | 28 | #define __MODULE_PARM_TYPE(name, _type) \ |
| 31 | __MODULE_INFO(parmtype, name##type, #name ":" _type) | 29 | __MODULE_INFO(parmtype, name##type, #name ":" _type) |
| 32 | 30 | ||
diff --git a/samples/Kconfig b/samples/Kconfig index 30a89425009c..0561a94f6fdb 100644 --- a/samples/Kconfig +++ b/samples/Kconfig | |||
| @@ -20,8 +20,7 @@ config SAMPLE_TRACE_PRINTK | |||
| 20 | test various trace_printk() calls from a module. | 20 | test various trace_printk() calls from a module. |
| 21 | 21 | ||
| 22 | config SAMPLE_KOBJECT | 22 | config SAMPLE_KOBJECT |
| 23 | tristate "Build kobject examples -- loadable modules only" | 23 | tristate "Build kobject examples" |
| 24 | depends on m | ||
| 25 | help | 24 | help |
| 26 | This config option will allow you to build a number of | 25 | This config option will allow you to build a number of |
| 27 | different kobject sample modules showing how to use kobjects, | 26 | different kobject sample modules showing how to use kobjects, |
| @@ -103,8 +102,8 @@ config SAMPLE_CONNECTOR | |||
| 103 | See also Documentation/connector/connector.txt | 102 | See also Documentation/connector/connector.txt |
| 104 | 103 | ||
| 105 | config SAMPLE_SECCOMP | 104 | config SAMPLE_SECCOMP |
| 106 | tristate "Build seccomp sample code -- loadable modules only" | 105 | bool "Build seccomp sample code" |
| 107 | depends on SECCOMP_FILTER && m | 106 | depends on SECCOMP_FILTER |
| 108 | help | 107 | help |
| 109 | Build samples of seccomp filters using various methods of | 108 | Build samples of seccomp filters using various methods of |
| 110 | BPF filter construction. | 109 | BPF filter construction. |
diff --git a/samples/Makefile b/samples/Makefile index 2484cc262d3e..8e096e0d45d1 100644 --- a/samples/Makefile +++ b/samples/Makefile | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | # Makefile for Linux samples code | 1 | # Makefile for Linux samples code |
| 2 | 2 | ||
| 3 | obj-$(CONFIG_SAMPLES) += kobject/ kprobes/ trace_events/ livepatch/ \ | 3 | obj-y += kobject/ kprobes/ trace_events/ livepatch/ \ |
| 4 | hw_breakpoint/ kfifo/ kdb/ hidraw/ rpmsg/ seccomp/ \ | 4 | hw_breakpoint/ kfifo/ kdb/ hidraw/ rpmsg/ seccomp/ \ |
| 5 | configfs/ connector/ v4l/ trace_printk/ \ | 5 | configfs/ connector/ v4l/ trace_printk/ \ |
| 6 | vfio-mdev/ vfs/ qmi/ binderfs/ pidfd/ | 6 | vfio-mdev/ vfs/ qmi/ binderfs/ pidfd/ |
diff --git a/samples/seccomp/Makefile b/samples/seccomp/Makefile index fb43a814d4c0..00e0b5e90bd0 100644 --- a/samples/seccomp/Makefile +++ b/samples/seccomp/Makefile | |||
| @@ -40,5 +40,5 @@ HOSTLDLIBS_bpf-fancy += $(MFLAG) | |||
| 40 | HOSTLDLIBS_dropper += $(MFLAG) | 40 | HOSTLDLIBS_dropper += $(MFLAG) |
| 41 | HOSTLDLIBS_user-trap += $(MFLAG) | 41 | HOSTLDLIBS_user-trap += $(MFLAG) |
| 42 | endif | 42 | endif |
| 43 | always := $(hostprogs-m) | 43 | always := $(hostprogs-y) |
| 44 | endif | 44 | endif |
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}/ |
