[PATCH] Makefile: Match the full path to ccache for filtering

One can use ccache by keeping ccache in PATH or by providing the full path to ccache as well. Providing the full path to ccache fails as the current regex tries to look for ccache being the initial token during filtering.
Do a greedy search to remove anything before ccache for regex matching.
Fixes: 04b1d84221d5 ("Makefile: fix empty MK_ARCH when using ccache") Signed-off-by: Manorit Chawdhry m-chawdhry@ti.com --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Makefile b/Makefile index 2e49f6088ccd7d281ace651a011149418e1d5c9b..70ed4983aa4a1a45fa32b5718705e3936b6d428d 100644 --- a/Makefile +++ b/Makefile @@ -21,7 +21,7 @@ include include/host_arch.h ifeq ("", "$(CROSS_COMPILE)") MK_ARCH="${shell uname -m}" else - MK_ARCH="${shell echo $(CROSS_COMPILE) | sed -n 's/^(ccache){0,1}[[:space:]]*([^/]*/)*([^-]*)-[^[:space:]]*/\3/p'}" + MK_ARCH="${shell echo $(CROSS_COMPILE) | sed -n 's/^(.*ccache){0,1}[[:space:]]*([^/]*/)*([^-]*)-[^[:space:]]*/\3/p'}" endif unexport HOST_ARCH ifeq ("x86_64", $(MK_ARCH))
--- base-commit: b841e559cd26ffcb20f22e8ee75debed9616c002 change-id: 20241210-b4-upstream-fix-ccache-663fdc31fc1f
Best regards,

On Tue, 10 Dec 2024 14:46:45 +0530, Manorit Chawdhry wrote:
One can use ccache by keeping ccache in PATH or by providing the full path to ccache as well. Providing the full path to ccache fails as the current regex tries to look for ccache being the initial token during filtering.
Do a greedy search to remove anything before ccache for regex matching.
[...]
Applied to u-boot/master, thanks!
participants (2)
-
Manorit Chawdhry
-
Tom Rini