• Home
  • Raw
  • Download

Lines Matching +full:ext +full:- +full:gen

1 # SPDX-License-Identifier: GPL-2.0
22 # - Kernel release
23 # - SMP is CONFIG_SMP
24 # - PREEMPT is CONFIG_PREEMPT[_RT]
25 # - GCC Version
27 # - Module version (MODULE_VERSION)
28 # - Module alias'es (MODULE_ALIAS)
29 # - Module license (MODULE_LICENSE)
30 # - See include/linux/module.h for more details
50 $(if $(CONFIG_MODVERSIONS),-m) \
51 $(if $(CONFIG_MODULE_SRCVERSION_ALL),-a) \
52 $(if $(CONFIG_SECTION_MISMATCH_WARN_ONLY),,-E) \
53 $(if $(KBUILD_MODPOST_WARN),-w) \
54 -o $@
70 input-symdump := vmlinux.symvers
71 output-symdump := modules-only.symvers
73 quiet_cmd_cat = GEN $@
74 cmd_cat = cat $(real-prereqs) > $@
79 Module.symvers: vmlinux.symvers modules-only.symvers FORCE
88 # set src + obj - they may be used in the modules's Makefile
97 MODPOST += -e
99 input-symdump := Module.symvers $(KBUILD_EXTRA_SYMBOLS)
100 output-symdump := $(KBUILD_EXTMOD)/Module.symvers
104 # modpost options for modules (both in-kernel and external)
106 $(addprefix -i ,$(wildcard $(input-symdump))) \
107 $(if $(KBUILD_NSDEPS),-d $(MODULES_NSDEPS)) \
108 $(if $(CONFIG_MODULE_ALLOW_MISSING_NAMESPACE_IMPORTS)$(KBUILD_NSDEPS),-N)
110 # 'make -i -k' ignores compile errors, and builds as many modules as possible.
111 ifneq ($(findstring i,$(filter-out --%,$(MAKEFLAGS))),)
112 MODPOST += -n
117 $(input-symdump):
124 prelink-ext := .lto
128 $(LD) $(ld_flags) -r -o $@ \
129 $(shell [ -s $(@:.lto.o=.o.symversions) ] && \
130 echo -T $(@:.lto.o=.o.symversions)) \
131 --whole-archive $^
142 cmd_modpost = sed 's/\.ko$$/$(prelink-ext)\.o/' $< | $(MODPOST) -T -
144 $(output-symdump): $(MODORDER) $(input-symdump) $(modules:.ko=$(prelink-ext).o) FORCE
147 targets += $(output-symdump)
149 __modpost: $(output-symdump)
151 $(Q)$(MAKE) -f $(srctree)/scripts/Makefile.modfinal
157 existing-targets := $(wildcard $(sort $(targets)))
159 -include $(foreach f,$(existing-targets),$(dir $(f)).$(notdir $(f)).cmd)