Makefile.modfinal (976e3645923bdd2fe7893aae33fd7a21098bfb28) Makefile.modfinal (596b0474d3d9b1242eab713f84d8873f9887d980)
1# SPDX-License-Identifier: GPL-2.0-only
2# ===========================================================================
3# Module final link
4# ===========================================================================
5
6PHONY := __modfinal
7__modfinal:
8

--- 19 unchanged lines hidden (view full) ---

28 $(call if_changed_dep,cc_o_c)
29
30ARCH_POSTLINK := $(wildcard $(srctree)/arch/$(SRCARCH)/Makefile.postlink)
31
32quiet_cmd_ld_ko_o = LD [M] $@
33 cmd_ld_ko_o = \
34 $(LD) -r $(KBUILD_LDFLAGS) \
35 $(KBUILD_LDFLAGS_MODULE) $(LDFLAGS_MODULE) \
1# SPDX-License-Identifier: GPL-2.0-only
2# ===========================================================================
3# Module final link
4# ===========================================================================
5
6PHONY := __modfinal
7__modfinal:
8

--- 19 unchanged lines hidden (view full) ---

28 $(call if_changed_dep,cc_o_c)
29
30ARCH_POSTLINK := $(wildcard $(srctree)/arch/$(SRCARCH)/Makefile.postlink)
31
32quiet_cmd_ld_ko_o = LD [M] $@
33 cmd_ld_ko_o = \
34 $(LD) -r $(KBUILD_LDFLAGS) \
35 $(KBUILD_LDFLAGS_MODULE) $(LDFLAGS_MODULE) \
36 $(addprefix -T , $(KBUILD_LDS_MODULE)) \
37 -o $@ $(filter %.o, $^); \
36 -T scripts/module.lds -o $@ $(filter %.o, $^); \
38 $(if $(ARCH_POSTLINK), $(MAKE) -f $(ARCH_POSTLINK) $@, true)
39
37 $(if $(ARCH_POSTLINK), $(MAKE) -f $(ARCH_POSTLINK) $@, true)
38
40$(modules): %.ko: %.o %.mod.o $(KBUILD_LDS_MODULE) FORCE
39$(modules): %.ko: %.o %.mod.o scripts/module.lds FORCE
41 +$(call if_changed,ld_ko_o)
42
43targets += $(modules) $(modules:.ko=.mod.o)
44
45# Add FORCE to the prequisites of a target to force it to be always rebuilt.
46# ---------------------------------------------------------------------------
47
48PHONY += FORCE

--- 12 unchanged lines hidden ---
40 +$(call if_changed,ld_ko_o)
41
42targets += $(modules) $(modules:.ko=.mod.o)
43
44# Add FORCE to the prequisites of a target to force it to be always rebuilt.
45# ---------------------------------------------------------------------------
46
47PHONY += FORCE

--- 12 unchanged lines hidden ---