From 3ef830a49899d473af620b9657157a215d58f1ad Mon Sep 17 00:00:00 2001
From: Jerry Leung <tingfung.leung@solarwinds.com>
Date: Wed, 13 Dec 2023 16:28:17 -0800
Subject: [PATCH] Updated Makefile

---
 collector/Makefile | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/collector/Makefile b/collector/Makefile
index d50baf4b63..7b6e9d3d6e 100644
--- a/collector/Makefile
+++ b/collector/Makefile
@@ -8,7 +8,13 @@ LAYER_NAME:=otel-collector
 VERSION=$(shell cat VERSION)
 GIT_SHA=$(shell git rev-parse HEAD)
 GOARCH ?= amd64
-ARCH ?= x86_64
+
+ifeq ($(GOARCH), amd64)
+ARCH=x86_64
+else
+ARCH=$(GOARCH)
+endif
+
 GOBUILD=GO111MODULE=on CGO_ENABLED=0 installsuffix=cgo go build -trimpath
 BUILD_INFO_IMPORT_PATH=main