diff --git a/Makefile b/Makefile index 88b751c9..2f25115e 100644 --- a/Makefile +++ b/Makefile @@ -42,14 +42,14 @@ cross: $(BUILD_DIR) ## Cross-compile go binaries using CGO. # - `-linkmode external -extldflags "-static-libgo"` allows dynamic linking. echo "Building $(BIN_NAME)_$(GIT_TAG)_linux_arm64..." CC=aarch64-linux-gnu-gcc CGO_ENABLED=1 GOOS=linux GOARCH=arm64 go build \ - -ldflags '$(VERSION_FLAGS) -s -w -linkmode external -extldflags "-static-libgo"' \ + -ldflags '$(VERSION_FLAGS) -s -w -linkmode external -extldflags "-static"' \ -tags netgo \ -o $(BUILD_DIR)/$(BIN_NAME)_$(GIT_TAG)_linux_arm64 \ main.go echo "Building $(BIN_NAME)_$(GIT_TAG)_linux_amd64..." CGO_ENABLED=1 GOOS=linux GOARCH=amd64 go build \ - -ldflags '$(VERSION_FLAGS) -s -w -linkmode external -extldflags "-static-libgo"' \ + -ldflags '$(VERSION_FLAGS) -s -w -linkmode external -extldflags "-static"' \ -tags netgo \ -o $(BUILD_DIR)/$(BIN_NAME)_$(GIT_TAG)_linux_amd64 \ main.go