mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-23 12:14:10 +08:00
kbuild: remove sed command from cmd_ar_builtin
Replace a pipeline of echo and sed with printf to decrease process forks. Signed-off-by: Masahiro Yamada <masahiroy@kernel.org> Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
This commit is contained in:
parent
31f6d95c2c
commit
5439d4d4dc
@ -358,9 +358,8 @@ $(subdir-modorder): $(obj)/%/modules.order: $(obj)/% ;
|
|||||||
|
|
||||||
quiet_cmd_ar_builtin = AR $@
|
quiet_cmd_ar_builtin = AR $@
|
||||||
cmd_ar_builtin = rm -f $@; \
|
cmd_ar_builtin = rm -f $@; \
|
||||||
echo $(patsubst $(obj)/%,%,$(real-prereqs)) | \
|
$(if $(real-prereqs), printf "$(obj)/%s " $(patsubst $(obj)/%,%,$(real-prereqs)) | xargs) \
|
||||||
sed -E 's:([^ ]+):$(obj)/\1:g' | \
|
$(AR) cDPrST $@
|
||||||
xargs $(AR) cDPrST $@
|
|
||||||
|
|
||||||
$(obj)/built-in.a: $(real-obj-y) FORCE
|
$(obj)/built-in.a: $(real-obj-y) FORCE
|
||||||
$(call if_changed,ar_builtin)
|
$(call if_changed,ar_builtin)
|
||||||
|
Loading…
Reference in New Issue
Block a user