[PATCH 10/24] kbuild: move archive command to scripts/Makefile.lib
Ilias Apalodimas
ilias.apalodimas at linaro.org
Tue May 20 07:21:21 CEST 2025
Backport from kernel
commit 898f5a009f22 ("kbuild: move archive command to scripts/Makefile.lib")
Signed-off-by: Ilias Apalodimas <ilias.apalodimas at linaro.org>
---
scripts/Makefile.build | 4 +---
scripts/Makefile.lib | 5 +++++
2 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/scripts/Makefile.build b/scripts/Makefile.build
index 73e1d71e30df..d90b0b7aa6a0 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 28295c7ff125..c441be352da1 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
# ---------------------------------------------------------------------------
--
2.49.0
More information about the U-Boot
mailing list