• 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
96 MODPOST += -e
98 input-symdump := Module.symvers $(KBUILD_EXTRA_SYMBOLS)
99 output-symdump := $(KBUILD_EXTMOD)/Module.symvers
103 # modpost options for modules (both in-kernel and external)
105 $(addprefix -i ,$(wildcard $(input-symdump))) \
106 $(if $(KBUILD_NSDEPS),-d $(MODULES_NSDEPS)) \
107 $(if $(CONFIG_MODULE_ALLOW_MISSING_NAMESPACE_IMPORTS)$(KBUILD_NSDEPS),-N)
109 # 'make -i -k' ignores compile errors, and builds as many modules as possible.
110 ifneq ($(findstring i,$(filter-out --%,$(MAKEFLAGS))),)
111 MODPOST += -n
116 $(input-symdump):
123 prelink-ext := .lto
127 $(LD) $(ld_flags) -r -o $@ \
128 $(shell [ -s $(@:.lto.o=.o.symversions) ] && \
129 echo -T $(@:.lto.o=.o.symversions)) \
130 --whole-archive $^
141 cmd_modpost = sed 's/\.ko$$/$(prelink-ext)\.o/' $< | $(MODPOST) -T -
143 $(output-symdump): $(MODORDER) $(input-symdump) $(modules:.ko=$(prelink-ext).o) FORCE
146 targets += $(output-symdump)
148 __modpost: $(output-symdump)
150 $(Q)$(MAKE) -f $(srctree)/scripts/Makefile.modfinal
156 existing-targets := $(wildcard $(sort $(targets)))
158 -include $(foreach f,$(existing-targets),$(dir $(f)).$(notdir $(f)).cmd)