From: Manorit Chawdhry Date: Tue, 10 Dec 2024 09:16:45 +0000 (+0530) Subject: Makefile: Match the full path to ccache for filtering X-Git-Url: http://git.dujemihanovic.xyz/html/%7B%7B%20%28.OutputFormats.Get?a=commitdiff_plain;h=c06705a9a13d58e799b98927c360e93954b62860;p=u-boot.git 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 --- diff --git a/Makefile b/Makefile index 2e49f6088c..70ed4983aa 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))