From b6c2a605095feeb3c08126c57ee1c52928953760 Mon Sep 17 00:00:00 2001 From: bin Date: Tue, 2 Feb 2021 14:47:21 +0800 Subject: [PATCH] kata-monitor: set buildmode to exe to avoid build failing CGO_ENABLED=0 and -buildmode=pie are not compatible and may lead build failing in some OS. Specify buildmode=exe to overwrite the value set in BUILDFLAGS Fixes: #1343 Signed-off-by: bin --- src/runtime/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/runtime/Makefile b/src/runtime/Makefile index d43ca3dbf7..764c12780c 100644 --- a/src/runtime/Makefile +++ b/src/runtime/Makefile @@ -606,7 +606,7 @@ $(SHIMV2_OUTPUT): $(SOURCES) $(GENERATED_FILES) $(MAKEFILE_LIST) $(MONITOR_OUTPUT): $(SOURCES) $(GENERATED_FILES) $(MAKEFILE_LIST) .git-commit $(QUIET_BUILD)(cd $(MONITOR_DIR)/ && CGO_ENABLED=0 go build \ - --ldflags "-X main.GitCommit=$(shell cat .git-commit)" $(BUILDFLAGS) -o $@ .) + --ldflags "-X main.GitCommit=$(shell cat .git-commit)" $(BUILDFLAGS) -buildmode=exe -o $@ .) .PHONY: \ check \