ANDROID: Makefile.modfinal: restore postlink support for fips140.ko

Support for postlink commands was removed from scripts/Makefile.modfinal
in v6.7 due to it being unused upstream.  It is needed for fips140.ko,
so bring it back in the case where fips140.ko is enabled.

Bug: 188620248
Change-Id: Ia45d2a2e4f7bbcbdb4ddf834e41ed4bbaddde60c
Signed-off-by: Eric Biggers <ebiggers@google.com>
This commit is contained in:
Eric Biggers
2024-11-22 21:48:07 +00:00
committed by Matthias Männich
parent bf51e93edc
commit 890413e80f

View File

@@ -35,11 +35,16 @@ quiet_cmd_cc_o_c = CC [M] $@
$(extmod_prefix).module-common.o: $(srctree)/scripts/module-common.c FORCE
$(call if_changed_dep,cc_o_c)
ifdef CONFIG_CRYPTO_FIPS140_MOD
ARCH_POSTLINK := $(srctree)/arch/$(SRCARCH)/Makefile.postlink
endif
quiet_cmd_ld_ko_o = LD [M] $@
cmd_ld_ko_o = \
$(LD) -r $(KBUILD_LDFLAGS) \
$(KBUILD_LDFLAGS_MODULE) $(LDFLAGS_MODULE) \
-T scripts/module.lds -o $@ $(filter %.o, $^)
-T scripts/module.lds -o $@ $(filter %.o, $^); \
$(if $(ARCH_POSTLINK), $(MAKE) -f $(ARCH_POSTLINK) $@, true)
quiet_cmd_btf_ko = BTF [M] $@
cmd_btf_ko = \