From 53a69a228a5c65671fd788e7dc3e6a5a9405965c Mon Sep 17 00:00:00 2001 From: PaulC <212168+paulc@users.noreply.github.com> Date: Mon, 1 Mar 2021 17:43:08 +0000 Subject: [PATCH] Issue #285 - Makefile does not detect TARGET_ARCH correctly on FreeBSD (#325) * Issue-285: Detect TARGET_ARCH correctly for FreeBSD amd64 (uname -m returns amd64 not x86_64) See: https://github.com/cloudflare/cloudflared/issues/285 * Add note not to `go get github.com/BurntSushi/go-sumtype` in build directory as this will cause vendor issues Co-authored-by: PaulC --- Makefile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index a27f11e6..8136d8ba 100644 --- a/Makefile +++ b/Makefile @@ -34,6 +34,8 @@ ifneq ($(GOARCH),) TARGET_ARCH ?= $(GOARCH) else ifeq ($(LOCAL_ARCH),x86_64) TARGET_ARCH ?= amd64 +else ifeq ($(LOCAL_ARCH),amd64) + TARGET_ARCH ?= amd64 else ifeq ($(LOCAL_ARCH),i686) TARGET_ARCH ?= amd64 else ifeq ($(shell echo $(LOCAL_ARCH) | head -c 5),armv8) @@ -236,7 +238,7 @@ tunnelrpc/tunnelrpc.capnp.go: tunnelrpc/tunnelrpc.capnp .PHONY: vet vet: go vet -mod=vendor ./... - which go-sumtype # go get github.com/BurntSushi/go-sumtype + which go-sumtype # go get github.com/BurntSushi/go-sumtype (don't do this in build directory or this will cause vendor issues) go-sumtype $$(go list -mod=vendor ./...) .PHONY: msi