History

modpost: print symbol dump file as the build target in short log

The symbol dump *.symvers is the output of modpost. Print it in the short log.

Masahiro Yamada committed 6 years ago

Commit bcfedae1 parent e3fb4df1 file · +20 −13Browse files

Showing the changes to scripts (1 of 1 file). Show all

Unified · Split

scripts/Makefile.modpost+20−13
@@ -44,25 +44,26 @@ include include/config/auto.conf · 43 unmodified lines
44include scripts/Kbuild.include44include scripts/Kbuild.include
45 45
46kernelsymfile := $(objtree)/Module.symvers46kernelsymfile := $(objtree)/Module.symvers
47modulesymfile := $(KBUILD_EXTMOD)/Module.symvers
48 47
49MODPOST = scripts/mod/modpost \48MODPOST = scripts/mod/modpost \
50 $(if $(CONFIG_MODVERSIONS),-m) \49 $(if $(CONFIG_MODVERSIONS),-m) \
51 $(if $(CONFIG_MODULE_SRCVERSION_ALL),-a) \50 $(if $(CONFIG_MODULE_SRCVERSION_ALL),-a) \
52 $(if $(KBUILD_EXTMOD),-i,-o) $(kernelsymfile) \51 $(if $(KBUILD_EXTMOD),-i $(kernelsymfile)) \
53 $(if $(KBUILD_EXTMOD),$(addprefix -i ,$(KBUILD_EXTRA_SYMBOLS))) \52 $(if $(KBUILD_EXTMOD),$(addprefix -i ,$(KBUILD_EXTRA_SYMBOLS))) \
54 $(if $(KBUILD_EXTMOD),-o $(modulesymfile)) \
55 $(if $(CONFIG_SECTION_MISMATCH_WARN_ONLY),,-E) \53 $(if $(CONFIG_SECTION_MISMATCH_WARN_ONLY),,-E) \
56 $(if $(KBUILD_MODPOST_WARN),-w)54 $(if $(KBUILD_MODPOST_WARN),-w) \
55 -o $@
57 56
58ifdef MODPOST_VMLINUX57ifdef MODPOST_VMLINUX
59 58
60quiet_cmd_modpost = MODPOST vmlinux.o59quiet_cmd_modpost = MODPOST $@
61 cmd_modpost = $(MODPOST) vmlinux.o60 cmd_modpost = $(MODPOST) $<
62 61
63__modpost:62Module.symvers: vmlinux.o
64 $(call cmd,modpost)63 $(call cmd,modpost)
65 64
65__modpost: Module.symvers
66
66else67else
67 68
68MODPOST += -s \69MODPOST += -s \
@@ -70,6 +71,8 @@ MODPOST += -s \ · 1 unmodified line
70 71
71ifeq ($(KBUILD_EXTMOD),)72ifeq ($(KBUILD_EXTMOD),)
72MODPOST += $(wildcard vmlinux)73MODPOST += $(wildcard vmlinux)
74output-symdump := Module.symvers
75
73else76else
74 77
75# set src + obj - they may be used in the modules's Makefile78# set src + obj - they may be used in the modules's Makefile
@@ -83,6 +86,8 @@ include $(if $(wildcard $(KBUILD_EXTMOD)/Kbuild), \ · 7 unmodified lines
83# modpost option for external modules86# modpost option for external modules
84MODPOST += -e87MODPOST += -e
85 88
89output-symdump := $(KBUILD_EXTMOD)/Module.symvers
90
86endif91endif
87 92
88# modpost options for modules (both in-kernel and external)93# modpost options for modules (both in-kernel and external)
@@ -94,20 +99,22 @@ ifneq ($(findstring i,$(filter-out --%,$(MAKEFLAGS))),) · 5 unmodified lines
94MODPOST += -n99MODPOST += -n
95endif100endif
96 101
97# find all modules listed in modules.order102# Read out modules.order to pass in modpost.
98modules := $(sort $(shell cat $(MODORDER)))
99
100# Read out modules.order instead of expanding $(modules) to pass in modpost.
101# Otherwise, allmodconfig would fail with "Argument list too long".103# Otherwise, allmodconfig would fail with "Argument list too long".
102quiet_cmd_modpost = MODPOST $(words $(modules)) modules104quiet_cmd_modpost = MODPOST $@
103 cmd_modpost = sed 's/ko$$/o/' $(MODORDER) | $(MODPOST) -T -105 cmd_modpost = sed 's/ko$$/o/' $(MODORDER) | $(MODPOST) -T -
104 106
105__modpost:107$(output-symdump): FORCE
106 $(call cmd,modpost)108 $(call cmd,modpost)
109
110__modpost: $(output-symdump)
107ifneq ($(KBUILD_MODPOST_NOFINAL),1)111ifneq ($(KBUILD_MODPOST_NOFINAL),1)
108 $(Q)$(MAKE) -f $(srctree)/scripts/Makefile.modfinal112 $(Q)$(MAKE) -f $(srctree)/scripts/Makefile.modfinal
109endif113endif
110 114
115PHONY += FORCE
116FORCE:
117
111endif118endif
112 119
113.PHONY: $(PHONY)120.PHONY: $(PHONY)