]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
Makefile: Avoid non-portable GNU sed extension
authorMark Kettenis <kettenis@openbsd.org>
Thu, 5 May 2022 14:42:23 +0000 (16:42 +0200)
committerHeinrich Schuchardt <heinrich.schuchardt@canonical.com>
Sat, 7 May 2022 21:17:25 +0000 (23:17 +0200)
Use [:space:] instead of \s and \S in regular expression that
determines the sandbox target architecture.  Fixes the build
failure on OpenBSD introduced with commit 4e65ca00f3a3
("efi_loader: bootmgr: add booting from removable media").

Fixes: f7691a6d736b ("sandbox: allow cross-compiling sandbox")
Signed-off-by: Mark Kettenis <kettenis@openbsd.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Makefile

index ea80f00716d929029686190afd6743ef3f323954..6eceeb35b460c49f4435ecfeb8019a34ba3fba89 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/^\s*\([^\/]*\/\)*\([^-]*\)-\S*/\2/p'}"
+  MK_ARCH="${shell echo $(CROSS_COMPILE) | sed -n 's/^[[:space:]]*\([^\/]*\/\)*\([^-]*\)-[^[:space:]]*/\2/p'}"
 endif
 unexport HOST_ARCH
 ifeq ("x86_64", $(MK_ARCH))