[PATCH] Kbuild: use printf for as-instr

Rouven Czerwinski r.czerwinski at pengutronix.de
Thu Jan 20 00:46:51 PST 2022


Instead of hard coding /bin/echo, port the upstream printf formatting.

Signed-off-by: Rouven Czerwinski <r.czerwinski at pengutronix.de>
---
 scripts/Kbuild.include | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/Kbuild.include b/scripts/Kbuild.include
index 838ab11e7c..ab092e455c 100644
--- a/scripts/Kbuild.include
+++ b/scripts/Kbuild.include
@@ -111,7 +111,7 @@ as-option = $(call try-run,\
 # Usage: cflags-y += $(call as-instr,instr,option1,option2)
 
 as-instr = $(call try-run,\
-	/bin/echo -e "$(1)" | $(CC) $(KBUILD_AFLAGS) -c -xassembler -o "$$TMP" -,$(2),$(3))
+	printf "%b\n" "$(1)" | $(CC) $(KBUILD_AFLAGS) -c -xassembler -o "$$TMP" -,$(2),$(3))
 
 # cc-option
 # Usage: cflags-y += $(call cc-option,-march=winchip-c6,-march=i586)
-- 
2.34.1




More information about the barebox mailing list