From b74cda02437e20001bcc4d116ac95b96b3a4ec8d Mon Sep 17 00:00:00 2001 From: Jose Carlos Venegas Munoz Date: Wed, 19 Feb 2020 16:49:40 +0000 Subject: [PATCH] makefile: do not use LDFLAGS for extra kata flags. Some flags defined by the host may not be compatible with golang, not use LDFLAGS but use our own variable. Fixes: #2478 Signed-off-by: Jose Carlos Venegas Munoz --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index ed37020484..ab4b46fdea 100644 --- a/Makefile +++ b/Makefile @@ -465,7 +465,7 @@ BUILDFLAGS := -buildmode=pie # whether stipping the binary ifeq ($(STRIP),yes) - LDFLAGS := -ldflags "-w -s" + KATA_LDFLAGS := -ldflags "-w -s" endif # Return non-empty string if specified directory exists @@ -495,7 +495,7 @@ containerd-shim-v2: $(SHIMV2_OUTPUT) netmon: $(NETMON_TARGET_OUTPUT) $(NETMON_TARGET_OUTPUT): $(SOURCES) VERSION - $(QUIET_BUILD)(cd $(NETMON_DIR) && go build $(BUILDFLAGS) -o $@ -ldflags "-X main.version=$(VERSION)" $(LDFLAGS)) + $(QUIET_BUILD)(cd $(NETMON_DIR) && go build $(BUILDFLAGS) -o $@ -ldflags "-X main.version=$(VERSION)" $(KATA_LDFLAGS)) runtime: $(TARGET_OUTPUT) $(CONFIGS) .DEFAULT: default