[v2 06/22] Makefile: Fix calling make with V=1

Siew Chin Lim elly.siew.chin.lim at intel.com
Tue Nov 10 06:55:17 CET 2020


From: Pali Rohár <pali at kernel.org>

Calling 'make V=1 all' on Ubuntu 18.04 with gcc version 9.2.1 and GNU Make
version 4.1 fails on error:

    scripts/Kbuild.include:220: *** Recursive variable 'echo-cmd' references itself (eventually).  Stop.

As a workaround expand 'echo-cmd' variable via 'call' construction instead
of expanding it directly.

Signed-off-by: Pali Rohár <pali at kernel.org>
Reported-by: Patrick Delaunay <patrick.delaunay at st.com>
Reviewed-by: Patrick Delaunay <patrick.delaunay at st.com>
Fixes: ae897022d7bd ("Makefile: Fix u-boot-nodtb.bin target")
---
 Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Makefile b/Makefile
index 89c42c1024..59ba3330cd 100644
--- a/Makefile
+++ b/Makefile
@@ -1309,7 +1309,7 @@ init_sp_bss_offset_check: u-boot.dtb FORCE
 	fi
 endif
 
-shell_cmd = { $(echo-cmd) $(cmd_$(1)); }
+shell_cmd = { $(call echo-cmd,$(1)) $(cmd_$(1)); }
 
 quiet_cmd_objcopy_uboot = OBJCOPY $@
 cmd_objcopy_uboot = $(cmd_objcopy) && $(call shell_cmd,static_rela,$<,$@,$(CONFIG_SYS_TEXT_BASE)) || rm -f $@
-- 
2.13.0



More information about the U-Boot mailing list