From 643005c6e9725fc2626a1e228eee03725d4a21f8 Mon Sep 17 00:00:00 2001 From: Enrico Graziani Date: Tue, 20 Jun 2023 15:42:10 +0100 Subject: [PATCH] Support cross compilation on MacOs M1 This is required in order to get an amd64 on a standard M1 i installation. Trying without the proposed changes will result in a arm64 binary called `*layer*amd64*.zip` --- collector/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/collector/Makefile b/collector/Makefile index efce3b68ee..be65b9c1b7 100644 --- a/collector/Makefile +++ b/collector/Makefile @@ -37,7 +37,7 @@ clean: build: clean @echo Building otel collector extension mkdir -p $(BUILD_SPACE)/extensions - GOOS=linux $(GOBUILD) $(LDFLAGS) -o $(BUILD_SPACE)/extensions . + GOOS=linux GOARCH=$(GOARCH) $(GOBUILD) $(LDFLAGS) -o $(BUILD_SPACE)/extensions . .PHONY: package package: build