Skip to content
This repository has been archived by the owner on May 12, 2021. It is now read-only.

Commit

Permalink
makefile: do not use LDFLAGS for extra kata flags.
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
jcvenegas committed Feb 19, 2020
1 parent 44b0967 commit b74cda0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit b74cda0

Please sign in to comment.