]> Git Repo - J-u-boot.git/commitdiff
Makefile: avoid non-standard sed expressions
authorMark Kettenis <[email protected]>
Tue, 26 Nov 2024 19:12:14 +0000 (20:12 +0100)
committerTom Rini <[email protected]>
Sat, 30 Nov 2024 17:57:08 +0000 (11:57 -0600)
The '?' that is used in the sed expression that determines MK_ARCH
is part of the extended regular expression syntax, but the default
behaviour of sed as specified by POSIX is to use only basic regular
expression syntax.  Use the equivalent '\{0,1\}' instead as
suggested by the OpenBSD re_format(7) man page.

Fixes: 04b1d84221d5 ("Makefile: fix empty MK_ARCH when using ccache")
Signed-off-by: Mark Kettenis <[email protected]>
Reviewed-by: Marek Vasut <[email protected]>
Tested-by: Quentin Schulz <[email protected]>
Makefile

index 22953bdabd8c65fe2460749a61d7715f56a3f92d..7933ade6eff27206450d8695560fb5cacc711b3c 100644 (file)
--- 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\)\?[[: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))
This page took 0.036627 seconds and 4 git commands to generate.