Add buildmode=pie to makefile

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
This commit is contained in:
Michael Crosby
2017-10-26 13:34:16 -04:00
parent 8c77d9ac72
commit b8c4d85564
6 changed files with 10 additions and 6 deletions

View File

@@ -1,7 +1,12 @@
#linux specific settings
COMMANDS += containerd-shim
# check GOOS for cross compile builds
ifeq ($(GOOS),linux)
GO_GCFLAGS= -buildmode=pie
endif
# amd64 supports go test -race
ifeq ("amd64", $(GOARCH))
ifeq ($(GOARCH),amd64)
TESTFLAGS_RACE= -race
endif