mirror of
https://github.com/u-boot/u-boot.git
synced 2025-04-25 23:06:15 +00:00
Makefile: fix empty MK_ARCH when using ccache
One can use ccache by prefixing the typical CROSS_COMPILE value with
"ccache " (e.g. "ccache aarch64-gnu-linux-" for Aarch64). This however
makes the MK_ARCH empty because sed won't find a match anymore since it
expects the CROSS_COMPILE value to start with the actual toolchain (with
an unlimited number of white spaces before).
This is failing builds since commit 7506c15669
("sandbox: Report host
default-filename in native mode").
Add "ccache" prefix to ignore but participate in the matching regex used
by sed to identify the target architecture.
Signed-off-by: Quentin Schulz <quentin.schulz@cherry.de>
This commit is contained in:
parent
2b14d12067
commit
04b1d84221
1 changed files with 1 additions and 1 deletions
2
Makefile
2
Makefile
|
@ -21,7 +21,7 @@ include include/host_arch.h
|
||||||
ifeq ("", "$(CROSS_COMPILE)")
|
ifeq ("", "$(CROSS_COMPILE)")
|
||||||
MK_ARCH="${shell uname -m}"
|
MK_ARCH="${shell uname -m}"
|
||||||
else
|
else
|
||||||
MK_ARCH="${shell echo $(CROSS_COMPILE) | sed -n 's/^[[:space:]]*\([^\/]*\/\)*\([^-]*\)-[^[:space:]]*/\2/p'}"
|
MK_ARCH="${shell echo $(CROSS_COMPILE) | sed -n 's/^\(ccache\)\?[[:space:]]*\([^\/]*\/\)*\([^-]*\)-[^[:space:]]*/\3/p'}"
|
||||||
endif
|
endif
|
||||||
unexport HOST_ARCH
|
unexport HOST_ARCH
|
||||||
ifeq ("x86_64", $(MK_ARCH))
|
ifeq ("x86_64", $(MK_ARCH))
|
||||||
|
|
Loading…
Add table
Reference in a new issue