kbuild: move archive command to scripts/Makefile.lib

Backport from kernel
commit 898f5a009f22 ("kbuild: move archive command to scripts/Makefile.lib")

Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
This commit is contained in:
Ilias Apalodimas
2025-05-20 08:21:21 +03:00
committed by Tom Rini
parent 603a4ade16
commit 47a4770c7a
2 changed files with 6 additions and 3 deletions

View File

@@ -355,11 +355,9 @@ $(modorder-target): $(subdir-ym) FORCE
# Rule to compile a set of .o files into one .a file
#
ifdef lib-target
quiet_cmd_link_l_target = AR $@
cmd_link_l_target = rm -f $@; $(AR) rcsTP$(KBUILD_ARFLAGS) $@ $(real-prereqs)
$(lib-target): $(lib-y) FORCE
$(call if_changed,link_l_target)
$(call if_changed,ar)
targets += $(lib-target)
endif

View File

@@ -278,6 +278,11 @@ $(obj)/%: $(src)/%_shipped
quiet_cmd_ld = LD $@
cmd_ld = $(LD) $(ld_flags) $(filter-out FORCE,$^) -o $@
# Archive
# ---------------------------------------------------------------------------
quiet_cmd_ar = AR $@
cmd_ar = rm -f $@; $(AR) rcsTP$(KBUILD_ARFLAGS) $@ $(real-prereqs)
# Objcopy
# ---------------------------------------------------------------------------