Skip to content

Commit

Permalink
Makefile: Avoid non-portable GNU sed extension
Browse files Browse the repository at this point in the history
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 4e65ca0
("efi_loader: bootmgr: add booting from removable media").

Fixes: f7691a6 ("sandbox: allow cross-compiling sandbox")
Signed-off-by: Mark Kettenis <kettenis@openbsd.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
  • Loading branch information
kettenis authored and xypron committed May 7, 2022
1 parent 145921b commit 1a16e66
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down

0 comments on commit 1a16e66

Please sign in to comment.