diff --git a/GNUmakefile b/GNUmakefile index 6da9a80b20e..dc301eb8bdb 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -65,7 +65,6 @@ TOYBOX_SRC := $(TOYBOX_ROOT)/toybox-$(TOYBOX_VER) # Detect the target system # See https://doc.rust-lang.org/beta/rustc/platform-support.html -# todo: support building wasm OS := $(or $(CARGO_BUILD_TARGET),$(shell rustc --print host-tuple)) # hardlinks are better default since @@ -79,11 +78,18 @@ SELINUX_PROGS := \ $(info Detected OS = $(OS)) -ifeq (,$(findstring windows,$(OS))) - FEATURE_EXTRACT_UTILS := feat_os_unix -else +ifneq (,$(findstring windows,$(OS))) FEATURE_EXTRACT_UTILS := windows +else ifneq (,$(findstring openbsd,$(OS))) + FEATURE_EXTRACT_UTILS := feat_Tier1,feat_require_unix +else ifneq (,$(findstring redox,$(OS))) + FEATURE_EXTRACT_UTILS := feat_os_unix_redox +else ifneq (,$(findstring wasip,$(OS))) + FEATURE_EXTRACT_UTILS := feat_wasm +else + FEATURE_EXTRACT_UTILS := feat_os_unix endif + PROGS := $(shell cargo tree --depth 1 --features $(FEATURE_EXTRACT_UTILS) --format "{lib}" --prefix none | sed -n 's/^uu_//p') ifeq ($(SELINUX_ENABLED),1) diff --git a/util/show-utils.sh b/util/show-utils.sh index ce11ad1a675..6cb39178606 100755 --- a/util/show-utils.sh +++ b/util/show-utils.sh @@ -1,4 +1,5 @@ #!/usr/bin/env bash +# This script was deprecated. Thus, new scripts should not use this. set -eo pipefail @@ -9,6 +10,8 @@ if test "$*";then else CARGO_BUILD_TARGET="${CARGO_BUILD_TARGET:-$(rustc --print host-tuple)}" case "$CARGO_BUILD_TARGET" in + *openbsd*) _args=("--features=feat_Tier1,feat_require_unix");; + *redox*) _args=("--features=feat_os_unix_redox");; *windows*) _args=("--features=windows");; *wasip*) _args=("--features=feat_wasm");; *android*) _args=("--features=feat_os_unix_android,feat_require_selinux");;