Commit 898f5a00 authored by Masahiro Yamada's avatar Masahiro Yamada

kbuild: move archive command to scripts/Makefile.lib

scripts/Makefile.build and arch/s390/boot/Makefile use the same
command (thin archiving with symbol table creation).

Avoid the code duplication, and move it to scripts/Makefile.lib.
Signed-off-by: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
parent 46c7dd56
...@@ -57,9 +57,6 @@ $(obj)/section_cmp%: vmlinux $(obj)/compressed/vmlinux FORCE ...@@ -57,9 +57,6 @@ $(obj)/section_cmp%: vmlinux $(obj)/compressed/vmlinux FORCE
$(obj)/compressed/vmlinux: $(obj)/startup.a FORCE $(obj)/compressed/vmlinux: $(obj)/startup.a FORCE
$(Q)$(MAKE) $(build)=$(obj)/compressed $@ $(Q)$(MAKE) $(build)=$(obj)/compressed $@
quiet_cmd_ar = AR $@
cmd_ar = rm -f $@; $(AR) rcsTP$(KBUILD_ARFLAGS) $@ $(real-prereqs)
$(obj)/startup.a: $(OBJECTS) FORCE $(obj)/startup.a: $(OBJECTS) FORCE
$(call if_changed,ar) $(call if_changed,ar)
......
...@@ -426,13 +426,9 @@ $(modorder-target): $(subdir-ym) FORCE ...@@ -426,13 +426,9 @@ $(modorder-target): $(subdir-ym) FORCE
# Rule to compile a set of .o files into one .a file (with symbol table) # Rule to compile a set of .o files into one .a file (with symbol table)
# #
ifdef lib-target ifdef lib-target
quiet_cmd_link_l_target = AR $@
# lib target archives do get a symbol table and index
cmd_link_l_target = rm -f $@; $(AR) rcsTP$(KBUILD_ARFLAGS) $@ $(real-prereqs)
$(lib-target): $(lib-y) FORCE $(lib-target): $(lib-y) FORCE
$(call if_changed,link_l_target) $(call if_changed,ar)
targets += $(lib-target) targets += $(lib-target)
......
...@@ -233,6 +233,12 @@ $(obj)/%: $(src)/%_shipped ...@@ -233,6 +233,12 @@ $(obj)/%: $(src)/%_shipped
quiet_cmd_ld = LD $@ quiet_cmd_ld = LD $@
cmd_ld = $(LD) $(ld_flags) $(real-prereqs) -o $@ cmd_ld = $(LD) $(ld_flags) $(real-prereqs) -o $@
# Archive
# ---------------------------------------------------------------------------
quiet_cmd_ar = AR $@
cmd_ar = rm -f $@; $(AR) rcsTP$(KBUILD_ARFLAGS) $@ $(real-prereqs)
# Objcopy # Objcopy
# --------------------------------------------------------------------------- # ---------------------------------------------------------------------------
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment