diff --git a/Makefile b/Makefile index 873b8bfb..6fff23b5 100644 --- a/Makefile +++ b/Makefile @@ -63,10 +63,18 @@ ldflags = -X github.com/cosmos/cosmos-sdk/version.Name=fetch \ ifeq ($(WITH_CLEVELDB),yes) ldflags += -X github.com/cosmos/cosmos-sdk/types.DBBackend=cleveldb endif + +# PIE is enabled for all builds. +# +# PIE and static linking are *independent* properties: +# -buildmode=pie -> position-independent executable (platform *independent*) +# -static-pie -> *Linux* only *static* linking of the PIE executable +buildmode_flags += -buildmode=pie + ldflags += $(LDFLAGS) ldflags := $(strip $(ldflags)) -BUILD_FLAGS := -tags $(build_tags_comma_sep) -ldflags '$(ldflags)' -trimpath +BUILD_FLAGS := -tags $(build_tags_comma_sep) -ldflags '$(ldflags)' -trimpath $(buildmode_flags) # The below include contains the tools target. #include contrib/devtools/Makefile @@ -152,6 +160,7 @@ $(TEST_TARGETS): run-tests SUB_MODULES = $(shell find . -type f -name 'go.mod' -print0 | xargs -0 -n1 dirname | sort) CURRENT_DIR = $(shell pwd) + run-tests: ifneq (,$(shell which tparse 2>/dev/null)) @echo "Unit tests"; \ @@ -190,7 +199,7 @@ localnet-start: build-linux localnet-stop @if ! [ -f build/node0/fetchd/config/genesis.json ]; then docker run --rm -v $(CURDIR)/build:/fetchd:Z tendermint/fetchdnode testnet --v 4 -o . --starting-ip-address 192.168.10.2 ; fi docker-compose up -d -# Stop testnet +# Stop local testnet localnet-stop: docker-compose down @@ -253,4 +262,6 @@ proto-update-deps: @mkdir -p $(COSMOS_PROTO_TYPES)/base/query/v1beta1/ @curl -sSL $(COSMOS_PROTO_URL)/base/query/v1beta1/pagination.proto > $(COSMOS_PROTO_TYPES)/base/query/v1beta1/pagination.proto + + @mkdir -p $(COSMOS_PROTO_TYPES)/base/v1beta1/ @curl -sSL $(COSMOS_PROTO_URL)/base/v1beta1/coin.proto > $(COSMOS_PROTO_TYPES)/base/v1beta1/coin.proto