summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorIlias Apalodimas <[email protected]>2025-05-20 08:21:21 +0300
committerTom Rini <[email protected]>2025-05-29 18:42:37 -0600
commit47a4770c7a2f6dab7ada9ba77b12bd41939db551 (patch)
tree92402696b96b8b4cb6264c09177194e9b60368c9 /scripts
parent603a4ade16069851b6005591426e36edd9c465cc (diff)
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 <[email protected]>
Diffstat (limited to 'scripts')
-rw-r--r--scripts/Makefile.build4
-rw-r--r--scripts/Makefile.lib5
2 files changed, 6 insertions, 3 deletions
diff --git a/scripts/Makefile.build b/scripts/Makefile.build
index 73e1d71e30d..d90b0b7aa6a 100644
--- a/scripts/Makefile.build
+++ b/scripts/Makefile.build
@@ -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
diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib
index 28295c7ff12..c441be352da 100644
--- a/scripts/Makefile.lib
+++ b/scripts/Makefile.lib
@@ -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
# ---------------------------------------------------------------------------