summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorMasahiro Yamada <masahiroy@kernel.org>2022-04-06 17:30:22 +0200
committerMasahiro Yamada <masahiroy@kernel.org>2022-05-07 20:16:59 +0200
commitfc93a4cdce1db7568fcdff608924324f5754efe5 (patch)
tree783c2523980e27d9fcbc1be79fab97ca15635101 /Makefile
parentkbuild: get rid of duplication in *.mod files (diff)
downloadlinux-fc93a4cdce1db7568fcdff608924324f5754efe5.tar.xz
linux-fc93a4cdce1db7568fcdff608924324f5754efe5.zip
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>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile3
1 files changed, 2 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 82ee893909e9..e915aacd02b0 100644
--- a/Makefile
+++ b/Makefile
@@ -1792,7 +1792,8 @@ ifdef single-build
# .ko is special because modpost is needed
single-ko := $(sort $(filter %.ko, $(MAKECMDGOALS)))
-single-no-ko := $(sort $(patsubst %.ko,%.mod, $(MAKECMDGOALS)))
+single-no-ko := $(filter-out $(single-ko), $(MAKECMDGOALS)) \
+ $(foreach x, o mod, $(patsubst %.ko, %.$x, $(single-ko)))
$(single-ko): single_modpost
@: