Commit 5e18f029 authored by Masahiro Yamada's avatar Masahiro Yamada

kbuild: clean up archive rule of built-in.a

With the incremental linking entirely dropped, we can simplify
the Makefile.

While I am here, I renamed cmd_link_o_target to cmd_ar_builtin.
Signed-off-by: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
parent 7657f60e
...@@ -450,17 +450,12 @@ ifdef builtin-target ...@@ -450,17 +450,12 @@ ifdef builtin-target
# makes them small and fast, but unable to be used by the linker. # makes them small and fast, but unable to be used by the linker.
# scripts/link-vmlinux.sh builds an aggregate built-in.a with a symbol # scripts/link-vmlinux.sh builds an aggregate built-in.a with a symbol
# table and index. # table and index.
cmd_make_builtin = rm -f $@; $(AR) rcSTP$(KBUILD_ARFLAGS) quiet_cmd_ar_builtin = AR $@
cmd_make_empty_builtin = rm -f $@; $(AR) rcSTP$(KBUILD_ARFLAGS) cmd_ar_builtin = rm -f $@; \
quiet_cmd_link_o_target = AR $@ $(AR) rcSTP$(KBUILD_ARFLAGS) $@ $(filter $(real-obj-y), $^)
# If the list of objects to link is empty, just create an empty built-in.a
cmd_link_o_target = $(if $(strip $(real-obj-y)),\
$(cmd_make_builtin) $@ $(filter $(real-obj-y), $^), \
$(cmd_make_empty_builtin) $@)
$(builtin-target): $(real-obj-y) FORCE $(builtin-target): $(real-obj-y) FORCE
$(call if_changed,link_o_target) $(call if_changed,ar_builtin)
targets += $(builtin-target) targets += $(builtin-target)
endif # builtin-target endif # builtin-target
......
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