From 6772dcc141038519285ad5343f04e9fb5b7d10e0 Mon Sep 17 00:00:00 2001 From: Ard Biesheuvel Date: Tue, 6 Apr 2021 15:53:15 +0200 Subject: [PATCH] ANDROID: kbuild: lto: permit the use of .a archives in LTO modules Permit the use of AR archives in .a format as input to the partial link that produces a kernel module. This permits a set of builtin objects to be bundled with a module object, to create a single module carrying the payload of several modules. This is used by the FIPS 140 module. Bug: 153614920 Bug: 188620248 Change-Id: I7183e6922a03aed498f947062bf0d36709371294 Signed-off-by: Ard Biesheuvel --- scripts/Makefile.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/Makefile.build b/scripts/Makefile.build index 3f6bf0ea7c0e..a4b050588edf 100644 --- a/scripts/Makefile.build +++ b/scripts/Makefile.build @@ -439,7 +439,7 @@ quiet_cmd_link_multi-m = AR [M] $@ cmd_link_multi-m = \ $(cmd_update_lto_symversions); \ rm -f $@; \ - $(AR) cDPrsT $@ $(filter %.o,$^) + $(AR) cDPrsT $@ $(filter %.o %.a,$^) else quiet_cmd_link_multi-m = LD [M] $@ cmd_link_multi-m = $(LD) $(ld_flags) -r -o $@ $(filter %.o,$^)