Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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: Masahiro Yamada <yamada.masahiro@socionext.com>

+7 -8
-3
arch/s390/boot/Makefile
··· 57 57 $(obj)/compressed/vmlinux: $(obj)/startup.a FORCE 58 58 $(Q)$(MAKE) $(build)=$(obj)/compressed $@ 59 59 60 - quiet_cmd_ar = AR $@ 61 - cmd_ar = rm -f $@; $(AR) rcsTP$(KBUILD_ARFLAGS) $@ $(real-prereqs) 62 - 63 60 $(obj)/startup.a: $(OBJECTS) FORCE 64 61 $(call if_changed,ar) 65 62
+1 -5
scripts/Makefile.build
··· 426 426 # Rule to compile a set of .o files into one .a file (with symbol table) 427 427 # 428 428 ifdef lib-target 429 - quiet_cmd_link_l_target = AR $@ 430 - 431 - # lib target archives do get a symbol table and index 432 - cmd_link_l_target = rm -f $@; $(AR) rcsTP$(KBUILD_ARFLAGS) $@ $(real-prereqs) 433 429 434 430 $(lib-target): $(lib-y) FORCE 435 - $(call if_changed,link_l_target) 431 + $(call if_changed,ar) 436 432 437 433 targets += $(lib-target) 438 434
+6
scripts/Makefile.lib
··· 233 233 quiet_cmd_ld = LD $@ 234 234 cmd_ld = $(LD) $(ld_flags) $(real-prereqs) -o $@ 235 235 236 + # Archive 237 + # --------------------------------------------------------------------------- 238 + 239 + quiet_cmd_ar = AR $@ 240 + cmd_ar = rm -f $@; $(AR) rcsTP$(KBUILD_ARFLAGS) $@ $(real-prereqs) 241 + 236 242 # Objcopy 237 243 # --------------------------------------------------------------------------- 238 244