diff options
author | Masahiro Yamada <masahiroy@kernel.org> | 2022-06-14 14:51:49 +0900 |
---|---|---|
committer | Masahiro Yamada <masahiroy@kernel.org> | 2022-07-27 21:17:59 +0900 |
commit | 5439d4d4dcee548b1ad984c293225c1668045ad2 (patch) | |
tree | 96b73042f97b03f590a566894b2d3e8d4fb5abe4 /scripts | |
parent | 31f6d95c2cab1898c05a95f434f54a327431f158 (diff) | |
download | lwn-5439d4d4dcee548b1ad984c293225c1668045ad2.tar.gz lwn-5439d4d4dcee548b1ad984c293225c1668045ad2.zip |
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>
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/Makefile.build | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/scripts/Makefile.build b/scripts/Makefile.build index cac070aee791..784f46d41959 100644 --- a/scripts/Makefile.build +++ b/scripts/Makefile.build @@ -358,9 +358,8 @@ $(subdir-modorder): $(obj)/%/modules.order: $(obj)/% ; quiet_cmd_ar_builtin = AR $@ cmd_ar_builtin = rm -f $@; \ - echo $(patsubst $(obj)/%,%,$(real-prereqs)) | \ - sed -E 's:([^ ]+):$(obj)/\1:g' | \ - xargs $(AR) cDPrST $@ + $(if $(real-prereqs), printf "$(obj)/%s " $(patsubst $(obj)/%,%,$(real-prereqs)) | xargs) \ + $(AR) cDPrST $@ $(obj)/built-in.a: $(real-obj-y) FORCE $(call if_changed,ar_builtin) |