From 290d8737d2deeb0b6dbb8bbb15bbb275bb098759 Mon Sep 17 00:00:00 2001 From: Angel Montero Date: Wed, 8 Jan 2025 20:58:32 +0000 Subject: [PATCH] put all of -extldflags and its options in quotes --- Makefile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index 20b706c8840..9fc8d79b5eb 100644 --- a/Makefile +++ b/Makefile @@ -74,10 +74,10 @@ endif # when build for local development (`LOCAL=true make install` can skip license check) $(BUILD_DIR)/$(PROJECT): $(EMBEDDED_FILES_CHECK) $(GO_FILES) $(BUILD_DIR) - $(eval ldflags = $(GO_LDFLAGS) $(patsubst %,-extldflags "%",$(LDFLAGS_$(GOOS)))) + $(eval ldflags = $(GO_LDFLAGS) $(patsubst %,'-extldflags %',$(LDFLAGS_$(GOOS)))) $(eval tags = $(GO_BUILD_TAGS) $(GO_BUILD_TAGS_$(GOOS)) $(GO_BUILD_TAGS_$(GOOS)_$(GOARCH))) GOOS=$(GOOS) GOARCH=$(GOARCH) CGO_ENABLED=1 \ - go build -mod="vendor" -gcflags="all=-N -l" -tags "$(tags)" -ldflags '$(ldflags)' -o $@ $(BUILD_PACKAGE) + go build -mod="vendor" -gcflags="all=-N -l" -tags "$(tags)" -ldflags "$(ldflags)" -o $@ $(BUILD_PACKAGE) ifeq ($(GOOS),darwin) codesign --force --deep --sign - $@ endif @@ -96,9 +96,9 @@ cross: $(foreach platform, $(SUPPORTED_PLATFORMS), $(BUILD_DIR)/$(PROJECT)-$(pla $(BUILD_DIR)/$(PROJECT)-%: $(EMBEDDED_FILES_CHECK) $(GO_FILES) $(BUILD_DIR) $(eval os = $(firstword $(subst -, ,$*))) $(eval arch = $(lastword $(subst -, ,$(subst .exe,,$*)))) - $(eval ldflags = $(GO_LDFLAGS) $(patsubst %,-extldflags "%",$(LDFLAGS_$(os)))) + $(eval ldflags = $(GO_LDFLAGS) $(patsubst %,'-extldflags %',$(LDFLAGS_$(os)))) $(eval tags = $(GO_BUILD_TAGS) $(GO_BUILD_TAGS_$(os)) $(GO_BUILD_TAGS_$(os)_$(arch))) - GOOS=$(os) GOARCH=$(arch) CGO_ENABLED=1 go build -mod="vendor" -tags "$(tags)" -ldflags '$(ldflags)' -o $@ ./cmd/skaffold + GOOS=$(os) GOARCH=$(arch) CGO_ENABLED=1 go build -mod="vendor" -tags "$(tags)" -ldflags "$(ldflags)" -o $@ ./cmd/skaffold (cd `dirname $@`; shasum -a 256 `basename $@`) | tee $@.sha256 file $@ || true