diff --git a/Makefile b/Makefile index a280a5f1f58b..f0227f33743f 100644 --- a/Makefile +++ b/Makefile @@ -5,6 +5,7 @@ BUILD_TAGS = netgo ledger BUILD_FLAGS = -tags "${BUILD_TAGS}" -ldflags "-X github.com/cosmos/cosmos-sdk/version.GitCommit=${COMMIT_HASH}" GCC := $(shell command -v gcc 2> /dev/null) LEDGER_ENABLED ?= true +UNAME_S := $(shell uname -s) all: get_tools get_vendor_deps install install_examples install_cosmos-sdk-cli test_lint test ######################################## @@ -17,12 +18,18 @@ ci: get_tools get_vendor_deps install test_cover test_lint test check-ledger: ifeq ($(LEDGER_ENABLED),true) -ifndef GCC -$(error "gcc not installed for ledger support, please install or set LEDGER_ENABLED to false in the Makefile") -endif + ifeq ($(UNAME_S),OpenBSD) + $(info "OpenBSD detected, disabling ledger support (https://github.com/cosmos/cosmos-sdk/issues/1988)") + TMP_BUILD_TAGS := $(BUILD_TAGS) + BUILD_TAGS = $(filter-out ledger, $(TMP_BUILD_TAGS)) + else + ifndef GCC + $(error "gcc not installed for ledger support, please install or set LEDGER_ENABLED to false in the Makefile") + endif + endif else -TMP_BUILD_TAGS := $(BUILD_TAGS) -BUILD_TAGS = $(filter-out ledger, $(TMP_BUILD_TAGS)) + TMP_BUILD_TAGS := $(BUILD_TAGS) + BUILD_TAGS = $(filter-out ledger, $(TMP_BUILD_TAGS)) endif build: check-ledger diff --git a/PENDING.md b/PENDING.md index be173d531140..3279340fe87f 100644 --- a/PENDING.md +++ b/PENDING.md @@ -75,6 +75,7 @@ IMPROVEMENTS * [x/stake] \#2000 Added tests for new staking endpoints BUG FIXES +* \#1988 Make us compile on OpenBSD (disable ledger) [#1988] (https://github.com/cosmos/cosmos-sdk/issues/1988) * \#1666 Add intra-tx counter to the genesis validators * \#1797 Fix off-by-one error in slashing for downtime * \#1787 Fixed bug where Tally fails due to revoked/unbonding validator