Adding delay to link commands in scripts/Makefile.build

@@ -353,7 +353,7 @@ $(modorder-target): $(subdir-ym) FORCE
 #
 ifdef lib-target
 quiet_cmd_link_l_target = AR      $@
-cmd_link_l_target = rm -f $@; $(AR) cDPrsT$(KBUILD_ARFLAGS) $@ $(lib-y)
+cmd_link_l_target = rm -f $@; echo "HACK delaying lib-target"; sleep 10; $(AR) 
cDPrsT$(KBUILD_ARFLAGS) $@ $(lib-y)

 $(lib-target): $(lib-y) FORCE
        $(call if_changed,link_l_target)
(1/2) Stage this hunk [y,n,q,a,d,j,J,g,/,e,?]? n
@@ -362,7 +362,7 @@ targets += $(lib-target)
 endif

 quiet_cmd_link_multi-y = AR      $@
-cmd_link_multi-y = rm -f $@; $(AR) cDPrsT$(KBUILD_ARFLAGS) $@ $(filter %.o,$^)
+cmd_link_multi-y = rm -f $@; echo "HACK delaying cmd_link_multi-y"; sleep 10; 
$(AR) cDPrsT$(KBUILD_ARFLAGS) $@ $(filter %.o,$^)

 quiet_cmd_link_multi-m = AR [M]  $@
 cmd_link_multi-m = $(cmd_link_multi-y)

exposes a build failure:

make[3]: *** No rule to make target 'lib/efi_loader/helloworld.efi', needed by 
'__build'.  Stop.
make[3]: *** Waiting for unfinished jobs....

This if fixed by using normal targets for .efi apps. The rules
in scripts/Makefile.lib handle the dependencies correctly.

Signed-off-by: Mikko Rapeli <mikko.rap...@linaro.org>
---
 lib/efi_loader/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/efi_loader/Makefile b/lib/efi_loader/Makefile
index cf050e5385dd..e929c23b1cb1 100644
--- a/lib/efi_loader/Makefile
+++ b/lib/efi_loader/Makefile
@@ -96,5 +96,5 @@ $(foreach f,$(apps-y),\
        $(eval CFLAGS_$(f).o := $(CFLAGS_EFI) -Os -ffreestanding)\
        $(eval CFLAGS_REMOVE_$(f).o := $(CFLAGS_NON_EFI)))
 
-always += $(foreach f,$(apps-y),$(f).efi)
+targets += $(foreach f,$(apps-y),$(f).efi)
 targets += $(foreach f,$(apps-y),$(f).o)
-- 
2.43.0

Reply via email to