summaryrefslogtreecommitdiff
path: root/tools/build/Makefile.build
diff options
context:
space:
mode:
Diffstat (limited to 'tools/build/Makefile.build')
-rw-r--r--tools/build/Makefile.build6
1 files changed, 4 insertions, 2 deletions
diff --git a/tools/build/Makefile.build b/tools/build/Makefile.build
index 60e65870eae1..ad69efdd4e85 100644
--- a/tools/build/Makefile.build
+++ b/tools/build/Makefile.build
@@ -70,11 +70,13 @@ quiet_cmd_gen = GEN $@
# If there's nothing to link, create empty $@ object.
quiet_cmd_ld_multi = LD $@
cmd_ld_multi = $(if $(strip $(obj-y)),\
- $(LD) -r -o $@ $(filter $(obj-y),$^),rm -f $@; $(AR) rcs $@)
+ printf "$(objprefix)%s " $(patsubst $(objprefix)%,%,$(filter $(obj-y),$^)) | \
+ xargs $(LD) -r -o $@,rm -f $@; $(AR) rcs $@)
quiet_cmd_host_ld_multi = HOSTLD $@
cmd_host_ld_multi = $(if $(strip $(obj-y)),\
- $(HOSTLD) -r -o $@ $(filter $(obj-y),$^),rm -f $@; $(HOSTAR) rcs $@)
+ printf "$(objprefix)%s " $(patsubst $(objprefix)%,%,$(filter $(obj-y),$^)) | \
+ xargs $(HOSTLD) -r -o $@,rm -f $@; $(HOSTAR) rcs $@)
rust_common_cmd = \
$(RUSTC) $(rust_flags) \