Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

kbuild: make *.mod not depend on *.o

The dependency

$(obj)/%.mod: $(obj)/%$(mod-prelink-ext).o

... exists because *.mod files previously contained undefined symbols,
which are computed from *.o files when CONFIG_TRIM_UNUSED_KSYMS=y.

Now that the undefined symbols are put into separate *.usyms files,
there is no reason to make *.mod depend on *.o files.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>

+4 -4
+2 -1
Makefile
··· 1792 1792 1793 1793 # .ko is special because modpost is needed 1794 1794 single-ko := $(sort $(filter %.ko, $(MAKECMDGOALS))) 1795 - single-no-ko := $(sort $(patsubst %.ko,%.mod, $(MAKECMDGOALS))) 1795 + single-no-ko := $(filter-out $(single-ko), $(MAKECMDGOALS)) \ 1796 + $(foreach x, o mod, $(patsubst %.ko, %.$x, $(single-ko))) 1796 1797 1797 1798 $(single-ko): single_modpost 1798 1799 @:
+2 -3
scripts/Makefile.build
··· 85 85 targets-for-builtin += $(obj)/built-in.a 86 86 endif 87 87 88 - targets-for-modules := $(foreach x, mod $(if $(CONFIG_TRIM_UNUSED_KSYMS), usyms), \ 88 + targets-for-modules := $(foreach x, o mod $(if $(CONFIG_TRIM_UNUSED_KSYMS), usyms), \ 89 89 $(patsubst %.o, %.$x, $(filter %.o, $(obj-m)))) 90 90 91 91 ifneq ($(CONFIG_LTO_CLANG)$(CONFIG_X86_KERNEL_IBT),) ··· 306 306 cmd_mod = echo $(addprefix $(obj)/, $(call real-search, $*.o, .o, -objs -y -m)) | \ 307 307 $(AWK) -v RS='( |\n)' '!x[$$0]++' > $@ 308 308 309 - $(obj)/%.mod: $(obj)/%$(mod-prelink-ext).o FORCE 309 + $(obj)/%.mod: FORCE 310 310 $(call if_changed,mod) 311 311 312 312 # List module undefined symbols ··· 469 469 $(call if_changed,link_multi-m) 470 470 $(call multi_depend, $(multi-obj-m), .o, -objs -y -m) 471 471 472 - targets += $(multi-obj-m) 473 472 targets := $(filter-out $(PHONY), $(targets)) 474 473 475 474 # Add intermediate targets: