dynamically supply GOARCH

pull/14265/head
Sharif Elgamal 2022-05-31 17:32:36 -07:00
parent 7a0119d9cb
commit 9e78a3a817
5 changed files with 32 additions and 5 deletions

View File

@ -12,6 +12,11 @@ CNI_LICENSE_FILES = LICENSE
CNI_DEPENDENCIES = host-go
CNI_GOARCH=amd64
ifeq ($(BR2_aarch64),y)
CNI_GOARCH=arm64
endif
CNI_GOPATH = $(@D)/_output
CNI_MAKE_ENV = \
$(GO_TARGET_ENV) \
@ -20,6 +25,7 @@ CNI_MAKE_ENV = \
GOPATH="$(CNI_GOPATH)" \
GOBIN="$(CNI_GOPATH)/bin" \
PATH=$(CNI_GOPATH)/bin:$(BR_PATH) \
GOARCH=$(CNI_GOARCH)
CNI_BUILDFLAGS = -a --ldflags '-extldflags \"-static\"'

View File

@ -13,6 +13,11 @@ CRI_DOCKERD_SOURCE = $(CRI_DOCKERD_VERSION).tar.gz
CRI_DOCKERD_DEPENDENCIES = host-go
CRI_DOCKERD_GOARCH=amd64
ifeq ($(BR2_aarch64),y)
CRI_DOCKERD_GOARCH=arm64
endif
CRI_DOCKERD_GOPATH = $(@D)/_output
CRI_DOCKERD_ENV = \
$(GO_TARGET_ENV) \
@ -21,6 +26,7 @@ CRI_DOCKERD_ENV = \
GOPATH="$(CRI_DOCKERD_GOPATH)" \
GOBIN="$(CRI_DOCKERD_GOPATH)/bin" \
PATH=$(CRI_DOCKERD_GOPATH)/bin:$(BR_PATH) \
GOARCH=$(CRI_DOCKERD_GOARCH)
CRI_DOCKERD_COMPILE_SRC = $(CRI_DOCKERD_GOPATH)/src/github.com/Mirantis/cri-dockerd
CRI_DOCKERD_BUILDFLAGS = "-ldflags '-X github.com/Mirantis/cri-dockerd/version.Version=$(CRI_DOCKERD_VER) -X github.com/Mirantis/cri-dockerd/version.GitCommit=$(CRI_DOCKERD_REV)'"

View File

@ -10,14 +10,18 @@ CRIO_BIN_SITE = https://github.com/cri-o/cri-o/archive
CRIO_BIN_SOURCE = $(CRIO_BIN_VERSION).tar.gz
CRIO_BIN_DEPENDENCIES = host-go libgpgme
CRIO_BIN_GOPATH = $(@D)/_output
CRIO_BIN_GOARCH=amd64
ifeq ($(BR2_aarch64),y)
CRIO_BIN_GOARCH=arm64
endif
CRIO_BIN_ENV = \
$(GO_TARGET_ENV) \
CGO_ENABLED=1 \
GO111MODULE=off \
GOPATH="$(CRIO_BIN_GOPATH)" \
GOBIN="$(CRIO_BIN_GOPATH)/bin" \
PATH=$(CRIO_BIN_GOPATH)/bin:$(BR_PATH)
PATH=$(CRIO_BIN_GOPATH)/bin:$(BR_PATH) \
GOARCH=$(CRIO_BIN_GOARCH)
define CRIO_BIN_USERS
- -1 crio-admin -1 - - - - -

View File

@ -11,14 +11,19 @@ ifeq ($(BR2_INIT_SYSTEMD),y)
PODMAN_DEPENDENCIES += systemd
endif
PODMAN_GOARCH=amd64
ifeq ($(BR2_aarch64),y)
PODMAN_GOARCH=arm64
endif
PODMAN_GOPATH = $(@D)/_output
PODMAN_BIN_ENV = \
$(GO_TARGET_ENV) \
CGO_ENABLED=1 \
GOPATH="$(PODMAN_GOPATH)" \
GOBIN="$(PODMAN_GOPATH)/bin" \
PATH=$(PODMAN_GOPATH)/bin:$(BR_PATH)
PATH=$(PODMAN_GOPATH)/bin:$(BR_PATH) \
GOARCH=$(PODMAN_GOARCH)
define PODMAN_USERS
- -1 podman -1 - - - - -

View File

@ -13,6 +13,11 @@ RUNC_MASTER_LICENSE_FILES = LICENSE
RUNC_MASTER_DEPENDENCIES = host-go
RUNC_MASTER_GOARCH=amd64
ifeq ($(BR2_aarch64),y)
RUNC_MASTER_GOARCH=arm64
endif
RUNC_MASTER_GOPATH = $(@D)/_output
RUNC_MASTER_MAKE_ENV = \
$(GO_TARGET_ENV) \
@ -20,7 +25,8 @@ RUNC_MASTER_MAKE_ENV = \
GO111MODULE=off \
GOPATH="$(RUNC_MASTER_GOPATH)" \
GOBIN="$(RUNC_MASTER_GOPATH)/bin" \
PATH=$(RUNC_MASTER_GOPATH)/bin:$(BR_PATH)
PATH=$(RUNC_MASTER_GOPATH)/bin:$(BR_PATH) \
GOARCH=$(RUNC_MASTER_GOARCH)
RUNC_MASTER_COMPILE_SRC = $(RUNC_MASTER_GOPATH)/src/github.com/opencontainers/runc